Repository: massCodeIO/massCode Branch: main Commit: 682b402df9c5 Files: 614 Total size: 8.2 MB Directory structure: gitextract_ny75g84n/ ├── .claude/ │ └── settings.json ├── .gemini/ │ └── settings.json ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ └── config.yml │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ ├── build-sponsored.yml │ ├── issue-close-require.yml │ ├── issue-labeled.yml │ └── release.yml ├── .gitignore ├── .prettierrc ├── AGENTS.md ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build/ │ ├── entitlements.mac.inherit.plist │ └── icons/ │ └── icon.icns ├── commitlint.config.js ├── components.json ├── electron-builder.json ├── electron-builder.sponsored.json ├── eslint.config.js ├── nodemon.json ├── package.json ├── postcss.config.js ├── scripts/ │ ├── api-generate.js │ ├── bench-load-test.js │ ├── bench-seed.js │ └── copy-locales.js ├── src/ │ ├── main/ │ │ ├── api/ │ │ │ ├── dto/ │ │ │ │ ├── common/ │ │ │ │ │ ├── query.ts │ │ │ │ │ └── response.ts │ │ │ │ ├── folders.ts │ │ │ │ ├── snippet-contents.ts │ │ │ │ ├── snippets.ts │ │ │ │ └── tags.ts │ │ │ ├── index.ts │ │ │ └── routes/ │ │ │ ├── folders.ts │ │ │ ├── snippets.ts │ │ │ ├── system.ts │ │ │ └── tags.ts │ │ ├── currencyRates.ts │ │ ├── db/ │ │ │ ├── index.ts │ │ │ ├── migrate.ts │ │ │ └── types/ │ │ │ └── index.ts │ │ ├── i18n/ │ │ │ ├── index.ts │ │ │ ├── language.ts │ │ │ └── locales/ │ │ │ ├── README.md │ │ │ ├── cs_CZ/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── de_DE/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── el_GR/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── en_US/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── es_ES/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── fa_IR/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── fr_FR/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── ja_JP/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── pl_PL/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── pt_BR/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── ro_RO/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── ru_RU/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── tr_TR/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── uk_UA/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── zh_CN/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ ├── zh_HK/ │ │ │ │ ├── devtools.json │ │ │ │ ├── menu.json │ │ │ │ ├── messages.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ └── zh_TW/ │ │ │ ├── devtools.json │ │ │ ├── menu.json │ │ │ ├── messages.json │ │ │ ├── preferences.json │ │ │ └── ui.json │ │ ├── index.ts │ │ ├── ipc/ │ │ │ ├── handlers/ │ │ │ │ ├── db.ts │ │ │ │ ├── dialog.ts │ │ │ │ ├── fs.ts │ │ │ │ ├── prettier.ts │ │ │ │ ├── spaces.ts │ │ │ │ ├── system.ts │ │ │ │ └── theme.ts │ │ │ └── index.ts │ │ ├── menu/ │ │ │ ├── main.ts │ │ │ └── utils/ │ │ │ └── index.ts │ │ ├── preload.ts │ │ ├── storage/ │ │ │ ├── contracts.ts │ │ │ ├── index.ts │ │ │ └── providers/ │ │ │ ├── markdown/ │ │ │ │ ├── index.ts │ │ │ │ ├── migrations.ts │ │ │ │ ├── runtime/ │ │ │ │ │ ├── constants.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── normalizers.ts │ │ │ │ │ ├── parser.ts │ │ │ │ │ ├── paths.ts │ │ │ │ │ ├── search.ts │ │ │ │ │ ├── snippets.ts │ │ │ │ │ ├── spaceState.ts │ │ │ │ │ ├── spaces.ts │ │ │ │ │ ├── state.ts │ │ │ │ │ ├── sync.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── validation.ts │ │ │ │ ├── storages/ │ │ │ │ │ ├── folders.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── snippets.ts │ │ │ │ │ └── tags.ts │ │ │ │ └── watcher.ts │ │ │ └── sqlite/ │ │ │ ├── folders.ts │ │ │ ├── index.ts │ │ │ ├── snippets.ts │ │ │ └── tags.ts │ │ ├── store/ │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── module/ │ │ │ │ ├── app.ts │ │ │ │ ├── currency-rates.ts │ │ │ │ ├── math-notebook.ts │ │ │ │ └── preferences.ts │ │ │ └── types/ │ │ │ ├── index.ts │ │ │ └── theme.ts │ │ ├── types/ │ │ │ ├── index.ts │ │ │ └── ipc.ts │ │ ├── updates/ │ │ │ └── index.ts │ │ └── utils/ │ │ └── index.ts │ └── renderer/ │ ├── App.vue │ ├── components/ │ │ ├── app-space-shell/ │ │ │ └── AppSpaceShell.vue │ │ ├── code-space-layout/ │ │ │ └── CodeSpaceLayout.vue │ │ ├── devtools/ │ │ │ ├── ShadcnComparison.vue │ │ │ ├── converters/ │ │ │ │ ├── Base64Converter.vue │ │ │ │ ├── CaseConverter.vue │ │ │ │ ├── ColorConverter.vue │ │ │ │ ├── JsonToToml.vue │ │ │ │ ├── JsonToXml.vue │ │ │ │ ├── JsonToYaml.vue │ │ │ │ ├── TextToAsciiBinary.vue │ │ │ │ └── TextToUnicode.vue │ │ │ ├── crypto/ │ │ │ │ ├── Hash.vue │ │ │ │ ├── Hmac.vue │ │ │ │ ├── Password.vue │ │ │ │ └── Uuid.vue │ │ │ ├── generators/ │ │ │ │ ├── JsonGenerator.vue │ │ │ │ └── LoremIpsumGenerator.vue │ │ │ ├── shadcn-comparison/ │ │ │ │ ├── RootUi.vue │ │ │ │ ├── Shadcn2.vue │ │ │ │ └── copy.ts │ │ │ └── web/ │ │ │ ├── Slugify.vue │ │ │ ├── UrlEncoder.vue │ │ │ └── UrlParser.vue │ │ ├── editor/ │ │ │ ├── Description.vue │ │ │ ├── Editor.vue │ │ │ ├── Footer.vue │ │ │ ├── Tab.vue │ │ │ ├── code-image/ │ │ │ │ ├── BackgroundSwitch.vue │ │ │ │ └── CodeImage.vue │ │ │ ├── grammars/ │ │ │ │ ├── auxiliary-grammars.ts │ │ │ │ ├── index.ts │ │ │ │ ├── languages.ts │ │ │ │ └── textmate/ │ │ │ │ ├── abap.tmLanguage.json │ │ │ │ ├── abc.tmLanguage.json │ │ │ │ ├── actionscript-3.tmLanguage.json │ │ │ │ ├── ada.tmLanguage.json │ │ │ │ ├── alda.tmLanguage.json │ │ │ │ ├── apache.tmLanguage.json │ │ │ │ ├── apex.tmLanguage.json │ │ │ │ ├── applescript.tmLanguage.json │ │ │ │ ├── arm.tmLanguage.json │ │ │ │ ├── asciidoctor.tmLanguage.json │ │ │ │ ├── asl.tmLanguage.json │ │ │ │ ├── asm.tmLanguage.json │ │ │ │ ├── asp-vb-net.tmlanguage.json │ │ │ │ ├── asymptote.tmLanguage.json │ │ │ │ ├── autohotkey.tmLanguage.json │ │ │ │ ├── batchfile.tmLanguage.json │ │ │ │ ├── bibtex.tmLanguage.json │ │ │ │ ├── bicep.tmLanguage.json │ │ │ │ ├── c.tmLanguage.json │ │ │ │ ├── cfscript.tmLanguage.json │ │ │ │ ├── cirru.tmLanguage.json │ │ │ │ ├── clojure.tmLanguage.json │ │ │ │ ├── cobol.tmLanguage.json │ │ │ │ ├── coffee.tmLanguage.json │ │ │ │ ├── coldfusion.tmLanguage.json │ │ │ │ ├── cpp-embedded-latex.tmLanguage.json │ │ │ │ ├── cpp.embedded.macro.tmLanguage.json │ │ │ │ ├── cpp.tmLanguage.json │ │ │ │ ├── crystal.tmLanguage.json │ │ │ │ ├── csharp.tmLanguage.json │ │ │ │ ├── csound-document.tmLanguage.json │ │ │ │ ├── csound-score.tmLanguage.json │ │ │ │ ├── csound.tmLanguage.json │ │ │ │ ├── css.tmLanguage.json │ │ │ │ ├── curly.tmLanguage.json │ │ │ │ ├── d.tmLanguage.json │ │ │ │ ├── dart.tmLanguage.json │ │ │ │ ├── diff.tmLanguage.json │ │ │ │ ├── django.tmLanguage.json │ │ │ │ ├── docker.tmLanguage.json │ │ │ │ ├── dot.tmLanguage.json │ │ │ │ ├── drools.tmLanguage.json │ │ │ │ ├── edifact.tmLanguage.json │ │ │ │ ├── eex.tmLanguage.json │ │ │ │ ├── eiffel.tmLanguage.json │ │ │ │ ├── ejs.tmLanguage.json │ │ │ │ ├── elixir.tmLanguage.json │ │ │ │ ├── elm.tmLanguage.json │ │ │ │ ├── erlang.tmLanguage.json │ │ │ │ ├── etc.tmLanguage.json │ │ │ │ ├── forth.tmLanguage.json │ │ │ │ ├── fortran.tmLanguage.json │ │ │ │ ├── fsharp.tmLanguage.json │ │ │ │ ├── gcode.tmLanguage.json │ │ │ │ ├── gherkin.tmLanguage.json │ │ │ │ ├── git-commit.tmLanguage.json │ │ │ │ ├── git-rebase.tmLanguage.json │ │ │ │ ├── gitignore.tmLanguage.json │ │ │ │ ├── glsl.tmLanguage.json │ │ │ │ ├── gnuplot.tmLanguage.json │ │ │ │ ├── go.tmLanguage.json │ │ │ │ ├── graphql.tmLanguage.json │ │ │ │ ├── groovy.tmLanguage.json │ │ │ │ ├── haml.tmLanguage.json │ │ │ │ ├── handlebars.tmLanguage.json │ │ │ │ ├── haskell-cabal.tmLanguage.json │ │ │ │ ├── haskell.tmLanguage.json │ │ │ │ ├── haxe.tmLanguage.json │ │ │ │ ├── hjson.tmLanguage.json │ │ │ │ ├── html-cfml.tmLanguage.json │ │ │ │ ├── html-derivative.tmLanguage.json │ │ │ │ ├── html-django.tmLanguage.json │ │ │ │ ├── html-elixir.tmLanguage.json │ │ │ │ ├── html-ruby.tmLanguage.json │ │ │ │ ├── html.tmLanguage.json │ │ │ │ ├── ini.tmLanguage.json │ │ │ │ ├── io.tmLanguage.json │ │ │ │ ├── java.tmLanguage.json │ │ │ │ ├── javadoc.tmLanguage.json │ │ │ │ ├── javascript.tmLanguage.json │ │ │ │ ├── jquery.tmLanguage.json │ │ │ │ ├── json.tmLanguage.json │ │ │ │ ├── json5.tmLanguage.json │ │ │ │ ├── jsonc.tmLanguage.json │ │ │ │ ├── jsoniq.tmLanguage.json │ │ │ │ ├── jsp.tmLanguage.json │ │ │ │ ├── jsx-styled.tmLanguage.json │ │ │ │ ├── jsx.tmLanguage.json │ │ │ │ ├── julia.tmLanguage.json │ │ │ │ ├── kotlin.tmLanguage.json │ │ │ │ ├── kusto.tmLanguage.json │ │ │ │ ├── latex.tmLanguage.json │ │ │ │ ├── latte.tmLanguage.json │ │ │ │ ├── less.tmLanguage.json │ │ │ │ ├── liquid.tmLanguage.json │ │ │ │ ├── lisp.tmLanguage.json │ │ │ │ ├── livescript.tmLanguage.json │ │ │ │ ├── log.tmLanguage.json │ │ │ │ ├── lsl.tmLanguage.json │ │ │ │ ├── lua.tmLanguage.json │ │ │ │ ├── make.tmLanguage.json │ │ │ │ ├── markdown-gf.tmLanguage.json │ │ │ │ ├── markdown-latex-combined.tmLanguage.json │ │ │ │ ├── markdown.tmLanguage.json │ │ │ │ ├── mask.tmLanguage.json │ │ │ │ ├── matlab.tmLanguage.json │ │ │ │ ├── mediawiki.tmLanguage.json │ │ │ │ ├── mel.tmLanguage.json │ │ │ │ ├── mermaid.tmLanguage.json │ │ │ │ ├── mikrotik.tmLanguage.json │ │ │ │ ├── mips.tmLanguage.json │ │ │ │ ├── mysql.tmLanguage.json │ │ │ │ ├── nginx.tmLanguage.json │ │ │ │ ├── nim.tmLanguage.json │ │ │ │ ├── nix.tmLanguage.json │ │ │ │ ├── nsis.tmLanguage.json │ │ │ │ ├── nu.tmLanguage.json │ │ │ │ ├── nunjucks.tmLanguage.json │ │ │ │ ├── objective-c.tmLanguage.json │ │ │ │ ├── ocaml.tmLanguage.json │ │ │ │ ├── oeabl.tmLanguage.json │ │ │ │ ├── pascal.tmLanguage.json │ │ │ │ ├── perl.tmLanguage.json │ │ │ │ ├── pgsql.tmLanguage.json │ │ │ │ ├── php-blade.tmLanguage.json │ │ │ │ ├── php-html.tmLanguage.json │ │ │ │ ├── php.tmLanguage.json │ │ │ │ ├── pig.tmLanguage.json │ │ │ │ ├── plain-text.tmLanguage.json │ │ │ │ ├── plsql.tmLanguage.json │ │ │ │ ├── postcss.tmLanguage.json │ │ │ │ ├── postscript.tmLanguage.json │ │ │ │ ├── powerquery.tmLanguage.json │ │ │ │ ├── powershell.tmLanguage.json │ │ │ │ ├── praat.tmLanguage.json │ │ │ │ ├── prisma.tmLanguage.json │ │ │ │ ├── prolog.tmLanguage.json │ │ │ │ ├── properties.tmLanguage.json │ │ │ │ ├── protobuf.tmLanguage.json │ │ │ │ ├── pug.tmLanguage.json │ │ │ │ ├── puppet.tmLanguage.json │ │ │ │ ├── python.tmLanguage.json │ │ │ │ ├── qml.tmLanguage.json │ │ │ │ ├── r.tmLanguage.json │ │ │ │ ├── raku.tmLanguage.json │ │ │ │ ├── razor.tmLanguage.json │ │ │ │ ├── rdoc.tmLanguage.json │ │ │ │ ├── red.tmLanguage.json │ │ │ │ ├── regexp-extended.tmLanguage.json │ │ │ │ ├── regexp-javascript.tmLanguage.json │ │ │ │ ├── regexp-posix.tmLanguage.json │ │ │ │ ├── regexp-python.tmLanguage.json │ │ │ │ ├── regexp.tmLanguage.json │ │ │ │ ├── rst.tmLanguage.json │ │ │ │ ├── ruby.tmLanguage.json │ │ │ │ ├── rust.tmLanguage.json │ │ │ │ ├── sas.tmLanguage.json │ │ │ │ ├── sass.tmLanguage.json │ │ │ │ ├── sassdoc.tmLanguage.json │ │ │ │ ├── scad.tmLanguage.json │ │ │ │ ├── scala.tmLanguage.json │ │ │ │ ├── scheme.tmLanguage.json │ │ │ │ ├── scrypt.tmLanguage.json │ │ │ │ ├── scss.tmLanguage.json │ │ │ │ ├── shell-unix-bash.tmLanguage.json │ │ │ │ ├── sjs.tmLanguage.json │ │ │ │ ├── slim.tmLanguage.json │ │ │ │ ├── slm.tmLanguage.json │ │ │ │ ├── smalltalk.tmLanguage.json │ │ │ │ ├── smarty.tmLanguage.json │ │ │ │ ├── smithy.tmLanguage.json │ │ │ │ ├── solidity.tmLanguage.json │ │ │ │ ├── soytemplate.tmLanguage.json │ │ │ │ ├── sql.tmLanguage.json │ │ │ │ ├── stylus.tmLanguage.json │ │ │ │ ├── svg.tmLanguage.json │ │ │ │ ├── swift.tmLanguage.json │ │ │ │ ├── syon.tmLanguage.json │ │ │ │ ├── systemverilog.tmLanguage.json │ │ │ │ ├── tcl.tmLanguage.json │ │ │ │ ├── terraform.tmLanguage.json │ │ │ │ ├── tex.tmLanguage.json │ │ │ │ ├── textile.tmLanguage.json │ │ │ │ ├── toml.tmLanguage.json │ │ │ │ ├── tsx.tmLanguage.json │ │ │ │ ├── twig.tmLanguage.json │ │ │ │ ├── typescript.tmLanguage.json │ │ │ │ ├── vala.tmLanguage.json │ │ │ │ ├── velocity.tmLanguage.json │ │ │ │ ├── vhdl.tmLanguage.json │ │ │ │ ├── visualforce.tmLanguage.json │ │ │ │ ├── vue.tmLanguage.json │ │ │ │ ├── wollok.tmLanguage.json │ │ │ │ ├── xml.tmLanguage.json │ │ │ │ ├── xquery.tmLanguage.json │ │ │ │ ├── xsl.tmLanguage.json │ │ │ │ ├── yaml.tmLanguage.json │ │ │ │ └── zeek.tmLanguage.json │ │ │ ├── header/ │ │ │ │ ├── Header.vue │ │ │ │ ├── Tags.vue │ │ │ │ └── Tool.vue │ │ │ ├── json-visualizer/ │ │ │ │ ├── DialogInfo.vue │ │ │ │ ├── JsonVisualizer.vue │ │ │ │ ├── composables/ │ │ │ │ │ └── useLayout.ts │ │ │ │ ├── nodes/ │ │ │ │ │ ├── ArrayNode.vue │ │ │ │ │ └── ObjectNode.vue │ │ │ │ ├── types/ │ │ │ │ │ └── index.ts │ │ │ │ └── utils/ │ │ │ │ ├── index.ts │ │ │ │ └── json-parser.ts │ │ │ ├── markdown/ │ │ │ │ ├── LaserPointer.vue │ │ │ │ ├── Markdown.vue │ │ │ │ ├── Presentation.vue │ │ │ │ └── composables/ │ │ │ │ ├── index.ts │ │ │ │ └── useMarkdown.ts │ │ │ ├── mindmap/ │ │ │ │ └── Mindmap.vue │ │ │ ├── preview/ │ │ │ │ └── Preview.vue │ │ │ └── types/ │ │ │ └── index.ts │ │ ├── layout/ │ │ │ └── TwoColumn.vue │ │ ├── math-notebook/ │ │ │ ├── MathEditor.vue │ │ │ ├── README.md │ │ │ ├── ResultsPanel.vue │ │ │ ├── SheetList.vue │ │ │ ├── Workspace.vue │ │ │ └── math-editor-highlight.ts │ │ ├── preferences/ │ │ │ ├── API.vue │ │ │ ├── Appearance.vue │ │ │ ├── Editor.vue │ │ │ ├── Language.vue │ │ │ ├── Storage.vue │ │ │ └── keys.ts │ │ ├── sidebar/ │ │ │ ├── Sidebar.vue │ │ │ ├── folders/ │ │ │ │ ├── Tree.vue │ │ │ │ ├── custom-icons/ │ │ │ │ │ ├── CustomIcons.vue │ │ │ │ │ └── icons.ts │ │ │ │ └── types/ │ │ │ │ └── index.ts │ │ │ ├── library/ │ │ │ │ ├── Item.vue │ │ │ │ └── Library.vue │ │ │ └── tags/ │ │ │ ├── Item.vue │ │ │ └── Tags.vue │ │ ├── snippet/ │ │ │ ├── Header.vue │ │ │ ├── Item.vue │ │ │ └── List.vue │ │ ├── space-rail/ │ │ │ └── SpaceRail.vue │ │ └── ui/ │ │ ├── action-button/ │ │ │ └── ActionButton.vue │ │ ├── color-picker/ │ │ │ └── ColorPicker.vue │ │ ├── empty/ │ │ │ └── Placeholder.vue │ │ ├── folder-icon/ │ │ │ ├── FolderIcon.vue │ │ │ ├── icons.ts │ │ │ └── variants.ts │ │ ├── heading/ │ │ │ └── Heading.vue │ │ ├── input/ │ │ │ ├── Input.vue │ │ │ └── variants.ts │ │ ├── input-tags/ │ │ │ ├── InputTags.vue │ │ │ └── types/ │ │ │ └── index.ts │ │ ├── menu/ │ │ │ ├── FormItem.vue │ │ │ ├── FormSection.vue │ │ │ └── Item.vue │ │ ├── shadcn/ │ │ │ ├── button/ │ │ │ │ ├── Button.vue │ │ │ │ └── index.ts │ │ │ ├── checkbox/ │ │ │ │ ├── Checkbox.vue │ │ │ │ └── index.ts │ │ │ ├── command/ │ │ │ │ ├── Command.vue │ │ │ │ ├── CommandDialog.vue │ │ │ │ ├── CommandEmpty.vue │ │ │ │ ├── CommandGroup.vue │ │ │ │ ├── CommandInput.vue │ │ │ │ ├── CommandItem.vue │ │ │ │ ├── CommandList.vue │ │ │ │ ├── CommandSeparator.vue │ │ │ │ ├── CommandShortcut.vue │ │ │ │ └── index.ts │ │ │ ├── context-menu/ │ │ │ │ ├── ContextMenu.vue │ │ │ │ ├── ContextMenuCheckboxItem.vue │ │ │ │ ├── ContextMenuContent.vue │ │ │ │ ├── ContextMenuGroup.vue │ │ │ │ ├── ContextMenuItem.vue │ │ │ │ ├── ContextMenuLabel.vue │ │ │ │ ├── ContextMenuPortal.vue │ │ │ │ ├── ContextMenuRadioGroup.vue │ │ │ │ ├── ContextMenuRadioItem.vue │ │ │ │ ├── ContextMenuSeparator.vue │ │ │ │ ├── ContextMenuShortcut.vue │ │ │ │ ├── ContextMenuSub.vue │ │ │ │ ├── ContextMenuSubContent.vue │ │ │ │ ├── ContextMenuSubTrigger.vue │ │ │ │ ├── ContextMenuTrigger.vue │ │ │ │ └── index.ts │ │ │ ├── dialog/ │ │ │ │ ├── Dialog.vue │ │ │ │ ├── DialogClose.vue │ │ │ │ ├── DialogContent.vue │ │ │ │ ├── DialogDescription.vue │ │ │ │ ├── DialogFooter.vue │ │ │ │ ├── DialogHeader.vue │ │ │ │ ├── DialogOverlay.vue │ │ │ │ ├── DialogScrollContent.vue │ │ │ │ ├── DialogTitle.vue │ │ │ │ ├── DialogTrigger.vue │ │ │ │ └── index.ts │ │ │ ├── input/ │ │ │ │ ├── Input.vue │ │ │ │ └── index.ts │ │ │ ├── popover/ │ │ │ │ ├── Popover.vue │ │ │ │ ├── PopoverAnchor.vue │ │ │ │ ├── PopoverContent.vue │ │ │ │ ├── PopoverTrigger.vue │ │ │ │ └── index.ts │ │ │ ├── resizable/ │ │ │ │ ├── ResizableHandle.vue │ │ │ │ ├── ResizablePanel.vue │ │ │ │ ├── ResizablePanelGroup.vue │ │ │ │ └── index.ts │ │ │ ├── select/ │ │ │ │ ├── Select.vue │ │ │ │ ├── SelectContent.vue │ │ │ │ ├── SelectGroup.vue │ │ │ │ ├── SelectItem.vue │ │ │ │ ├── SelectItemText.vue │ │ │ │ ├── SelectLabel.vue │ │ │ │ ├── SelectScrollDownButton.vue │ │ │ │ ├── SelectScrollUpButton.vue │ │ │ │ ├── SelectSeparator.vue │ │ │ │ ├── SelectTrigger.vue │ │ │ │ ├── SelectValue.vue │ │ │ │ └── index.ts │ │ │ ├── switch/ │ │ │ │ ├── Switch.vue │ │ │ │ └── index.ts │ │ │ ├── tabs/ │ │ │ │ ├── Tabs.vue │ │ │ │ ├── TabsContent.vue │ │ │ │ ├── TabsList.vue │ │ │ │ ├── TabsTrigger.vue │ │ │ │ └── index.ts │ │ │ ├── textarea/ │ │ │ │ ├── Textarea.vue │ │ │ │ └── index.ts │ │ │ └── tooltip/ │ │ │ ├── Tooltip.vue │ │ │ ├── TooltipContent.vue │ │ │ ├── TooltipProvider.vue │ │ │ ├── TooltipTrigger.vue │ │ │ └── index.ts │ │ ├── sonner/ │ │ │ ├── Sonner.vue │ │ │ ├── templates/ │ │ │ │ └── Donate.vue │ │ │ └── types.ts │ │ ├── text/ │ │ │ ├── Text.vue │ │ │ └── index.ts │ │ ├── textarea/ │ │ │ ├── Textarea.vue │ │ │ └── variants.ts │ │ └── tree/ │ │ ├── Tree.vue │ │ ├── TreeNode.vue │ │ ├── composables.ts │ │ ├── index.ts │ │ ├── keys.ts │ │ └── types.ts │ ├── composables/ │ │ ├── __tests__/ │ │ │ └── useMathEngine.test.ts │ │ ├── index.ts │ │ ├── math-notebook/ │ │ │ ├── index.ts │ │ │ ├── math-engine/ │ │ │ │ ├── constants.ts │ │ │ │ ├── css.ts │ │ │ │ ├── mathInstance.ts │ │ │ │ ├── preprocess.ts │ │ │ │ ├── timeZones.ts │ │ │ │ └── types.ts │ │ │ ├── useMathEngine.ts │ │ │ └── useMathNotebook.ts │ │ ├── types/ │ │ │ └── index.ts │ │ ├── useApp.ts │ │ ├── useCopyToClipboard.ts │ │ ├── useDialog.ts │ │ ├── useEditor.ts │ │ ├── useFolders.ts │ │ ├── useSnippetScroller.ts │ │ ├── useSnippetUpdate.ts │ │ ├── useSnippets.ts │ │ ├── useSonner.ts │ │ ├── useStorageMutation.ts │ │ ├── useTags.ts │ │ └── useTheme.ts │ ├── electron.ts │ ├── index.html │ ├── ipc/ │ │ ├── index.ts │ │ └── listeners/ │ │ ├── main-menu.ts │ │ └── system.ts │ ├── main.ts │ ├── router/ │ │ └── index.ts │ ├── services/ │ │ ├── api/ │ │ │ ├── generated/ │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ └── notifications/ │ │ ├── donate.ts │ │ └── index.ts │ ├── spaceDefinitions.ts │ ├── styles.css │ ├── utils/ │ │ └── index.ts │ ├── views/ │ │ ├── Devtools.vue │ │ ├── Main.vue │ │ ├── MarkdownPresentation.vue │ │ ├── MathNotebook.vue │ │ └── Preferences.vue │ └── vue-virtual-scroller.d.ts ├── tsconfig.json ├── tsconfig.main.json ├── vite.config.mjs └── vitest.config.ts ================================================ FILE CONTENTS ================================================ ================================================ FILE: .claude/settings.json ================================================ { "enabledPlugins": { "frontend-design@claude-plugins-official": true } } ================================================ FILE: .gemini/settings.json ================================================ { "mcpServers": { "context7": { "httpUrl": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "${CONTEXT7_API_KEY}", "Accept": "application/json, text/event-stream" } } }, "context": { "fileName": ["AGENTS.md"] } } ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: masscode # ko_fi: antonreshetov tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry custom: [paypal.me/antongithub, antonreshetov.gumroad.com/l/masscode, https://buy.polar.sh/polar_cl_bpDmjg079kfiAVtdtrtBwxyRXN6NK8B4Bvqdk2QXdx7] ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.yml ================================================ name: 🐞 Bug report description: Report an issue with massCode title: '[Bug]: ' labels: [pending triage] body: - type: markdown attributes: value: | Thanks for taking the time to fill out this bug report! - type: textarea id: describe attributes: label: Describe the bug description: A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem. validations: required: true - type: textarea id: reproduse attributes: label: To reproduce description: Steps to reproduce the behavior value: | 1. Go to ... 2. Click on ... 3. Scroll down to .. 4. See error validations: required: true - type: input id: app_details attributes: label: App Version and Architecture description: What version and architecture of massCode are you running? You can get this info from the About massCode in app menu. placeholder: e.g. 4.0.1 (arm64) validations: required: true - type: textarea id: system attributes: label: System info description: Output of `npx envinfo --system` render: shell placeholder: System validations: required: true - type: checkboxes id: validation attributes: label: Validations description: Before submitting the issue, please make sure you do the following options: - label: Follow our [Code of Conduct](https://github.com/massCodeIO/massCode/blob/master/CODE_OF_CONDUCT.md) required: true - label: Check that there isn't [already an issue](https://github.com/massCodeIO/massCode/issues) that reports the same bug to avoid creating a duplicate. required: true - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/massCodeIO/massCode/discussions). required: true ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: Questions & Discussions url: https://github.com/massCodeIO/massCode/discussions about: Use GitHub discussions for message-board style questions and discussions. ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ### What kind of change does this PR introduce? > check at least one - [ ] Bugfix - [ ] Feature - [ ] Refactor - [ ] Other, please describe: ### Validations - [ ] Follow our [CONTRIBUTING](https://github.com/massCodeIO/massCode/blob/master/CONTRIBUTING.md) guide ================================================ FILE: .github/workflows/build-sponsored.yml ================================================ name: Build Sponsored on: workflow_dispatch: jobs: build-sponsored: name: Build Sponsored for ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: include: - os: macos-15-intel platform: mac arch: x64 - os: macos-15 platform: mac arch: arm64 - os: windows-latest platform: win - os: ubuntu-latest platform: linux steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: latest - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20.16.0 cache: pnpm - name: Install dependencies run: pnpm install - name: Rebuild native dependencies (macOS) if: matrix.platform == 'mac' run: pnpm run rebuild --arch ${{ matrix.arch }} - name: Rebuild native dependencies (other platforms) if: matrix.platform != 'mac' run: pnpm run rebuild - name: Build application (sponsored macOS) if: matrix.platform == 'mac' run: pnpm run build:sponsored:${{ matrix.platform }}:${{ matrix.arch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VITE_SPONSORED: true - name: Build application (sponsored other platforms) if: matrix.platform != 'mac' run: pnpm run build:sponsored:${{ matrix.platform }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VITE_SPONSORED: true - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: sponsored-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name }} path: | dist/*.dmg dist/*.pkg dist/*.exe dist/*.msi dist/*.AppImage dist/*.snap if-no-files-found: warn retention-days: 30 ================================================ FILE: .github/workflows/issue-close-require.yml ================================================ name: Issue Close Require on: schedule: - cron: '0 0 * * *' jobs: close-issues: runs-on: ubuntu-latest steps: - name: need reproduction uses: actions-cool/issues-helper@v3 with: actions: close-issues token: ${{ secrets.GITHUB_TOKEN }} labels: need reproduction inactive-day: 3 ================================================ FILE: .github/workflows/issue-labeled.yml ================================================ name: Issue Labeled on: issues: types: [labeled] jobs: reply-labeled: runs-on: ubuntu-latest steps: - name: need reproduction if: github.event.label.name == 'need reproduction' uses: actions-cool/issues-helper@v3 with: actions: 'create-comment, remove-labels' token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.issue.number }} body: | Hello @${{ github.event.issue.user.login }}. Please describe in detail the sequence of actions that leads to the bug (skip it if it's already there). Add screenshots of errors from the console. If possible add a video. Issues marked with `need reproduction` will be closed if they have no activity within 3 days. labels: pending triage ================================================ FILE: .github/workflows/release.yml ================================================ name: Release on: push: tags: - 'v*' workflow_dispatch: inputs: tag: description: 'Tag for release (e.g., v1.0.0)' required: true default: v4.0.0 jobs: build: name: Build for ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: include: - os: macos-15-intel platform: mac arch: x64 - os: macos-15 platform: mac arch: arm64 - os: windows-latest platform: win - os: ubuntu-latest platform: linux steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: latest - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20.16.0 cache: pnpm - name: Install dependencies run: pnpm install - name: Rebuild native dependencies (macOS) if: matrix.platform == 'mac' run: pnpm run rebuild --arch ${{ matrix.arch }} - name: Rebuild native dependencies (other platforms) if: matrix.platform != 'mac' run: pnpm run rebuild - name: Build application (macOS) if: matrix.platform == 'mac' run: pnpm run build:${{ matrix.platform }}:${{ matrix.arch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build application (other platforms) if: matrix.platform != 'mac' run: pnpm run build:${{ matrix.platform }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: masscode-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name || inputs.tag }} path: | dist/*.dmg dist/*.pkg dist/*.exe dist/*.msi dist/*.AppImage dist/*.snap !dist/*-sponsored.* !dist/*.yml !dist/*.blockmap if-no-files-found: warn retention-days: 30 release: name: Create Release needs: build runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Download artifacts from "build" job uses: actions/download-artifact@v4 with: pattern: masscode-* path: artifacts - name: Generate changelog run: npx changelogithub --output release-notes.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release id: create_release uses: softprops/action-gh-release@v2 with: files: artifacts/**/* tag_name: ${{ github.ref_name || inputs.tag }} draft: true body_path: release-notes.md generate_release_notes: true append_body: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .gitignore ================================================ dist build/main build/renderer scripts/build-sponsored.sh node_modules .DS_Store components.d.ts auto-imports.d.ts .github/*-instructions.md .env ================================================ FILE: .prettierrc ================================================ { "plugins": ["prettier-plugin-tailwindcss"] } ================================================ FILE: AGENTS.md ================================================ # massCode AI Coding Guidelines You are an expert Senior Frontend Developer specializing in Electron, Vue 3, and TypeScript. Follow these rules strictly when generating code for massCode. ## 1. Core Stack - **Framework:** Vue 3 (Composition API, ` ``` **Data Fetching (Renderer):** ```typescript import { api } from '~/renderer/services/api' const { data } = await api.snippets.getSnippets({ folderId: 1 }) ``` **IPC Call:** ```typescript import { ipc } from '@/electron' await ipc.invoke('fs:assets', { buffer, fileName }) ``` **Localization:** ```html ``` **Creating New API Endpoint (DTO & Route):** 1. **Define DTO** (`src/main/api/dto/snippets.ts`): ```typescript import { t } from 'elysia' // Define validation schema const snippetsDuplicate = t.Object({ id: t.Number() }) // Register in main DTO model export const snippetsDTO = new Elysia().model({ // ... other DTOs snippetsDuplicate }) ``` 2. **Add Route** (`src/main/api/routes/snippets.ts`): ```typescript import { useDB } from '../../db' app.post('/duplicate', ({ body }) => { const db = useDB() // Database logic here... return { id: newId } }, { body: 'snippetsDuplicate', // Use registered DTO name detail: { tags: ['Snippets'] } }) ``` 3. **Generate Client:** Run `pnpm api:generate` ================================================ FILE: CHANGELOG.md ================================================ # [4.4.0](https://github.com/massCodeIO/massCode/compare/v4.3.0...v4.4.0) (2025-12-19) ### Bug Fixes * **devtools:** update scroll position on change route ([864afb1](https://github.com/massCodeIO/massCode/commit/864afb181dfc2d17d46d9d8af9ffae152c044ed8)) * **elysia:** prevent DB hangs during saves ([#643](https://github.com/massCodeIO/massCode/issues/643)) ([f6583b7](https://github.com/massCodeIO/massCode/commit/f6583b7cb2d4555b008820a9121bd46808955f09)) * **i18n:** fix Czech translations ([#651](https://github.com/massCodeIO/massCode/issues/651)) ([55367e2](https://github.com/massCodeIO/massCode/commit/55367e2334075d559b12c92d2e12c4e9ea8aa49f)) ### Features * **devtools:** add JSON generator ([#644](https://github.com/massCodeIO/massCode/issues/644)) ([630cf86](https://github.com/massCodeIO/massCode/commit/630cf8629a8d06cc16e7980b8f562bc778851033)) * **devtools:** add Lorem Ipsum generator ([#645](https://github.com/massCodeIO/massCode/issues/645)) ([332362a](https://github.com/massCodeIO/massCode/commit/332362ae73c4338f00f99715f4be3173a39d2615)) * **devtools:** add notifications for copy to clipboard ([#646](https://github.com/massCodeIO/massCode/issues/646)) ([00755ba](https://github.com/massCodeIO/massCode/commit/00755ba5aab109ee151458d062cae6462e14a101)) # [4.3.0](https://github.com/massCodeIO/massCode/compare/v4.2.2...v4.3.0) (2025-11-26) ### Bug Fixes * **folders:** ensure context and toolbar folder creation respect parent ([#640](https://github.com/massCodeIO/massCode/issues/640)) ([b2877c2](https://github.com/massCodeIO/massCode/commit/b2877c29994f4c227da967e801dc13d3731aeba0)) ### Features * **editor:** add Power Query (M) language support ([#639](https://github.com/massCodeIO/massCode/issues/639)) ([a49b5d0](https://github.com/massCodeIO/massCode/commit/a49b5d04ab28cd1bc163a24f8b8c431c72baa6f5)) * **folders:** add multi-selection ([#641](https://github.com/massCodeIO/massCode/issues/641)) ([daef94f](https://github.com/massCodeIO/massCode/commit/daef94f718fd7ec9611f8c21a618c8a33f833feb)) * **preferences:** add api port to preference option ([#631](https://github.com/massCodeIO/massCode/issues/631)) ([d542824](https://github.com/massCodeIO/massCode/commit/d542824361becdcfcd7bd980adff8a7f8f0354ce)) ## [4.2.2](https://github.com/massCodeIO/massCode/compare/v4.2.1...v4.2.2) (2025-10-29) ### Bug Fixes * **db:** ensure directory exists before accessing the db ([#628](https://github.com/massCodeIO/massCode/issues/628)) ([d20bd9a](https://github.com/massCodeIO/massCode/commit/d20bd9a2aa44e58d36abd019936761afeb439766)) * **editor:** jumping scroll when editing ([#629](https://github.com/massCodeIO/massCode/issues/629)) ([ee7e384](https://github.com/massCodeIO/massCode/commit/ee7e38458c541c455b74203ec6a59749090bd758)) ## [4.2.1](https://github.com/massCodeIO/massCode/compare/v4.2.0...v4.2.1) (2025-10-28) # [4.2.0](https://github.com/massCodeIO/massCode/compare/v4.1.0...v4.2.0) (2025-10-08) ### Bug Fixes * **editor:** prevent header and editor display for multiple selected snippets ([e1d4ccd](https://github.com/massCodeIO/massCode/commit/e1d4ccd995f5d1ea14f50d9d8bef51101ffb4bb1)) * **editor:** show code preview panel ([5e91b74](https://github.com/massCodeIO/massCode/commit/5e91b74c93a57b491bf4b84241e8b2ff664551dd)) * **i18n:** update sidebar toggle translations ([f819f4a](https://github.com/massCodeIO/massCode/commit/f819f4acd83f90387e8644b88e871f5451b17d40)) * **scrollbar:** suppress horizontal scrolling ([53f6aef](https://github.com/massCodeIO/massCode/commit/53f6aef8497be9aad13b680d801a7bbcd8312198)) * **snippets:** use default folder language for fragments [#611](https://github.com/massCodeIO/massCode/issues/611) ([#612](https://github.com/massCodeIO/massCode/issues/612)) ([4c52a5e](https://github.com/massCodeIO/massCode/commit/4c52a5e4a6c607dbb8009dd1c660f964a474e3a0)) * update entitlements and enable hardened runtime for macOS builds ([d350977](https://github.com/massCodeIO/massCode/commit/d350977b02c158789b887f7cf54981310c738bd4)) ### Features * add show/hide sidebar toggle ([#610](https://github.com/massCodeIO/massCode/issues/610)) ([64cc14f](https://github.com/massCodeIO/massCode/commit/64cc14f803ed27490c8cfe087ccb3c3d9fd523ee)) # [4.1.0](https://github.com/massCodeIO/massCode/compare/v4.0.4...v4.1.0) (2025-10-03) ### Bug Fixes * add help menu ([a27d605](https://github.com/massCodeIO/massCode/commit/a27d6059057b7adb10ccafbe78ba2b353efe657f)) * set folder custom icon ([#607](https://github.com/massCodeIO/massCode/issues/607)) ([505a8a0](https://github.com/massCodeIO/massCode/commit/505a8a0e735979ebbd887280a5017bc19a491681)) ### Features * add json visualizer ([#609](https://github.com/massCodeIO/massCode/issues/609)) ([afce45c](https://github.com/massCodeIO/massCode/commit/afce45c3e131e402ae3e180d8db57504b444bf19)) * **editor:** add highlighting for search terms ([#606](https://github.com/massCodeIO/massCode/issues/606)) ([48b7f56](https://github.com/massCodeIO/massCode/commit/48b7f56b4cc45e14664d9521e100ad2c265e5e38)) ## [4.0.4](https://github.com/massCodeIO/massCode/compare/v4.0.3...v4.0.4) (2025-09-30) ### Bug Fixes * **editor:** vertical scrolling [#603](https://github.com/massCodeIO/massCode/issues/603) ([#604](https://github.com/massCodeIO/massCode/issues/604)) ([dc75eb0](https://github.com/massCodeIO/massCode/commit/dc75eb0f1ce5a811e1b0eb4ff549b4193436badb)) ## [4.0.3](https://github.com/massCodeIO/massCode/compare/v4.0.2...v4.0.3) (2025-09-30) ### Bug Fixes * **db:** add SQLite file validation and backup for non-SQLite file [#592](https://github.com/massCodeIO/massCode/issues/592) ([#601](https://github.com/massCodeIO/massCode/issues/601)) ([1951d6a](https://github.com/massCodeIO/massCode/commit/1951d6a75ed894550cd25dc74137bda7cd6c909f)) ## [4.0.2](https://github.com/massCodeIO/massCode/compare/v4.0.1...v4.0.2) (2025-09-29) ### Bug Fixes * **db:** check tables, set default values during migration [#581](https://github.com/massCodeIO/massCode/issues/581) ([#599](https://github.com/massCodeIO/massCode/issues/599)) ([ee52846](https://github.com/massCodeIO/massCode/commit/ee52846c0489b550b4f4c227ecc3f14543008cc6)) * **menu:** update preview code shortcut to include Alt modifier ([de92898](https://github.com/massCodeIO/massCode/commit/de92898092914484cbf16ce1110b0c93a0ef9e17)) ## [4.0.1](https://github.com/massCodeIO/massCode/compare/v4.0.0...v4.0.1) (2025-09-29) ### Bug Fixes * **editor:** line number overlapping [#594](https://github.com/massCodeIO/massCode/issues/594) ([#596](https://github.com/massCodeIO/massCode/issues/596)) ([7641421](https://github.com/massCodeIO/massCode/commit/7641421269cfc35c0e9cd4a0ed4a6b58358f8952)) * **menu:** double window menu ([#595](https://github.com/massCodeIO/massCode/issues/595)) ([c5dc66c](https://github.com/massCodeIO/massCode/commit/c5dc66cf842d88162624a064dc78f229f7dd1769)), closes [#593](https://github.com/massCodeIO/massCode/issues/593) # [4.0.0](https://github.com/massCodeIO/massCode/compare/v3.12.1...v4.0.0) (2025-09-27) ### Features * v4 ([#590](https://github.com/massCodeIO/massCode/issues/590)) ([d50d939](https://github.com/massCodeIO/massCode/commit/d50d9391b395380961ae3e1e5d27cc66c583cf35)), closes [#504](https://github.com/massCodeIO/massCode/issues/504) [#505](https://github.com/massCodeIO/massCode/issues/505) [#506](https://github.com/massCodeIO/massCode/issues/506) [#508](https://github.com/massCodeIO/massCode/issues/508) [#509](https://github.com/massCodeIO/massCode/issues/509) [#511](https://github.com/massCodeIO/massCode/issues/511) [#513](https://github.com/massCodeIO/massCode/issues/513) [#514](https://github.com/massCodeIO/massCode/issues/514) [#515](https://github.com/massCodeIO/massCode/issues/515) [#517](https://github.com/massCodeIO/massCode/issues/517) [#518](https://github.com/massCodeIO/massCode/issues/518) [#519](https://github.com/massCodeIO/massCode/issues/519) [#520](https://github.com/massCodeIO/massCode/issues/520) [#521](https://github.com/massCodeIO/massCode/issues/521) [#522](https://github.com/massCodeIO/massCode/issues/522) [#523](https://github.com/massCodeIO/massCode/issues/523) [#524](https://github.com/massCodeIO/massCode/issues/524) [#525](https://github.com/massCodeIO/massCode/issues/525) [#527](https://github.com/massCodeIO/massCode/issues/527) [#528](https://github.com/massCodeIO/massCode/issues/528) [#529](https://github.com/massCodeIO/massCode/issues/529) [#530](https://github.com/massCodeIO/massCode/issues/530) ## [3.12.1](https://github.com/massCodeIO/massCode/compare/v3.12.0...v3.12.1) (2025-06-13) ### Features * check only v3 & handle github rate limit ([30d0987](https://github.com/massCodeIO/massCode/commit/30d0987ccf0b895486e1d1377ef7df1450df3e66)) # [3.12.0](https://github.com/massCodeIO/massCode/compare/v3.11.0...v3.12.0) (2025-02-10) ### Bug Fixes * **search:** delete marks by reset search ([#500](https://github.com/massCodeIO/massCode/issues/500)) ([2142bd9](https://github.com/massCodeIO/massCode/commit/2142bd91b794a1a319eb682f55d51318b14977d5)) * **snippets:** truncate name ([#501](https://github.com/massCodeIO/massCode/issues/501)) ([54be51b](https://github.com/massCodeIO/massCode/commit/54be51bd188e0a385d83c751a176a6f808b1c8ed)) ### Features * add window menu with minimize option ([#499](https://github.com/massCodeIO/massCode/issues/499)) ([2f013d1](https://github.com/massCodeIO/massCode/commit/2f013d18e6067fbef2ba213b46be0088c5794f67)), closes [#498](https://github.com/massCodeIO/massCode/issues/498) # [3.11.0](https://github.com/massCodeIO/massCode/compare/v3.10.0...v3.11.0) (2024-02-19) ### Features * add fuzzy search ([a0eba0a](https://github.com/massCodeIO/massCode/commit/a0eba0ac89335ad134999bc1a679b99d523096c7)) * add search by description ([134c424](https://github.com/massCodeIO/massCode/commit/134c4249f474c6653d0c8e1a8470b13e2fdd5359)) * **i18n:** add new Czech translations ([3166034](https://github.com/massCodeIO/massCode/commit/3166034bf8e576bebb23dd8fcb8f65719c8f45ea)) * **i18n:** add Persian locales ([a32dc0f](https://github.com/massCodeIO/massCode/commit/a32dc0ff8a187b4eb80971c15082e848ed4d5b23)) * **i18n:** add Polish locales ([cd44fb4](https://github.com/massCodeIO/massCode/commit/cd44fb4d87ff873d6483c1eaeff3f45f5a9a287f)) # [3.10.0](https://github.com/massCodeIO/massCode/compare/v3.9.0...v3.10.0) (2023-10-12) ### Bug Fixes * **snippets:** delete fragment ([8b362a0](https://github.com/massCodeIO/massCode/commit/8b362a00c1dc61b6e415dfa37257c9a83b3d37d8)) ### Features * add mindmap ([#419](https://github.com/massCodeIO/massCode/issues/419)) ([238388d](https://github.com/massCodeIO/massCode/commit/238388de5bd3288121415a3860e8818036e96fcc)) * **i18n:** add French locales ([#417](https://github.com/massCodeIO/massCode/issues/417)) ([5b27fda](https://github.com/massCodeIO/massCode/commit/5b27fdad3180a43177a2b047afe221114efe39f2)) # [3.9.0](https://github.com/massCodeIO/massCode/compare/v3.8.0...v3.9.0) (2023-10-05) ### Bug Fixes * devtools menu in win [#415](https://github.com/massCodeIO/massCode/issues/415) ([#416](https://github.com/massCodeIO/massCode/issues/416)) ([a8909e4](https://github.com/massCodeIO/massCode/commit/a8909e475dafb4ff876d438e185f61ae9baf4510)) ### Features * **i18n:** add new Czech translations ([#411](https://github.com/massCodeIO/massCode/issues/411)) ([e7e0cdc](https://github.com/massCodeIO/massCode/commit/e7e0cdcaca4718ffe828ff7ae9119895cabb79bc)) * **i18n:** add Turkish locales ([#412](https://github.com/massCodeIO/massCode/issues/412)) ([bc6da09](https://github.com/massCodeIO/massCode/commit/bc6da09021d95eeb9ba35f2a5373e464b155df88)) # [3.8.0](https://github.com/massCodeIO/massCode/compare/v3.7.0...v3.8.0) (2023-09-29) ### Features * add dev tools ([#407](https://github.com/massCodeIO/massCode/issues/407)) ([eea5900](https://github.com/massCodeIO/massCode/commit/eea5900f6765d62a64863c5a8bbb28bebffac862)) * add reload db ([#408](https://github.com/massCodeIO/massCode/issues/408)) ([d6ff713](https://github.com/massCodeIO/massCode/commit/d6ff71324d478e3e2f6590a3ae01ed30feb43877)) * **icons:** add DigitalOcean, Moodle and Oracle icons ([#388](https://github.com/massCodeIO/massCode/issues/388)) ([864e2f6](https://github.com/massCodeIO/massCode/commit/864e2f6ff42c79ac99c63d84e470a0beb1aab362)) # [3.7.0](https://github.com/massCodeIO/massCode/compare/v3.6.0...v3.7.0) (2023-06-14) ### Bug Fixes * **snippets:** multiple select ([#373](https://github.com/massCodeIO/massCode/issues/373)) ([63c90e9](https://github.com/massCodeIO/massCode/commit/63c90e9b9c29f678f2236a5897f337eef385320e)) * **snippets:** remove prev characters by typing name [#347](https://github.com/massCodeIO/massCode/issues/347) ([#351](https://github.com/massCodeIO/massCode/issues/351)) ([ddc31e7](https://github.com/massCodeIO/massCode/commit/ddc31e7b5d792aafc531b95c37dfc738571ca509)) ### Features * **folders:** add custom icon ([#376](https://github.com/massCodeIO/massCode/issues/376)) ([3c6f762](https://github.com/massCodeIO/massCode/commit/3c6f7626b3b977d16a3076984998a652bfd7b81d)) * hide subfolder snippets ([#371](https://github.com/massCodeIO/massCode/issues/371)) ([e2c8d4f](https://github.com/massCodeIO/massCode/commit/e2c8d4f08294998b195a397fe12a6dff3572e46c)) * **snippets:** add compact mode ([#372](https://github.com/massCodeIO/massCode/issues/372)) ([84b39d1](https://github.com/massCodeIO/massCode/commit/84b39d1d4caae305d566290614492b298330cd51)) # [3.6.0](https://github.com/massCodeIO/massCode/compare/v3.5.0...v3.6.0) (2023-02-22) ### Bug Fixes * **main:** blinking context menu ([#345](https://github.com/massCodeIO/massCode/issues/345)) ([23f57c5](https://github.com/massCodeIO/massCode/commit/23f57c5fabb7f1273ccb6a8b85419a9a808458f3)) * **snippets:** invalid prettier es6 option ([#323](https://github.com/massCodeIO/massCode/issues/323)) ([08e5123](https://github.com/massCodeIO/massCode/commit/08e512381601faa60c4aad590ca4e4c789e64e19)) * **snippets:** wrapping long lines in screenshot ([#326](https://github.com/massCodeIO/massCode/issues/326)) ([891b548](https://github.com/massCodeIO/massCode/commit/891b548c021c7f8817e28379cd86f77d23171b40)) ### Features * **grammars:** add bicep ([#325](https://github.com/massCodeIO/massCode/issues/325)) ([e461e51](https://github.com/massCodeIO/massCode/commit/e461e516c089437bd8391c3dda474c5c5cd8124e)) * **grammars:** add kusto (KQL) ([#324](https://github.com/massCodeIO/massCode/issues/324)) ([b92e403](https://github.com/massCodeIO/massCode/commit/b92e4033530d77c5ffb956a5b10b76c58e6776d2)) * **i18n:** add Czech locales ([#294](https://github.com/massCodeIO/massCode/issues/294)) ([7fe6696](https://github.com/massCodeIO/massCode/commit/7fe66967c6e73467948626ba19eb7a99b019c65d)) * **i18n:** add Romanian locales ([#334](https://github.com/massCodeIO/massCode/issues/334)) ([9f55ff1](https://github.com/massCodeIO/massCode/commit/9f55ff1ec219c81281c30e6733407230d6a30b44)) * **snippets:** copy screenshot to clipboard ([#327](https://github.com/massCodeIO/massCode/issues/327)) ([f06b084](https://github.com/massCodeIO/massCode/commit/f06b0842b14502bb4e2f9882ed5ed79625652043)) # [3.5.0](https://github.com/massCodeIO/massCode/compare/v3.4.1...v3.5.0) (2023-01-07) ### Bug Fixes * **snippets:** export to html [#309](https://github.com/massCodeIO/massCode/issues/309) ([#320](https://github.com/massCodeIO/massCode/issues/320)) ([2f3bada](https://github.com/massCodeIO/massCode/commit/2f3badaf78378c68a7f667edb26a8a5039d282a9)) * **snippets:** use 'dom-to-image' instead 'html2canvas' [#297](https://github.com/massCodeIO/massCode/issues/297) ([#317](https://github.com/massCodeIO/massCode/issues/317)) ([2ba53ac](https://github.com/massCodeIO/massCode/commit/2ba53ac1408dc083fcbbeccd6010fa93e1cbe6a9)) ### Features * **i18n:** add Greek locales ([#304](https://github.com/massCodeIO/massCode/issues/304)) ([19f0942](https://github.com/massCodeIO/massCode/commit/19f0942e229d64ebf976f540f1b73c9fa85ee563)) * **i18n:** add Ukrainian locales ([#319](https://github.com/massCodeIO/massCode/issues/319)) ([a44ebd2](https://github.com/massCodeIO/massCode/commit/a44ebd222731fb0965fd9df87b8cc7835c8c42df)) * **snippets:** save screenshot as svg ([#318](https://github.com/massCodeIO/massCode/issues/318)) ([4cf24c9](https://github.com/massCodeIO/massCode/commit/4cf24c9ba49931ac36e18c1e9cdc407639e4d709)) * **snippets:** use codemirror for screenshot ([#321](https://github.com/massCodeIO/massCode/issues/321)) ([9d264e0](https://github.com/massCodeIO/massCode/commit/9d264e0659f1e2b064eab1e93072c672b330ed15)) ## [3.4.1](https://github.com/massCodeIO/massCode/compare/v3.4.0...v3.4.1) (2022-08-29) ### Bug Fixes * **grammars:** update xml & xsl [#263](https://github.com/massCodeIO/massCode/issues/263) ([#268](https://github.com/massCodeIO/massCode/issues/268)) ([fa79043](https://github.com/massCodeIO/massCode/commit/fa7904344f1261bcba5f2b711fd290d33275afc8)) # [3.4.0](https://github.com/massCodeIO/massCode/compare/v3.3.0...v3.4.0) (2022-08-22) ### Bug Fixes * **editor:** editor height by resize window [#242](https://github.com/massCodeIO/massCode/issues/242) ([#253](https://github.com/massCodeIO/massCode/issues/253)) ([7865ff8](https://github.com/massCodeIO/massCode/commit/7865ff85023b5db0243d22f346dd6121ee639864)) * **snippet:** set first fragment when creating a snippet ([#256](https://github.com/massCodeIO/massCode/issues/256)) ([d382625](https://github.com/massCodeIO/massCode/commit/d382625859a371e009be8def83839eb2791edf27)) ### Features * **i18n:** add German locales ([#244](https://github.com/massCodeIO/massCode/issues/244)) ([d842b29](https://github.com/massCodeIO/massCode/commit/d842b291670fa77b63e8083e670152a667afa369)) # [3.3.0](https://github.com/massCodeIO/massCode/compare/v3.2.0...v3.3.0) (2022-08-15) ### Bug Fixes * **editor:** update editor value only if snippet id is changed ([#228](https://github.com/massCodeIO/massCode/issues/228)) ([78f6f7e](https://github.com/massCodeIO/massCode/commit/78f6f7ebedd781f987df4e07540c3f29c3f40217)) * **markdown:** crash if value is empty ([#233](https://github.com/massCodeIO/massCode/issues/233)) ([23bb935](https://github.com/massCodeIO/massCode/commit/23bb935e975fdbc9b3821195229685265fa89d9b)) * **markdown:** render mermaid ([#231](https://github.com/massCodeIO/massCode/issues/231)) ([1df5319](https://github.com/massCodeIO/massCode/commit/1df53194e162b57bbbe610efba8c685ced9c86ec)) * restore scroll to folder on init ([#234](https://github.com/massCodeIO/massCode/issues/234)) ([3fb66e4](https://github.com/massCodeIO/massCode/commit/3fb66e462d324130c0ce0c2dccb3945a86ad2a18)) * **snippets:** use only markdown for presentation ([#232](https://github.com/massCodeIO/massCode/issues/232)) ([834327a](https://github.com/massCodeIO/massCode/commit/834327a20540847661346948974cda457bdcedeb)) ### Features * add snippets selection history ([#238](https://github.com/massCodeIO/massCode/issues/238)) ([a7540c9](https://github.com/massCodeIO/massCode/commit/a7540c91fd9a62aa4dd2f8253f30be1b70cd5bff)) * **main:menu:** add keymap to control editor font size ([#229](https://github.com/massCodeIO/massCode/issues/229)) ([cb17910](https://github.com/massCodeIO/massCode/commit/cb17910e87eb5275ab693f4fb8d4728cda971835)) * **markdown:** persist preview state ([#236](https://github.com/massCodeIO/massCode/issues/236)) ([3fadd32](https://github.com/massCodeIO/massCode/commit/3fadd327a2f4c753124ccc956123a1b52617d176)) * **snippets:** add snippet link ([#230](https://github.com/massCodeIO/massCode/issues/230)) ([5a744f5](https://github.com/massCodeIO/massCode/commit/5a744f5d482c783b7ee1e2ba4cb94dbea8b667e9)) * use escape to exit from markdown, code & screenshot previews ([#235](https://github.com/massCodeIO/massCode/issues/235)) ([12c6906](https://github.com/massCodeIO/massCode/commit/12c69060af04bbd4d29f2c9b9826022ca6d72572)) # [3.2.0](https://github.com/massCodeIO/massCode/compare/v3.1.0...v3.2.0) (2022-08-11) ### Features * add presentation mode ([#215](https://github.com/massCodeIO/massCode/issues/215)) ([0b540cf](https://github.com/massCodeIO/massCode/commit/0b540cf9214a30a3b11d50a517f44efced527e5f)) * **i18n:** add Japanese locales ([#214](https://github.com/massCodeIO/massCode/issues/214)) ([5ceea07](https://github.com/massCodeIO/massCode/commit/5ceea076c691ed6e8d96050d8232e5dadc925a85)) * **keymap:** add `cmd+` / `cmd-` to control editor font size ([#222](https://github.com/massCodeIO/massCode/issues/222)) ([d8b2872](https://github.com/massCodeIO/massCode/commit/d8b2872c5073038e505290eebbfc291c09aec31a)) * **markdown:** add optional codemirror as code block renderer ([#218](https://github.com/massCodeIO/massCode/issues/218)) ([4a76beb](https://github.com/massCodeIO/massCode/commit/4a76beb76f4e2bd6a5d82296f8d09b6508026028)) * notarizing macOS builds ([#219](https://github.com/massCodeIO/massCode/issues/219)) ([0a9c214](https://github.com/massCodeIO/massCode/commit/0a9c214da6f680a5bfc1998f195fe12e6ba0d153)) * **snippets:** add restore from trash ([#221](https://github.com/massCodeIO/massCode/issues/221)) ([0db6756](https://github.com/massCodeIO/massCode/commit/0db67561ee57ac98b17aace22fedb13db97ebedb)) # [3.1.0](https://github.com/massCodeIO/massCode/compare/v3.0.0...v3.1.0) (2022-08-08) ### Bug Fixes * **editor:** clear search marks ([6a1bfc1](https://github.com/massCodeIO/massCode/commit/6a1bfc11b73403cc249c19555d5e4aae7d7f4936)) ### Features * add collapse/expand all folders action ([#199](https://github.com/massCodeIO/massCode/issues/199)) ([b1ee963](https://github.com/massCodeIO/massCode/commit/b1ee963f2f61cd5d0e82c85ea290693c75627b5a)) * add create a new storage ([#197](https://github.com/massCodeIO/massCode/issues/197)) ([da2f192](https://github.com/massCodeIO/massCode/commit/da2f19203da237ce567f821010d3b7e7dbaac919)) * **editor:** add embed image in mardown ([#201](https://github.com/massCodeIO/massCode/issues/201)) ([37dcae9](https://github.com/massCodeIO/massCode/commit/37dcae9ba53c5f96af7b1b3655adaf234351702f)) * **i18n:** add Português (Brasil) locale ([#194](https://github.com/massCodeIO/massCode/issues/194)) ([3e60142](https://github.com/massCodeIO/massCode/commit/3e601425b4b8c96a868b730d257183cdf91dbac8)) * **main: menu:** add snippet collection link ([#198](https://github.com/massCodeIO/massCode/issues/198)) ([861f889](https://github.com/massCodeIO/massCode/commit/861f889f473aea59a7f032663a89c09079e944e9)) * **themes:** add material palenight ([#195](https://github.com/massCodeIO/massCode/issues/195)) ([d644074](https://github.com/massCodeIO/massCode/commit/d644074dceb64ae798942c26d0487eb9cd17df01)) * **themes:** add tokyo night ([#196](https://github.com/massCodeIO/massCode/issues/196)) ([f17aa89](https://github.com/massCodeIO/massCode/commit/f17aa8918b0da0a1bdc1c59f6545f8f0fd791e65)) # [3.0.0](https://github.com/massCodeIO/massCode/compare/v2.11.0...v3.0.0) (2022-08-05) ### Features * add codemirror & use `.tmLanguage` directly as grammar ([#190](https://github.com/massCodeIO/massCode/issues/190)) ([a36bcf0](https://github.com/massCodeIO/massCode/commit/a36bcf005f4210a372b424ccc7e7c3fb84f7d634)) # [2.11.0](https://github.com/massCodeIO/massCode/compare/v2.10.0...v2.11.0) (2022-08-04) ### Bug Fixes * **snippets:** folder rename [#162](https://github.com/massCodeIO/massCode/issues/162) ([#169](https://github.com/massCodeIO/massCode/issues/169)) ([c5ddd23](https://github.com/massCodeIO/massCode/commit/c5ddd231c6baecda6df572dda4406d50cc803575)) ### Features * **i18n:** add Chinese traditional locale ([#161](https://github.com/massCodeIO/massCode/issues/161)) ([8b00fcd](https://github.com/massCodeIO/massCode/commit/8b00fcd58eca6c42402a747f23ac57ee8be28927)) * **i18n:** add Spanish locale ([bd68311](https://github.com/massCodeIO/massCode/commit/bd6831123158a38166025a3683412a290ca74114)) # [2.10.0](https://github.com/massCodeIO/massCode/compare/v2.9.0...v2.10.0) (2022-07-21) ### Bug Fixes * **editor:** fallback to monospace font [#149](https://github.com/massCodeIO/massCode/issues/149) ([3d9efcd](https://github.com/massCodeIO/massCode/commit/3d9efcdc6dd82d6ae598e160333c3fb116b87aa9)) * **editor:** height when opening code preview ([#131](https://github.com/massCodeIO/massCode/issues/131)) ([c8d8443](https://github.com/massCodeIO/massCode/commit/c8d84432d71873a5b64c66c9f1afc4043031a20d)) ### Features * add tooltips ([#159](https://github.com/massCodeIO/massCode/issues/159)) ([9c90e71](https://github.com/massCodeIO/massCode/commit/9c90e713e9e6aa4d3425f0c68be2ebfba0fd5965)) * **i18n:** add Simplified Chinese for i18n ([#154](https://github.com/massCodeIO/massCode/issues/154)) ([843b91d](https://github.com/massCodeIO/massCode/commit/843b91de41752face2e8a86ae23a0e8d5ad1f57a)) * **snippets:** add snippets showcase link ([e30a174](https://github.com/massCodeIO/massCode/commit/e30a17469bf7da14e3dfaac289fbc25254bd5432)) * support i18n, add russian local ([#152](https://github.com/massCodeIO/massCode/issues/152)) ([59da3d9](https://github.com/massCodeIO/massCode/commit/59da3d95ee28f637fc3314cfc28cf940f7e3ee18)) # [2.9.0](https://github.com/massCodeIO/massCode/compare/v2.8.1...v2.9.0) (2022-07-13) ### Features * **snippets:** add html & css renderer to snippets preview ([#126](https://github.com/massCodeIO/massCode/issues/126)) ([21828e6](https://github.com/massCodeIO/massCode/commit/21828e63a142c13953495e3d8693fe946deabe50)) ## [2.8.1](https://github.com/massCodeIO/massCode/compare/v2.8.0...v2.8.1) (2022-07-09) ### Bug Fixes * **editor:** search highlighting ([0bdab6c](https://github.com/massCodeIO/massCode/commit/0bdab6ceda460074cb1781b9ded3958309f8750f)) * **snippets:** blinking system folder when click ([bc7cdfe](https://github.com/massCodeIO/massCode/commit/bc7cdfee4090e7e65f036b6ad3b2a00913937ad6)) * **snippets:** clear search field after click folder ([6360b5c](https://github.com/massCodeIO/massCode/commit/6360b5cab456881a67ccad0ab4da61d7b5ad4e4d)) * **snippets:** double get snippets when add new snippet ([c38af77](https://github.com/massCodeIO/massCode/commit/c38af77500dd147aa3ff83bfa492464589f5b748)) * **snippets:** search [#117](https://github.com/massCodeIO/massCode/issues/117) ([beb8591](https://github.com/massCodeIO/massCode/commit/beb8591003f45305a1f08455ff4e26e785135e27)) # [2.8.0](https://github.com/massCodeIO/massCode/compare/v2.7.1...v2.8.0) (2022-07-08) ### Bug Fixes * **markdown:** proper bg color for code block depending on theme ([85eaa64](https://github.com/massCodeIO/massCode/commit/85eaa6475c7f167b26f83e04424781844caf85c7)) * **snippets:** update editor if fragments is changed [#113](https://github.com/massCodeIO/massCode/issues/113) ([8908af9](https://github.com/massCodeIO/massCode/commit/8908af9906611d4cd604fe869840748a0bd6ce8a)) ### Features * **snippets:** create screenshot of snippets ([#115](https://github.com/massCodeIO/massCode/issues/115)) ([024dfa5](https://github.com/massCodeIO/massCode/commit/024dfa5870d9e7dd36f533dcb06898e9bc50a641)) ## [2.7.1](https://github.com/massCodeIO/massCode/compare/v2.7.0...v2.7.1) (2022-07-07) ### Bug Fixes * **editor:** update value after format ([3a91111](https://github.com/massCodeIO/massCode/commit/3a911112d7dcebc0b0299ada6e1e5e550c899197)) * **markdown:** render task list ([#107](https://github.com/massCodeIO/massCode/issues/107)) ([4ee1970](https://github.com/massCodeIO/massCode/commit/4ee19704291e55ef66b5e617ed56afc7a732edd5)) * **snippets:** await fetch snippets by click on system folders ([4f2a203](https://github.com/massCodeIO/massCode/commit/4f2a203611130713e20f64f1f4a6605d552f3dfe)) ### Performance Improvements * **editor:** set value only if snippet id is changed ([#109](https://github.com/massCodeIO/massCode/issues/109)) ([56bd929](https://github.com/massCodeIO/massCode/commit/56bd9296deae1f37a0f467b596fc4b2be0d4021c)) * **snippets:** no need to fetch snippets after patch ([3a51e69](https://github.com/massCodeIO/massCode/commit/3a51e695ac61e268cc499acd71f61ad48a57f28d)) # [2.7.0](https://github.com/massCodeIO/massCode/compare/v2.6.1...v2.7.0) (2022-07-06) ### Bug Fixes * **snippets:** fragmetns scroll [#92](https://github.com/massCodeIO/massCode/issues/92) ([#105](https://github.com/massCodeIO/massCode/issues/105)) ([35e57dd](https://github.com/massCodeIO/massCode/commit/35e57dd233bbc518b7124084b1e64104ab9879ed)) * **snippets:** update snippets list after add new ([#101](https://github.com/massCodeIO/massCode/issues/101)) ([55bb05d](https://github.com/massCodeIO/massCode/commit/55bb05dae55a559c8bd4519713eeab24fb690218)) ### Features * add mermaid diagram for markdown ([#104](https://github.com/massCodeIO/massCode/issues/104)) ([e578056](https://github.com/massCodeIO/massCode/commit/e57805675fe352f1e9a7618d40b0e725e6fee2ba)) * **db:** add migration from SnippetsLab >= v2.1 ([#98](https://github.com/massCodeIO/massCode/issues/98)) ([542870d](https://github.com/massCodeIO/massCode/commit/542870d621673308549fdde1937f336029524830)) * **main: menu:** add donate via PayPal ([86bf46a](https://github.com/massCodeIO/massCode/commit/86bf46af9ffcaaf64cfd964c145f555ccb40ee05)) ## [2.6.1](https://github.com/massCodeIO/massCode/compare/v2.6.0...v2.6.1) (2022-05-06) ### Bug Fixes * **ui:** button spacing ([41ade18](https://github.com/massCodeIO/massCode/commit/41ade1819235ca1690450734807208279ef99ec8)) # [2.6.0](https://github.com/massCodeIO/massCode/compare/v2.5.0...v2.6.0) (2022-05-06) ### Bug Fixes * **snippets:** deselect after context menu action ([4fb7b95](https://github.com/massCodeIO/massCode/commit/4fb7b95c8c9cb410ba25923ea90a498943db9837)) * **snippets:** flickering lang selector via add new fragment ([3c59f26](https://github.com/massCodeIO/massCode/commit/3c59f26463f2863fd20ae43c018a0e69c97ccc2a)) * **snippets:** multiple add to favorites ([1776679](https://github.com/massCodeIO/massCode/commit/1776679c78bc1b4fec892dbac736d64e6aed3e9e)) * **snippets:** show placeholder for not selected snippet ([25b4494](https://github.com/massCodeIO/massCode/commit/25b449416e74f6c253fc701c08a62c7d4770afe7)) ### Features * **snippets:** add description ([#74](https://github.com/massCodeIO/massCode/issues/74)) ([7e78922](https://github.com/massCodeIO/massCode/commit/7e78922a0536858111ffbe5ee34d9f3c156d6154)) * **snippets:** add sort by `name`, `createdAt` & `updatedAt` ([#69](https://github.com/massCodeIO/massCode/issues/69)) ([3603fad](https://github.com/massCodeIO/massCode/commit/3603fad4691dd55c329c1ce11e9050abe96e1e4a)) # [2.5.0](https://github.com/massCodeIO/massCode/compare/v2.4.0...v2.5.0) (2022-04-29) ### Bug Fixes * **main: menu:** add check for updates for other platforms ([94676b6](https://github.com/massCodeIO/massCode/commit/94676b65c1dca707fae18fc1119d79636d20b89a)) ### Features * **main: menu:** add check for updates ([702d0f5](https://github.com/massCodeIO/massCode/commit/702d0f550306f57b2964c9588a579d6f3bbaf7c5)) * **snippets:** more languages support for prettier ([#58](https://github.com/massCodeIO/massCode/issues/58)) ([658d3c0](https://github.com/massCodeIO/massCode/commit/658d3c0bf69a801e9f4ff3c6ebd7d1b3c1e91f02)) # [2.4.0](https://github.com/massCodeIO/massCode/compare/v2.3.0...v2.4.0) (2022-04-27) ### Features * **api:** create snippets ([#56](https://github.com/massCodeIO/massCode/issues/56)) ([4abd6bd](https://github.com/massCodeIO/massCode/commit/4abd6bd53660c8b2750700139ba0fa4202532c35)) * **main: menu:** add VS Code extension link ([98c4720](https://github.com/massCodeIO/massCode/commit/98c4720a3bf40fe3031808ccbf22717f4ac87d15)) # [2.3.0](https://github.com/massCodeIO/massCode/compare/v2.2.0...v2.3.0) (2022-04-26) ### Bug Fixes * **api:** don't mutate snippets table during embed folders ([f60d045](https://github.com/massCodeIO/massCode/commit/f60d04586b5b7890df7dbcf5f0c71aedd4a455b4)) * **main: db:** migrate after move storage ([5406083](https://github.com/massCodeIO/massCode/commit/54060831a8bd3d3a11f63b8cb044e2c777d28f8d)) * **main: db:** set empty `value` for content if `value` is `null` on migrate from v1 [#38](https://github.com/massCodeIO/massCode/issues/38) ([1874d1c](https://github.com/massCodeIO/massCode/commit/1874d1c3c925175a74f95527d6aafb3307b09ffe)) * **snippets:** remove selected by click for system folder ([ebd9f29](https://github.com/massCodeIO/massCode/commit/ebd9f29ae31db0f5e03cec76e79a072c4b36b127)) ### Features * **main: menu:** add raycast & alfred extensions links ([aab76b6](https://github.com/massCodeIO/massCode/commit/aab76b61ad7191a929e3c3861b1394811ad926da)) * **snippets:** allow add snippets to inbox ([#52](https://github.com/massCodeIO/massCode/issues/52)) ([5cf809a](https://github.com/massCodeIO/massCode/commit/5cf809aea45e20d3cab9152dcb986652583413b6)) # [2.2.0](https://github.com/massCodeIO/massCode/compare/v2.1.1...v2.2.0) (2022-04-19) ### Bug Fixes * **search:** set selected folder & snippet after focus on editor after search ([069e296](https://github.com/massCodeIO/massCode/commit/069e296f0aa3792990b8a25a1cfd314c853946fa)) * **snippets:** persist scroll position by change view ([ba05384](https://github.com/massCodeIO/massCode/commit/ba05384c62eb39115bcc6c0fdd5d0f0a6a83b6c5)) ### Features * **editor:** add `highlightGutter` & `highlightLine` settings ([#45](https://github.com/massCodeIO/massCode/issues/45)) ([52f8455](https://github.com/massCodeIO/massCode/commit/52f845575b641b1eeaa3a2a893b72f362908c744)) ## [2.1.1](https://github.com/massCodeIO/massCode/compare/v2.1.0...v2.1.1) (2022-04-18) ### Bug Fixes * **editor:** disable multiple selection by edit snippet after search ([ec2c1eb](https://github.com/massCodeIO/massCode/commit/ec2c1eb39605a87f575b0e5e970232b7ef5078fa)) * **sidebar:** tag highlight, spell fix tabs -> tags ([#33](https://github.com/massCodeIO/massCode/issues/33)) ([9be3e13](https://github.com/massCodeIO/massCode/commit/9be3e13b1fad2c8a5d027d36f743d7f1bc4afd86)) * **snippets:** color text for ghost for multiple dragged snippets ([fc25202](https://github.com/massCodeIO/massCode/commit/fc25202059819f298e27e4506c0625756219c97d)) # [2.1.0](https://github.com/massCodeIO/massCode/compare/v2.0.1...v2.1.0) (2022-04-15) ### Bug Fixes * **snippets:** disable markdown preview by select other fragment [#27](https://github.com/massCodeIO/massCode/issues/27) ([#31](https://github.com/massCodeIO/massCode/issues/31)) ([a7dfceb](https://github.com/massCodeIO/massCode/commit/a7dfcebd7d0721a7c28f412ced93d4bf8d4e6518)) * unsubscribe on unmount for emiiter events [#29](https://github.com/massCodeIO/massCode/issues/29) ([#32](https://github.com/massCodeIO/massCode/issues/32)) ([d1d0bc5](https://github.com/massCodeIO/massCode/commit/d1d0bc583801d8655a1736310b4baef9e4f58372)) ### Features * **main: db:** migrate from SnippetsLab ([#30](https://github.com/massCodeIO/massCode/issues/30)) ([1d48506](https://github.com/massCodeIO/massCode/commit/1d485067c5b6f476d92149905b437ae918a16963)) ## [2.0.1](https://github.com/massCodeIO/massCode/compare/v2.0.0...v2.0.1) (2022-04-15) ### Bug Fixes * **snippets:** system folder highlight ([4cfe131](https://github.com/massCodeIO/massCode/commit/4cfe131bc79f55b28b1929905adfd86a7ada6086)) # [2.0.0](https://github.com/massCodeIO/massCode/compare/v2.0.0-beta.6...v2.0.0) (2022-04-15) ### Bug Fixes * **snippets:** sort by `updatedAt` ([f5f50e6](https://github.com/massCodeIO/massCode/commit/f5f50e6a68d5b309fabe77f402b370a6d4d22d43)) ### Features * **api:** add controller to get snippets with folder ([3a2f1fb](https://github.com/massCodeIO/massCode/commit/3a2f1fb0f1d224e943942ad02be851c97a62ef97)) * **main: menu:** add find menu ([e42349e](https://github.com/massCodeIO/massCode/commit/e42349e25f6cfdbb9b74d3f7815a3e7eabd2b39a)) * **snippets:** show time for today updated & full date for other snippets ([3724a5b](https://github.com/massCodeIO/massCode/commit/3724a5b459034bab90a3410c5e2d720394c33581)) # [2.0.0-beta.6](https://github.com/massCodeIO/massCode/compare/v2.0.0-beta.5...v2.0.0-beta.6) (2022-04-14) ### Features * add 4 light & 4 dark app theme ([#26](https://github.com/massCodeIO/massCode/issues/26)) ([e9dff1e](https://github.com/massCodeIO/massCode/commit/e9dff1e7739f770d557dc8cea4fcfc2bd131d0cd)) * **folders:** add rename context menu ([#25](https://github.com/massCodeIO/massCode/issues/25)) ([654767b](https://github.com/massCodeIO/massCode/commit/654767b98dbf25390af892ac3eb1ba93f7cefee0)) * **snippets:** exit from edit mode by enter for fragment ([9e3e301](https://github.com/massCodeIO/massCode/commit/9e3e301006953bc81ac7fee9bb3c1920b1ec5d39)) # [2.0.0-beta.5](https://github.com/massCodeIO/massCode/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2022-04-13) ### Bug Fixes * **snippets:** cut off snippets name for Windows [#20](https://github.com/massCodeIO/massCode/issues/20) ([#24](https://github.com/massCodeIO/massCode/issues/24)) ([097d2cb](https://github.com/massCodeIO/massCode/commit/097d2cbf688fdfc7404d1e7d9e479bb70dd42ed0)) * **snippets:** open external link in markdown ([b5d3ee0](https://github.com/massCodeIO/massCode/commit/b5d3ee01cf7ad48dffb0255d10b652f98659867b)) ### Features * add prettier for snippets formatting ([#22](https://github.com/massCodeIO/massCode/issues/22)) ([14b0f86](https://github.com/massCodeIO/massCode/commit/14b0f86ab67ed7bea7277c424988f75e07a8ed91)) * resizable layout ([#19](https://github.com/massCodeIO/massCode/issues/19)) ([a1e41b3](https://github.com/massCodeIO/massCode/commit/a1e41b3ab567854eda7b9c636cb94c6e34614242)) * update main menu ([#21](https://github.com/massCodeIO/massCode/issues/21)) ([6d14e7d](https://github.com/massCodeIO/massCode/commit/6d14e7df657f4762a8e43f207e909ee3eaed33cf)) # [2.0.0-beta.4](https://github.com/massCodeIO/massCode/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2022-04-12) ### Bug Fixes * **editor:** undo/redo stack ([84096c4](https://github.com/massCodeIO/massCode/commit/84096c47bcf88b49229997d592f473f23812672e)) * **snippets:** sort in 'All snippets' ([ab799d5](https://github.com/massCodeIO/massCode/commit/ab799d5df478bed659d56cb6529c1dd589355c0f)) ### Features * add editor preferences ([#18](https://github.com/massCodeIO/massCode/issues/18)) ([d1fe23f](https://github.com/massCodeIO/massCode/commit/d1fe23fd510445426424bef85df2e3cf01c086e4)) * **snippets:** add markdown preview ([#15](https://github.com/massCodeIO/massCode/issues/15)) ([c208871](https://github.com/massCodeIO/massCode/commit/c2088712ffbc38c2ce2593ec50dbaeaa6291bd7a)) # [2.0.0-beta.3](https://github.com/massCodeIO/massCode/compare/v2.0.0-beta.2...v2.0.0-beta.3) (2022-04-11) ### Bug Fixes * **main: db:** create app folder [#14](https://github.com/massCodeIO/massCode/issues/14) ([750637d](https://github.com/massCodeIO/massCode/commit/750637d068dae50dc10cc7308e9f5862754f0177)) * **snippets:** scroll to top ([2dbecaf](https://github.com/massCodeIO/massCode/commit/2dbecaff987d9376e62fab0e98aa9194ef01d2d3)) # [2.0.0-beta.2](https://github.com/massCodeIO/massCode/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2022-04-10) ### Features * support win ([#13](https://github.com/massCodeIO/massCode/issues/13)) ([edc114c](https://github.com/massCodeIO/massCode/commit/edc114cd4995913f039da0197c2560c5a99828f1)) # [2.0.0-beta.1](https://github.com/massCodeIO/massCode/compare/9fd7085f113be898b9bde3a78eca1eff56c7a391...v2.0.0-beta.1) (2022-04-09) ### Bug Fixes * **build:** change main script, move files to `src` ([6eb1e8a](https://github.com/massCodeIO/massCode/commit/6eb1e8a788abb15ec32d4089868ee2f5b30c6b30)) * **build:** include renderer to build ([8ea99c5](https://github.com/massCodeIO/massCode/commit/8ea99c5f1206876786e2a9d046fbc59d7048a2a0)) * **editor:** init theme ([1de3afa](https://github.com/massCodeIO/massCode/commit/1de3afae2669c9bf3125281c7192f6dd40b82d06)) * **editor:** set lang during init ([34c340d](https://github.com/massCodeIO/massCode/commit/34c340d91df1e3a93632526108fd3dfc30f3fd50)) * **editor:** update height ([2f55391](https://github.com/massCodeIO/massCode/commit/2f5539138448c6b062be3afca041a8e65c18192f)) * in build need to push to main route ([4dc4974](https://github.com/massCodeIO/massCode/commit/4dc497434e5612e87f178ae3ec9875eb95fe121f)) * **ipc:** cancel delete snippet ([7c71b49](https://github.com/massCodeIO/massCode/commit/7c71b4924a0c876ab767fa398ce4557a4bb48e9a)) * **main: api:** path resolve ([07d7f8c](https://github.com/massCodeIO/massCode/commit/07d7f8cf24cfc4d2fca14c77e579e9a39cc21c31)) * **main: db:** remove from app store `selectedFolderId` & `selectedFolderIds` ([8e364f1](https://github.com/massCodeIO/massCode/commit/8e364f1ea8617f0fd705b9982e381a39a7fa722d)) * **main: ipc:** add typing ([07cfb74](https://github.com/massCodeIO/massCode/commit/07cfb7432ad67992e13a57cf42c243a923879b5f)) * **main: store:** set cwd to v2 to prevent conflict ([075b490](https://github.com/massCodeIO/massCode/commit/075b4907de48d5c97ff1ee2a9ba5414ebf60afb4)) * **main:** import config in build ([aa68762](https://github.com/massCodeIO/massCode/commit/aa6876221b7e83c81e28c9f9d460d756270df148)) * **main:** ipc listener for `restart` ([4ea5460](https://github.com/massCodeIO/massCode/commit/4ea5460675aeb8e6d9013fda3bc09b084d293c95)) * **main:** set storage & backup path in dev mode ([dd455cf](https://github.com/massCodeIO/massCode/commit/dd455cfe8b0137bc752039908facdc647ea04725)) * **router:** import all views at once ([7762315](https://github.com/massCodeIO/massCode/commit/7762315e512c3135c8d0f08b670c110c2f251c74)) * **snippets:** `currentContent` & `currentLanguage` getters ([4b6e4e4](https://github.com/massCodeIO/massCode/commit/4b6e4e4952c701f691ec4b284447bb6553e8cb28)) * **snippets:** add `folder` prop as optional ([e28c761](https://github.com/massCodeIO/massCode/commit/e28c7614f3a921665276ed0f8a920d028c6d03c6)) * **snippets:** add new snippet from list header ([686c982](https://github.com/massCodeIO/massCode/commit/686c9829c6188c67bcc832e4b786b2089c35af34)) * **snippets:** blur snippets after context menu ([c8b1c6a](https://github.com/massCodeIO/massCode/commit/c8b1c6a4be754bf3f1efade02599c03c65d1cb2e)) * **snippets:** check for `undefined` ([f2b6a2f](https://github.com/massCodeIO/massCode/commit/f2b6a2f13c4cf03c20b97dc207fe30ed276eee56)) * **snippets:** delete fragments ([453fc05](https://github.com/massCodeIO/massCode/commit/453fc053862bc5045bd4e9c9837cafaed16831ea)) * **snippets:** delete from electron store snippet id ([b5dcb73](https://github.com/massCodeIO/massCode/commit/b5dcb7345badebaecaa7f46da8154fa100d7ce58)) * **snippets:** filter by not deleted ([c1099e7](https://github.com/massCodeIO/massCode/commit/c1099e73070a191f0235de52ef7446f27ba82c34)) * **snippets:** focus snippet name by add new snippet ([e2e4ff3](https://github.com/massCodeIO/massCode/commit/e2e4ff3d0193945fbb2cf0b578498f98c92f6f4b)) * **snippets:** get all snippets after patch ([f6b0d76](https://github.com/massCodeIO/massCode/commit/f6b0d7659a828a982224334355605a88495c2061)) * **snippets:** set first selected ([24bc85c](https://github.com/massCodeIO/massCode/commit/24bc85c5a82f0cc725e177d24a8533f0d4b20594)) * **snippets:** unset `selectedIds` by `setSnippetsByAlias` ([7d76a6c](https://github.com/massCodeIO/massCode/commit/7d76a6c3ede566f9d872914f29989dc2d2537ead)) * **tags:** scroll ([b060225](https://github.com/massCodeIO/massCode/commit/b0602254a11e8e4df30948beeb0120dabfeb54bc)) * **ui: tree:** disable `hoveredNodeId` if is dragged tree node ([6eab5e6](https://github.com/massCodeIO/massCode/commit/6eab5e67feea2f8abd8d9a8fc0e04a255d26bec2)) ### Features * add analytics ([#12](https://github.com/massCodeIO/massCode/issues/12)) ([d73856c](https://github.com/massCodeIO/massCode/commit/d73856cc631616d465a1c185466a99b9dcbf7840)) * add custom scroll, restore snippet position during init ([#10](https://github.com/massCodeIO/massCode/issues/10)) ([889624f](https://github.com/massCodeIO/massCode/commit/889624fb2e2307dcf89896027c775eeb1a91b4ac)) * add db (basic) ([#1](https://github.com/massCodeIO/massCode/issues/1)) ([bccf129](https://github.com/massCodeIO/massCode/commit/bccf129b4a4c10d5df5f48684fd1e51818db41a2)) * add editor (base) ([9fd7085](https://github.com/massCodeIO/massCode/commit/9fd7085f113be898b9bde3a78eca1eff56c7a391)) * add folder component & retrieve folders from store ([9120886](https://github.com/massCodeIO/massCode/commit/91208869996ac254cbfe2e596d852c523a81d0fc)) * add folder tree ([#2](https://github.com/massCodeIO/massCode/issues/2)) ([ac025f0](https://github.com/massCodeIO/massCode/commit/ac025f031c4d1cf0c2bfe1253812de2dd827581a)) * add init app ([5e4de2a](https://github.com/massCodeIO/massCode/commit/5e4de2a84288d21b80d9cae6688a9b48a01b8e08)) * add search ([#9](https://github.com/massCodeIO/massCode/issues/9)) ([e8f4bce](https://github.com/massCodeIO/massCode/commit/e8f4bceec2c1eccc36496eea4beda8be75af4dbb)) * add sidebar (basic) ([118e83a](https://github.com/massCodeIO/massCode/commit/118e83a808c683d9b8e2795bb6426bf84b68823c)) * add snippet list (basic) ([5681c75](https://github.com/massCodeIO/massCode/commit/5681c754a4a9457f4dc41bf0696e65a1a2503c4a)) * add snippets header, fragments (basic) ([8ae34ee](https://github.com/massCodeIO/massCode/commit/8ae34ee0249646cdcc2d770959a8f6c3af63c47e)) * add storage preferences ([#11](https://github.com/massCodeIO/massCode/issues/11)) ([7756db5](https://github.com/massCodeIO/massCode/commit/7756db5cd65638bfffe12cf8df8d5af1e4ec7a38)) * add tags ([#8](https://github.com/massCodeIO/massCode/issues/8)) ([c84386c](https://github.com/massCodeIO/massCode/commit/c84386c997669220368064ddc71489c8d0c599e0)) * **api:** add snippets batch delete ([f27295a](https://github.com/massCodeIO/massCode/commit/f27295a795c8a2422ee8470674a5a3af2857af27)) * **composable:** add `useApi` ([b29cd11](https://github.com/massCodeIO/massCode/commit/b29cd11a133cbf218ac824f0c18ee9791b9e4e6e)) * **composable:** add emitter ([80f7fc5](https://github.com/massCodeIO/massCode/commit/80f7fc5bf124cdb63e27c1722611814f1cd875d9)) * drop .env & add `config.ts` ([1ad8639](https://github.com/massCodeIO/massCode/commit/1ad8639041111d39679f2d9d2d942dd9145ad800)) * **editor:** add old languages mapping ([bfd86ba](https://github.com/massCodeIO/massCode/commit/bfd86ba6a1553f4c92fe65860fa76ffab08d75d0)) * **editor:** disable all keybindings ([b75d987](https://github.com/massCodeIO/massCode/commit/b75d987bdf5c0aca21744339e4f969ae7f61b283)) * fetch multiple folders with snippets ([62d427d](https://github.com/massCodeIO/massCode/commit/62d427db4987929ed548d99697e57345ccd7bd29)) * **folders:** add alias ([7297274](https://github.com/massCodeIO/massCode/commit/729727414a6a483e7a3ccd76d52046a00609bde3)) * **folders:** add context menu for add new, delete ([9f921b2](https://github.com/massCodeIO/massCode/commit/9f921b2ea7780c9ef1a34448c2bf31398be89835)) * **main: api:** add middleware for POST, PATCH & PUT ([df26660](https://github.com/massCodeIO/massCode/commit/df266606c5e1716dd8fd2e85f1eaf763abdd7fd0)) * **main: components:** return instance of menu ([5b12cc7](https://github.com/massCodeIO/massCode/commit/5b12cc7dcb35bf246a6b506365f85637bcd39011)) * **main: db:** map old languages during migration ([9e91d5a](https://github.com/massCodeIO/massCode/commit/9e91d5a0f5ff7686f1aeb1c1b62b0b8e19583fca)) * **main: ipc:** add context menu for snippets ([24f33c2](https://github.com/massCodeIO/massCode/commit/24f33c2523690406a2c65fba2bafa297e06c4192)) * **main: ipc:** add restart app listener ([1b8ea86](https://github.com/massCodeIO/massCode/commit/1b8ea860bb5969fd62bed02526fce154f1572f6e)) * **main: ipc:** create notification ([8a66475](https://github.com/massCodeIO/massCode/commit/8a66475819e59dbb4133fc655f0d1e69d7c1bdb1)) * **main: store:** store selected folder & snippet id ([b0547e2](https://github.com/massCodeIO/massCode/commit/b0547e23d7a6b085c27aac5a82ea18a8404af56d)) * **main:** add `createPopupMenu` constructor ([cc806ba](https://github.com/massCodeIO/massCode/commit/cc806ba003f16c8d35799f18cf6c66003fcfb4ff)) * **main:** add context menu ipc, typing ([d5c11ee](https://github.com/massCodeIO/massCode/commit/d5c11ee8f23e36d98588706592b3c7fd0bc235a1)) * **main:** check for update ([09ec5ee](https://github.com/massCodeIO/massCode/commit/09ec5eed378658bc6ec59c90b61d48b771d3fdb1)) * **main:** disable `webSecurity` ([3bd9999](https://github.com/massCodeIO/massCode/commit/3bd9999bfb276fc30a732b7ff60f297e0fbbc210)) * **main:** expose `on` & `once` events ([008e11a](https://github.com/massCodeIO/massCode/commit/008e11aa2ea8c010003182f7e6cc51eebd05000c)) * **main:** expose only `invoke` ipc ([daf42b5](https://github.com/massCodeIO/massCode/commit/daf42b5b134edd479bd93db0d669b260783ac832)) * **main:** extend exposed store methods ([e24ee88](https://github.com/massCodeIO/massCode/commit/e24ee88da68a3cc74cee9875855a9eeba8751cf3)) * **main:** provide preferences ([9520dc9](https://github.com/massCodeIO/massCode/commit/9520dc9523267eecfc3440f5ca99fe432534bc3c)) * **main:** provide store to renderer ([9829f0a](https://github.com/massCodeIO/massCode/commit/9829f0ad56b8b1a2a033961b67aee0e215bbe922)) * **main:** remove trash as folder from default ([34c8287](https://github.com/massCodeIO/massCode/commit/34c8287bc2da2319e9363431862851f8b9fcb766)) * **main:** set window width to 1000 ([a89367b](https://github.com/massCodeIO/massCode/commit/a89367b988fecb8592d5efc52fddf40a38317b96)) * **main:** store window bounds on move & resize ([3d1e88d](https://github.com/massCodeIO/massCode/commit/3d1e88d486c094c921a76cdd165af82b8b46e540)) * **sidebar:** add focus, selected state ([bc7f2d3](https://github.com/massCodeIO/massCode/commit/bc7f2d34f89e9b8ccc31bd852b5d487fa36b5429)) * **snippets:** add copy to clipboard ([1699335](https://github.com/massCodeIO/massCode/commit/169933530ca173c08b85d404e90d161edaa3a9bd)) * **snippets:** add date format, name placeholder ([da12895](https://github.com/massCodeIO/massCode/commit/da128951251d8514e4ad276779e9c043aedf2628)) * **snippets:** add delete fragment ([40c54fb](https://github.com/massCodeIO/massCode/commit/40c54fb14563be3b82d2fd95e8cec1626b887277)) * **snippets:** add delete method ([caad594](https://github.com/massCodeIO/massCode/commit/caad594b2b0f17117d94f44fbe98ff11dc7fe546)) * **snippets:** add delete, duplicate & add to favorites ([bc306fe](https://github.com/massCodeIO/massCode/commit/bc306fece419dbc0e1b2e7034a35648b05136052)) * **snippets:** add ediable snippet name, focus name for new snippet ([2798fa0](https://github.com/massCodeIO/massCode/commit/2798fa0b0ad6c1c84ea214355162175254b1cf91)) * **snippets:** add empty trash ([8bcf972](https://github.com/massCodeIO/massCode/commit/8bcf97297f02a5e2e24182aa94849f1380e689b9)) * **snippets:** add fragment coun ([6fdf620](https://github.com/massCodeIO/massCode/commit/6fdf62095083d6597a77a11629f0348a70c2ca4a)) * **snippets:** add h-scroll for fragments ([8ec47a6](https://github.com/massCodeIO/massCode/commit/8ec47a631f1a3021db72157ead99e9b28f3f399f)) * **snippets:** add multiple selection ([#6](https://github.com/massCodeIO/massCode/issues/6)) ([dcd0ff4](https://github.com/massCodeIO/massCode/commit/dcd0ff4a9483a89fb04e46facf8d4703c709e200)) * **snippets:** add new fragment ([fa1e828](https://github.com/massCodeIO/massCode/commit/fa1e828df9018f52181bc1ba95861762241089b7)) * **snippets:** add new snippet action ([60f35d7](https://github.com/massCodeIO/massCode/commit/60f35d733be3257722b2410e88d424d2a78d8258)) * **snippets:** add new snippet method ([412b3a1](https://github.com/massCodeIO/massCode/commit/412b3a14d7d0c5e6375f9e3212878cd13c4d5057)) * **snippets:** add patch method ([41ba0c8](https://github.com/massCodeIO/massCode/commit/41ba0c8c55e55cc45e832c09701fccf188c31934)) * **snippets:** add placeholder for not selected ([445431f](https://github.com/massCodeIO/massCode/commit/445431fdc3d63bdd086912e2e402a7674f20795b)) * **snippets:** add separeate context menu & actions ([2dc81b5](https://github.com/massCodeIO/massCode/commit/2dc81b5b633340b875a1dcc72f65cb715c05cec2)) * **snippets:** add snippets to folder by drag & drop ([a27b042](https://github.com/massCodeIO/massCode/commit/a27b04246625646aee2dfea224fda19a0c555d1b)) * **snippets:** editable fragment name ([8df0ea3](https://github.com/massCodeIO/massCode/commit/8df0ea368c5bbf5bcef9f418408ce842e6114203)) * **snippets:** get all snipptes, set snippets by folder id or alias ([313301c](https://github.com/massCodeIO/massCode/commit/313301c4fa1e7c2078f61d9b41454f6df4519a63)) * **snippets:** listen `context-menu:close` to remove highlight ([3fce6b5](https://github.com/massCodeIO/massCode/commit/3fce6b5ab4b5522c9f80b3a23f1ee166070c5987)) * **snippets:** retrieve snippets from store, update style ([88e7546](https://github.com/massCodeIO/massCode/commit/88e75462ce61885430094f81397a50a7c43b271a)) * **snippets:** select new fragment after add ([04c51af](https://github.com/massCodeIO/massCode/commit/04c51af36984f7d8c63e769c57c5e9f3d1d09e96)) * **snippets:** show only non deleted snippets ([f895d97](https://github.com/massCodeIO/massCode/commit/f895d9741cb653619e55daee3073aedb6cbe106c)) * **snippets:** sort by date ([dea7dc2](https://github.com/massCodeIO/massCode/commit/dea7dc27af6e2b8a3b3b21a60b1eeb47725e9905)) * **snippets:** use debounce for update content ([6d56cb5](https://github.com/massCodeIO/massCode/commit/6d56cb5643d4515acfd43f78521bae8d32060046)) * **store:** add app store, set app theme ([a48d439](https://github.com/massCodeIO/massCode/commit/a48d439932576d20df78fda3f117e6c022a791e1)) * **store:** add snippets & folders store (basic) ([18462a4](https://github.com/massCodeIO/massCode/commit/18462a48212e188767c8b19bbb8b040754cb08e1)) * **ui: tree:** add & expose`hoveredNodeId` ([59d7886](https://github.com/massCodeIO/massCode/commit/59d7886025a6c12b41eb96f6dc45994903fc0b02)) * **ui:** add `AppActionButton` ([20e739e](https://github.com/massCodeIO/massCode/commit/20e739e358c160c8934010c4ae3a8ebcf00efd20)) * **ui:** add `contextMenuHandler` for AppTree ([f8ded2a](https://github.com/massCodeIO/massCode/commit/f8ded2a680418b50c747ac74e3ba775242786ca7)) * update db table by API request, remove manual restart server ([cdbec6f](https://github.com/massCodeIO/massCode/commit/cdbec6f30719da5a4b712a1b2322083ed33814e2)) * update init ([cb3507d](https://github.com/massCodeIO/massCode/commit/cb3507db680dfc0df3b02afd11cd02dac083a5fe)) ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Code Of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, political party, or sexual identity and orientation. Note, however, that religion, political party, or other ideological affiliation provide no exemptions for the behavior we outline as unacceptable in this Code of Conduct. ## Our Standards Examples of behavior that contributes to creating a positive environment include: - Using welcoming and inclusive language - Being respectful of differing viewpoints and experiences - Gracefully accepting constructive criticism - Focusing on what is best for the community - Showing empathy towards other community members Examples of unacceptable behavior by participants include: - The use of sexualized language or imagery and unwelcome sexual attention or advances - Trolling, insulting/derogatory comments, and personal or political attacks - Public or private harassment - Publishing others' private information, such as a physical or electronic address, without explicit permission - Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [email](reshetov.art@gmail.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org ================================================ FILE: CONTRIBUTING.md ================================================ Hey there! We are really excited that you are interested in contributing. Before submitting your contribution, please make sure to take a moment and read through the following guide: ## Sending Pull Request ### Discuss First Before you start to work on a feature pull request, it's always better to open a feature request issue first to [discuss](https://github.com/massCodeIO/massCode/discussions) with the maintainers whether the feature is desired and the design of those features. This would help save time for both the maintainers and the contributors and help features to be shipped faster. For typo fixes, it's recommended to batch multiple typo fixes into one pull request to maintain a cleaner commit history. ### Commit Convention We use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages, which allows the changelog to be auto-generated based on the commits. Please read the guide through if you aren't familiar with it already. Only `fix:` and `feat:` will be presented in the changelog. Note that `fix:` and `feat:` are for actual code changes (that might affect logic). For typo or document changes, use docs: or chore: instead: - ~~`fix: typo`~~ -> `docs: fix typo` ### Pull Request If you don't know how to send a Pull Request, we recommend reading the [guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). When sending a pull request, make sure your PR's title also follows the Commit Convention. If your PR fixes or resolves an existing issue, please add the following line in your PR description (replace 123 with a real issue number): ``` fix #123 ``` It's ok to have multiple commits in a single PR, you don't need to rebase or force push for your changes as we will use Squash and Merge to squash the commits into one commit when merging. And of course please test your code before PR. ================================================ FILE: LICENSE ================================================ GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . ================================================ FILE: README.md ================================================

massCode

massCode

A free, open-source code snippet manager to create, organize, and instantly access your personal snippet library.

Built with Electron, Vue & Codemirror.
Inspired by applications like SnippetsLab and Quiver.

GitHub package.json version GitHub All Releases GitHub

Latest Release | Documentation | Change Log

Extensions: VS Code | Raycast

SPONSORS

 

## Support massCode is an open-source project and completely free to use. Maintaining and adding new features requires significant time and effort. If you find massCode useful, consider supporting its development. Your contribution helps keep the project alive and moving forward. You can support massCode through the following channels:
[![Donate via Open Collective](https://img.shields.io/badge/donate-Open%20Collective-blue.svg?style=popout&logo=opencollective)](https://opencollective.com/masscode) [![Donate via PayPal](https://img.shields.io/badge/donate-PayPal-blue.svg?style=popout&logo=paypal)](https://paypal.me/antongithub) [![Donate via Gummroad](https://img.shields.io/badge/donate-Gumroad-blue?style=popout&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCAzNCAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGVsbGlwc2UgY3g9IjE5LjgyODciIGN5PSIxOS4xMzU5IiByeD0iMTQuMTcxNCIgcnk9IjEzLjY3NjUiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik0xNi4xNzE0IDI5Ljk0NjRDMjQuNDAzMiAyOS45NDY0IDMxLjEyNDEgMjMuNDk5NSAzMS4xMjQxIDE1LjQ4ODdDMzEuMTI0MSA3LjQ3OCAyNC40MDMyIDEuMDMxMDEgMTYuMTcxNCAxLjAzMTAxQzcuOTM5NyAxLjAzMTAxIDEuMjE4NzUgNy40NzggMS4yMTg3NSAxNS40ODg3QzEuMjE4NzUgMjMuNDk5NSA3LjkzOTcgMjkuOTQ2NCAxNi4xNzE0IDI5Ljk0NjRaIiBmaWxsPSIjRkY5MEU4IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuNTYyNSIvPgo8cGF0aCBkPSJNMTUuMDQ2NyAyMi43ODI3QzEwLjg2MiAyMi43ODI3IDguNDAwMzkgMTkuNDAyNCA4LjQwMDM5IDE1LjE5NzZDOC40MDAzOSAxMC44Mjc5IDExLjEwODEgNy4yODI3MSAxNi4yNzc0IDcuMjgyNzFDMjEuNjEwOSA3LjI4MjcxIDIzLjQxNiAxMC45MTA0IDIzLjQ5ODEgMTIuOTcxNUgxOS42NDE2QzE5LjU1OTYgMTEuODE3MyAxOC41NzQ5IDEwLjA4NTkgMTYuMTk1NCAxMC4wODU5QzEzLjY1MTggMTAuMDg1OSAxMi4wMTA3IDEyLjMxMiAxMi4wMTA3IDE1LjAzMjdDMTIuMDEwNyAxNy43NTM1IDEzLjY1MTggMTkuOTc5NSAxNi4xOTU0IDE5Ljk3OTVDMTguNDkyOSAxOS45Nzk1IDE5LjQ3NzUgMTguMTY1NyAxOS44ODc4IDE2LjM1MTlIMTYuMTk1NFYxNC44Njc4SDIzLjk0MzJWMjIuNDUyOUgyMC41NDQyVjE3LjY3MUMyMC4yOTggMTkuNDAyNCAxOS4yMzEzIDIyLjc4MjcgMTUuMDQ2NyAyMi43ODI3WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)](https://antonreshetov.gumroad.com/l/masscode) [![Donate via Polar](https://img.shields.io/badge/donate-Polar-blue?style=popout&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xXzEwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjYuNDI4NCAyNzQuMjZDMTM0Ljg3NiAzMjAuNTkzIDIyNy45MjUgMzAyLjY2NiAyNzQuMjU4IDIzNC4yMTlDMzIwLjU5MyAxNjUuNzcxIDMwMi42NjYgNzIuNzIyMiAyMzQuMjE4IDI2LjM4ODVDMTY1Ljc3IC0xOS45NDUxIDcyLjcyMSAtMi4wMTgxIDI2LjM4NzIgNjYuNDI5N0MtMTkuOTQ2NSAxMzQuODc3IC0yLjAxOTM5IDIyNy45MjcgNjYuNDI4NCAyNzQuMjZaTTQ3Ljk1NTUgMTE2LjY3QzMwLjgzNzQgMTY5LjI2MyAzNi41NDQ1IDIyMS44OTMgNTkuMjQ1NCAyNTYuMzczQzE4LjA0MTIgMjE3LjM2MSA3LjI3NTYyIDE1MC4zMDcgMzYuOTQzNiA5Mi4zMThDNTUuOTE1MSA1NS4yMzYyIDg3LjU2NjQgMjkuMzkzNyAxMjIuNSAxOC4zNDgzQzkwLjU5MTEgMzYuNzEwNSA2Mi41NTQ5IDcxLjgxNDQgNDcuOTU1NSAxMTYuNjdaTTE3NS4zNDcgMjgzLjEzN0MyMTEuMzc3IDI3Mi42MDYgMjQ0LjIxMSAyNDYuMzg1IDI2My42ODUgMjA4LjMyMkMyOTMuMTAxIDE1MC44MjUgMjgyLjc2OCA4NC40MTcyIDI0Mi40MjcgNDUuMjY3M0MyNjQuMjIgNzkuNzYyNiAyNjkuNDczIDEzMS41NDIgMjUyLjYzMSAxODMuMjg3QzIzNy42MTUgMjI5LjQyMSAyMDguMzg1IDI2NS4yMzkgMTc1LjM0NyAyODMuMTM3Wk0xODMuNjI3IDI2Ni4yMjlDMjA3Ljk0NSAyNDUuNDE4IDIyOC4wMTYgMjEwLjYwNCAyMzYuOTM1IDE2OC43OUMyNTEuMDMzIDEwMi42OTMgMjMyLjU1MSA0MS4xOTc4IDE5NS4xMTIgMjAuNjc2OEMyMTQuOTcgNDcuMzk0NSAyMjUuMDIyIDk5LjI5MDIgMjE4LjgyNCAxNTcuMzMzQzIxNC4wODUgMjAxLjcyNCAyMDAuODE0IDI0MC41OTMgMTgzLjYyNyAyNjYuMjI5Wk02My43MTc3IDEzMS44NDRDNDkuNTE1NSAxOTguNDMgNjguMzc3IDI2MC4zNDUgMTA2LjM3NCAyODAuNDA1Qzg1Ljk5NjIgMjU0LjAwOSA3NS41OTY4IDIwMS41MTQgODEuODc1OCAxNDIuNzExQzg2LjUzNzQgOTkuMDUzNiA5OS40NTAzIDYwLjczNyAxMTYuMjI1IDM1LjA5NjlDOTIuMjY3NyA1NS45ODMgNzIuNTM4NCA5MC40ODkyIDYzLjcxNzcgMTMxLjg0NFpNMTk5LjgzNCAxNDkuNTYxQzIwMC45MDggMjE3LjQ3MyAxNzkuNTkgMjcyLjg3OCAxNTIuMjIyIDI3My4zMDlDMTI0Ljg1MyAyNzMuNzQyIDEwMS43OTcgMjE5LjAzOSAxMDAuNzI0IDE1MS4xMjdDOTkuNjUxMSA4My4yMTM4IDEyMC45NjggMjcuODA5NCAxNDguMzM3IDI3LjM3N0MxNzUuNzA1IDI2Ljk0NDYgMTk4Ljc2MiA4MS42NDggMTk5LjgzNCAxNDkuNTYxWiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xXzEwIj4KPHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==)](https://buy.polar.sh/polar_cl_bpDmjg079kfiAVtdtrtBwxyRXN6NK8B4Bvqdk2QXdx7)
## Features ### Organization Organize your snippets with multi-level folders and tags. Each snippet can contain multiple fragments (tabs), giving you fine-grained control over structure and grouping. ### Editor Built on [CodeMirror](https://github.com/codemirror/codemirror5) with `.tmLanguage` grammars for syntax highlighting. * Supports over [600 grammars](https://github.com/github/linguist/blob/master/vendor/README.md), with 160+ available out of the box. * Integrated [Prettier](https://prettier.io) for clean, consistent code formatting. ### Real-time HTML & CSS Preview Write and instantly preview HTML and CSS snippets. Perfect for prototyping, testing ideas, or quick visual checks. ### Markdown Full Markdown support with syntax highlighting, tables, lists, and more. * Integrated [Mermaid](https://mermaid-js.github.io/mermaid/#) for dynamic diagrams and charts. ### Presentation Mode Turn a sequence of snippets into a presentation. Useful for classrooms, team meetings, conference talks, or simply walking through your own notes. ### Mindmap Generate mind maps from Markdown. Fast, intuitive, and ideal for structuring and visualizing ideas. ### JSON Visualizer Visualize and explore your JSON data with an interactive graph view. Perfect for quickly inspecting complex responses, APIs, or configuration files. ### Math Notebook A calculator notepad inspired by [Numi](https://numi.app). Write expressions in natural language and get instant results on each line. Supports arithmetic, percentages, unit conversions, 28 currencies with live rates, date & time operations, variables, and more. ### Beautiful Screenshots Export snippets as polished images with customizable themes and backgrounds. ### Developer Tools Handy built-in utilities for everyday dev tasks: * **Text Tools**: Case Converter, Slug Generator, URL Parser * **Crypto & Security**: Hash/HMAC, Password Generator, UUID * **Encoders/Decoders**: URL, Base64, JSON ⇄ TOML/XML/YAML, Text ⇄ ASCII/Binary/Unicode, Color Converter ### Custom Themes Fully customize the UI and editor syntax highlighting with JSON theme files stored in `~/.massCode/themes/`. Supports light and dark types with live reload. ### Integrations Extend your workflow with: * [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=AntonReshetov.masscode-assistant): zen mode snippet search, instant insertion, and save selected code as snippets. * [Raycast Extension](https://www.raycast.com/antonreshetov/masscode): quick snippet access directly from Raycast. ## Storage massCode supports two storage engines — you can switch between them in **Settings → Storage**. ### Markdown Vault The default storage engine. Snippets are stored as plain `.md` files on disk with frontmatter metadata. The vault structure mirrors your folder hierarchy. * **Git-friendly** — track changes, sync via GitHub or any Git remote. * **Cloud sync** — works with iCloud, Dropbox, Syncthing, or any file sync service. * **Live sync** — massCode watches the vault directory and picks up external changes in real time. ### SQLite (Legacy) All data is stored in a single SQLite database file. SQLite engine is deprecated and will be removed in future versions. Please migrate to Markdown Vault. ## Overview massCode was created as a personal learning project and evolved into an open-source tool. The goal: combine the best features of snippet managers (free and paid) into one flexible, developer-friendly application. ## Build Locally ### Prerequisites - Node.js (>=20.16.0) - pnpm (>= 9.0.0) ### Install Dependencies ```bash pnpm install ``` ### Build To build for current platform: ```bash pnpm build ``` To build for a specific platform: ```bash pnpm build:mac # macOS pnpm build:win # Windows pnpm build:linux # Linux ``` ### Development To run in development mode: ```bash pnpm dev ``` This will start the application with hot reloading. ## Troubleshooting ### macOS If you encounter the error message "massCode" is damaged and can't be opened. You should move it to the Trash while installing software on macOS, it may be due to security settings restrictions in macOS. **Option 1: System Settings (macOS 13+)** 1. Open **System Settings** → **Privacy & Security** 2. Scroll down to find "massCode" in the list of blocked applications 3. Click **Allow Anyway** or **Open Anyway** 4. You may need to enter your administrator password **Option 2: Terminal command** ```bash sudo xattr -r -d com.apple.quarantine /Applications/massCode.app ``` ## Follow - News and updates on [X](https://x.com/anton_reshetov). - [Discussions](https://github.com/massCodeIO/massCode/discussions). ![](.github/assets/subscribe.gif) ## License [AGPL-3.0](https://github.com/massCodeIO/massCode/blob/master/LICENSE) Copyright (c) 2019-present, [Anton Reshetov](https://github.com/antonreshetov). ================================================ FILE: build/entitlements.mac.inherit.plist ================================================ com.apple.security.cs.allow-jit com.apple.security.cs.allow-unsigned-executable-memory com.apple.security.cs.allow-dyld-environment-variables ================================================ FILE: commitlint.config.js ================================================ module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [ 2, 'always', [ 'build', 'chore', 'ci', 'docs', 'feat', 'fix', 'polish', 'refactor', 'release', 'revert', 'style', 'test', 'types', ], ], }, } ================================================ FILE: components.json ================================================ { "$schema": "https://shadcn-vue.com/schema.json", "style": "new-york", "typescript": true, "tailwind": { "config": "", "css": "src/renderer/styles.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, "iconLibrary": "lucide", "aliases": { "components": "@/components", "utils": "@/utils", "ui": "@/components/ui/shadcn2", "lib": "@/utils", "composables": "~/composables" }, "registries": {} } ================================================ FILE: electron-builder.json ================================================ { "$schema": "https://json.schemastore.org/electron-builder", "appId": "io.masscode.app", "productName": "massCode", "directories": { "output": "dist" }, "files": [ "build/renderer/**/*", "build/main/**/*", "!build/**/*.map" ], "mac": { "target": "dmg", "icon": "build/icons/icon.icns", "entitlements": "build/entitlements.mac.inherit.plist", "category": "public.app-category.productivity", "hardenedRuntime": true, "identity": null }, "win": { "target": ["nsis", "portable"], "icon": "build/icons/icon.ico" }, "linux": { "target": ["AppImage"], "icon": "build/icons/icon.png" }, "nsis": { "oneClick": false, "perMachine": false, "allowToChangeInstallationDirectory": true, "shortcutName": "massCode", "artifactName": "${productName}-${version}-${arch}.${ext}" }, "portable": { "artifactName": "${productName}-${version}-${arch}-portable.${ext}" }, "protocols": [ { "name": "massCode", "schemes": ["masscode"] } ] } ================================================ FILE: electron-builder.sponsored.json ================================================ { "$schema": "https://json.schemastore.org/electron-builder", "appId": "io.masscode.app", "productName": "massCode", "directories": { "output": "dist" }, "files": [ "build/renderer/**/*", "build/main/**/*", "!build/**/*.map" ], "artifactName": "${productName}-${version}-${arch}-sponsored.${ext}", "mac": { "target": "dmg", "icon": "build/icons/icon.icns", "entitlements": "build/entitlements.mac.inherit.plist", "category": "public.app-category.productivity", "hardenedRuntime": true, "identity": null }, "win": { "target": ["nsis", "portable"], "icon": "build/icons/icon.ico" }, "linux": { "target": ["AppImage"], "icon": "build/icons/icon.png" }, "nsis": { "oneClick": false, "perMachine": false, "allowToChangeInstallationDirectory": true, "shortcutName": "massCode", "artifactName": "${productName}-${version}-${arch}-sponsored.${ext}" }, "portable": { "artifactName": "${productName}-${version}-${arch}-portable-sponsored.${ext}" }, "protocols": [ { "name": "massCode", "schemes": ["masscode"] } ] } ================================================ FILE: eslint.config.js ================================================ const antfu = require('@antfu/eslint-config').default module.exports = antfu({ rules: { 'vue/max-attributes-per-line': [ 'error', { singleline: 1, }, ], }, ignores: ['src/renderer/services/api/generated/**/*'], }) ================================================ FILE: nodemon.json ================================================ { "watch": ["src/main"], "ext": "ts,json", "ignore": [ "src/main/i18n/locales/**/*.json" ], "exec": "tsc -p tsconfig.main.json", "delay": 1000 } ================================================ FILE: package.json ================================================ { "name": "masscode", "version": "4.7.1", "description": "A free and open source code snippets manager for developers", "author": { "name": "Anton Reshetov", "url": "https://github.com/antonreshetov" }, "license": "AGPL-3.0", "repository": "https://github.com/massCodeIO/massCode", "main": "build/main/index.js", "engines": { "pnpm": ">=9.0.0" }, "scripts": { "dev": "npm run build:main && concurrently -k \"vite\" \"npm:dev:main\" \"npm:dev:start\"", "dev:main": "nodemon", "dev:start": "cross-env NODE_ENV=development electronmon .", "build": "vite build && npm run build:main && electron-builder", "build:mac": "vite build && npm run build:main && npm run build:mac:x64 && npm run build:mac:arm64", "build:mac:x64": "vite build && npm run build:main && electron-builder --mac --x64", "build:mac:arm64": "vite build && npm run build:main && electron-builder --mac --arm64", "build:win": "vite build && npm run build:main && electron-builder --win --x64", "build:linux": "vite build && npm run build:main && electron-builder --linux --x64", "build:sponsored:mac": "vite build && npm run build:main && npm run build:sponsored:mac:x64 && npm run build:sponsored:mac:arm64", "build:sponsored:mac:x64": "vite build && npm run build:main && electron-builder --config electron-builder.sponsored.json --mac --x64", "build:sponsored:mac:arm64": "vite build && npm run build:main && electron-builder --config electron-builder.sponsored.json --mac --arm64", "build:sponsored:win": "vite build && npm run build:main && electron-builder --config electron-builder.sponsored.json --win --x64", "build:sponsored:linux": "vite build && npm run build:main && electron-builder --config electron-builder.sponsored.json --linux --x64", "build:all": "vite build && npm run build:main && npm run build:mac && npm run build:win && npm run build:linux", "build:main": "npm run copy:locales && tsc -p tsconfig.main.json", "api:generate": "node scripts/api-generate.js", "copy:locales": "node scripts/copy-locales.js", "bench:load-test": "node scripts/bench-load-test.js", "bench:seed": "node scripts/bench-seed.js", "test": "vitest run", "test:watch": "vitest", "lint": "eslint .", "lint:fix": "eslint --fix .", "release": "bumpp -c 'build: release v' -t", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", "rebuild": "electron-rebuild", "prepare": "simple-git-hooks && npm run rebuild" }, "dependencies": { "@dagrejs/dagre": "^1.1.5", "@elysiajs/cors": "^1.2.0", "@elysiajs/node": "^1.4.2", "@elysiajs/swagger": "^1.3.1", "@faker-js/faker": "^10.1.0", "@sinclair/typebox": "^0.34.41", "@vue-flow/background": "^1.3.2", "@vue-flow/controls": "^1.1.3", "@vue-flow/core": "^1.46.5", "@vue-flow/minimap": "^1.5.4", "@vueuse/core": "^12.7.0", "better-sqlite3": "^12.4.1", "change-case": "^5.4.4", "chokidar": "^4.0.3", "chroma-js": "^3.1.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "codemirror": "^5.65.18", "codemirror-textmate": "^1.1.0", "color-name-list": "^11.22.0", "crypto-js": "^4.2.0", "date-fns": "^4.1.0", "dom-to-image": "^2.6.0", "electron-store": "^8.2.0", "elysia": "^1.4.16", "fs-extra": "^11.3.0", "i18next": "^24.2.2", "i18next-fs-backend": "^2.6.0", "interactjs": "^1.10.27", "js-yaml": "^4.1.0", "ky": "^1.7.5", "lucide-vue-next": "^0.476.0", "marked": "^15.0.8", "markmap-lib": "^0.18.11", "markmap-view": "^0.18.10", "mathjs": "^15.1.1", "mermaid": "^11.6.0", "nanoid": "^3.3.8", "nearest-color": "^0.4.4", "onigasm": "^2.2.5", "prettier": "^3.5.3", "reka-ui": "^2.9.0", "sanitize-html": "^2.15.0", "slash": "^3.0.0", "slugify": "^1.6.6", "tailwind-merge": "^3.0.2", "toml": "^3.0.0", "uuid": "^11.1.0", "vue-sonner": "^1.3.0", "vue-virtual-scroller": "2.0.0-beta.8", "vuedraggable": "^4.1.0" }, "devDependencies": { "@antfu/eslint-config": "^3.16.0", "@commitlint/cli": "^19.6.1", "@commitlint/config-conventional": "^19.6.0", "@electron/rebuild": "^3.7.1", "@tailwindcss/postcss": "^4.0.9", "@tailwindcss/vite": "^4.0.9", "@types/better-sqlite3": "^7.6.12", "@types/chroma-js": "^3.1.1", "@types/codemirror": "^5.60.15", "@types/crypto-js": "^4.2.2", "@types/dagre": "^0.7.53", "@types/dom-to-image": "^2.6.7", "@types/fs-extra": "^11.0.4", "@types/js-yaml": "^4.0.9", "@types/node": "^22.10.8", "@types/sanitize-html": "^2.15.0", "@vitejs/plugin-vue": "^5.2.1", "autoprefixer": "^10.4.20", "bumpp": "^9.10.2", "concurrently": "^9.1.2", "cross-env": "^7.0.3", "electron": "^34.0.1", "electron-builder": "^25.1.8", "electronmon": "^2.0.3", "eslint": "^9.18.0", "lint-staged": "^15.4.2", "nodemon": "^3.1.9", "prettier-plugin-tailwindcss": "^0.6.11", "sass": "^1.85.1", "simple-git-hooks": "^2.11.1", "tailwindcss": "^4.0.9", "tw-animate-css": "^1.4.0", "typescript": "^5.7.3", "unplugin-auto-import": "^19.1.0", "unplugin-vue-components": "^28.4.0", "vite": "^6.1.1", "vitest": "^4.0.18", "vue": "^3.5.13", "vue-router": "^4.5.0", "vue-tsc": "^3.2.5" }, "pnpm": { "onlyBuiltDependencies": [ "better-sqlite3", "electron" ] }, "simple-git-hooks": { "pre-commit": "npx lint-staged", "commit-msg": "npx commitlint --edit $1" }, "lint-staged": { "*.{js,ts,vue}": [ "prettier --write", "eslint --fix" ] }, "electronmon": { "patterns": [ "!scripts/**/*", "!src/renderer/**/*", "!src/main/**/*" ] }, "volta": { "node": "20.16.0" } } ================================================ FILE: postcss.config.js ================================================ module.exports = { plugins: { '@tailwindcss/postcss': {}, }, } ================================================ FILE: scripts/api-generate.js ================================================ const child_process = require('node:child_process') const { styleText } = require('node:util') const Store = require('electron-store') const store = new Store({ name: 'preferences', cwd: 'v2' }) const apiPort = store.get('apiPort', 4321) const url = `http://localhost:${apiPort}/swagger/json` async function generateApi() { try { console.log(styleText('blue', 'Generating API...')) child_process.execSync( `npx swagger-typescript-api@13.0.23 -p ${url} -o ./src/renderer/services/api/generated -n index.ts`, ) console.log(styleText('green', 'API is successfully generated')) } catch (err) { console.log(styleText('red', 'Error generating API')) console.log(err) } } generateApi() ================================================ FILE: scripts/bench-load-test.js ================================================ #!/usr/bin/env node const { performance } = require('node:perf_hooks') const process = require('node:process') function getErrorMessage(error) { if (error instanceof Error) { const cause = error.cause if (cause && typeof cause === 'object' && 'message' in cause) { const causeMessage = String(cause.message || '').trim() if (causeMessage) { return `${error.message} (${causeMessage})` } } return error.message } return String(error) } function parseArgs(argv) { const options = { baseUrl: process.env.MASSCODE_API_URL || 'http://localhost:4321', fragments: 3, keep: false, query: '', snippets: 100, } for (let index = 0; index < argv.length; index += 1) { const argument = argv[index] if (argument === '--base-url') { options.baseUrl = String(argv[index + 1] || options.baseUrl) index += 1 continue } if (argument === '--snippets') { options.snippets = Number(argv[index + 1] || options.snippets) index += 1 continue } if (argument === '--fragments') { options.fragments = Number(argv[index + 1] || options.fragments) index += 1 continue } if (argument === '--query') { options.query = String(argv[index + 1] || '') index += 1 continue } if (argument === '--keep') { options.keep = true } } options.snippets = Number.isFinite(options.snippets) && options.snippets > 0 ? Math.trunc(options.snippets) : 100 options.fragments = Number.isFinite(options.fragments) && options.fragments > 0 ? Math.trunc(options.fragments) : 3 return options } async function requestJson(baseUrl, pathname, options) { const requestUrl = new URL(pathname, baseUrl) let response try { response = await fetch(requestUrl, options) } catch (error) { const details = getErrorMessage(error) throw new Error( [ `Failed to reach API at ${requestUrl.origin}.`, 'Start massCode first (for example: "pnpm dev") or pass a different URL with --base-url.', `Details: ${details}`, ].join(' '), ) } if (!response.ok) { const errorBody = await response.text() throw new Error( `Request failed (${response.status}) ${pathname}: ${errorBody || response.statusText}`, ) } if (response.status === 204) { return null } return response.json() } async function measure(name, callback) { const startedAt = performance.now() const result = await callback() return { duration: performance.now() - startedAt, name, result, } } function formatDuration(duration) { return `${duration.toFixed(2)}ms` } function printMetrics(metrics) { console.log('\nLoad Test Results') console.log('-----------------') metrics.forEach((metric) => { const payload = metric.result && typeof metric.result === 'object' ? ` ${JSON.stringify(metric.result)}` : '' console.log(`${metric.name}: ${formatDuration(metric.duration)}${payload}`) }) } async function createSnippet(baseUrl, name) { const createdSnippet = await requestJson(baseUrl, '/snippets/', { body: JSON.stringify({ name }), headers: { 'content-type': 'application/json', }, method: 'POST', }) return createdSnippet.id } async function createSnippetContent(baseUrl, snippetId, label, value) { await requestJson(baseUrl, `/snippets/${snippetId}/contents`, { body: JSON.stringify({ label, language: 'typescript', value, }), headers: { 'content-type': 'application/json', }, method: 'POST', }) } async function deleteSnippet(baseUrl, snippetId) { try { await requestJson(baseUrl, `/snippets/${snippetId}`, { method: 'DELETE', }) } catch { // ignore cleanup errors } } async function getSnippets(baseUrl, query) { const searchParams = new URLSearchParams() Object.entries(query || {}).forEach(([key, value]) => { if (value === undefined || value === null || value === '') { return } searchParams.set(key, String(value)) }) const pathWithQuery = searchParams.size ? `/snippets/?${searchParams.toString()}` : '/snippets/' return requestJson(baseUrl, pathWithQuery, { method: 'GET', }) } async function resetStorageCache(baseUrl) { await requestJson(baseUrl, '/system/storage-cache/reset', { method: 'POST', }) } async function main() { const options = parseArgs(process.argv.slice(2)) const baseUrl = options.baseUrl.endsWith('/') ? options.baseUrl : `${options.baseUrl}/` const engineResponse = await requestJson(baseUrl, '/system/storage-engine', { method: 'GET', }) const runToken = Date.now() const snippetPrefix = `load-test-${runToken}` const createdSnippetIds = [] console.log(`API: ${baseUrl}`) console.log(`Engine: ${engineResponse.engine}`) console.log( `Preparing snippets: ${options.snippets} x ${options.fragments} fragments`, ) for ( let snippetIndex = 1; snippetIndex <= options.snippets; snippetIndex += 1 ) { const snippetId = await createSnippet( baseUrl, `${snippetPrefix}-snippet-${snippetIndex}`, ) createdSnippetIds.push(snippetId) for ( let fragmentIndex = 1; fragmentIndex <= options.fragments; fragmentIndex += 1 ) { const contentToken = `${snippetPrefix}-f-${snippetIndex}-${fragmentIndex}` await createSnippetContent( baseUrl, snippetId, `Fragment ${fragmentIndex}`, `export const token = '${contentToken}'`, ) } } const defaultSearchQuery = options.query || `${snippetPrefix}-f-${Math.max(1, Math.floor(options.snippets / 2))}-1` const metrics = [] metrics.push( await measure('coldStart(getSnippets after cache reset)', async () => { await resetStorageCache(baseUrl) const snippets = await getSnippets(baseUrl, { search: defaultSearchQuery, }) return { matches: snippets.length, } }), ) metrics.push( await measure('hotStart(getSnippets repeated)', async () => { const snippets = await getSnippets(baseUrl, { search: defaultSearchQuery, }) return { matches: snippets.length, } }), ) metrics.push( await measure('uncachedSearch(reset + search)', async () => { await resetStorageCache(baseUrl) const snippets = await getSnippets(baseUrl, { search: defaultSearchQuery, }) return { matches: snippets.length, } }), ) metrics.push( await measure('cachedSearch(repeated same query)', async () => { const snippets = await getSnippets(baseUrl, { search: defaultSearchQuery, }) return { matches: snippets.length, } }), ) printMetrics(metrics) if (!options.keep) { for (const snippetId of createdSnippetIds) { await deleteSnippet(baseUrl, snippetId) } } } main().catch((error) => { console.error(getErrorMessage(error)) process.exitCode = 1 }) ================================================ FILE: scripts/bench-seed.js ================================================ #!/usr/bin/env node const { performance } = require('node:perf_hooks') const process = require('node:process') const ALLOWED_SNIPPETS = [1000, 5000, 10000] const ALLOWED_FRAGMENTS = [3, 4] const DEFAULT_BASE_URL = process.env.MASSCODE_API_URL || 'http://localhost:4321' const DEFAULT_CONCURRENCY = 6 const DEFAULT_PREFIX = 'seed' function getErrorMessage(error) { if (error instanceof Error) { const cause = error.cause if (cause && typeof cause === 'object' && 'message' in cause) { const causeMessage = String(cause.message || '').trim() if (causeMessage) { return `${error.message} (${causeMessage})` } } return error.message } return String(error) } function parseInteger(value, fallback) { const parsed = Number(value) if (!Number.isFinite(parsed)) { return fallback } const integer = Math.trunc(parsed) return integer > 0 ? integer : fallback } function parseArgs(argv) { const options = { all: false, baseUrl: DEFAULT_BASE_URL, concurrency: DEFAULT_CONCURRENCY, fragments: 3, help: false, prefix: DEFAULT_PREFIX, profiles: '', snippets: 1000, token: Date.now().toString(36), } for (let index = 0; index < argv.length; index += 1) { const argument = argv[index] if (argument === '--help' || argument === '-h') { options.help = true continue } if (argument === '--all') { options.all = true continue } if (argument === '--base-url') { options.baseUrl = String(argv[index + 1] || options.baseUrl) index += 1 continue } if (argument === '--snippets') { options.snippets = parseInteger(argv[index + 1], options.snippets) index += 1 continue } if (argument === '--fragments') { options.fragments = parseInteger(argv[index + 1], options.fragments) index += 1 continue } if (argument === '--concurrency') { options.concurrency = parseInteger(argv[index + 1], options.concurrency) index += 1 continue } if (argument === '--prefix') { options.prefix = String(argv[index + 1] || options.prefix).trim() || options.prefix index += 1 continue } if (argument === '--token') { options.token = String(argv[index + 1] || options.token).trim() || options.token index += 1 continue } if (argument === '--profiles') { options.profiles = String(argv[index + 1] || '') index += 1 continue } } options.concurrency = Math.max(1, options.concurrency) return options } function printHelp() { console.log(` Fake snippets seed for benchmarking. Usage: node scripts/bench-seed.js [options] Options: --snippets Allowed: ${ALLOWED_SNIPPETS.join(', ')} (default: 1000) --fragments Allowed: ${ALLOWED_FRAGMENTS.join(', ')} (default: 3) --profiles Comma-separated profiles: "1000x3,5000x4" --all Generate all profiles: 1000/5000/10000 x 3/4 --concurrency Parallel workers (default: ${DEFAULT_CONCURRENCY}) --base-url API base URL (default: ${DEFAULT_BASE_URL}) --prefix Name prefix (default: ${DEFAULT_PREFIX}) --token Dataset token (default: generated from timestamp) --help Show this help `) } function validateProfile(profile) { if (!ALLOWED_SNIPPETS.includes(profile.snippets)) { throw new Error( `Unsupported snippets count "${profile.snippets}". Allowed values: ${ALLOWED_SNIPPETS.join(', ')}`, ) } if (!ALLOWED_FRAGMENTS.includes(profile.fragments)) { throw new Error( `Unsupported fragments count "${profile.fragments}". Allowed values: ${ALLOWED_FRAGMENTS.join(', ')}`, ) } } function parseProfile(value) { const match = value.trim().match(/^(\d+)x(\d+)$/i) if (!match) { throw new Error( `Invalid profile "${value}". Expected format: x, for example 1000x3`, ) } const profile = { snippets: Number(match[1]), fragments: Number(match[2]), } validateProfile(profile) return profile } function resolveProfiles(options) { if (options.all) { return ALLOWED_SNIPPETS.flatMap(snippets => ALLOWED_FRAGMENTS.map(fragments => ({ fragments, snippets })), ) } if (options.profiles.trim()) { const uniqueProfiles = new Map() options.profiles .split(',') .map(item => item.trim()) .filter(Boolean) .forEach((item) => { const profile = parseProfile(item) uniqueProfiles.set(`${profile.snippets}x${profile.fragments}`, profile) }) if (uniqueProfiles.size === 0) { throw new Error('No valid profiles provided') } return [...uniqueProfiles.values()] } const profile = { fragments: options.fragments, snippets: options.snippets, } validateProfile(profile) return [profile] } function normalizeBaseUrl(value) { return value.endsWith('/') ? value : `${value}/` } async function requestJson(baseUrl, pathname, options) { const requestUrl = new URL(pathname, baseUrl) let response try { response = await fetch(requestUrl, options) } catch (error) { throw new Error( `Failed to reach API at ${requestUrl.origin}. Start massCode first (for example: "pnpm dev"). Details: ${getErrorMessage(error)}`, ) } if (!response.ok) { const errorBody = await response.text() throw new Error( `Request failed (${response.status}) ${pathname}: ${errorBody || response.statusText}`, ) } if (response.status === 204) { return null } return response.json() } async function createSnippet(baseUrl, name) { const createdSnippet = await requestJson(baseUrl, '/snippets/', { body: JSON.stringify({ name }), headers: { 'content-type': 'application/json', }, method: 'POST', }) return createdSnippet.id } async function createSnippetContent(baseUrl, snippetId, label, value) { await requestJson(baseUrl, `/snippets/${snippetId}/contents`, { body: JSON.stringify({ label, language: 'typescript', value, }), headers: { 'content-type': 'application/json', }, method: 'POST', }) } function formatDuration(durationMs) { if (durationMs < 1_000) { return `${durationMs.toFixed(0)}ms` } const seconds = durationMs / 1_000 if (seconds < 60) { return `${seconds.toFixed(2)}s` } return `${(seconds / 60).toFixed(2)}m` } function buildSnippetName(options, profile, snippetIndex) { return [ options.prefix, options.token, `${profile.snippets}x${profile.fragments}`, 'snippet', String(snippetIndex).padStart(5, '0'), ].join('-') } function buildFragmentBody(options, profile, snippetIndex, fragmentIndex) { const token = [ options.prefix, options.token, profile.snippets, profile.fragments, snippetIndex, fragmentIndex, ].join('-') return [ '// Generated by bench-seed.js', `export const seedToken = '${token}'`, `export const profile = '${profile.snippets}x${profile.fragments}'`, `export const snippetIndex = ${snippetIndex}`, `export const fragmentIndex = ${fragmentIndex}`, ].join('\n') } async function runProfile(baseUrl, options, profile) { const total = profile.snippets const workerCount = Math.min(total, options.concurrency) const profileLabel = `${profile.snippets}x${profile.fragments}` const startedAt = performance.now() let completed = 0 let nextSnippetIndex = 1 let workerError = null console.log(`\n[${profileLabel}] Start seeding`) console.log(`[${profileLabel}] Snippets: ${profile.snippets}`) console.log(`[${profileLabel}] Fragments per snippet: ${profile.fragments}`) console.log(`[${profileLabel}] Workers: ${workerCount}`) console.log(`[${profileLabel}] Prefix: ${options.prefix}`) console.log(`[${profileLabel}] Token: ${options.token}`) const progressTimer = setInterval(() => { const percent = ((completed / total) * 100).toFixed(1) console.log( `[${profileLabel}] Progress: ${completed}/${total} (${percent}%)`, ) }, 5_000) async function worker() { while (!workerError) { const snippetIndex = nextSnippetIndex nextSnippetIndex += 1 if (snippetIndex > total) { return } const snippetName = buildSnippetName(options, profile, snippetIndex) try { const snippetId = await createSnippet(baseUrl, snippetName) for ( let fragmentIndex = 1; fragmentIndex <= profile.fragments; fragmentIndex += 1 ) { const fragmentBody = buildFragmentBody( options, profile, snippetIndex, fragmentIndex, ) await createSnippetContent( baseUrl, snippetId, `Fragment ${fragmentIndex}`, fragmentBody, ) } } catch (error) { workerError = new Error( `Profile ${profileLabel}: failed at snippet #${snippetIndex} ("${snippetName}"). ${getErrorMessage(error)}`, ) } finally { completed += 1 } } } await Promise.all(Array.from({ length: workerCount }, () => worker())) clearInterval(progressTimer) if (workerError) { throw workerError } const durationMs = performance.now() - startedAt console.log(`[${profileLabel}] Completed in ${formatDuration(durationMs)}`) return { durationMs, fragments: profile.fragments, snippets: profile.snippets, } } async function main() { const options = parseArgs(process.argv.slice(2)) if (options.help) { printHelp() return } const profiles = resolveProfiles(options) const baseUrl = normalizeBaseUrl(options.baseUrl) const engineResponse = await requestJson(baseUrl, '/system/storage-engine', { method: 'GET', }) console.log(`API: ${baseUrl}`) console.log(`Engine: ${engineResponse.engine}`) console.log( `Profiles: ${profiles.map(p => `${p.snippets}x${p.fragments}`).join(', ')}`, ) const summary = [] for (const profile of profiles) { summary.push(await runProfile(baseUrl, options, profile)) } console.log('\nSeeding summary') console.log('--------------') summary.forEach((result) => { console.log( `${result.snippets}x${result.fragments}: ${formatDuration(result.durationMs)}`, ) }) } main().catch((error) => { console.error(getErrorMessage(error)) process.exitCode = 1 }) ================================================ FILE: scripts/copy-locales.js ================================================ const fs = require('node:fs') const path = require('node:path') const { styleText } = require('node:util') const sourceDir = path.join(__dirname, '../src/main/i18n/locales') const targetDir = path.join(__dirname, '../build/main/i18n/locales') function copyDirRecursive(sourceDir, targetDir) { if (!fs.existsSync(targetDir)) { fs.mkdirSync(targetDir, { recursive: true }) } const files = fs.readdirSync(sourceDir) for (const file of files) { const sourcePath = path.join(sourceDir, file) const targetPath = path.join(targetDir, file) const stat = fs.statSync(sourcePath) if (stat.isDirectory()) { copyDirRecursive(sourcePath, targetPath) } else { fs.copyFileSync(sourcePath, targetPath) } } } console.log(styleText('blue', 'Localization files copying...')) copyDirRecursive(sourceDir, targetDir) console.log(styleText('green', 'Localization files copying completed')) ================================================ FILE: src/main/api/dto/common/query.ts ================================================ import { t } from 'elysia' const Order = { ASC: 'ASC', DESC: 'DESC', } as const export const commonQuery = t.Optional( t.Object({ search: t.Optional(t.String()), sort: t.Optional(t.String()), order: t.Optional(t.Enum(Order)), }), ) ================================================ FILE: src/main/api/dto/common/response.ts ================================================ import { t } from 'elysia' export const commonAddResponse = t.Object({ id: t.Union([t.Number(), t.BigInt()]), }) ================================================ FILE: src/main/api/dto/folders.ts ================================================ import Elysia, { t } from 'elysia' const foldersAdd = t.Object({ name: t.String(), parentId: t.Optional(t.Union([t.Number(), t.Null()])), }) const foldersUpdate = t.Object({ name: t.Optional(t.String()), icon: t.Optional(t.Union([t.String(), t.Null()])), defaultLanguage: t.Optional(t.String()), parentId: t.Optional(t.Union([t.Number(), t.Null()])), isOpen: t.Optional(t.Number({ minimum: 0, maximum: 1 })), orderIndex: t.Optional(t.Number()), }) const foldersItem = t.Object({ id: t.Number(), name: t.String(), createdAt: t.Number(), updatedAt: t.Number(), icon: t.Union([t.String(), t.Null()]), parentId: t.Union([t.Number(), t.Null()]), isOpen: t.Number(), defaultLanguage: t.String(), orderIndex: t.Number(), }) const foldersItemWithChildren = t.Recursive(This => t.Object({ ...foldersItem.properties, children: t.Array(This), }), ) const foldersResponse = t.Array(foldersItem) const foldersTreeResponse = t.Array(foldersItemWithChildren) export const foldersDTO = new Elysia().model({ foldersAdd, foldersResponse, foldersUpdate, foldersTreeResponse, }) export type FoldersAdd = typeof foldersAdd.static export type FoldersResponse = typeof foldersResponse.static export type FoldersTree = typeof foldersTreeResponse.static export type FoldersItem = typeof foldersItem.static ================================================ FILE: src/main/api/dto/snippet-contents.ts ================================================ import Elysia, { t } from 'elysia' const snippetContentsAdd = t.Object({ snippetId: t.Number(), label: t.Union([t.String(), t.Null()]), value: t.Union([t.String(), t.Null()]), language: t.String(), }) export const snippetContentsDTO = new Elysia().model({ snippetContentsAdd, }) export type SnippetContentsAdd = typeof snippetContentsAdd.static ================================================ FILE: src/main/api/dto/snippets.ts ================================================ import Elysia, { t } from 'elysia' import { commonQuery } from './common/query' const snippetsAdd = t.Object({ name: t.String(), folderId: t.Optional(t.Union([t.Number(), t.Null()])), }) const snippetsUpdate = t.Object({ name: t.Optional(t.String()), folderId: t.Optional(t.Union([t.Number(), t.Null()])), description: t.Optional(t.Union([t.String(), t.Null()])), isDeleted: t.Optional(t.Number({ minimum: 0, maximum: 1 })), isFavorites: t.Optional(t.Number({ minimum: 0, maximum: 1 })), }) const snippetContentsAdd = t.Object({ label: t.String(), value: t.Union([t.String(), t.Null()]), language: t.String(), // TODO: enum }) const snippetContentsUpdate = t.Object({ label: t.Optional(t.String()), value: t.Optional(t.Union([t.String(), t.Null()])), language: t.Optional(t.String()), // TODO: enum }) const snippetItem = t.Object({ id: t.Number(), name: t.String(), description: t.Union([t.String(), t.Null()]), tags: t.Array( t.Object({ id: t.Number(), name: t.String(), }), ), folder: t.Nullable( t.Object({ id: t.Number(), name: t.String(), }), ), contents: t.Array( t.Object({ id: t.Number(), label: t.String(), value: t.Union([t.String(), t.Null()]), language: t.String(), }), ), isFavorites: t.Number(), isDeleted: t.Number(), createdAt: t.Number(), updatedAt: t.Number(), }) const snippetsResponse = t.Array(snippetItem) const snippetsCountsResponse = t.Object({ total: t.Number(), trash: t.Number(), }) export const snippetsDTO = new Elysia().model({ snippetContentsAdd, snippetContentsUpdate, snippetsAdd, snippetsUpdate, snippetsCountsResponse, snippetsQuery: t.Object({ ...commonQuery.properties, folderId: t.Optional(t.Number()), tagId: t.Optional(t.Number()), isFavorites: t.Optional(t.Number({ minimum: 0, maximum: 1 })), isDeleted: t.Optional(t.Number({ minimum: 0, maximum: 1 })), isInbox: t.Optional(t.Number({ minimum: 0, maximum: 1 })), }), snippetsResponse, }) export type SnippetsAdd = typeof snippetsAdd.static export type SnippetsResponse = typeof snippetsResponse.static export type SnippetsCountsResponse = typeof snippetsCountsResponse.static ================================================ FILE: src/main/api/dto/tags.ts ================================================ import Elysia, { t } from 'elysia' const tagsAdd = t.Object({ name: t.String(), }) const tagsItem = t.Object({ id: t.Number(), name: t.String(), }) export const tagsResponse = t.Array(tagsItem) export const tagsAddResponse = t.Object({ id: t.Number(), }) export const tagsDTO = new Elysia().model({ tagsAdd, tagsResponse, tagsAddResponse, }) export type TagsAdd = typeof tagsAdd.static export type TagsResponse = typeof tagsResponse.static ================================================ FILE: src/main/api/index.ts ================================================ import { cors } from '@elysiajs/cors' import { swagger } from '@elysiajs/swagger' import { app as electronApp } from 'electron' import { Elysia } from 'elysia' import { store } from '../store' import { importEsm } from '../utils' import folders from './routes/folders' import snippets from './routes/snippets' import system from './routes/system' import tags from './routes/tags' export async function initApi() { // поскольку @elysiajs/node использует crossws, который работает только в ESM среде, // то делаем хак с динамическим импортом const { node } = await importEsm('@elysiajs/node') const app = new Elysia({ adapter: node() }) const port = store.preferences.get('apiPort') app .use(cors({ origin: '*' })) .use( swagger({ documentation: { info: { title: 'massCode API', version: electronApp.getVersion(), }, }, }), ) .use(snippets) .use(folders) .use(system) .use(tags) .listen(port) // eslint-disable-next-line no-console console.log(`\nAPI started on port ${port}\n`) } ================================================ FILE: src/main/api/routes/folders.ts ================================================ import type { FoldersResponse, FoldersTree } from '../dto/folders' import { Elysia } from 'elysia' import { useStorage } from '../../storage' import { commonAddResponse } from '../dto/common/response' import { foldersDTO } from '../dto/folders' const app = new Elysia({ prefix: '/folders' }) function parseStorageError( error: unknown, ): { code: string, message: string } | null { if (!(error instanceof Error)) { return null } const separatorIndex = error.message.indexOf(':') if (separatorIndex <= 0) { return null } return { code: error.message.slice(0, separatorIndex), message: error.message.slice(separatorIndex + 1).trim(), } } function mapStorageError(status: unknown, error: unknown): never { const setStatus = status as ( code: number, payload: { message: string }, ) => never const parsedError = parseStorageError(error) if (!parsedError) { return setStatus(500, { message: 'Internal storage error' }) } if (parsedError.code === 'NAME_CONFLICT') { return setStatus(409, { message: parsedError.message }) } if (parsedError.code === 'FOLDER_NOT_FOUND') { return setStatus(404, { message: parsedError.message }) } if ( parsedError.code === 'INVALID_NAME' || parsedError.code === 'RESERVED_NAME' ) { return setStatus(400, { message: parsedError.message }) } return setStatus(500, { message: parsedError.message || 'Internal storage error', }) } app .use(foldersDTO) // Получение списка папок .get( '/', () => { const storage = useStorage() const result = storage.folders.getFolders() return result as FoldersResponse }, { response: 'foldersResponse', detail: { tags: ['Folders'], }, }, ) // Получение папок в виде древовидной структуры .get( '/tree', (): any => { const storage = useStorage() return storage.folders.getFoldersTree() as FoldersTree }, { response: 'foldersTreeResponse', detail: { tags: ['Folders'], }, }, ) // Добавление папки .post( '/', ({ body, status }) => { const storage = useStorage() try { const { id } = storage.folders.createFolder(body) return { id } } catch (error) { return mapStorageError(status, error) } }, { body: 'foldersAdd', response: commonAddResponse, detail: { tags: ['Folders'], }, }, ) // Обновление папки .patch( '/:id', ({ params, body, status }) => { const storage = useStorage() try { const { invalidInput, notFound } = storage.folders.updateFolder( Number(params.id), body, ) if (invalidInput) { return status(400, { message: 'Need at least one field to update' }) } if (notFound) { return status(404, { message: 'Folder not found' }) } return { message: 'Folder updated' } } catch (error) { return mapStorageError(status, error) } }, { body: 'foldersUpdate', detail: { tags: ['Folders'], }, }, ) // Удаление папки .delete( '/:id', ({ params, status }) => { const storage = useStorage() try { const { deleted } = storage.folders.deleteFolder(Number(params.id)) if (!deleted) { return status(404, { message: 'Folder not found' }) } return { message: 'Folder deleted' } } catch (error) { return mapStorageError(status, error) } }, { detail: { tags: ['Folders'], }, }, ) export default app ================================================ FILE: src/main/api/routes/snippets.ts ================================================ import type { SnippetsCountsResponse, SnippetsResponse } from '../dto/snippets' import Elysia from 'elysia' import { useStorage } from '../../storage' import { commonAddResponse } from '../dto/common/response' import { snippetsDTO } from '../dto/snippets' const app = new Elysia({ prefix: '/snippets' }) function parseStorageError( error: unknown, ): { code: string, message: string } | null { if (!(error instanceof Error)) { return null } const separatorIndex = error.message.indexOf(':') if (separatorIndex <= 0) { return null } return { code: error.message.slice(0, separatorIndex), message: error.message.slice(separatorIndex + 1).trim(), } } function mapStorageError(status: unknown, error: unknown): never { const setStatus = status as ( code: number, payload: { message: string }, ) => never const parsedError = parseStorageError(error) if (!parsedError) { return setStatus(500, { message: 'Internal storage error' }) } if (parsedError.code === 'NAME_CONFLICT') { return setStatus(409, { message: parsedError.message }) } if ( parsedError.code === 'FOLDER_NOT_FOUND' || parsedError.code === 'SNIPPET_NOT_FOUND' ) { return setStatus(404, { message: parsedError.message }) } if ( parsedError.code === 'INVALID_NAME' || parsedError.code === 'RESERVED_NAME' ) { return setStatus(400, { message: parsedError.message }) } return setStatus(500, { message: parsedError.message || 'Internal storage error', }) } app .use(snippetsDTO) // Получение списка сниппетов c возможностью фильтрации .get( '/', ({ query }) => { const storage = useStorage() const result = storage.snippets.getSnippets(query) return result as SnippetsResponse }, { query: 'snippetsQuery', response: 'snippetsResponse', detail: { tags: ['Snippets'], }, }, ) // Получение кол-ва сниппетов .get( '/counts', () => { const storage = useStorage() return storage.snippets.getSnippetsCounts() as SnippetsCountsResponse }, { response: 'snippetsCountsResponse', detail: { tags: ['Snippets'], }, }, ) // Создание сниппета .post( '/', ({ body, status }) => { const storage = useStorage() try { const { id } = storage.snippets.createSnippet(body) return { id } } catch (error) { return mapStorageError(status, error) } }, { body: 'snippetsAdd', response: commonAddResponse, detail: { tags: ['Snippets'], }, }, ) // Добавление содержимого сниппета .post( '/:id/contents', ({ params, body, status }) => { const storage = useStorage() try { const { id } = storage.snippets.createSnippetContent( Number(params.id), body, ) return { id } } catch (error) { return mapStorageError(status, error) } }, { body: 'snippetContentsAdd', response: commonAddResponse, detail: { tags: ['Snippets'], }, }, ) // Обновление сниппета .patch( '/:id', ({ params, body, status }) => { const storage = useStorage() try { const { invalidInput, notFound } = storage.snippets.updateSnippet( Number(params.id), body, ) if (invalidInput) { return status(400, { message: 'Need at least one field to update' }) } if (notFound) { return status(404, { message: 'Snippet not found' }) } return { message: 'Snippet updated' } } catch (error) { return mapStorageError(status, error) } }, { body: 'snippetsUpdate', detail: { tags: ['Snippets'], }, }, ) // Обновление содержимого сниппета .patch( '/:id/contents/:contentId', ({ params, body, status }) => { const storage = useStorage() const { invalidInput, notFound, parentNotFound } = storage.snippets.updateSnippetContent( Number(params.id), Number(params.contentId), body, ) if (invalidInput) { return status(400, { message: 'Need at least one field to update' }) } if (notFound) { return status(404, { message: 'Snippet content not found' }) } if (parentNotFound) { return status(404, { message: 'Snippet not found' }) } return { message: 'Snippet content updated' } }, { body: 'snippetContentsUpdate', detail: { tags: ['Snippets'], }, }, ) // Добавление тега к сниппету .post( '/:id/tags/:tagId', ({ params, status }) => { const storage = useStorage() const { snippetFound, tagFound } = storage.snippets.addTagToSnippet( Number(params.id), Number(params.tagId), ) if (!snippetFound) { return status(404, { message: 'Snippet not found' }) } if (!tagFound) { return status(404, { message: 'Tag not found' }) } return { message: 'Tag added to snippet' } }, { detail: { tags: ['Snippets'], }, }, ) // Удаление тега из сниппета .delete( '/:id/tags/:tagId', ({ params, status }) => { const storage = useStorage() const { snippetFound, tagFound, relationFound } = storage.snippets.deleteTagFromSnippet( Number(params.id), Number(params.tagId), ) if (!snippetFound) { return status(404, { message: 'Snippet not found' }) } if (!tagFound) { return status(404, { message: 'Tag not found' }) } if (!relationFound) { return status(404, { message: 'Tag is not associated with this snippet', }) } return { message: 'Tag removed from snippet' } }, { detail: { tags: ['Snippets'], }, }, ) // Удаление сниппета .delete( '/:id', ({ params, status }) => { const storage = useStorage() const { deleted } = storage.snippets.deleteSnippet(Number(params.id)) if (!deleted) { return status(404, { message: 'Snippet not found' }) } return { message: 'Snippet deleted' } }, { detail: { tags: ['Snippets'], }, }, ) // Удаление всех сниппетов в корзине .delete( '/trash', ({ status }) => { const storage = useStorage() const { deletedCount } = storage.snippets.emptyTrash() if (!deletedCount) { return status(404, { message: 'No snippets in trash' }) } return { message: `Successfully emptied trash: ${deletedCount} snippet(s) deleted`, } }, { detail: { tags: ['Snippets'], }, }, ) // Удаление содержимого сниппета .delete( '/:id/contents/:contentId', ({ params, status }) => { const storage = useStorage() const { deleted } = storage.snippets.deleteSnippetContent( Number(params.contentId), ) if (!deleted) { return status(404, { message: 'Snippet content not found' }) } return { message: 'Snippet content deleted' } }, { detail: { tags: ['Snippets'], }, }, ) export default app ================================================ FILE: src/main/api/routes/system.ts ================================================ import { Elysia } from 'elysia' import { resetRuntimeCache } from '../../storage/providers/markdown' import { getVaultPath } from '../../storage/providers/markdown/runtime' import { store } from '../../store' const app = new Elysia({ prefix: '/system' }) app.get( '/storage-engine', () => { const engine = store.preferences.get('storage.engine') return { engine } }, { detail: { tags: ['System'], }, }, ) app.get( '/storage-vault-path', () => { return { vaultPath: getVaultPath(), } }, { detail: { tags: ['System'], }, }, ) app.post( '/storage-cache/reset', () => { if (store.preferences.get('storage.engine') === 'markdown') { resetRuntimeCache() } return { reset: true, } }, { detail: { tags: ['System'], }, }, ) export default app ================================================ FILE: src/main/api/routes/tags.ts ================================================ import type { TagsResponse } from '../dto/tags' import Elysia from 'elysia' import { useStorage } from '../../storage' import { tagsDTO } from '../dto/tags' const app = new Elysia({ prefix: '/tags' }) app .use(tagsDTO) // Получение списка тегов .get( '/', () => { const storage = useStorage() const result = storage.tags.getTags() return result as TagsResponse }, { response: 'tagsResponse', detail: { tags: ['Tags'], }, }, ) // Добавление тега .post( '/', ({ body }) => { const storage = useStorage() const { id } = storage.tags.createTag(body.name) return { id } }, { body: 'tagsAdd', response: 'tagsAddResponse', detail: { tags: ['Tags'], }, }, ) // Удаление тега и удаление его из всех сниппетов .delete( '/:id', ({ params, status }) => { const storage = useStorage() const { deleted } = storage.tags.deleteTag(Number(params.id)) if (!deleted) { return status(404, { message: 'Tag not found' }) } return { message: 'Tag deleted' } }, { detail: { tags: ['Tags'], }, }, ) export default app ================================================ FILE: src/main/currencyRates.ts ================================================ import { store } from './store' const CACHE_TTL = 1000 * 60 * 60 interface CurrencyRatesApiResponse { result?: string rates?: Record time_last_update_unix?: number } export interface CurrencyRatesPayload { rates: Record fetchedAt: number source: 'live' | 'cache' | 'unavailable' } function normalizeRates(rates: Record) { const normalized: Record = { USD: 1 } Object.entries(rates).forEach(([code, value]) => { if (typeof value === 'number' && Number.isFinite(value)) { normalized[code] = value } }) normalized.USD = 1 return normalized } export async function getCurrencyRates(): Promise { const cached = store.currencyRates.get('cache') if (cached && Date.now() - cached.fetchedAt < CACHE_TTL) { return { ...cached, source: 'cache', } } try { const response = await fetch('https://open.er-api.com/v6/latest/USD') if (!response.ok) { throw new Error( `Currency rates request failed with status ${response.status}`, ) } const data = (await response.json()) as CurrencyRatesApiResponse if (data.result !== 'success' || !data.rates) { throw new Error('Currency rates response is invalid') } const payload = { rates: normalizeRates(data.rates), fetchedAt: data.time_last_update_unix ? data.time_last_update_unix * 1000 : Date.now(), } store.currencyRates.set('cache', payload) return { ...payload, source: 'live', } } catch { if (cached) { return { ...cached, source: 'cache', } } return { rates: {}, fetchedAt: 0, source: 'unavailable', } } } ================================================ FILE: src/main/db/index.ts ================================================ /* eslint-disable node/prefer-global/process */ import type { Backup } from './types' import path from 'node:path' import Database from 'better-sqlite3' import { format } from 'date-fns' import fs from 'fs-extra' import { store } from '../store' import { log } from '../utils' const DB_NAME = 'massCode.db' const isDev = process.env.NODE_ENV === 'development' let db: Database.Database | null = null let backupTimer: NodeJS.Timeout | null = null function isSqliteStorageEngine(): boolean { return store.preferences.get('storage.engine') === 'sqlite' } function isSqliteFile(dbPath: string): boolean { try { if (!fs.existsSync(dbPath)) return false const buffer = fs.readFileSync(dbPath).subarray(0, 16) return buffer.toString('ascii') === 'SQLite format 3\x00' } catch { return false } } function tableExists(db: Database.Database, table: string): boolean { const row = db .prepare( ` SELECT name FROM sqlite_master WHERE type='table' AND name=? `, ) .get(table) return !!row } export function useDB() { if (db) return db const dbPath = `${store.preferences.get('storagePath')}/${DB_NAME}` const dbDir = path.dirname(dbPath) if (!fs.existsSync(dbDir)) { fs.mkdirSync(dbDir, { recursive: true }) } if (fs.existsSync(dbPath) && !isSqliteFile(dbPath)) { const backupPath = `${dbPath}.old` try { fs.moveSync(dbPath, backupPath) } catch {} } try { db = new Database(dbPath, { // eslint-disable-next-line no-console verbose: isDev ? console.log : undefined, }) db.pragma('journal_mode = WAL') db.pragma('foreign_keys = ON') // Поскольку из коробки в SQLite регистронезависимый поиск возможен только для ASCII, // то добавляем самостоятельно функцию для сравнения строк без учета регистра db.function('unicode_lower', (str: unknown) => { if (typeof str !== 'string') return str return str.toLowerCase() }) // Таблица для папок db.exec(` CREATE TABLE IF NOT EXISTS folders ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, defaultLanguage TEXT NOT NULL, parentId INTEGER, isOpen INTEGER NOT NULL, orderIndex INTEGER NOT NULL DEFAULT 0, icon TEXT, createdAt INTEGER NOT NULL, updatedAt INTEGER NOT NULL, FOREIGN KEY(parentId) REFERENCES folders(id) ) `) // Таблица для сниппетов db.exec(` CREATE TABLE IF NOT EXISTS snippets ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, description TEXT, folderId INTEGER, isDeleted INTEGER NOT NULL, isFavorites INTEGER NOT NULL, createdAt INTEGER NOT NULL, updatedAt INTEGER NOT NULL, FOREIGN KEY(folderId) REFERENCES folders(id) ) `) // Таблица для содержимого (фрагментов) сниппетов db.exec(` CREATE TABLE IF NOT EXISTS snippet_contents ( id INTEGER PRIMARY KEY AUTOINCREMENT, snippetId INTEGER NOT NULL, label TEXT, value TEXT, language TEXT, FOREIGN KEY(snippetId) REFERENCES snippets(id) ) `) // Таблица для тегов db.exec(` CREATE TABLE IF NOT EXISTS tags ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL UNIQUE, createdAt INTEGER NOT NULL, updatedAt INTEGER NOT NULL ) `) // Таблица для связи сниппетов с тегами (многие ко многим) db.exec(` CREATE TABLE IF NOT EXISTS snippet_tags ( snippetId INTEGER NOT NULL, tagId INTEGER NOT NULL, PRIMARY KEY(snippetId, tagId), FOREIGN KEY(snippetId) REFERENCES snippets(id), FOREIGN KEY(tagId) REFERENCES tags(id) ) `) return db } catch (error) { log('Database initialization failed', error) throw error } } export function reloadDB() { try { // Закрываем текущую базу данных, если она открыта if (db) { db.close() db = null // eslint-disable-next-line no-console console.log('Current database has been closed') } // Определяем путь к новой базе данных const dbPath = `${store.preferences.get('storagePath')}/${DB_NAME}` // Создаем новое соединение с базой данных db = new Database(dbPath, { // eslint-disable-next-line no-console verbose: isDev ? console.log : undefined, }) db.pragma('journal_mode = WAL') db.pragma('foreign_keys = ON') // eslint-disable-next-line no-console console.log(`Database successfully reloaded: ${dbPath}`) } catch (error) { log('Error while reloading the database', error) throw error } } export function clearDB() { try { const db = useDB() const stmt = db.transaction(() => { const tables = [ // Таблицы со внешними ключами должны быть первыми 'snippet_tags', 'snippet_contents', 'snippets', // Остальные таблицы можно удалить в любом порядке 'tags', 'folders', ] for (const table of tables) { if (tableExists(db, table)) { db.prepare(`DELETE FROM ${table}`).run() } } // Сброс автоинкремента — тоже только если таблица есть if (tableExists(db, 'sqlite_sequence')) { db.prepare('DELETE FROM sqlite_sequence').run() } }) stmt() } catch (error) { log('Error while clearing the database', error) throw error } } export async function moveDB(path: string) { try { const currentPath = `${store.preferences.get('storagePath')}/${DB_NAME}` const newPath = `${path}/${DB_NAME}` const isExists = await fs.exists(newPath) if (isExists) { throw new Error(`Database already exists at the new path: ${newPath}`) } if (db) { db.close() db = null } await fs.move(currentPath, newPath, { overwrite: true }) store.preferences.set('storagePath', path) reloadDB() } catch (error) { log('Error while moving the database', error) throw error } } export async function createBackup(manual = false) { try { if (!isSqliteStorageEngine()) { return null } const db = useDB() const backupSettings = store.preferences.get('backup') await fs.ensureDir(backupSettings.path) const date = format(Date.now(), 'yyyy-MM-dd_HH-mm-ss-SSS') const backupFileName = manual ? `massCode-manual-backup-${date}.db` : `massCode-backup-${date}.db` const backupFilePath = path.join(backupSettings.path, backupFileName) const stmt = db.prepare(`VACUUM INTO ?`) stmt.run(backupFilePath) store.preferences.set('backup.lastBackupTime', Date.now()) await cleanupOldBackups() return backupFilePath } catch (error) { log('Error creating database backup', error) throw error } } async function cleanupOldBackups() { try { const backupSettings = store.preferences.get('backup') const files = await fs.readdir(backupSettings.path) const backupFiles = files .filter( file => file.startsWith('massCode-backup-') && file.endsWith('.db'), ) .map(file => ({ name: file, path: path.join(backupSettings.path, file), stat: fs.statSync(path.join(backupSettings.path, file)), })) .sort((a, b) => b.stat.mtime.getTime() - a.stat.mtime.getTime()) if (backupFiles.length > backupSettings.maxBackups) { const filesToDelete = backupFiles.slice(backupSettings.maxBackups) for (const file of filesToDelete) { await fs.remove(file.path) } } } catch (error) { console.error('Error cleaning up old backups:', error) } } export async function deleteBackup(backupPath: string) { await fs.remove(backupPath) } function shouldCreateBackup() { if (!isSqliteStorageEngine()) { return false } const backupSettings = store.preferences.get('backup') if (!backupSettings.enabled) { return false } const lastBackupTime = backupSettings.lastBackupTime if (!lastBackupTime) { return true // Если бекап никогда не создавался } const now = Date.now() const intervalMs = backupSettings.interval * 60 * 60 * 1000 // Конвертируем часы в миллисекунды return now - lastBackupTime >= intervalMs } export async function startAutoBackup() { try { if (backupTimer) { clearInterval(backupTimer) backupTimer = null } if (!isSqliteStorageEngine()) { return } const backupSettings = store.preferences.get('backup') if (!backupSettings.enabled) { return } if (shouldCreateBackup()) { await createBackup() } const intervalMs = backupSettings.interval * 60 * 60 * 1000 // Конвертируем часы в миллисекунды backupTimer = setInterval(async () => { try { if (shouldCreateBackup()) { await createBackup() } } catch (error) { log('Error during scheduled backup', error) } }, intervalMs) } catch (error) { log('Error starting auto backup', error) } } export function stopAutoBackup() { if (backupTimer) { clearInterval(backupTimer) backupTimer = null } } export async function restoreFromBackup(backupFilePath: string) { try { const storagePath = store.preferences.get('storagePath') const currentDbPath = path.join(storagePath, DB_NAME) const backupExists = await fs.exists(backupFilePath) if (!backupExists) { throw new Error(`Backup file does not exist: ${backupFilePath}`) } if (db) { db.close() db = null } await fs.copy(backupFilePath, currentDbPath, { overwrite: true }) reloadDB() console.warn(`Database restored from backup: ${backupFilePath}`) } catch (error) { log('Error restoring database from backup', error) throw error } } export async function getBackupList() { try { const backupSettings = store.preferences.get('backup') if (!(await fs.exists(backupSettings.path))) { return [] } const files = await fs.readdir(backupSettings.path) const backupFiles: Backup[] = [] for (const file of files) { if ( file.startsWith('massCode-backup-') || (file.startsWith('massCode-manual-backup-') && file.endsWith('.db')) ) { const filePath = path.join(backupSettings.path, file) const stat = await fs.stat(filePath) backupFiles.push({ name: file, path: filePath, size: stat.size, createdAt: stat.mtime, }) } } return backupFiles.sort( (a, b) => b.createdAt.getTime() - a.createdAt.getTime(), ) } catch (error) { log('Error getting backup list', error) return [] } } export async function moveBackupStorage(newPath: string) { try { const backupSettings = store.preferences.get('backup') const newPathExists = await fs.exists(newPath) if (!newPathExists) { throw new Error(`Target directory does not exist: ${newPath}`) } const newPathStat = await fs.stat(newPath) if (!newPathStat.isDirectory()) { throw new Error(`Target path is not a directory: ${newPath}`) } const files = await fs.readdir(backupSettings.path) const backupFiles = files.filter( file => (file.startsWith('massCode-backup-') || file.startsWith('massCode-manual-backup-')) && file.endsWith('.db'), ) for (const file of backupFiles) { const sourcePath = path.join(backupSettings.path, file) const targetPath = path.join(newPath, file) await fs.move(sourcePath, targetPath, { overwrite: true }) } store.preferences.set('backup.path', newPath) } catch (error) { log('Error while moving backup storage', error) throw error } } ================================================ FILE: src/main/db/migrate.ts ================================================ // import type Database from 'better-sqlite3' import type { JSONDB } from './types' import { clearDB, useDB } from '.' export function migrateJsonToSqlite(jsonData: JSONDB) { return new Promise((resolve, reject) => { try { const db = useDB() clearDB() // Подготовленные выражения для вставки данных const insertFolderStmt = db.prepare(` INSERT INTO folders (name, defaultLanguage, parentId, isOpen, createdAt, updatedAt, icon, orderIndex) VALUES (?, ?, ?, ?, ?, ?, ?, ?) `) const updateFolderParentStmt = db.prepare(` UPDATE folders SET parentId = ? WHERE id = ? `) const insertTagStmt = db.prepare(` INSERT INTO tags (name, createdAt, updatedAt) VALUES (?, ?, ?) `) const insertSnippetStmt = db.prepare(` INSERT INTO snippets (name, description, folderId, isDeleted, isFavorites, createdAt, updatedAt) VALUES (?, ?, ?, ?, ?, ?, ?) `) const insertSnippetContentStmt = db.prepare(` INSERT INTO snippet_contents (snippetId, label, value, language) VALUES (?, ?, ?, ?) `) const insertSnippetTagStmt = db.prepare(` INSERT INTO snippet_tags (snippetId, tagId) VALUES (?, ?) `) // Словари для сопоставления оригинальных string id с новыми числовыми id const folderIdMap: Record = {} const tagIdMap: Record = {} const snippetIdMap: Record = {} // Транзакция для миграции данных const transaction = db.transaction(() => { // Миграция папок jsonData.folders.forEach((folder) => { const result = insertFolderStmt.run( folder.name || 'Untitled Folder', folder.defaultLanguage || 'plain_text', null, // parentId обновим позже folder.isOpen ? 1 : 0, folder.createdAt || Date.now(), folder.updatedAt || Date.now(), folder.icon || null, folder.index ?? 0, ) folderIdMap[folder.id] = Number(result.lastInsertRowid) }) // Обновляем поле parentId для папок, у которых оно задано jsonData.folders.forEach((folder) => { if (folder.parentId) { const newId = folderIdMap[folder.id] const parentNewId = folderIdMap[folder.parentId] if (parentNewId) { updateFolderParentStmt.run(parentNewId, newId) } } }) // Миграция тегов jsonData.tags.forEach((tag) => { const result = insertTagStmt.run( tag.name || 'Untitled Tag', tag.createdAt || Date.now(), tag.updatedAt || Date.now(), ) tagIdMap[tag.id] = Number(result.lastInsertRowid) }) // Миграция сниппетов, их содержимого и связей с тегами jsonData.snippets.forEach((snippet) => { // Определяем новый id папки для сниппета const mappedFolderId = folderIdMap[snippet.folderId] || null const result = insertSnippetStmt.run( snippet.name || 'Untitled Snippet', snippet.description || null, mappedFolderId, snippet.isDeleted ? 1 : 0, snippet.isFavorites ? 1 : 0, snippet.createdAt || Date.now(), snippet.updatedAt || Date.now(), ) const newSnippetId = Number(result.lastInsertRowid) snippetIdMap[snippet.id] = newSnippetId // Устанавливаем содержимое сниппета snippet.content.forEach((content) => { insertSnippetContentStmt.run( newSnippetId, content.label || null, content.value || null, content.language || null, ) }) // Устанавливаем связи сниппета с тегами if (snippet.tagsIds && snippet.tagsIds.length > 0) { snippet.tagsIds.forEach((tagOrigId) => { const mappedTagId = tagIdMap[tagOrigId] if (mappedTagId) { insertSnippetTagStmt.run(newSnippetId, mappedTagId) } }) } }) }) transaction() resolve(true) } catch (error) { reject(error) } }) } ================================================ FILE: src/main/db/types/index.ts ================================================ interface Folder { id: string name: string defaultLanguage: string | null parentId: string | null isOpen: boolean isSystem: boolean index: number createdAt: number updatedAt: number icon: string | null } interface SnippetContent { label: string value: string language: string } interface Snippet { id: string name: string content: SnippetContent[] description: string | null folderId: string tagsIds: string[] isDeleted: boolean isFavorites: boolean createdAt: number updatedAt: number } interface Tag { id: string name: string createdAt: number updatedAt: number } export interface JSONDB { folders: Folder[] snippets: Snippet[] tags: Tag[] } export interface Backup { name: string path: string size: number createdAt: Date } ================================================ FILE: src/main/i18n/index.ts ================================================ import { lstatSync, readdirSync } from 'node:fs' import { join } from 'node:path' import i18next from 'i18next' import Backend from 'i18next-fs-backend' import { store } from '../store' import { language } from './language' const storedLng = store.preferences.get('language') const lng = storedLng && Object.keys(language).includes(storedLng) ? storedLng : 'en_US' i18next.use(Backend).init({ fallbackLng: 'en_US', lng, debug: false, ns: ['devtools', 'menu', 'messages', 'preferences', 'special', 'ui'], defaultNS: 'ui', initImmediate: false, preload: readdirSync(join(__dirname, './locales')).filter((fileName) => { const joinedPath = join(join(__dirname, './locales'), fileName) const isDirectory = lstatSync(joinedPath).isDirectory() return isDirectory }), backend: { loadPath: join(__dirname, './locales/{{lng}}/{{ns}}.json'), }, }) i18next.addResourceBundle(lng, 'language', language) export default i18next ================================================ FILE: src/main/i18n/language.ts ================================================ export const language = { cs_CZ: 'Čeština', de_DE: 'Deutsch', el_GR: 'Ελληνικά', en_US: 'English', es_ES: 'Español', fa_IR: 'فارسی', fr_FR: 'French', ja_JP: '日本語', pl_PL: 'Polski', pt_BR: 'Português (Brasil)', ro_RO: 'Română', ru_RU: 'Русский', tr_TR: 'Türkçe', uk_UA: 'Українська', zh_CN: '中文 (简体)', zh_HK: '中文 (繁體 香港特別行政區)', zh_TW: '中文 (繁體)', } as const ================================================ FILE: src/main/i18n/locales/README.md ================================================ # Locales ## File Structure Locales are stored in directories named according to the [BCP 47 language tag standard](https://en.wikipedia.org/wiki/IETF_language_tag) which uses ISO 639 language codes and ISO 3166-1 country codes. We use the format: `language_REGION` where: - `language` is a two-letter [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (lowercase) - `REGION` is a two-letter [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1) (uppercase) Examples: - `en_US` - English (United States) - `en_GB` - English (United Kingdom) - `pt_BR` - Portuguese (Brazil) - `pt_PT` - Portuguese (Portugal) - `ru_RU` - Russian (Russia) - `zh_CN` - Chinese (China) ### Main Files: - **ui.json** - User interface elements - **menu.json** - Application menus - **messages.json** - Dialogs, confirmation prompts, warnings, errors, and descriptions - **preferences.json** - Application settings and preferences - **devtools.json** - Developer tools and utilities ## Organization Principles 1. **Modularity**: Separate keys by functional blocks 2. **Hierarchy**: Use nested objects to group related keys 3. **Consistency**: Maintain the same structure across files 4. **Context**: Place keys in context-appropriate files ## Adding New Keys When adding new localization keys: 1. Determine which functional block your key belongs to 2. Choose the appropriate file based on the content type 3. Follow the existing structure and naming conventions 4. Add the key to all language packs ## Adding New Languages 1. Make a duplicate of the `en_US` (or other base language) directory, then rename it according to the language_REGION format (e.g., `ru_RU`, `pt_BR`) 2. Translate all values in all files 3. Add a new property to i18n where the property name corresponds to the directory name: ```javascript // Property name should match directory name export const language = { en_US: 'English', ru_RU: 'Русский', pt_BR: 'Português (Brasil)', // new language } ``` 4. Create a PR When creating a PR, please follow this commit message format: ``` feat(i18n): add translation ``` For example: ``` feat(i18n): add zh_CN translation fix(i18n): pt_BR translation ``` ## Translation Guidelines 1. Preserve the original formatting and placeholders (e.g., `{{count}}`, `{{name}}`) 2. Consider the context in which the phrase is used 3. Maintain a consistent style and terminology throughout the translation 4. Verify that your translation fits the UI components (text length, line breaks) 5. For narrow navigation areas such as the space rail, keep product labels short and stable. If a locale would make the label too long, it is acceptable to omit that locale-specific label and rely on the `en_US` fallback while adding localized tooltip keys instead. ================================================ FILE: src/main/i18n/locales/cs_CZ/devtools.json ================================================ { "label": "Vývojářské nástroje", "generators": { "label": "Generátory", "lorem": { "label": "Generátor Lorem Ipsum", "description": "Generovat zástupný text", "selectType": "Vybrat typ", "maxCount": "Max {{count}}", "types": { "words": "Slova", "sentences": "Věty", "paragraphs": "Odstavce" } }, "json": { "label": "JSON generátor", "description": "Generovat náhodná JSON data s různými typy polí", "fields": "Pole", "fieldName": "Název pole", "selectType": "Vybrat typ", "addField": "Přidat pole", "rowCount": "Počet řádků", "maxRows": "Max 1000", "categories": { "general": "Obecné", "person": "Osoba", "internet": "Internet", "location": "Umístění", "finance": "Finance", "commerce": "Obchod", "company": "Společnost", "lorem": "Lorem", "date": "Datum", "number": "Číslo", "phone": "Telefon", "image": "Obrázek" }, "types": { "rowNumber": "Číslo řádku", "firstName": "Křestní jméno", "lastName": "Příjmení", "fullName": "Celé jméno", "gender": "Pohlaví", "jobTitle": "Pracovní pozice", "email": "E-mailová adresa", "username": "Uživatelské jméno", "password": "Heslo", "url": "URL", "ipv4": "IP adresa v4", "ipv6": "IP adresa v6", "userAgent": "User Agent", "city": "Město", "country": "Země", "streetAddress": "Adresa", "zipCode": "PSČ", "latitude": "Zeměpisná šířka", "longitude": "Zeměpisná délka", "amount": "Částka", "currencyCode": "Kód měny", "creditCardNumber": "Číslo kreditní karty", "productName": "Název produktu", "price": "Cena", "department": "Oddělení", "companyName": "Název společnosti", "catchPhrase": "Slogan", "word": "Slovo", "sentence": "Věta", "paragraph": "Odstavec", "past": "Minulé datum", "future": "Budoucí datum", "recent": "Nedávné datum", "birthdate": "Datum narození", "int": "Celé číslo", "float": "Desetinné číslo", "boolean": "Boolean", "phoneNumber": "Telefonní číslo", "imei": "IMEI", "avatar": "URL avatara", "imageUrl": "URL obrázku" } } }, "converters": { "label": "Převodníky", "caseConverter": { "label": "Převodník velikosti písmen", "description": "Transformace textu do různých velikostí písmen", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Text na Unicode", "description": "Převod textu na Unicode a naopak", "modes": { "textToUnicode": "Text → Unicode", "unicodeToText": "Unicode → Text" } }, "textToAscii": { "label": "Text na ASCII Binary", "description": "Převod textu na ASCII binary a naopak", "modes": { "textToAscii": "Text → ASCII", "asciiToText": "ASCII → Text" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Kódování nebo dekódování textu do Base64", "modes": { "textToBase64": "Text → Base64", "base64ToText": "Base64 → Text" } }, "jsonToYaml": { "label": "JSON na YAML", "description": "Převod JSON na YAML a naopak", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON na TOML", "description": "Převod JSON na TOML a naopak", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON na XML", "description": "Převod JSON na XML a naopak", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Převodník barev", "description": "Převod barev mezi různými formáty" } }, "crypto": { "label": "Kryptografie / Bezpečnost", "hash": { "label": "Generátor hash", "description": "Generování hashů z textu" }, "hmac": { "label": "Generátor HMAC", "description": "Generování autentizačního kódu zprávy založeného na hash (HMAC) složeného z klíče a zprávy" }, "password": { "label": "Generátor hesel", "description": "Generování bezpečného hesla" }, "uuid": { "label": "Generátor UUID", "description": "Generování univerzálního jedinečného identifikátoru (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "Parser URL", "description": "Parsování URL na komponenty" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Kódování nebo dekódování URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Převod textu na URL-přátelský slug" } }, "form": { "input": "Vstup", "output": "Výstup", "inputString": "Vstupní řetězec", "outputString": "Výstupní řetězec", "inputUrl": "Vstupní URL", "outputUrl": "Výstupní URL", "parsedUrl": "Parsovaná URL", "splitQueryString": "Rozdělit Query String", "key": "Klíč", "value": "Hodnota", "component": "Komponenta", "result": "Výsledek", "secretKey": "Tajný klíč", "algorithm": "Algoritmus", "version": "Verze", "amount": "Množství", "type": "Typ", "length": "Délka", "options": "Možnosti", "numbers": "Čísla", "symbols": "Symboly", "lowercase": "Malá písmena", "uppercase": "Velká písmena", "placeholder": { "text": "Zadejte text", "value": "Zadejte hodnotu", "secretKey": "Zadejte tajný klíč", "url": "Zadejte URL" } } } ================================================ FILE: src/main/i18n/locales/cs_CZ/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Nastavení", "devtools": "Vývojářské nástroje", "update": "Zkontrolovat aktualizace...", "quit": "Ukončit massCode", "about": "O aplikaci massCode", "hide": "Skrýt massCode" }, "help": { "label": "Nápověda", "website": "Webové stránky", "documentation": "Dokumentace", "viewInGitHub": "Zobrazit na GitHubu", "changeLog": "Seznam změn", "reportIssue": "Nahlásit problém", "giveStar": "Dát hvězdičku", "extension": { "vscode": "VS Code rozšíření", "raycast": "Raycast rozšíření", "alfred": "Alfred rozšíření" }, "donate": { "openCollective": "Přispět na Open Collective", "payPal": "Přispět přes PayPal", "gumroad": "Přispět přes Gumroad (Visa, Mastercard, atd.)" }, "twitter": "X", "devTools": "Přepnout vývojářské nástroje", "links": { "snippets": "Kolekce snippetů" } }, "edit": { "label": "Upravit", "find": "Najít" }, "view": { "label": "Zobrazení", "sortBy": { "label": "Seřadit snippety podle", "dateModified": "Data úpravy", "dateCreated": "Data vytvoření", "name": "Názvu" }, "compactMode": "Kompaktní režim", "showSidebar": "Zobrazit/skrýt postranní panel" }, "editor": { "label": "Editor", "copy": "Kopírovat snippet do schránky", "format": "Formátovat", "previewCode": "Náhled kódu", "previewScreenshot": "Náhled snímku obrazovky", "previewJson": "Náhled JSON", "fontSizeIncrease": "Zvětšit velikost písma", "fontSizeDecrease": "Zmenšit velikost písma", "fontSizeReset": "Obnovit velikost písma" }, "markdown": { "label": "Markdown", "presentationMode": "Prezentační režim", "preview": "Náhled", "previewMarkdown": "Náhled Markdownu", "previewMindmap": "Náhled myšlenkové mapy" }, "history": { "label": "Historie", "back": "Zpět", "forward": "Vpřed" }, "devtools": { "label": "Vývojářské nástroje" }, "window": { "label": "Okno", "minimize": "Minimalizovat" } } ================================================ FILE: src/main/i18n/locales/cs_CZ/messages.json ================================================ { "confirm": { "delete": "Opravdu chcete smazat \"{{name}}\"?", "deletePermanently": "Opravdu chcete trvale smazat \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Opravdu chcete trvale smazat {{count}} vybraných snippetů?", "emptyTrash": "Opravdu chcete trvale smazat všechny snippety v Koši?", "clearDb": "Opravdu chcete vymazat databázi?", "migrateDb": [ "Opravdu chcete provést migraci?", "Během migrace bude současná knihovna přepsána." ], "backup": { "restore": "Opravdu chcete obnovit ze zálohy?", "delete": "Opravdu chcete smazat tuto zálohu?" } }, "success": { "copied": "Zkopírováno do schránky", "migrate": "Databáze byla úspěšně migrována.", "backup": { "created": "Záloha byla úspěšně vytvořena.", "restored": "Záloha byla úspěšně obnovena.", "deleted": "Záloha byla úspěšně smazána." } }, "warning": { "noUndo": "Tuto akci nelze vrátit zpět.", "allSnippetsMoveToTrash": "Všechny snippety v této složce budou přesunuty do koše.", "deleteTag": "Toto také způsobí odstranění tohoto tagu ze všech snippetů.", "createDb": "Prosím vyberte jinou složku", "clearDb": "Toto trvale smaže všechny Snippety, Složky a Tagy z databáze.", "htmlCssPreview": "Přidejte HTML fragment pro zobrazení výsledku. Přidejte CSS pro stylování a JavaScript pro interaktivitu.", "codeBlockRenderer": [ "Při použití Codemirror musí jazyk nastavený pro blok kódu odpovídat jedné z hodnot", "languages" ] }, "error": { "backup": "Operace zálohování selhala" }, "description": { "storage": "Pro použití synchronizačních služeb jako iCloud Drive, Google Drive nebo Dropbox jednoduše přesuňte úložiště do odpovídajících synchronizovaných složek", "migrate": { "fromV3": "Pro migraci z massCode v3 vyberte složku obsahující JSON soubor.", "fromSnippetsLab": "Pro migraci ze SnippetsLab vyberte JSON soubor.", "snippetsLabLimitations": [ "Některá omezení. Během migrace ze SnippetsLab:", "Všechny složky budou na první úrovni, protože JSON soubor (pod v2.1) nepodporuje vnořené složky.", "Snippety s nepodporovanými jazyky budou nastaveny na výchozí Plain Text." ] }, "language": "Pro aplikaci změny jazyka je nutné aplikaci znovu načíst.", "backup": { "manual": "Manuální záloha nebude automaticky smazána, když počet záloh překročí limit." } }, "special": { "supportMessage": "Ahoj, tady Anton 👋

\nDěkuji za používání massCode. Pokud vám tato aplikace přijde užitečná, prosím {{-tagStart}}přispějte{{-tagEnd}}. Bude mě to motivovat k dalšímu vývoji projektu.", "unsponsored": "Bez sponzorů" }, "update": { "available": "Verze {{newVersion}} je nyní k dispozici ke stažení.\nVaše verze je {{oldVersion}}.", "noAvailable": "V současné době nejsou k dispozici žádné aktualizace." } } ================================================ FILE: src/main/i18n/locales/cs_CZ/preferences.json ================================================ { "label": "Předvolby", "storage": { "section": { "main": "Hlavní", "backup": "Záloha" }, "label": "Úložiště", "migrate": "Migrovat", "count": "Počet", "clearDatabase": "Vymazat databázi", "backup": { "label": "Záloha", "enabled": "Automatická záloha", "interval": { "label": "Interval", "1": "Každou hodinu", "6": "Každých 6 hodin", "12": "Každých 12 hodin", "24": "Každých 24 hodin" }, "maxBackups": "Maximální počet záloh", "createNow": "Vytvořit zálohu nyní", "restore": "Obnovit ze zálohy", "list": "Seznam záloh", "lastBackup": "Poslední záloha", "noBackups": "Nebyly nalezeny žádné zálohy" } }, "editor": { "label": "Editor", "fontSize": "Velikost písma", "fontFamily": "Rodina písma", "wrap": { "label": "Zalamování", "wordWrap": "Zalamování slov", "off": "Vypnuto" }, "tabSize": "Velikost tabulátoru", "showInvisibles": "Zobrazit neviditelné znaky", "highlightLine": "Zvýraznit řádek", "highlightGutter": "Zvýraznit okraj", "matchBrackets": "Párové závorky", "prettier": { "label": "Prettier", "trailingComma": { "label": "Koncová čárka", "none": "Žádná", "all": "Všude", "es5": "ES5" }, "semi": "Středník", "singleQuote": "Jednoduché uvozovky" } }, "appearance": { "label": "Vzhled", "theme": { "label": "Motiv", "light": "Světlý", "dark": "Tmavý", "system": "Systémový" } }, "language": { "label": "Jazyk" }, "markdown": { "label": "Markdown", "codeRenderer": "Renderer bloků kódu" }, "api": { "label": "API Port", "port": { "label": "API Port", "description": "Číslo portu pro API server (vyžaduje restart aplikace). Platný rozsah: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/cs_CZ/ui.json ================================================ { "total": "Celkem", "line": "Řádek", "column": "Sloupec", "fragment": "Fragment", "path": "Cesta", "button": { "back": "Zpět", "cancel": "Zrušit", "clear": "Vymazat", "confirm": "Potvrdit", "copy": "Kopírovat", "fit": "Přizpůsobit", "generate": "Generovat", "ok": "OK", "revers": "Obrátit", "saveAs": "Uložit jako", "sort": "Seřadit", "update": ["Přejít na GitHub", "OK"], "zoomIn": "Přiblížit", "zoomOut": "Oddálit", "darkMode": "Tmavý režim", "toggleDarkMode": "Přepnout tmavý režim", "background": "Pozadí", "goToDownload": "Přejít ke stažení", "refreshPreview": "Obnovit náhled", "laserPointer": "Laserové ukazovátko", "fullscreen": "Celá obrazovka", "prev": "Předchozí", "next": "Další" }, "action": { "close": "Zavřít", "defaultLanguage": "Výchozí jazyk", "duplicate": "Duplikovat", "rename": "Přejmenovat", "restore": "Obnovit", "setCustomIcon": "Nastavit ikonu", "removeCustomIcon": "Odebrat ikonu", "show": "Zobrazit", "hide": "Skrýt", "showSidebar": "Zobrazit postranní panel", "hideSidebar": "Skrýt postranní panel", "new": { "storage": "Nové úložiště", "folder": "Nová složka", "snippet": "Nový snippet", "fragment": "Nový fragment" }, "add": { "description": "Přidat popis", "tag": "Přidat tag", "toFavorites": "Přidat do oblíbených" }, "open": { "storage": "Otevřít úložiště" }, "move": { "storage": "Přesunout úložiště", "toTrash": "Přesunout do koše" }, "remove": { "fromFavorites": "Odebrat z oblíbených" }, "reload": { "storage": "Znovu načíst úložiště", "app": "Znovu načíst aplikaci" }, "delete": { "common": "Smazat", "now": "Smazat nyní", "allData": "Smazat všechna data", "trash": "Vyprázdnit koš" }, "migrate": { "fromSnippetsLab": "Ze SnippetsLab", "fromV3": "Z massCode v3" }, "export": { "toHtml": "Exportovat do HTML" }, "copy": { "snippetLink": "Kopírovat odkaz na snippet" }, "backup": { "create": "Vytvořit zálohu", "restore": "Obnovit ze zálohy", "delete": "Smazat zálohu" } }, "sidebar": { "inbox": "Doručené", "favorites": "Oblíbené", "allSnippets": "Všechny snippety", "trash": "Koš", "folders": "Složky", "library": "Knihovna", "tags": "Tagy" }, "folder": { "untitled": "Nepojmenovaná složka", "plural": "Složky", "collapseAll": "Sbalit vše", "expandAll": "Rozbalit vše" }, "snippet": { "untitled": "Nepojmenovaný snippet", "plural": "Snippety", "emptyName": "Zadejte název snippetu", "selectedMultiple": "{{count}} vybraných snippetů", "noSelected": "Není vybrán žádný snippet" }, "placeholder": { "emptyTagList": "Přidejte tagy ke snippetům, aby se zde zobrazily", "emptyFoldersList": "Žádné složky", "emptySnippetsList": "Žádné snippety", "search": "Hledat", "addTag": "Přidat tag" } } ================================================ FILE: src/main/i18n/locales/de_DE/devtools.json ================================================ { "label": "Entwicklertools", "generators": { "label": "Generatoren", "lorem": { "label": "Lorem Ipsum Generator", "description": "Platzhalter-Text generieren", "selectType": "Typ auswählen", "maxCount": "Max {{count}}", "types": { "words": "Wörter", "sentences": "Sätze", "paragraphs": "Absätze" } }, "json": { "label": "JSON Generator", "description": "Zufällige JSON-Daten mit verschiedenen Feldtypen generieren", "fields": "Felder", "fieldName": "Feldname", "selectType": "Typ auswählen", "addField": "Feld hinzufügen", "rowCount": "Anzahl der Zeilen", "maxRows": "Max 1000", "categories": { "general": "Allgemein", "person": "Person", "internet": "Internet", "location": "Standort", "finance": "Finanzen", "commerce": "Handel", "company": "Unternehmen", "lorem": "Lorem", "date": "Datum", "number": "Zahl", "phone": "Telefon", "image": "Bild" }, "types": { "rowNumber": "Zeilennummer", "firstName": "Vorname", "lastName": "Nachname", "fullName": "Vollständiger Name", "gender": "Geschlecht", "jobTitle": "Berufsbezeichnung", "email": "E-Mail-Adresse", "username": "Benutzername", "password": "Passwort", "url": "URL", "ipv4": "IP-Adresse v4", "ipv6": "IP-Adresse v6", "userAgent": "User Agent", "city": "Stadt", "country": "Land", "streetAddress": "Straßenadresse", "zipCode": "Postleitzahl", "latitude": "Breitengrad", "longitude": "Längengrad", "amount": "Betrag", "currencyCode": "Währungscode", "creditCardNumber": "Kreditkartennummer", "productName": "Produktname", "price": "Preis", "department": "Abteilung", "companyName": "Firmenname", "catchPhrase": "Slogan", "word": "Wort", "sentence": "Satz", "paragraph": "Absatz", "past": "Vergangenes Datum", "future": "Zukünftiges Datum", "recent": "Kürzliches Datum", "birthdate": "Geburtsdatum", "int": "Ganzzahl", "float": "Gleitkommazahl", "boolean": "Boolesch", "phoneNumber": "Telefonnummer", "imei": "IMEI", "avatar": "Avatar-URL", "imageUrl": "Bild-URL" } } }, "converters": { "label": "Konverter", "caseConverter": { "label": "Case Converter", "description": "Text in verschiedene Schreibweisen umwandeln", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Text zu Unicode", "description": "Text zu Unicode konvertieren und umgekehrt", "modes": { "textToUnicode": "Text → Unicode", "unicodeToText": "Unicode → Text" } }, "textToAscii": { "label": "Text zu ASCII Binary", "description": "Text zu ASCII Binary konvertieren und umgekehrt", "modes": { "textToAscii": "Text → ASCII", "asciiToText": "ASCII → Text" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Text zu Base64 kodieren oder dekodieren", "modes": { "textToBase64": "Text → Base64", "base64ToText": "Base64 → Text" } }, "jsonToYaml": { "label": "JSON zu YAML", "description": "JSON zu YAML konvertieren und umgekehrt", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON zu TOML", "description": "JSON zu TOML konvertieren und umgekehrt", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON zu XML", "description": "JSON zu XML konvertieren und umgekehrt", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Farbkonverter", "description": "Farben zwischen verschiedenen Formaten konvertieren" } }, "crypto": { "label": "Kryptographie / Sicherheit", "hash": { "label": "Hash Generator", "description": "Hashes aus Text generieren" }, "hmac": { "label": "HMAC Generator", "description": "Hash-basierten Nachrichtenauthentifizierungscode (HMAC) aus Schlüssel und Nachricht generieren" }, "password": { "label": "Passwort Generator", "description": "Sicheres Passwort generieren" }, "uuid": { "label": "UUID Generator", "description": "Universell eindeutige Kennung (UUID) generieren" } }, "web": { "label": "Web", "urlParser": { "label": "URL Parser", "description": "URL in ihre Komponenten zerlegen" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "URL kodieren oder dekodieren", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Text in URL-freundlichen Slug umwandeln" } }, "form": { "input": "Eingabe", "output": "Ausgabe", "inputString": "Eingabestring", "outputString": "Ausgabestring", "inputUrl": "Eingabe-URL", "outputUrl": "Ausgabe-URL", "parsedUrl": "Geparste URL", "splitQueryString": "Query String aufteilen", "key": "Schlüssel", "value": "Wert", "component": "Komponente", "result": "Ergebnis", "secretKey": "Geheimer Schlüssel", "algorithm": "Algorithmus", "version": "Version", "amount": "Anzahl", "type": "Typ", "length": "Länge", "options": "Optionen", "numbers": "Zahlen", "symbols": "Symbole", "lowercase": "Kleinbuchstaben", "uppercase": "Großbuchstaben", "placeholder": { "text": "Text eingeben", "value": "Wert eingeben", "secretKey": "Geheimen Schlüssel eingeben", "url": "URL eingeben" } } } ================================================ FILE: src/main/i18n/locales/de_DE/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Einstellungen", "devtools": "Entwicklerwerkzeuge", "update": "Nach Updates suchen...", "quit": "massCode beenden", "about": "Über massCode", "hide": "massCode ausblenden" }, "help": { "label": "Hilfe", "website": "Website", "documentation": "Dokumentation", "viewInGitHub": "In GitHub anzeigen", "changeLog": "Änderungsprotokoll", "reportIssue": "Problem melden", "giveStar": "Stern geben", "extension": { "vscode": "VS Code Erweiterung", "raycast": "Raycast Erweiterung", "alfred": "Alfred Erweiterung" }, "donate": { "openCollective": "Über Open Collective spenden", "payPal": "Über PayPal spenden", "gumroad": "Über Gumroad spenden (Visa, Mastercard, etc.)" }, "twitter": "X", "devTools": "Entwicklerwerkzeuge ein-/ausblenden", "links": { "snippets": "Snippet-Sammlung" } }, "edit": { "label": "Bearbeiten", "find": "Suchen" }, "view": { "label": "Ansicht", "sortBy": { "label": "Snippets sortieren nach", "dateModified": "Änderungsdatum", "dateCreated": "Erstellungsdatum", "name": "Name" }, "compactMode": "Kompakter Modus", "showSidebar": "Seitenleiste ein-/ausblenden" }, "editor": { "label": "Editor", "copy": "Snippet in Zwischenablage kopieren", "format": "Formatieren", "previewCode": "Code-Vorschau", "previewScreenshot": "Screenshot-Vorschau", "previewJson": "JSON-Vorschau", "fontSizeIncrease": "Schriftgröße erhöhen", "fontSizeDecrease": "Schriftgröße verringern", "fontSizeReset": "Schriftgröße zurücksetzen" }, "markdown": { "label": "Markdown", "presentationMode": "Präsentationsmodus", "preview": "Vorschau", "previewMarkdown": "Markdown-Vorschau", "previewMindmap": "Mindmap-Vorschau" }, "history": { "label": "Verlauf", "back": "Zurück", "forward": "Vorwärts" }, "devtools": { "label": "Entwicklerwerkzeuge" } } ================================================ FILE: src/main/i18n/locales/de_DE/messages.json ================================================ { "confirm": { "delete": "Sind Sie sicher, dass Sie \"{{name}}\" löschen möchten?", "deletePermanently": "Sind Sie sicher, dass Sie \"{{name}}\" endgültig löschen möchten?", "deleteConfirmMultipleSnippets": "Sind Sie sicher, dass Sie {{count}} ausgewählte Snippets endgültig löschen möchten?", "emptyTrash": "Sind Sie sicher, dass Sie alle Snippets im Papierkorb endgültig löschen möchten?", "clearDb": "Sind Sie sicher, dass Sie die Datenbank leeren möchten?", "migrateDb": [ "Sind Sie sicher, dass Sie migrieren möchten?", "Während der Migration wird die aktuelle Bibliothek überschrieben." ] }, "success": { "copied": "In die Zwischenablage kopiert", "migrate": "Datenbank erfolgreich migriert.", "backup": { "created": "Sicherung erfolgreich erstellt.", "restored": "Sicherung erfolgreich wiederhergestellt.", "deleted": "Sicherung erfolgreich gelöscht." } }, "warning": { "noUndo": "Diese Aktion kann nicht rückgängig gemacht werden.", "allSnippetsMoveToTrash": "Alle Snippets in diesem Ordner werden in den Papierkorb verschoben.", "deleteTag": "Dies führt auch dazu, dass dieser Tag von allen Snippets entfernt wird.", "createDb": "Bitte wählen Sie einen anderen Ordner", "clearDb": "Dadurch werden alle Snippets, Ordner und Tags dauerhaft aus der Datenbank gelöscht.", "htmlCssPreview": "Fügen Sie ein HTML-Fragment hinzu, um das Ergebnis zu sehen. Fügen Sie CSS für das Styling und JavaScript für Interaktivität hinzu.", "codeBlockRenderer": [ "Bei Verwendung von Codemirror muss die für den Codeblock einzustellende Sprache einem der Werte der", "languages" ] }, "error": {}, "description": { "storage": "Um Sync-Dienste wie iCloud Drive, Google Drive oder Dropbox zu nutzen, verschieben Sie den Speicher einfach in die entsprechenden synchronisierten Ordner", "migrate": { "fromV3": "Um von massCode v3 zu migrieren, wählen Sie den Ordner mit der JSON-Datei aus.", "fromSnippetsLab": "Um von SnippetsLab zu migrieren, wählen Sie die JSON-Datei aus.", "snippetsLabLimitations": [ "Einige Einschränkungen bei der Migration von SnippetsLab:", "Alle Ordner werden auf der ersten Ebene sein, da die JSON-Datei (unter v2.1) keine verschachtelten Ordner darstellt.", "Snippets mit nicht unterstützten Sprachen werden auf Standard Plain Text gesetzt." ] } }, "special": { "supportMessage": "Hallo, hier ist Anton 👋

\nDanke, dass Sie massCode nutzen. Wenn Sie diese App nützlich finden, bitte {{-tagStart}}spenden{{-tagEnd}} Sie. Es wird mich inspirieren, die Entwicklung des Projekts fortzusetzen.", "unsponsored": "Nicht gesponsert" }, "update": { "available": "Version {{newVersion}} steht jetzt zum Download bereit.\nIhre Version ist {{oldVersion}}.", "noAvailable": "Derzeit sind keine Updates verfügbar." } } ================================================ FILE: src/main/i18n/locales/de_DE/preferences.json ================================================ { "label": "Einstellungen", "storage": { "label": "Speicher", "migrate": "Migrieren", "count": "Anzahl", "clearDatabase": "Datenbank leeren" }, "editor": { "label": "Editor", "fontSize": "Schriftgröße", "fontFamily": "Schriftart", "wrap": { "label": "Umbruch", "wordWrap": "Zeilenumbruch", "off": "Aus" }, "tabSize": "Tabgröße", "showInvisibles": "Unsichtbare Zeichen anzeigen", "highlightLine": "Zeile hervorheben", "highlightGutter": "Zeilennummern hervorheben", "matchBrackets": "Klammern hervorheben", "prettier": { "label": "Prettier", "trailingComma": { "label": "Abschließendes Komma", "none": "Keins", "all": "Alle", "es5": "ES5" }, "semi": "Semikolon", "singleQuote": "Einfache Anführungszeichen" } }, "appearance": { "label": "Erscheinungsbild", "theme": { "label": "Theme", "light": "Hell", "dark": "Dunkel" } }, "language": { "label": "Sprache" }, "markdown": { "label": "Markdown", "codeRenderer": "Code-Block Renderer" }, "api": { "label": "API-Port", "port": { "label": "API-Port", "description": "Portnummer für den API-Server (erfordert Neustart der App). Gültiger Bereich: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/de_DE/ui.json ================================================ { "total": "Gesamt", "line": "Zeile", "column": "Spalte", "fragment": "Fragment", "path": "Pfad", "button": { "back": "Zurück", "cancel": "Abbrechen", "clear": "Löschen", "confirm": "Bestätigen", "copy": "Kopieren", "fit": "Anpassen", "generate": "Generieren", "ok": "OK", "revers": "Umkehren", "saveAs": "Speichern unter", "sort": "Sortieren", "update": ["Zu GitHub", "OK"], "zoomIn": "Vergrößern", "zoomOut": "Verkleinern", "darkMode": "Dunkler Modus", "toggleDarkMode": "Dunkelmodus umschalten", "background": "Hintergrund", "goToDownload": "Zum Download", "refreshPreview": "Vorschau aktualisieren", "laserPointer": "Laserpointer", "fullscreen": "Vollbild", "prev": "Zurück", "next": "Weiter" }, "action": { "close": "Schließen", "defaultLanguage": "Standardsprache", "duplicate": "Duplizieren", "rename": "Umbenennen", "restore": "Wiederherstellen", "setCustomIcon": "Icon festlegen", "removeCustomIcon": "Icon entfernen", "show": "Anzeigen", "hide": "Ausblenden", "showSidebar": "Seitenleiste anzeigen", "hideSidebar": "Seitenleiste ausblenden", "new": { "storage": "Neuer Speicher", "folder": "Neuer Ordner", "snippet": "Neues Snippet", "fragment": "Neues Fragment" }, "add": { "description": "Beschreibung hinzufügen", "tag": "Tag hinzufügen", "toFavorites": "Zu Favoriten hinzufügen" }, "open": { "storage": "Speicher öffnen" }, "move": { "storage": "Speicher verschieben", "toTrash": "In Papierkorb verschieben" }, "remove": { "fromFavorites": "Aus Favoriten entfernen" }, "reload": { "storage": "Speicher neu laden" }, "delete": { "common": "Löschen", "now": "Jetzt löschen", "allData": "Alle Daten löschen", "trash": "Papierkorb leeren" }, "migrate": { "fromSnippetsLab": "Von SnippetsLab", "fromV3": "Von massCode v3" }, "export": { "toHtml": "Als HTML exportieren" }, "copy": { "snippetLink": "Snippet-Link kopieren" } }, "sidebar": { "inbox": "Posteingang", "favorites": "Favoriten", "allSnippets": "Alle Snippets", "trash": "Papierkorb", "folders": "Ordner", "library": "Bibliothek", "tags": "Tags" }, "folder": { "untitled": "Unbenannter Ordner", "plural": "Ordner", "collapseAll": "Alle einklappen", "expandAll": "Alle ausklappen" }, "snippet": { "untitled": "Unbenanntes Snippet", "plural": "Snippets", "emptyName": "Snippet-Namen eingeben", "selectedMultiple": "{{count}} Snippets ausgewählt", "noSelected": "Kein Snippet ausgewählt" }, "placeholder": { "emptyTagList": "Fügen Sie Tags zu Snippets hinzu, um sie hier zu sehen", "emptyFoldersList": "Keine Ordner", "emptySnippetsList": "Keine Snippets", "search": "Suchen", "addTag": "Tag hinzufügen" } } ================================================ FILE: src/main/i18n/locales/el_GR/devtools.json ================================================ { "label": "Εργαλεία Προγραμματιστή", "generators": { "label": "Γεννήτριες", "lorem": { "label": "Γεννήτρια Lorem Ipsum", "description": "Δημιουργία κειμένου κράτησης θέσης", "selectType": "Επιλέξτε τύπο", "maxCount": "Μέγιστο {{count}}", "types": { "words": "Λέξεις", "sentences": "Προτάσεις", "paragraphs": "Παράγραφοι" } }, "json": { "label": "Γεννήτρια JSON", "description": "Δημιουργία τυχαίων δεδομένων JSON με διάφορους τύπους πεδίων", "fields": "Πεδία", "fieldName": "Όνομα πεδίου", "selectType": "Επιλέξτε τύπο", "addField": "Προσθήκη πεδίου", "rowCount": "Αριθμός γραμμών", "maxRows": "Μέγιστο 1000", "categories": { "general": "Γενικά", "person": "Άτομο", "internet": "Διαδίκτυο", "location": "Τοποθεσία", "finance": "Οικονομικά", "commerce": "Εμπόριο", "company": "Εταιρεία", "lorem": "Lorem", "date": "Ημερομηνία", "number": "Αριθμός", "phone": "Τηλέφωνο", "image": "Εικόνα" }, "types": { "rowNumber": "Αριθμός γραμμής", "firstName": "Όνομα", "lastName": "Επώνυμο", "fullName": "Πλήρες όνομα", "gender": "Φύλο", "jobTitle": "Τίτλος εργασίας", "email": "Διεύθυνση email", "username": "Όνομα χρήστη", "password": "Κωδικός πρόσβασης", "url": "URL", "ipv4": "Διεύθυνση IP v4", "ipv6": "Διεύθυνση IP v6", "userAgent": "User Agent", "city": "Πόλη", "country": "Χώρα", "streetAddress": "Διεύθυνση", "zipCode": "Ταχυδρομικός κώδικας", "latitude": "Γεωγραφικό πλάτος", "longitude": "Γεωγραφικό μήκος", "amount": "Ποσό", "currencyCode": "Κωδικός νομίσματος", "creditCardNumber": "Αριθμός πιστωτικής κάρτας", "productName": "Όνομα προϊόντος", "price": "Τιμή", "department": "Τμήμα", "companyName": "Όνομα εταιρείας", "catchPhrase": "Σλόγκαν", "word": "Λέξη", "sentence": "Πρόταση", "paragraph": "Παράγραφος", "past": "Προηγούμενη ημερομηνία", "future": "Μελλοντική ημερομηνία", "recent": "Πρόσφατη ημερομηνία", "birthdate": "Ημερομηνία γέννησης", "int": "Ακέραιος", "float": "Δεκαδικός", "boolean": "Boolean", "phoneNumber": "Αριθμός τηλεφώνου", "imei": "IMEI", "avatar": "URL avatar", "imageUrl": "URL εικόνας" } } }, "converters": { "label": "Μετατροπείς", "caseConverter": { "label": "Μετατροπέας Κεφαλαίων", "description": "Μετατροπή κειμένου σε διαφορετικές μορφές κεφαλαίων", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Κείμενο σε Unicode", "description": "Μετατροπή κειμένου σε Unicode και αντίστροφα", "modes": { "textToUnicode": "Κείμενο → Unicode", "unicodeToText": "Unicode → Κείμενο" } }, "textToAscii": { "label": "Κείμενο σε ASCII Binary", "description": "Μετατροπή κειμένου σε ASCII binary και αντίστροφα", "modes": { "textToAscii": "Κείμενο → ASCII", "asciiToText": "ASCII → Κείμενο" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Κωδικοποίηση ή αποκωδικοποίηση κειμένου σε Base64", "modes": { "textToBase64": "Κείμενο → Base64", "base64ToText": "Base64 → Κείμενο" } }, "jsonToYaml": { "label": "JSON σε YAML", "description": "Μετατροπή JSON σε YAML και αντίστροφα", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON σε TOML", "description": "Μετατροπή JSON σε TOML και αντίστροφα", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON σε XML", "description": "Μετατροπή JSON σε XML και αντίστροφα", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Μετατροπέας Χρωμάτων", "description": "Μετατροπή χρωμάτων μεταξύ διαφορετικών μορφών" } }, "crypto": { "label": "Κρυπτογραφία / Ασφάλεια", "hash": { "label": "Γεννήτρια Hash", "description": "Δημιουργία hash από κείμενο" }, "hmac": { "label": "Γεννήτρια HMAC", "description": "Δημιουργία κώδικα πιστοποίησης μηνύματος βασισμένου σε hash (HMAC) που αποτελείται από κλειδί και μήνυμα" }, "password": { "label": "Γεννήτρια Κωδικών", "description": "Δημιουργία ασφαλούς κωδικού" }, "uuid": { "label": "Γεννήτρια UUID", "description": "Δημιουργία παγκόσμιου μοναδικού αναγνωριστικού (UUID)" } }, "web": { "label": "Ιστός", "urlParser": { "label": "Αναλυτής URL", "description": "Ανάλυση URL στα στοιχεία του" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Κωδικοποίηση ή αποκωδικοποίηση URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Μετατροπή κειμένου σε φιλικό προς URL slug" } }, "form": { "input": "Είσοδος", "output": "Έξοδος", "inputString": "Συμβολοσειρά Εισόδου", "outputString": "Συμβολοσειρά Εξόδου", "inputUrl": "URL Εισόδου", "outputUrl": "URL Εξόδου", "parsedUrl": "Αναλυμένο URL", "splitQueryString": "Διαχωρισμός Query String", "key": "Κλειδί", "value": "Τιμή", "component": "Στοιχείο", "result": "Αποτέλεσμα", "secretKey": "Μυστικό Κλειδί", "algorithm": "Αλγόριθμος", "version": "Έκδοση", "amount": "Ποσότητα", "type": "Τύπος", "length": "Μήκος", "options": "Επιλογές", "numbers": "Αριθμοί", "symbols": "Σύμβολα", "lowercase": "Πεζά", "uppercase": "Κεφαλαία", "placeholder": { "text": "Εισάγετε κείμενο", "value": "Εισάγετε τιμή", "secretKey": "Εισάγετε μυστικό κλειδί", "url": "Εισάγετε URL" } } } ================================================ FILE: src/main/i18n/locales/el_GR/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Προτιμήσεις", "devtools": "Developer Tools", "update": "Έλεγχος για Ενημερώσεις...", "quit": "Έξοδος από το massCode", "about": "Σχετικά με το massCode", "hide": "Απόκρυψη massCode" }, "help": { "label": "Βοήθεια", "website": "Ιστοσελίδα", "documentation": "Τεκμηρίωση", "viewInGitHub": "Προβολή στο GitHub", "changeLog": "Αρχείο Αλλαγών", "reportIssue": "Αναφορά Προβλήματος", "giveStar": "Δώστε ένα Αστέρι", "extension": { "vscode": "VS Code Extension", "raycast": "Raycast Extension", "alfred": "Alfred Extension" }, "donate": { "openCollective": "Δωρεά στο Open Collective", "payPal": "Δωρεά μέσω PayPal", "gumroad": "Δωρεά μέσω Gumroad (Visa, Mastercard, κλπ.)" }, "twitter": "X", "devTools": "Εναλλαγή Developer Tools", "links": { "snippets": "Συλλογή Snippets" } }, "edit": { "label": "Επεξεργασία", "find": "Εύρεση" }, "view": { "label": "Προβολή", "sortBy": { "label": "Ταξινόμηση Snippets κατά", "dateModified": "Ημερομηνία Τροποποίησης", "dateCreated": "Ημερομηνία Δημιουργίας", "name": "Όνομα" }, "compactMode": "Συμπαγής Λειτουργία", "showSidebar": "Εμφάνιση/απόκρυψη πλαϊνής γραμμής" }, "editor": { "label": "Editor", "copy": "Αντιγραφή Snippet στο Πρόχειρο", "format": "Μορφοποίηση", "previewCode": "Προεπισκόπηση Κώδικα", "previewScreenshot": "Προεπισκόπηση Screenshot", "previewJson": "Προεπισκόπηση JSON", "fontSizeIncrease": "Αύξηση Μεγέθους Γραμματοσειράς", "fontSizeDecrease": "Μείωση Μεγέθους Γραμματοσειράς", "fontSizeReset": "Επαναφορά Μεγέθους Γραμματοσειράς" }, "markdown": { "label": "Markdown", "presentationMode": "Λειτουργία Παρουσίασης", "preview": "Προεπισκόπηση", "previewMarkdown": "Προεπισκόπηση Markdown", "previewMindmap": "Προεπισκόπηση Mindmap" }, "history": { "label": "Ιστορικό", "back": "Πίσω", "forward": "Μπροστά" }, "devtools": { "label": "Developer Tools" } } ================================================ FILE: src/main/i18n/locales/el_GR/messages.json ================================================ { "confirm": { "delete": "Είστε βέβαιοι ότι θέλετε να διαγράψετε το \"{{name}}\"?", "deletePermanently": "Είστε βέβαιοι ότι θέλετε να διαγράψετε οριστικά το \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Είστε βέβαιοι ότι θέλετε να διαγράψετε οριστικά τα {{count}} επιλεγμένα snippets;", "emptyTrash": "Είστε βέβαιοι ότι θέλετε να διαγράψετε οριστικά όλα τα snippets στον Κάδο Απορριμμάτων;", "clearDb": "Είστε βέβαιοι ότι θέλετε να καθαρίσετε τη database;", "migrateDb": [ "Είστε βέβαιοι ότι θέλετε να κάνετε migrate;", "Κατά τη διάρκεια του migrate, η τρέχουσα βιβλιοθήκη θα αντικατασταθεί." ] }, "success": { "copied": "Αντιγράφηκε στο πρόχειρο", "migrate": "Η DB μετέφερε επιτυχώς τα δεδομένα.", "backup": { "created": "Το αντίγραφο ασφαλείας δημιουργήθηκε επιτυχώς.", "restored": "Το αντίγραφο ασφαλείας αποκαταστάθηκε επιτυχώς.", "deleted": "Το αντίγραφο ασφαλείας διαγράφηκε επιτυχώς." } }, "warning": { "noUndo": "Δεν μπορείτε να αναιρέσετε αυτήν την ενέργεια.", "allSnippetsMoveToTrash": "Όλα τα snippets σε αυτόν τον φάκελο θα μεταφερθούν στον κάδο απορριμμάτων.", "deleteTag": "Αυτό θα προκαλέσει επίσης την αφαίρεση αυτού του tag από όλα τα snippets.", "createDb": "Παρακαλώ επιλέξτε άλλο φάκελο", "clearDb": "Αυτό θα διαγράψει οριστικά όλα τα Snippets, Folders και Tags από τη database.", "htmlCssPreview": "Προσθέστε ένα τμήμα HTML για να δείτε το αποτέλεσμα. Προσθέστε CSS για στυλ και JavaScript για διαδραστικότητα.", "codeBlockRenderer": [ "Όταν χρησιμοποιείτε το Codemirror, η γλώσσα που θα οριστεί για το code block πρέπει να αντιστοιχεί σε μία από τις τιμές των", "languages" ] }, "error": {}, "description": { "storage": "Για να χρησιμοποιήσετε υπηρεσίες συγχρονισμού όπως iCloud Drive, Google Drive ή Dropbox, απλά μετακινήστε το storage στους αντίστοιχους συγχρονισμένους φακέλους", "migrate": { "fromV3": "Για να κάνετε migrate από το massCode v3 επιλέξτε τον φάκελο που περιέχει το JSON αρχείο.", "fromSnippetsLab": "Για να κάνετε migrate από το SnippetsLab επιλέξτε το JSON αρχείο.", "snippetsLabLimitations": [ "Μερικοί Περιορισμοί. Κατά τη διάρκεια του migration από το SnippetsLab:", "Όλοι οι φάκελοι θα είναι πρώτου επιπέδου καθώς το JSON αρχείο (κάτω από v2.1) δεν υποστηρίζει ένθετους φακέλους.", "Τα snippets με μη υποστηριζόμενες γλώσσες θα οριστούν ως Plain Text." ] } }, "special": { "supportMessage": "Γεια σας, ο Anton εδώ 👋

\nΕυχαριστώ που χρησιμοποιείτε το massCode. Αν βρίσκετε χρήσιμη την εφαρμογή, παρακαλώ {{-tagStart}}κάντε μια δωρεά{{-tagEnd}}. Θα με εμπνεύσει να συνεχίσω την ανάπτυξη του project.", "unsponsored": "Χωρίς χορηγία" }, "update": { "available": "Η έκδοση {{newVersion}} είναι διαθέσιμη για λήψη.\nΗ έκδοσή σας είναι {{oldVersion}}.", "noAvailable": "Δεν υπάρχουν διαθέσιμες ενημερώσεις αυτή τη στιγμή." } } ================================================ FILE: src/main/i18n/locales/el_GR/preferences.json ================================================ { "label": "Προτιμήσεις", "storage": { "label": "Storage", "migrate": "Μετεγκατάσταση", "count": "Πλήθος", "clearDatabase": "Εκκαθάριση Database" }, "editor": { "label": "Editor", "fontSize": "Μέγεθος Γραμματοσειράς", "fontFamily": "Οικογένεια Γραμματοσειράς", "wrap": { "label": "Αναδίπλωση", "wordWrap": "Αναδίπλωση Λέξεων", "off": "Απενεργοποίηση" }, "tabSize": "Μέγεθος Tab", "showInvisibles": "Εμφάνιση Αόρατων Χαρακτήρων", "highlightLine": "Επισήμανση Γραμμής", "highlightGutter": "Επισήμανση Gutter", "matchBrackets": "Αντιστοίχιση Παρενθέσεων", "prettier": { "label": "Prettier", "trailingComma": { "label": "Κόμμα στο Τέλος", "none": "Κανένα", "all": "Όλα", "es5": "ES5" }, "semi": "Ερωτηματικό", "singleQuote": "Μονά Εισαγωγικά" } }, "appearance": { "label": "Εμφάνιση", "theme": { "label": "Θέμα", "light": "Φωτεινό", "dark": "Σκοτεινό" } }, "language": { "label": "Γλώσσα" }, "markdown": { "label": "Markdown", "codeRenderer": "Code block Renderer" }, "api": { "label": "Θύρα API", "port": { "label": "Θύρα API", "description": "Αριθμός θύρας για τον διακομιστή API (απαιτείται επανεκκίνηση της εφαρμογής). Έγκυρο εύρος: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/el_GR/ui.json ================================================ { "total": "Σύνολο", "line": "Γραμμή", "column": "Στήλη", "fragment": "Fragment", "path": "Διαδρομή", "button": { "back": "Πίσω", "cancel": "Ακύρωση", "clear": "Καθαρισμός", "confirm": "Επιβεβαίωση", "copy": "Αντιγραφή", "fit": "Προσαρμογή", "generate": "Δημιουργία", "ok": "OK", "revers": "Αντιστροφή", "saveAs": "Αποθήκευση ως", "sort": "Ταξινόμηση", "update": ["Μετάβαση στο GitHub", "OK"], "zoomIn": "Μεγέθυνση", "zoomOut": "Σμίκρυνση", "darkMode": "Σκοτεινή Λειτουργία", "toggleDarkMode": "Εναλλαγή σκοτεινής λειτουργίας", "background": "Φόντο", "goToDownload": "Μετάβαση στη Λήψη", "refreshPreview": "Ανανέωση προεπισκόπησης", "laserPointer": "Δείκτης λέιζερ", "fullscreen": "Πλήρης οθόνη", "prev": "Προηγούμενο", "next": "Επόμενο" }, "action": { "close": "Κλείσιμο", "defaultLanguage": "Προεπιλεγμένη Γλώσσα", "duplicate": "Αντίγραφο", "rename": "Μετονομασία", "restore": "Επαναφορά", "setCustomIcon": "Ορισμός Εικονιδίου", "removeCustomIcon": "Αφαίρεση Εικονιδίου", "show": "Εμφάνιση", "hide": "Απόκρυψη", "showSidebar": "Εμφάνιση πλευρικής γραμμής", "hideSidebar": "Απόκρυψη πλευρικής γραμμής", "new": { "storage": "Νέο Storage", "folder": "Νέος Φάκελος", "snippet": "Νέο Snippet", "fragment": "Νέο Fragment" }, "add": { "description": "Προσθήκη Περιγραφής", "tag": "Προσθήκη Tag", "toFavorites": "Προσθήκη στα Αγαπημένα" }, "open": { "storage": "Άνοιγμα Storage" }, "move": { "storage": "Μετακίνηση Storage", "toTrash": "Μετακίνηση στον Κάδο" }, "remove": { "fromFavorites": "Αφαίρεση από τα Αγαπημένα" }, "reload": { "storage": "Επαναφόρτωση Storage" }, "delete": { "common": "Διαγραφή", "now": "Διαγραφή Τώρα", "allData": "Διαγραφή Όλων των Δεδομένων", "trash": "Άδειασμα Κάδου" }, "migrate": { "fromSnippetsLab": "Από SnippetsLab", "fromV3": "Από massCode v3" }, "export": { "toHtml": "Εξαγωγή σε HTML" }, "copy": { "snippetLink": "Αντιγραφή Συνδέσμου Snippet" } }, "sidebar": { "inbox": "Εισερχόμενα", "favorites": "Αγαπημένα", "allSnippets": "Όλα τα Snippets", "trash": "Κάδος", "folders": "Φάκελοι", "library": "Βιβλιοθήκη", "tags": "Tags" }, "folder": { "untitled": "Φάκελος χωρίς τίτλο", "plural": "Φάκελοι", "collapseAll": "Σύμπτυξη Όλων", "expandAll": "Ανάπτυξη Όλων" }, "snippet": { "untitled": "Snippet χωρίς τίτλο", "plural": "Snippets", "emptyName": "Πληκτρολογήστε όνομα snippet", "selectedMultiple": "{{count}} Επιλεγμένα Snippets", "noSelected": "Δεν έχει επιλεγεί Snippet" }, "placeholder": { "emptyTagList": "Προσθέστε tags στα snippets για να τα δείτε εδώ", "emptyFoldersList": "Κανένας φάκελος", "emptySnippetsList": "Κανένα απόσπασμα", "search": "Αναζήτηση", "addTag": "Προσθήκη Tag" } } ================================================ FILE: src/main/i18n/locales/en_US/devtools.json ================================================ { "label": "Developer Tools", "generators": { "label": "Generators", "lorem": { "label": "Lorem Ipsum Generator", "description": "Generate placeholder text", "selectType": "Select type", "maxCount": "Max {{count}}", "types": { "words": "Words", "sentences": "Sentences", "paragraphs": "Paragraphs" } }, "json": { "label": "JSON Generator", "description": "Generate random JSON data with various field types", "fields": "Fields", "fieldName": "Field name", "selectType": "Select type", "addField": "Add Field", "rowCount": "Number of Rows", "maxRows": "Max 1000", "categories": { "general": "General", "person": "Person", "internet": "Internet", "location": "Location", "finance": "Finance", "commerce": "Commerce", "company": "Company", "lorem": "Lorem", "date": "Date", "number": "Number", "phone": "Phone", "image": "Image" }, "types": { "rowNumber": "Row Number", "firstName": "First Name", "lastName": "Last Name", "fullName": "Full Name", "gender": "Gender", "jobTitle": "Job Title", "email": "Email Address", "username": "Username", "password": "Password", "url": "URL", "ipv4": "IP Address v4", "ipv6": "IP Address v6", "userAgent": "User Agent", "city": "City", "country": "Country", "streetAddress": "Street Address", "zipCode": "Zip Code", "latitude": "Latitude", "longitude": "Longitude", "amount": "Amount", "currencyCode": "Currency Code", "creditCardNumber": "Credit Card Number", "productName": "Product Name", "price": "Price", "department": "Department", "companyName": "Company Name", "catchPhrase": "Catch Phrase", "word": "Word", "sentence": "Sentence", "paragraph": "Paragraph", "past": "Past Date", "future": "Future Date", "recent": "Recent Date", "birthdate": "Birthdate", "int": "Integer", "float": "Float", "boolean": "Boolean", "phoneNumber": "Phone Number", "imei": "IMEI", "avatar": "Avatar URL", "imageUrl": "Image URL" } } }, "converters": { "label": "Converters", "caseConverter": { "label": "Case Converter", "description": "Transform text to different cases", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Text to Unicode", "description": "Convert text to Unicode and vice versa", "modes": { "textToUnicode": "Text → Unicode", "unicodeToText": "Unicode → Text" } }, "textToAscii": { "label": "Text to ASCII Binary", "description": "Convert text to ASCII binary and vice versa", "modes": { "textToAscii": "Text → ASCII", "asciiToText": "ASCII → Text" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Encode or decode text to Base64", "modes": { "textToBase64": "Text → Base64", "base64ToText": "Base64 → Text" } }, "jsonToYaml": { "label": "JSON to YAML", "description": "Convert JSON to YAML and vice versa", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON to TOML", "description": "Convert JSON to TOML and vice versa", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON to XML", "description": "Convert JSON to XML and vice versa", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Color Converter", "description": "Convert color between different formats" } }, "crypto": { "label": "Cryptography / Security", "hash": { "label": "Hash Generator", "description": "Generate hashes from text" }, "hmac": { "label": "HMAC Generator", "description": "Generate hash-based message authentication code (HMAC) composed of a key and a message" }, "password": { "label": "Password Generator", "description": "Generate a secure password" }, "uuid": { "label": "UUID Generator", "description": "Generate a universal unique identifier (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "URL Parser", "description": "Parse a URL into its components" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Encode or decode URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Convert text to a URL-friendly slug" } }, "form": { "input": "Input", "output": "Output", "inputString": "Input String", "outputString": "Output String", "inputUrl": "Input URL", "outputUrl": "Output URL", "parsedUrl": "Parsed URL", "splitQueryString": "Split Query String", "key": "Key", "value": "Value", "component": "Component", "result": "Result", "secretKey": "Secret Key", "algorithm": "Algorithm", "version": "Version", "amount": "Amount", "type": "Type", "length": "Length", "options": "Options", "numbers": "Numbers", "symbols": "Symbols", "lowercase": "Lowercase", "uppercase": "Uppercase", "placeholder": { "text": "Enter a text", "value": "Enter a value", "secretKey": "Enter a secret key", "url": "Enter a URL" } } } ================================================ FILE: src/main/i18n/locales/en_US/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Preferences", "devtools": "Developer Tools", "update": "Check for Updates...", "quit": "Quit massCode", "about": "About massCode", "hide": "Hide massCode", "mathNotebook": "Math Notebook" }, "help": { "label": "Help", "website": "Website", "documentation": "Documentation", "viewInGitHub": "View in GitHub", "changeLog": "Change Log", "reportIssue": "Report Issue", "giveStar": "Give a Star", "extension": { "vscode": "VS Code Extension", "raycast": "Raycast Extension", "alfred": "Alfred Extension" }, "donate": { "openCollective": "Donate on Open Collective", "payPal": "Donate via PayPal", "gumroad": "Donate via Gumroad (Visa, Mastercard, etc.)" }, "twitter": "X", "devTools": "Toggle Developer Tools", "links": { "snippets": "Snippet Collection" } }, "view": { "label": "View", "showSidebar": "Show/Hide Sidebar", "sortBy": { "label": "Sort Snippets By", "dateModified": "Date Modified", "dateCreated": "Date Created", "name": "Name" }, "compactMode": "Compact Mode" }, "edit": { "label": "Edit", "find": "Find" }, "editor": { "label": "Editor", "copy": "Copy Snippet to Clipboard", "format": "Format", "previewCode": "Preview Code", "previewScreenshot": "Preview Screenshot", "previewJson": "Preview JSON", "fontSizeIncrease": "Font Size Increase", "fontSizeDecrease": "Font Size Decrease", "fontSizeReset": "Font Size Reset" }, "markdown": { "label": "Markdown", "preview": "Preview", "previewMarkdown": "Preview Markdown", "presentationMode": "Presentation Mode", "previewMindmap": "Preview Mindmap" }, "history": { "label": "History", "back": "Back", "forward": "Forward" }, "devtools": { "label": "Developer Tools" }, "window": { "label": "Window", "minimize": "Minimize" } } ================================================ FILE: src/main/i18n/locales/en_US/messages.json ================================================ { "confirm": { "delete": "Are you sure you want to delete \"{{name}}\"?", "deletePermanently": "Are you sure you want to permanently delete \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Are you sure you want to permanently delete {{count}} selected snippets?", "emptyTrash": "Are you sure you want to permanently delete all snippets in Trash?", "clearDb": "Are you sure you want to clear the database?", "migrateDb": [ "Are you sure you want to migrate?", "During migrate, the current library will be overwritten." ], "migrateToMarkdown": [ "Migrate to Markdown Vault?", "The selected vault will be overwritten with the current SQLite library." ], "migrateToSqlite": [ "Rollback to SQLite?", "Current SQLite data will be replaced with data from markdown vault." ], "backup": { "restore": "Are you sure you want to restore from this backup?", "delete": "Are you sure you want to delete this backup?" } }, "success": { "copied": "Copied to clipboard", "migrate": "DB successfully migrated.", "migrateToMarkdown": "Migrated to Markdown Vault. Folders: {{folders}}, snippets: {{snippets}}, tags: {{tags}}.", "migrateToSqlite": "Rolled back to SQLite. Folders: {{folders}}, snippets: {{snippets}}, tags: {{tags}}.", "vaultLoaded": "Vault successfully loaded.", "backup": { "created": "Backup successfully created.", "restored": "Backup successfully restored.", "deleted": "Backup successfully deleted." } }, "warning": { "noUndo": "You cannot undo this action.", "allSnippetsMoveToTrash": "All snippets in this folder will be moved to trash.", "deleteTag": "This will also cause all snippets to have that tag removed.", "createDb": "Please select another folder", "clearDb": "This will permanently delete all Snippets, Folders, and Tags from the database.", "htmlCssPreview": "Add HTML fragment to see the result. Add CSS for styling and JavaScript for interactivity.", "codeBlockRenderer": [ "When using Codemirror, the language to be set for the code block must correspond to one of the values of the", "languages" ] }, "error": { "backup": "Backup operation failed" }, "description": { "storage": "The directory where the SQLite database is stored.", "storageEngine": "Markdown Vault is the new recommended storage format. SQLite remains available for compatibility and rollback.", "storageVault": "Choose the vault directory. To sync between devices, select a folder in iCloud Drive, Google Drive or Dropbox.", "migrate": { "fromV3": "To migrate from massCode v3 select the folder containing the JSON file.", "fromSnippetsLab": "To migrate from SnippetsLab select JSON file.", "snippetsLabLimitations": [ "Some Limitations. During migration from SnippetsLab:", "All folders will be first level as JSON file (below v2.1) does not represent nested folders.", "Snippets with unsupported languages will be set to default Plain Text." ] }, "language": "To apply language changes, you need to reload the app.", "backup": { "manual": "Manual backup will not be deleted automatically when the number of backups exceeds the limit." } }, "special": { "supportMessage": "Hi, Anton here 👋

\nThanks for using massCode. If you find this app useful, please {{-tagStart}}donate{{-tagEnd}}. It will inspire me to continue development on the project.", "unsponsored": "Unsponsored" }, "release": { "mdVaultAvailable": "New: Markdown Vault storage is now available! SQLite will be removed in v{{sqliteSunsetVersion}}." }, "update": { "available": "Version {{newVersion}} is now available for download.\nYour version is {{oldVersion}}.", "noAvailable": "There are currently no updates available." } } ================================================ FILE: src/main/i18n/locales/en_US/preferences.json ================================================ { "label": "Preferences", "storage": { "section": { "main": "Main", "migration": "Migration", "dangerZone": "Danger Zone", "backup": "Backup" }, "label": "Storage", "migrate": "Migrate", "migrateMarkdownToSqlite": "Rollback to SQLite", "migrateSqliteToMarkdown": "Migrate to Markdown Vault", "count": "Count", "vaultPath": "Vault Path", "engine": { "label": "Storage Engine", "sqlite": "SQLite (Legacy)", "markdown": "Markdown Vault (Recommended)" }, "clearDatabase": "Clear Database", "backup": { "label": "Backup", "enabled": "Auto Backup", "interval": { "label": "Interval", "1": "Every hour", "6": "Every 6 hours", "12": "Every 12 hours", "24": "Every 24 hours" }, "maxBackups": "Maximum Backups", "createNow": "Create Backup Now", "restore": "Restore from Backup", "list": "Backup List", "lastBackup": "Last Backup", "noBackups": "No backups found" } }, "editor": { "label": "Editor", "fontSize": "Font Size", "fontFamily": "Font Family", "wrap": { "label": "Wrap", "wordWrap": "Word Wrap", "off": "Off" }, "tabSize": "Tab Size", "showInvisibles": "Show Invisibles", "highlightLine": "Highlight Line", "highlightGutter": "Highlight Gutter", "matchBrackets": "Match Brackets", "prettier": { "label": "Prettier", "trailingComma": { "label": "Trailing Comma", "none": "None", "all": "All", "es5": "ES5" }, "semi": "Semi", "singleQuote": "Single Quote" } }, "appearance": { "label": "Appearance", "theme": { "label": "Theme", "builtIn": "Built-in", "custom": "Custom", "themesDir": "Themes Directory", "openDir": "Open Themes Directory", "createTemplate": "Create Theme Template", "dirDescription": "Place your JSON theme files in this folder.", "light": "Light", "dark": "Dark", "system": "System" } }, "language": { "label": "Language" }, "markdown": { "label": "Markdown", "codeRenderer": "Code block Renderer" }, "api": { "label": "API Port", "port": { "label": "API Port", "description": "Port number for the API server (requires app restart to take effect). Valid range: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/en_US/ui.json ================================================ { "total": "Total", "line": "Line", "column": "Column", "fragment": "Fragment", "path": "Path", "button": { "back": "Back", "cancel": "Cancel", "clear": "Clear", "confirm": "Confirm", "copy": "Copy", "fit": "Fit", "generate": "Generate", "ok": "OK", "revers": "Revers", "saveAs": "Save as", "sort": "Sort", "update": ["Go to GitHub", "OK"], "zoomIn": "Zoom In", "zoomOut": "Zoom Out", "darkMode": "Dark Mode", "toggleDarkMode": "Toggle Dark Mode", "background": "Background", "goToDownload": "Go to Download", "goToSettings": "Go to Settings", "refreshPreview": "Refresh Preview", "laserPointer": "Laser Pointer", "fullscreen": "Full Screen", "prev": "Prev", "next": "Next" }, "action": { "close": "Close", "defaultLanguage": "Default Language", "duplicate": "Duplicate", "rename": "Rename", "restore": "Restore", "setCustomIcon": "Set Icon", "removeCustomIcon": "Remove Icon", "show": "Show", "hide": "Hide", "showSidebar": "Show Sidebar", "hideSidebar": "Hide Sidebar", "new": { "storage": "New Storage", "folder": "New Folder", "snippet": "New Snippet", "fragment": "New Fragment" }, "add": { "description": "Add Description", "tag": "Add Tag", "toFavorites": "Add to Favorites" }, "open": { "storage": "Open Storage" }, "move": { "storage": "Move Storage", "toTrash": "Move to Trash" }, "remove": { "fromFavorites": "Remove from Favorites" }, "reload": { "storage": "Reload Storage", "app": "Reload massCode" }, "delete": { "common": "Delete", "now": "Delete Now", "allData": "Delete All Data", "trash": "Empty Trash" }, "migrate": { "fromSnippetsLab": "From SnippetsLab", "fromV3": "From massCode v3" }, "export": { "toHtml": "Export to HTML" }, "copy": { "snippetLink": "Copy Snippet Link" }, "backup": { "create": "Create Backup", "restore": "Restore from Backup", "showList": "Show List" }, "select": { "directory": "Select Directory" } }, "sidebar": { "title": "Code Snippets", "inbox": "Inbox", "favorites": "Favorites", "allSnippets": "All Snippets", "trash": "Trash", "folders": "Folders", "library": "Library", "tags": "Tags" }, "folder": { "untitled": "Untitled folder", "plural": "Folders", "collapseAll": "Collapse All", "expandAll": "Expand All" }, "snippet": { "untitled": "Untitled snippet", "plural": "Snippets", "emptyName": "Type snippet name", "selectedMultiple": "{{count}} Snippets Selected", "noSelected": "No Snippet Selected" }, "mathNotebook": { "label": "Math Notebook", "sheetList": "Sheet List", "newSheet": "New Sheet", "untitled": "Untitled", "copied": "Copied", "currencyUnavailable": "Currency rates service unavailable" }, "spaces": { "label": "Spaces", "code": "Code", "tools": "Tools", "math": "Math", "codeTooltip": "Code snippets", "toolsTooltip": "Developer tools", "mathTooltip": "Math notebook" }, "loading": "App loading...", "placeholder": { "emptyTagList": "Add tags to snippets to see them here", "emptyFoldersList": "No Folders", "emptySnippetsList": "No Snippets", "emptySheetList": "No Sheets", "search": "Search", "addTag": "Add Tag" } } ================================================ FILE: src/main/i18n/locales/es_ES/devtools.json ================================================ { "label": "Herramientas de desarrollo", "generators": { "label": "Generadores", "lorem": { "label": "Generador Lorem Ipsum", "description": "Generar texto de marcador de posición", "selectType": "Seleccionar tipo", "maxCount": "Máx {{count}}", "types": { "words": "Palabras", "sentences": "Oraciones", "paragraphs": "Párrafos" } }, "json": { "label": "Generador JSON", "description": "Generar datos JSON aleatorios con varios tipos de campos", "fields": "Campos", "fieldName": "Nombre del campo", "selectType": "Seleccionar tipo", "addField": "Agregar campo", "rowCount": "Número de filas", "maxRows": "Máx 1000", "categories": { "general": "General", "person": "Persona", "internet": "Internet", "location": "Ubicación", "finance": "Finanzas", "commerce": "Comercio", "company": "Empresa", "lorem": "Lorem", "date": "Fecha", "number": "Número", "phone": "Teléfono", "image": "Imagen" }, "types": { "rowNumber": "Número de fila", "firstName": "Nombre", "lastName": "Apellido", "fullName": "Nombre completo", "gender": "Género", "jobTitle": "Título del trabajo", "email": "Dirección de correo electrónico", "username": "Nombre de usuario", "password": "Contraseña", "url": "URL", "ipv4": "Dirección IP v4", "ipv6": "Dirección IP v6", "userAgent": "User Agent", "city": "Ciudad", "country": "País", "streetAddress": "Dirección", "zipCode": "Código postal", "latitude": "Latitud", "longitude": "Longitud", "amount": "Cantidad", "currencyCode": "Código de moneda", "creditCardNumber": "Número de tarjeta de crédito", "productName": "Nombre del producto", "price": "Precio", "department": "Departamento", "companyName": "Nombre de la empresa", "catchPhrase": "Eslogan", "word": "Palabra", "sentence": "Oración", "paragraph": "Párrafo", "past": "Fecha pasada", "future": "Fecha futura", "recent": "Fecha reciente", "birthdate": "Fecha de nacimiento", "int": "Entero", "float": "Flotante", "boolean": "Booleano", "phoneNumber": "Número de teléfono", "imei": "IMEI", "avatar": "URL del avatar", "imageUrl": "URL de la imagen" } } }, "converters": { "label": "Convertidores", "caseConverter": { "label": "Convertidor de mayúsculas", "description": "Transformar texto a diferentes casos", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Texto a Unicode", "description": "Convertir texto a Unicode y viceversa", "modes": { "textToUnicode": "Texto → Unicode", "unicodeToText": "Unicode → Texto" } }, "textToAscii": { "label": "Texto a ASCII Binary", "description": "Convertir texto a ASCII binary y viceversa", "modes": { "textToAscii": "Texto → ASCII", "asciiToText": "ASCII → Texto" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Codificar o decodificar texto a Base64", "modes": { "textToBase64": "Texto → Base64", "base64ToText": "Base64 → Texto" } }, "jsonToYaml": { "label": "JSON a YAML", "description": "Convertir JSON a YAML y viceversa", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON a TOML", "description": "Convertir JSON a TOML y viceversa", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON a XML", "description": "Convertir JSON a XML y viceversa", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Convertidor de colores", "description": "Convertir colores entre diferentes formatos" } }, "crypto": { "label": "Criptografía / Seguridad", "hash": { "label": "Generador de hash", "description": "Generar hashes a partir de texto" }, "hmac": { "label": "Generador HMAC", "description": "Generar código de autenticación de mensaje basado en hash (HMAC) compuesto por una clave y un mensaje" }, "password": { "label": "Generador de contraseñas", "description": "Generar una contraseña segura" }, "uuid": { "label": "Generador UUID", "description": "Generar un identificador único universal (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "Analizador URL", "description": "Analizar una URL en sus componentes" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Codificar o decodificar URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Convertir texto a un slug compatible con URL" } }, "form": { "input": "Entrada", "output": "Salida", "inputString": "Cadena de entrada", "outputString": "Cadena de salida", "inputUrl": "URL de entrada", "outputUrl": "URL de salida", "parsedUrl": "URL analizada", "splitQueryString": "Dividir Query String", "key": "Clave", "value": "Valor", "component": "Componente", "result": "Resultado", "secretKey": "Clave secreta", "algorithm": "Algoritmo", "version": "Versión", "amount": "Cantidad", "type": "Tipo", "length": "Longitud", "options": "Opciones", "numbers": "Números", "symbols": "Símbolos", "lowercase": "Minúsculas", "uppercase": "Mayúsculas", "placeholder": { "text": "Ingrese un texto", "value": "Ingrese un valor", "secretKey": "Ingrese una clave secreta", "url": "Ingrese una URL" } } } ================================================ FILE: src/main/i18n/locales/es_ES/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Preferencias", "devtools": "Herramientas de Desarrollo", "update": "Buscar Actualizaciones...", "quit": "Salir de massCode", "about": "Acerca de massCode", "hide": "Ocultar massCode" }, "help": { "label": "Ayuda", "website": "Sitio Web", "documentation": "Documentación", "viewInGitHub": "Ver en GitHub", "changeLog": "Registro de Cambios", "reportIssue": "Reportar Problema", "giveStar": "Dar una Estrella", "extension": { "vscode": "Extensión VS Code", "raycast": "Extensión Raycast", "alfred": "Extensión Alfred" }, "donate": { "openCollective": "Donar en Open Collective", "payPal": "Donar vía PayPal", "gumroad": "Donar vía Gumroad (Visa, Mastercard, etc.)" }, "twitter": "X", "devTools": "Alternar Herramientas de Desarrollo", "links": { "snippets": "Colección de Snippets" } }, "edit": { "label": "Editar", "find": "Buscar" }, "view": { "label": "Vista", "sortBy": { "label": "Ordenar Snippets Por", "dateModified": "Fecha de Modificación", "dateCreated": "Fecha de Creación", "name": "Nombre" }, "compactMode": "Modo Compacto", "showSidebar": "Mostrar/ocultar barra lateral" }, "editor": { "label": "Editor", "copy": "Copiar Snippet al Portapapeles", "format": "Formatear", "previewCode": "Vista Previa del Código", "previewScreenshot": "Vista Previa de Captura", "previewJson": "Vista previa JSON", "fontSizeIncrease": "Aumentar Tamaño de Fuente", "fontSizeDecrease": "Disminuir Tamaño de Fuente", "fontSizeReset": "Restablecer Tamaño de Fuente" }, "markdown": { "label": "Markdown", "presentationMode": "Modo Presentación", "preview": "Vista Previa", "previewMarkdown": "Vista Previa de Markdown", "previewMindmap": "Vista Previa de Mapa Mental" }, "history": { "label": "Historial", "back": "Atrás", "forward": "Adelante" }, "devtools": { "label": "Herramientas de Desarrollo" } } ================================================ FILE: src/main/i18n/locales/es_ES/messages.json ================================================ { "confirm": { "delete": "¿Estás seguro de que quieres eliminar \"{{name}}\"?", "deletePermanently": "¿Estás seguro de que quieres eliminar permanentemente \"{{name}}\"?", "deleteConfirmMultipleSnippets": "¿Estás seguro de que quieres eliminar permanentemente {{count}} snippets seleccionados?", "emptyTrash": "¿Estás seguro de que quieres eliminar permanentemente todos los snippets de la Papelera?", "clearDb": "¿Estás seguro de que quieres limpiar la base de datos?", "migrateDb": [ "¿Estás seguro de que quieres migrar?", "Durante la migración, la biblioteca actual será sobrescrita." ] }, "success": { "copied": "Copiado al portapapeles", "migrate": "Base de datos migrada exitosamente.", "backup": { "created": "Copia de seguridad creada exitosamente.", "restored": "Copia de seguridad restaurada exitosamente.", "deleted": "Copia de seguridad eliminada exitosamente." } }, "warning": { "noUndo": "No podrás deshacer esta acción.", "allSnippetsMoveToTrash": "Todos los snippets en esta carpeta se moverán a la papelera.", "deleteTag": "Esto también causará que se elimine la etiqueta de todos los snippets.", "createDb": "Por favor selecciona otra carpeta", "clearDb": "Esto eliminará permanentemente todos los Snippets, Carpetas y Etiquetas de la base de datos.", "htmlCssPreview": "Agregue un fragmento HTML para ver el resultado. Agregue CSS para el estilo y JavaScript para la interactividad.", "codeBlockRenderer": [ "Al usar Codemirror, el lenguaje a establecer para el bloque de código debe corresponder a uno de los valores de los", "languages" ] }, "error": {}, "description": { "storage": "Para usar servicios de sincronización como iCloud Drive, Google Drive o Dropbox, simplemente mueve el almacenamiento a las carpetas sincronizadas correspondientes", "migrate": { "fromV3": "Para migrar desde massCode v3 selecciona la carpeta que contiene el archivo JSON.", "fromSnippetsLab": "Para migrar desde SnippetsLab selecciona el archivo JSON.", "snippetsLabLimitations": [ "Algunas limitaciones. Durante la migración desde SnippetsLab:", "Todas las carpetas serán de primer nivel ya que el archivo JSON (inferior a v2.1) no representa carpetas anidadas.", "Los snippets con lenguajes no soportados se establecerán como Plain Text por defecto." ] } }, "special": { "supportMessage": "Hola, soy Anton 👋

\nGracias por usar massCode. Si encuentras útil esta aplicación, por favor {{-tagStart}}dona{{-tagEnd}}. Me inspirará a continuar el desarrollo del proyecto.", "unsponsored": "Sin patrocinio" }, "update": { "available": "La versión {{newVersion}} está disponible para descargar.\nTu versión es {{oldVersion}}.", "noAvailable": "Actualmente no hay actualizaciones disponibles." } } ================================================ FILE: src/main/i18n/locales/es_ES/preferences.json ================================================ { "label": "Preferencias", "storage": { "label": "Almacenamiento", "migrate": "Migrar", "count": "Cantidad", "clearDatabase": "Limpiar Base de Datos" }, "editor": { "label": "Editor", "fontSize": "Tamaño de Fuente", "fontFamily": "Familia de Fuente", "wrap": { "label": "Ajuste", "wordWrap": "Ajuste de Texto", "off": "Desactivado" }, "tabSize": "Tamaño de Tabulación", "showInvisibles": "Mostrar Invisibles", "highlightLine": "Resaltar Línea", "highlightGutter": "Resaltar Margen", "matchBrackets": "Emparejar Corchetes", "prettier": { "label": "Prettier", "trailingComma": { "label": "Coma Final", "none": "Ninguna", "all": "Todas", "es5": "ES5" }, "semi": "Punto y Coma", "singleQuote": "Comilla Simple" } }, "appearance": { "label": "Apariencia", "theme": { "label": "Tema", "light": "Claro", "dark": "Oscuro" } }, "language": { "label": "Idioma" }, "markdown": { "label": "Markdown", "codeRenderer": "Renderizador de Bloques de Código" }, "api": { "label": "Puerto API", "port": { "label": "Puerto API", "description": "Número de puerto para el servidor API (requiere reiniciar la aplicación). Rango válido: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/es_ES/ui.json ================================================ { "total": "Total", "line": "Línea", "column": "Columna", "fragment": "Fragmento", "path": "Ruta", "button": { "back": "Atrás", "cancel": "Cancelar", "clear": "Limpiar", "confirm": "Confirmar", "copy": "Copiar", "fit": "Ajustar", "generate": "Generar", "ok": "OK", "revers": "Invertir", "saveAs": "Guardar como", "sort": "Ordenar", "update": ["Ir a GitHub", "OK"], "zoomIn": "Acercar", "zoomOut": "Alejar", "darkMode": "Modo Oscuro", "toggleDarkMode": "Alternar modo oscuro", "background": "Fondo", "goToDownload": "Ir a Descargar", "refreshPreview": "Actualizar vista previa", "laserPointer": "Puntero láser", "fullscreen": "Pantalla completa", "prev": "Anterior", "next": "Siguiente" }, "action": { "close": "Cerrar", "defaultLanguage": "Lenguaje Predeterminado", "duplicate": "Duplicar", "rename": "Renombrar", "restore": "Restaurar", "setCustomIcon": "Establecer Icono", "removeCustomIcon": "Eliminar Icono", "show": "Mostrar", "hide": "Ocultar", "showSidebar": "Mostrar barra lateral", "hideSidebar": "Ocultar barra lateral", "new": { "storage": "Nuevo Almacenamiento", "folder": "Nueva Carpeta", "snippet": "Nuevo Snippet", "fragment": "Nuevo Fragmento" }, "add": { "description": "Agregar Descripción", "tag": "Agregar Etiqueta", "toFavorites": "Agregar a Favoritos" }, "open": { "storage": "Abrir Almacenamiento" }, "move": { "storage": "Mover Almacenamiento", "toTrash": "Mover a la Papelera" }, "remove": { "fromFavorites": "Eliminar de Favoritos" }, "reload": { "storage": "Recargar Almacenamiento" }, "delete": { "common": "Eliminar", "now": "Eliminar Ahora", "allData": "Eliminar Todos los Datos", "trash": "Vaciar Papelera" }, "migrate": { "fromSnippetsLab": "Desde SnippetsLab", "fromV3": "Desde massCode v3" }, "export": { "toHtml": "Exportar a HTML" }, "copy": { "snippetLink": "Copiar Enlace del Snippet" } }, "sidebar": { "inbox": "Bandeja de entrada", "favorites": "Favoritos", "allSnippets": "Todos los Snippets", "trash": "Papelera", "folders": "Carpetas", "library": "Biblioteca", "tags": "Etiquetas" }, "folder": { "untitled": "Carpeta sin título", "plural": "Carpetas", "collapseAll": "Contraer Todo", "expandAll": "Expandir Todo" }, "snippet": { "untitled": "Snippet sin título", "plural": "Snippets", "emptyName": "Escriba el nombre del snippet", "selectedMultiple": "{{count}} Snippets Seleccionados", "noSelected": "Ningún Snippet Seleccionado" }, "placeholder": { "emptyTagList": "Agregue etiquetas a los snippets para verlos aquí", "emptyFoldersList": "Sin carpetas", "emptySnippetsList": "Sin fragmentos", "search": "Buscar", "addTag": "Agregar Etiqueta" } } ================================================ FILE: src/main/i18n/locales/fa_IR/devtools.json ================================================ { "label": "ابزارهای توسعه‌دهنده", "generators": { "label": "تولیدکننده‌ها", "lorem": { "label": "تولیدکننده Lorem Ipsum", "description": "تولید متن نگهدارنده", "selectType": "نوع را انتخاب کنید", "maxCount": "حداکثر {{count}}", "types": { "words": "کلمات", "sentences": "جمله‌ها", "paragraphs": "پاراگراف‌ها" } }, "json": { "label": "تولیدکننده JSON", "description": "تولید داده‌های JSON تصادفی با انواع مختلف فیلد", "fields": "فیلدها", "fieldName": "نام فیلد", "selectType": "انتخاب نوع", "addField": "افزودن فیلد", "rowCount": "تعداد ردیف‌ها", "maxRows": "حداکثر ۱۰۰۰", "categories": { "general": "عمومی", "person": "شخص", "internet": "اینترنت", "location": "مکان", "finance": "مالی", "commerce": "تجارت", "company": "شرکت", "lorem": "Lorem", "date": "تاریخ", "number": "عدد", "phone": "تلفن", "image": "تصویر" }, "types": { "rowNumber": "شماره ردیف", "firstName": "نام", "lastName": "نام خانوادگی", "fullName": "نام کامل", "gender": "جنسیت", "jobTitle": "عنوان شغلی", "email": "آدرس ایمیل", "username": "نام کاربری", "password": "رمز عبور", "url": "URL", "ipv4": "آدرس IP v4", "ipv6": "آدرس IP v6", "userAgent": "User Agent", "city": "شهر", "country": "کشور", "streetAddress": "آدرس خیابان", "zipCode": "کد پستی", "latitude": "عرض جغرافیایی", "longitude": "طول جغرافیایی", "amount": "مقدار", "currencyCode": "کد ارز", "creditCardNumber": "شماره کارت اعتباری", "productName": "نام محصول", "price": "قیمت", "department": "بخش", "companyName": "نام شرکت", "catchPhrase": "شعار", "word": "کلمه", "sentence": "جمله", "paragraph": "پاراگراف", "past": "تاریخ گذشته", "future": "تاریخ آینده", "recent": "تاریخ اخیر", "birthdate": "تاریخ تولد", "int": "عدد صحیح", "float": "عدد اعشاری", "boolean": "بولی", "phoneNumber": "شماره تلفن", "imei": "IMEI", "avatar": "URL آواتار", "imageUrl": "URL تصویر" } } }, "converters": { "label": "مبدل‌ها", "caseConverter": { "label": "مبدل حروف بزرگ و کوچک", "description": "تبدیل متن به فرمت‌های مختلف حروف", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "متن به Unicode", "description": "تبدیل متن به Unicode و برعکس", "modes": { "textToUnicode": "متن ← Unicode", "unicodeToText": "Unicode ← متن" } }, "textToAscii": { "label": "متن به ASCII Binary", "description": "تبدیل متن به ASCII binary و برعکس", "modes": { "textToAscii": "متن ← ASCII", "asciiToText": "ASCII ← متن" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "رمزگذاری یا رمزگشایی متن به Base64", "modes": { "textToBase64": "متن ← Base64", "base64ToText": "Base64 ← متن" } }, "jsonToYaml": { "label": "JSON به YAML", "description": "تبدیل JSON به YAML و برعکس", "modes": { "jsonToYaml": "JSON ← YAML", "yamlToJson": "YAML ← JSON" } }, "jsonToToml": { "label": "JSON به TOML", "description": "تبدیل JSON به TOML و برعکس", "modes": { "jsonToToml": "JSON ← TOML", "tomlToJson": "TOML ← JSON" } }, "jsonToXml": { "label": "JSON به XML", "description": "تبدیل JSON به XML و برعکس", "modes": { "jsonToXml": "JSON ← XML", "xmlToJson": "XML ← JSON" } }, "colorConverter": { "label": "مبدل رنگ", "description": "تبدیل رنگ‌ها بین فرمت‌های مختلف" } }, "crypto": { "label": "رمزنگاری / امنیت", "hash": { "label": "تولیدکننده Hash", "description": "تولید hash از متن" }, "hmac": { "label": "تولیدکننده HMAC", "description": "تولید کد احراز هویت پیام مبتنی بر hash (HMAC) متشکل از کلید و پیام" }, "password": { "label": "تولیدکننده رمز عبور", "description": "تولید رمز عبور امن" }, "uuid": { "label": "تولیدکننده UUID", "description": "تولید شناسه منحصر به فرد جهانی (UUID)" } }, "web": { "label": "وب", "urlParser": { "label": "تجزیه‌کننده URL", "description": "تجزیه URL به اجزای آن" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "رمزگذاری یا رمزگشایی URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "تبدیل متن به slug سازگار با URL" } }, "form": { "input": "ورودی", "output": "خروجی", "inputString": "رشته ورودی", "outputString": "رشته خروجی", "inputUrl": "URL ورودی", "outputUrl": "URL خروجی", "parsedUrl": "URL تجزیه شده", "splitQueryString": "تقسیم Query String", "key": "کلید", "value": "مقدار", "component": "جزء", "result": "نتیجه", "secretKey": "کلید مخفی", "algorithm": "الگوریتم", "version": "نسخه", "amount": "مقدار", "type": "نوع", "length": "طول", "options": "گزینه‌ها", "numbers": "اعداد", "symbols": "نمادها", "lowercase": "حروف کوچک", "uppercase": "حروف بزرگ", "placeholder": { "text": "متن وارد کنید", "value": "مقدار وارد کنید", "secretKey": "کلید مخفی وارد کنید", "url": "URL وارد کنید" } } } ================================================ FILE: src/main/i18n/locales/fa_IR/menu.json ================================================ { "app": { "label": "massCode", "preferences": "تنظیمات", "devtools": "ابزارهای توسعه", "update": "بررسی به‌روزرسانی‌ها...", "quit": "خروج از massCode", "about": "درباره massCode", "hide": "مخفی کردن massCode" }, "help": { "label": "راهنما", "website": "وب‌سایت", "documentation": "مستندات", "viewInGitHub": "مشاهده در GitHub", "changeLog": "تغییرات", "reportIssue": "گزارش مشکل", "giveStar": "دادن ستاره", "extension": { "vscode": "افزونه VS Code", "raycast": "افزونه Raycast", "alfred": "افزونه Alfred" }, "donate": { "openCollective": "حمایت مالی در Open Collective", "payPal": "حمایت مالی از طریق PayPal", "gumroad": "حمایت مالی از طریق Gumroad (Visa، Mastercard و غیره)" }, "twitter": "X", "devTools": "تغییر وضعیت ابزارهای توسعه", "links": { "snippets": "مجموعه Snippet" } }, "edit": { "label": "ویرایش", "find": "جستجو" }, "view": { "label": "نمایش", "sortBy": { "label": "مرتب‌سازی Snippetها بر اساس", "dateModified": "تاریخ ویرایش", "dateCreated": "تاریخ ایجاد", "name": "نام" }, "compactMode": "حالت فشرده", "showSidebar": "نمایش/پنهان کردن نوار کناری" }, "editor": { "label": "ویرایشگر", "copy": "کپی Snippet به کلیپ‌بورد", "format": "قالب‌بندی", "previewCode": "پیش‌نمایش کد", "previewScreenshot": "پیش‌نمایش تصویر", "previewJson": "پیش‌نمایش JSON", "fontSizeIncrease": "افزایش اندازه فونت", "fontSizeDecrease": "کاهش اندازه فونت", "fontSizeReset": "بازنشانی اندازه فونت" }, "markdown": { "label": "Markdown", "presentationMode": "حالت ارائه", "preview": "پیش‌نمایش", "previewMarkdown": "پیش‌نمایش Markdown", "previewMindmap": "پیش‌نمایش نقشه ذهنی" }, "history": { "label": "تاریخچه", "back": "عقب", "forward": "جلو" }, "devtools": { "label": "ابزارهای توسعه" } } ================================================ FILE: src/main/i18n/locales/fa_IR/messages.json ================================================ { "confirm": { "delete": "آیا مطمئن هستید که می‌خواهید \"{{name}}\" را حذف کنید؟", "deletePermanently": "آیا مطمئن هستید که می‌خواهید \"{{name}}\" را به طور دائم حذف کنید؟", "deleteConfirmMultipleSnippets": "آیا مطمئن هستید که می‌خواهید {{count}} snippet انتخاب شده را به طور دائم حذف کنید؟", "emptyTrash": "آیا مطمئن هستید که می‌خواهید تمام snippets موجود در سطل زباله را به طور دائم حذف کنید؟", "clearDb": "آیا مطمئن هستید که می‌خواهید پایگاه داده را پاک کنید؟", "migrateDb": [ "آیا مطمئن هستید که می‌خواهید مهاجرت کنید؟", "در طول مهاجرت، کتابخانه فعلی بازنویسی خواهد شد." ] }, "success": { "copied": "در کلیپ‌بورد کپی شد", "migrate": "پایگاه داده با موفقیت مهاجرت کرد.", "backup": { "created": "پشتیبان با موفقیت ایجاد شد.", "restored": "پشتیبان با موفقیت بازیابی شد.", "deleted": "پشتیبان با موفقیت حذف شد." } }, "warning": { "noUndo": "شما نمی‌توانید این عمل را برگردانید.", "allSnippetsMoveToTrash": "تمام snippets در این پوشه به سطل زباله منتقل خواهند شد.", "deleteTag": "این کار باعث حذف برچسب از تمام snippets خواهد شد.", "createDb": "لطفاً پوشه دیگری را انتخاب کنید", "clearDb": "این کار تمام Snippets، پوشه‌ها و برچسب‌ها را از پایگاه داده به طور دائم حذف خواهد کرد.", "htmlCssPreview": "برای دیدن نتیجه، یک قطعه HTML اضافه کنید. برای استایل‌دهی CSS و برای تعامل JavaScript اضافه کنید.", "codeBlockRenderer": [ "هنگام استفاده از Codemirror، زبان تنظیم شده برای بلوک کد باید با یکی از مقادیر", "languages" ] }, "error": {}, "description": { "storage": "برای استفاده از سرویس‌های همگام‌سازی مانند iCloud Drive، Google Drive یا Dropbox، کافیست محل ذخیره‌سازی را به پوشه‌های همگام‌سازی شده مربوطه منتقل کنید", "migrate": { "fromV3": "برای مهاجرت از massCode v3 پوشه حاوی فایل JSON را انتخاب کنید.", "fromSnippetsLab": "برای مهاجرت از SnippetsLab فایل JSON را انتخاب کنید.", "snippetsLabLimitations": [ "برخی محدودیت‌ها. در طول مهاجرت از SnippetsLab:", "تمام پوشه‌ها در سطح اول خواهند بود زیرا فایل JSON (نسخه زیر 2.1) پوشه‌های تو در تو را نمایش نمی‌دهد.", "Snippets با زبان‌های پشتیبانی نشده به صورت پیش‌فرض به Plain Text تنظیم خواهند شد." ] } }, "special": { "supportMessage": "سلام، من Anton هستم 👋

\nممنون از استفاده شما از massCode. اگر این برنامه را مفید می‌دانید، لطفاً {{-tagStart}}حمایت مالی کنید{{-tagEnd}}. این کار به من انگیزه می‌دهد تا به توسعه پروژه ادامه دهم.", "unsponsored": "بدون حامی مالی" }, "update": { "available": "نسخه {{newVersion}} برای دانلود در دسترس است.\nنسخه شما {{oldVersion}} است.", "noAvailable": "در حال حاضر به‌روزرسانی در دسترس نیست." } } ================================================ FILE: src/main/i18n/locales/fa_IR/preferences.json ================================================ { "label": "تنظیمات", "storage": { "label": "ذخیره‌سازی", "migrate": "مهاجرت", "count": "تعداد", "clearDatabase": "پاک کردن پایگاه داده" }, "editor": { "label": "ویرایشگر", "fontSize": "اندازه فونت", "fontFamily": "خانواده فونت", "wrap": { "label": "شکستن خط", "wordWrap": "شکستن کلمه", "off": "خاموش" }, "tabSize": "اندازه تب", "showInvisibles": "نمایش نامرئی‌ها", "highlightLine": "برجسته کردن خط", "highlightGutter": "برجسته کردن حاشیه", "matchBrackets": "تطبیق پرانتزها", "prettier": { "label": "Prettier", "trailingComma": { "label": "کاما انتهایی", "none": "هیچ", "all": "همه", "es5": "ES5" }, "semi": "نقطه‌ویرگول", "singleQuote": "تک کوتیشن" } }, "appearance": { "label": "ظاهر", "theme": { "label": "تم", "light": "روشن", "dark": "تاریک" } }, "language": { "label": "زبان" }, "markdown": { "label": "Markdown", "codeRenderer": "رندرکننده بلوک کد" }, "api": { "label": "پورت API", "port": { "label": "پورت API", "description": "شماره پورت برای سرور API (نیاز به راه‌اندازی مجدد برنامه دارد). محدوده معتبر: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/fa_IR/ui.json ================================================ { "total": "مجموع", "line": "خط", "column": "ستون", "fragment": "قطعه", "path": "مسیر", "button": { "back": "بازگشت", "cancel": "لغو", "clear": "پاک کردن", "confirm": "تایید", "copy": "کپی", "fit": "متناسب", "generate": "تولید", "ok": "تایید", "revers": "معکوس", "saveAs": "ذخیره به عنوان", "sort": "مرتب‌سازی", "update": ["رفتن به GitHub", "تایید"], "zoomIn": "بزرگنمایی", "zoomOut": "کوچک‌نمایی", "darkMode": "حالت تاریک", "toggleDarkMode": "تغییر حالت تاریک", "background": "پس‌زمینه", "goToDownload": "رفتن به دانلود", "refreshPreview": "به‌روزرسانی پیش‌نمایش", "laserPointer": "اشاره‌گر لیزری", "fullscreen": "تمام صفحه", "prev": "قبلی", "next": "بعدی" }, "action": { "close": "بستن", "defaultLanguage": "زبان پیش‌فرض", "duplicate": "تکثیر", "rename": "تغییر نام", "restore": "بازیابی", "setCustomIcon": "تنظیم آیکون", "removeCustomIcon": "حذف آیکون", "show": "نمایش", "hide": "پنهان", "showSidebar": "نمایش نوار کناری", "hideSidebar": "مخفی کردن نوار کناری", "new": { "storage": "فضای ذخیره‌سازی جدید", "folder": "پوشه جدید", "snippet": "Snippet جدید", "fragment": "قطعه جدید" }, "add": { "description": "افزودن توضیحات", "tag": "افزودن برچسب", "toFavorites": "افزودن به علاقه‌مندی‌ها" }, "open": { "storage": "باز کردن فضای ذخیره‌سازی" }, "move": { "storage": "انتقال فضای ذخیره‌سازی", "toTrash": "انتقال به سطل زباله" }, "remove": { "fromFavorites": "حذف از علاقه‌مندی‌ها" }, "reload": { "storage": "بارگذاری مجدد فضای ذخیره‌سازی" }, "delete": { "common": "حذف", "now": "حذف اکنون", "allData": "حذف تمام داده‌ها", "trash": "خالی کردن سطل زباله" }, "migrate": { "fromSnippetsLab": "از SnippetsLab", "fromV3": "از massCode v3" }, "export": { "toHtml": "خروجی به HTML" }, "copy": { "snippetLink": "کپی لینک Snippet" } }, "sidebar": { "inbox": "صندوق ورودی", "favorites": "علاقه‌مندی‌ها", "allSnippets": "همه Snippetها", "trash": "سطل زباله", "folders": "پوشه‌ها", "library": "کتابخانه", "tags": "برچسب‌ها" }, "folder": { "untitled": "پوشه بدون عنوان", "plural": "پوشه‌ها", "collapseAll": "بستن همه", "expandAll": "باز کردن همه" }, "snippet": { "untitled": "Snippet بدون عنوان", "plural": "Snippetها", "emptyName": "نام snippet را وارد کنید", "selectedMultiple": "{{count}} Snippet انتخاب شده", "noSelected": "هیچ Snippet انتخاب نشده" }, "placeholder": { "emptyTagList": "برای مشاهده snippetها در اینجا، به آنها برچسب اضافه کنید", "emptyFoldersList": "بدون پوشه", "emptySnippetsList": "بدون اسنیپت", "search": "جستجو", "addTag": "افزودن برچسب" } } ================================================ FILE: src/main/i18n/locales/fr_FR/devtools.json ================================================ { "label": "Outils de développement", "generators": { "label": "Générateurs", "lorem": { "label": "Générateur Lorem Ipsum", "description": "Générer du texte d'espace réservé", "selectType": "Sélectionner le type", "maxCount": "Max {{count}}", "types": { "words": "Mots", "sentences": "Phrases", "paragraphs": "Paragraphes" } }, "json": { "label": "Générateur JSON", "description": "Générer des données JSON aléatoires avec différents types de champs", "fields": "Champs", "fieldName": "Nom du champ", "selectType": "Sélectionner le type", "addField": "Ajouter un champ", "rowCount": "Nombre de lignes", "maxRows": "Max 1000", "categories": { "general": "Général", "person": "Personne", "internet": "Internet", "location": "Localisation", "finance": "Finance", "commerce": "Commerce", "company": "Entreprise", "lorem": "Lorem", "date": "Date", "number": "Nombre", "phone": "Téléphone", "image": "Image" }, "types": { "rowNumber": "Numéro de ligne", "firstName": "Prénom", "lastName": "Nom de famille", "fullName": "Nom complet", "gender": "Genre", "jobTitle": "Titre du poste", "email": "Adresse e-mail", "username": "Nom d'utilisateur", "password": "Mot de passe", "url": "URL", "ipv4": "Adresse IP v4", "ipv6": "Adresse IP v6", "userAgent": "User Agent", "city": "Ville", "country": "Pays", "streetAddress": "Adresse", "zipCode": "Code postal", "latitude": "Latitude", "longitude": "Longitude", "amount": "Montant", "currencyCode": "Code de devise", "creditCardNumber": "Numéro de carte de crédit", "productName": "Nom du produit", "price": "Prix", "department": "Département", "companyName": "Nom de l'entreprise", "catchPhrase": "Slogan", "word": "Mot", "sentence": "Phrase", "paragraph": "Paragraphe", "past": "Date passée", "future": "Date future", "recent": "Date récente", "birthdate": "Date de naissance", "int": "Entier", "float": "Flottant", "boolean": "Booléen", "phoneNumber": "Numéro de téléphone", "imei": "IMEI", "avatar": "URL de l'avatar", "imageUrl": "URL de l'image" } } }, "converters": { "label": "Convertisseurs", "caseConverter": { "label": "Convertisseur de casse", "description": "Transformer le texte en différentes casses", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Texte vers Unicode", "description": "Convertir le texte en Unicode et vice versa", "modes": { "textToUnicode": "Texte → Unicode", "unicodeToText": "Unicode → Texte" } }, "textToAscii": { "label": "Texte vers ASCII Binary", "description": "Convertir le texte en ASCII binary et vice versa", "modes": { "textToAscii": "Texte → ASCII", "asciiToText": "ASCII → Texte" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Encoder ou décoder le texte en Base64", "modes": { "textToBase64": "Texte → Base64", "base64ToText": "Base64 → Texte" } }, "jsonToYaml": { "label": "JSON vers YAML", "description": "Convertir JSON en YAML et vice versa", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON vers TOML", "description": "Convertir JSON en TOML et vice versa", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON vers XML", "description": "Convertir JSON en XML et vice versa", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Convertisseur de couleurs", "description": "Convertir les couleurs entre différents formats" } }, "crypto": { "label": "Cryptographie / Sécurité", "hash": { "label": "Générateur de hash", "description": "Générer des hashes à partir de texte" }, "hmac": { "label": "Générateur HMAC", "description": "Générer un code d'authentification de message basé sur le hash (HMAC) composé d'une clé et d'un message" }, "password": { "label": "Générateur de mot de passe", "description": "Générer un mot de passe sécurisé" }, "uuid": { "label": "Générateur UUID", "description": "Générer un identifiant unique universel (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "Analyseur URL", "description": "Analyser une URL en ses composants" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Encoder ou décoder une URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Convertir le texte en slug compatible URL" } }, "form": { "input": "Entrée", "output": "Sortie", "inputString": "Chaîne d'entrée", "outputString": "Chaîne de sortie", "inputUrl": "URL d'entrée", "outputUrl": "URL de sortie", "parsedUrl": "URL analysée", "splitQueryString": "Diviser Query String", "key": "Clé", "value": "Valeur", "component": "Composant", "result": "Résultat", "secretKey": "Clé secrète", "algorithm": "Algorithme", "version": "Version", "amount": "Quantité", "type": "Type", "length": "Longueur", "options": "Options", "numbers": "Chiffres", "symbols": "Symboles", "lowercase": "Minuscules", "uppercase": "Majuscules", "placeholder": { "text": "Entrez un texte", "value": "Entrez une valeur", "secretKey": "Entrez une clé secrète", "url": "Entrez une URL" } } } ================================================ FILE: src/main/i18n/locales/fr_FR/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Préférences", "devtools": "Outils de développement", "update": "Rechercher des mises à jour...", "quit": "Quitter massCode", "about": "À propos de massCode", "hide": "Masquer massCode" }, "help": { "label": "Aide", "website": "Site Web", "documentation": "Documentation", "viewInGitHub": "Voir sur GitHub", "changeLog": "Journal des modifications", "reportIssue": "Signaler un problème", "giveStar": "Donner une étoile", "extension": { "vscode": "Extension VS Code", "raycast": "Extension Raycast", "alfred": "Extension Alfred" }, "donate": { "openCollective": "Faire un don sur Open Collective", "payPal": "Faire un don via PayPal", "gumroad": "Faire un don via Gumroad (Visa, Mastercard, etc.)" }, "twitter": "X", "devTools": "Basculer les outils de développement", "links": { "snippets": "Collection de snippets" } }, "edit": { "label": "Édition", "find": "Rechercher" }, "view": { "label": "Affichage", "sortBy": { "label": "Trier les snippets par", "dateModified": "Date de modification", "dateCreated": "Date de création", "name": "Nom" }, "compactMode": "Mode compact", "showSidebar": "Afficher/masquer la barre latérale" }, "editor": { "label": "Éditeur", "copy": "Copier le snippet dans le presse-papiers", "format": "Formater", "previewCode": "Aperçu du code", "previewScreenshot": "Aperçu de la capture d'écran", "previewJson": "Aperçu JSON", "fontSizeIncrease": "Augmenter la taille de la police", "fontSizeDecrease": "Diminuer la taille de la police", "fontSizeReset": "Réinitialiser la taille de la police" }, "markdown": { "label": "Markdown", "presentationMode": "Mode présentation", "preview": "Aperçu", "previewMarkdown": "Aperçu Markdown", "previewMindmap": "Aperçu de la carte mentale" }, "history": { "label": "Historique", "back": "Retour", "forward": "Suivant" }, "devtools": { "label": "Outils de développement" } } ================================================ FILE: src/main/i18n/locales/fr_FR/messages.json ================================================ { "confirm": { "delete": "Êtes-vous sûr de vouloir supprimer \"{{name}}\" ?", "deletePermanently": "Êtes-vous sûr de vouloir supprimer définitivement \"{{name}}\" ?", "deleteConfirmMultipleSnippets": "Êtes-vous sûr de vouloir supprimer définitivement les {{count}} snippets sélectionnés ?", "emptyTrash": "Êtes-vous sûr de vouloir supprimer définitivement tous les snippets de la Corbeille ?", "clearDb": "Êtes-vous sûr de vouloir effacer la base de données ?", "migrateDb": [ "Êtes-vous sûr de vouloir migrer ?", "Pendant la migration, la bibliothèque actuelle sera écrasée." ] }, "success": { "copied": "Copié dans le presse-papiers", "migrate": "Base de données migrée avec succès.", "backup": { "created": "Sauvegarde créée avec succès.", "restored": "Sauvegarde restaurée avec succès.", "deleted": "Sauvegarde supprimée avec succès." } }, "warning": { "noUndo": "Vous ne pouvez pas annuler cette action.", "allSnippetsMoveToTrash": "Tous les snippets de ce dossier seront déplacés dans la corbeille.", "deleteTag": "Cela supprimera également cette étiquette de tous les snippets.", "createDb": "Veuillez sélectionner un autre dossier", "clearDb": "Cela supprimera définitivement tous les Snippets, Dossiers et Étiquettes de la base de données.", "htmlCssPreview": "Ajoutez un fragment HTML pour voir le résultat. Ajoutez du CSS pour le style et JavaScript pour l'interactivité.", "codeBlockRenderer": [ "Lors de l'utilisation de Codemirror, le langage à définir pour le bloc de code doit correspondre à l'une des valeurs des", "languages" ] }, "error": {}, "description": { "storage": "Pour utiliser des services de synchronisation comme iCloud Drive, Google Drive ou Dropbox, déplacez simplement le stockage vers les dossiers synchronisés correspondants", "migrate": { "fromV3": "Pour migrer depuis massCode v3, sélectionnez le dossier contenant le fichier JSON.", "fromSnippetsLab": "Pour migrer depuis SnippetsLab, sélectionnez le fichier JSON.", "snippetsLabLimitations": [ "Quelques limitations. Pendant la migration depuis SnippetsLab :", "Tous les dossiers seront au premier niveau car le fichier JSON (inférieur à v2.1) ne représente pas les dossiers imbriqués.", "Les snippets avec des langages non supportés seront définis par défaut en Plain Text." ] } }, "special": { "supportMessage": "Salut, c'est Anton 👋

\nMerci d'utiliser massCode. Si vous trouvez cette application utile, veuillez {{-tagStart}}faire un don{{-tagEnd}}. Cela m'inspirera à continuer le développement du projet.", "unsponsored": "Non sponsorisé" }, "update": { "available": "La version {{newVersion}} est maintenant disponible au téléchargement.\nVotre version est {{oldVersion}}.", "noAvailable": "Il n'y a actuellement aucune mise à jour disponible." } } ================================================ FILE: src/main/i18n/locales/fr_FR/preferences.json ================================================ { "label": "Préférences", "storage": { "label": "Stockage", "migrate": "Migrer", "count": "Nombre", "clearDatabase": "Effacer la base de données" }, "editor": { "label": "Éditeur", "fontSize": "Taille de police", "fontFamily": "Famille de police", "wrap": { "label": "Retour à la ligne", "wordWrap": "Retour à la ligne automatique", "off": "Désactivé" }, "tabSize": "Taille de tabulation", "showInvisibles": "Afficher les caractères invisibles", "highlightLine": "Surligner la ligne", "highlightGutter": "Surligner la gouttière", "matchBrackets": "Correspondance des parenthèses", "prettier": { "label": "Prettier", "trailingComma": { "label": "Virgule finale", "none": "Aucune", "all": "Toutes", "es5": "ES5" }, "semi": "Point-virgule", "singleQuote": "Guillemet simple" } }, "appearance": { "label": "Apparence", "theme": { "label": "Thème", "light": "Clair", "dark": "Sombre" } }, "language": { "label": "Langue" }, "markdown": { "label": "Markdown", "codeRenderer": "Rendu des blocs de code" }, "api": { "label": "Port API", "port": { "label": "Port API", "description": "Numéro de port pour le serveur API (nécessite un redémarrage de l'application). Plage valide: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/fr_FR/ui.json ================================================ { "total": "Total", "line": "Ligne", "column": "Colonne", "fragment": "Fragment", "path": "Chemin", "button": { "back": "Retour", "cancel": "Annuler", "clear": "Effacer", "confirm": "Confirmer", "copy": "Copier", "fit": "Ajuster", "generate": "Générer", "ok": "OK", "revers": "Inverser", "saveAs": "Enregistrer sous", "sort": "Trier", "update": ["Aller sur GitHub", "OK"], "zoomIn": "Zoom avant", "zoomOut": "Zoom arrière", "darkMode": "Mode sombre", "toggleDarkMode": "Basculer le mode sombre", "background": "Arrière-plan", "goToDownload": "Aller au téléchargement", "refreshPreview": "Actualiser l'aperçu", "laserPointer": "Pointeur laser", "fullscreen": "Plein écran", "prev": "Précédent", "next": "Suivant" }, "action": { "close": "Fermer", "defaultLanguage": "Langue par défaut", "duplicate": "Dupliquer", "rename": "Renommer", "restore": "Restaurer", "setCustomIcon": "Définir une icône", "removeCustomIcon": "Supprimer l'icône", "show": "Afficher", "hide": "Masquer", "showSidebar": "Afficher la barre latérale", "hideSidebar": "Masquer la barre latérale", "new": { "storage": "Nouveau stockage", "folder": "Nouveau dossier", "snippet": "Nouveau snippet", "fragment": "Nouveau fragment" }, "add": { "description": "Ajouter une description", "tag": "Ajouter un tag", "toFavorites": "Ajouter aux favoris" }, "open": { "storage": "Ouvrir le stockage" }, "move": { "storage": "Déplacer le stockage", "toTrash": "Déplacer vers la corbeille" }, "remove": { "fromFavorites": "Retirer des favoris" }, "reload": { "storage": "Recharger le stockage" }, "delete": { "common": "Supprimer", "now": "Supprimer maintenant", "allData": "Supprimer toutes les données", "trash": "Vider la corbeille" }, "migrate": { "fromSnippetsLab": "Depuis SnippetsLab", "fromV3": "Depuis massCode v3" }, "export": { "toHtml": "Exporter en HTML" }, "copy": { "snippetLink": "Copier le lien du snippet" } }, "sidebar": { "inbox": "Boîte de réception", "favorites": "Favoris", "allSnippets": "Tous les snippets", "trash": "Corbeille", "folders": "Dossiers", "library": "Bibliothèque", "tags": "Tags" }, "folder": { "untitled": "Dossier sans titre", "plural": "Dossiers", "collapseAll": "Tout réduire", "expandAll": "Tout développer" }, "snippet": { "untitled": "Snippet sans titre", "plural": "Snippets", "emptyName": "Saisissez le nom du snippet", "selectedMultiple": "{{count}} snippets sélectionnés", "noSelected": "Aucun snippet sélectionné" }, "placeholder": { "emptyTagList": "Ajoutez des tags aux snippets pour les voir ici", "emptyFoldersList": "Aucun dossier", "emptySnippetsList": "Aucun snippet", "search": "Rechercher", "addTag": "Ajouter un tag" } } ================================================ FILE: src/main/i18n/locales/ja_JP/devtools.json ================================================ { "label": "開発者ツール", "generators": { "label": "ジェネレーター", "lorem": { "label": "Lorem Ipsum ジェネレーター", "description": "プレースホルダーテキストを生成", "selectType": "タイプを選択", "maxCount": "最大 {{count}}", "types": { "words": "単語", "sentences": "文", "paragraphs": "段落" } }, "json": { "label": "JSON ジェネレーター", "description": "さまざまなフィールドタイプでランダムな JSON データを生成", "fields": "フィールド", "fieldName": "フィールド名", "selectType": "タイプを選択", "addField": "フィールドを追加", "rowCount": "行数", "maxRows": "最大 1000", "categories": { "general": "一般", "person": "人物", "internet": "インターネット", "location": "場所", "finance": "財務", "commerce": "商取引", "company": "会社", "lorem": "Lorem", "date": "日付", "number": "数字", "phone": "電話", "image": "画像" }, "types": { "rowNumber": "行番号", "firstName": "名", "lastName": "姓", "fullName": "フルネーム", "gender": "性別", "jobTitle": "職種", "email": "メールアドレス", "username": "ユーザー名", "password": "パスワード", "url": "URL", "ipv4": "IP アドレス v4", "ipv6": "IP アドレス v6", "userAgent": "User Agent", "city": "都市", "country": "国", "streetAddress": "住所", "zipCode": "郵便番号", "latitude": "緯度", "longitude": "経度", "amount": "金額", "currencyCode": "通貨コード", "creditCardNumber": "クレジットカード番号", "productName": "製品名", "price": "価格", "department": "部門", "companyName": "会社名", "catchPhrase": "キャッチフレーズ", "word": "単語", "sentence": "文", "paragraph": "段落", "past": "過去の日付", "future": "未来の日付", "recent": "最近の日付", "birthdate": "生年月日", "int": "整数", "float": "浮動小数点", "boolean": "ブール値", "phoneNumber": "電話番号", "imei": "IMEI", "avatar": "アバター URL", "imageUrl": "画像 URL" } } }, "converters": { "label": "コンバーター", "caseConverter": { "label": "ケースコンバーター", "description": "テキストを異なるケースに変換", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "テキストからUnicode", "description": "テキストをUnicodeに変換、またはその逆", "modes": { "textToUnicode": "テキスト → Unicode", "unicodeToText": "Unicode → テキスト" } }, "textToAscii": { "label": "テキストからASCII Binary", "description": "テキストをASCII binaryに変換、またはその逆", "modes": { "textToAscii": "テキスト → ASCII", "asciiToText": "ASCII → テキスト" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "テキストをBase64にエンコード、またはデコード", "modes": { "textToBase64": "テキスト → Base64", "base64ToText": "Base64 → テキスト" } }, "jsonToYaml": { "label": "JSONからYAML", "description": "JSONをYAMLに変換、またはその逆", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSONからTOML", "description": "JSONをTOMLに変換、またはその逆", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSONからXML", "description": "JSONをXMLに変換、またはその逆", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "カラーコンバーター", "description": "色を異なるフォーマット間で変換" } }, "crypto": { "label": "暗号化 / セキュリティ", "hash": { "label": "ハッシュジェネレーター", "description": "テキストからハッシュを生成" }, "hmac": { "label": "HMACジェネレーター", "description": "キーとメッセージから構成されるハッシュベースメッセージ認証コード(HMAC)を生成" }, "password": { "label": "パスワードジェネレーター", "description": "安全なパスワードを生成" }, "uuid": { "label": "UUIDジェネレーター", "description": "汎用一意識別子(UUID)を生成" } }, "web": { "label": "ウェブ", "urlParser": { "label": "URLパーサー", "description": "URLをコンポーネントに解析" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "URLをエンコード、またはデコード", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "テキストをURL対応のslugに変換" } }, "form": { "input": "入力", "output": "出力", "inputString": "入力文字列", "outputString": "出力文字列", "inputUrl": "入力URL", "outputUrl": "出力URL", "parsedUrl": "解析されたURL", "splitQueryString": "Query Stringを分割", "key": "キー", "value": "値", "component": "コンポーネント", "result": "結果", "secretKey": "秘密キー", "algorithm": "アルゴリズム", "version": "バージョン", "amount": "数量", "type": "タイプ", "length": "長さ", "options": "オプション", "numbers": "数字", "symbols": "記号", "lowercase": "小文字", "uppercase": "大文字", "placeholder": { "text": "テキストを入力", "value": "値を入力", "secretKey": "秘密キーを入力", "url": "URLを入力" } } } ================================================ FILE: src/main/i18n/locales/ja_JP/menu.json ================================================ { "app": { "label": "massCode", "preferences": "環境設定", "devtools": "開発者ツール", "update": "アップデートを確認...", "quit": "massCodeを終了", "about": "massCodeについて", "hide": "massCodeを隠す" }, "help": { "label": "ヘルプ", "website": "ウェブサイト", "documentation": "ドキュメント", "viewInGitHub": "GitHubで表示", "changeLog": "変更履歴", "reportIssue": "問題を報告", "giveStar": "スターを付ける", "extension": { "vscode": "VS Code拡張機能", "raycast": "Raycast拡張機能", "alfred": "Alfred拡張機能" }, "donate": { "openCollective": "Open Collectiveで寄付", "payPal": "PayPalで寄付", "gumroad": "Gumroadで寄付(Visa、Mastercard等)" }, "twitter": "X", "devTools": "開発者ツールの切り替え", "links": { "snippets": "スニペットコレクション" } }, "edit": { "label": "編集", "find": "検索" }, "view": { "label": "表示", "sortBy": { "label": "スニペットの並び替え", "dateModified": "更新日時", "dateCreated": "作成日時", "name": "名前" }, "compactMode": "コンパクトモード", "showSidebar": "サイドバーの表示/非表示" }, "editor": { "label": "エディタ", "copy": "スニペットをクリップボードにコピー", "format": "フォーマット", "previewCode": "コードのプレビュー", "previewScreenshot": "スクリーンショットのプレビュー", "previewJson": "JSON プレビュー", "fontSizeIncrease": "フォントサイズを大きく", "fontSizeDecrease": "フォントサイズを小さく", "fontSizeReset": "フォントサイズをリセット" }, "markdown": { "label": "Markdown", "presentationMode": "プレゼンテーションモード", "preview": "プレビュー", "previewMarkdown": "Markdownのプレビュー", "previewMindmap": "マインドマップのプレビュー" }, "history": { "label": "履歴", "back": "戻る", "forward": "進む" }, "devtools": { "label": "開発者ツール" } } ================================================ FILE: src/main/i18n/locales/ja_JP/messages.json ================================================ { "confirm": { "delete": "「{{name}}」を削除してもよろしいですか?", "deletePermanently": "「{{name}}」を完全に削除してもよろしいですか?", "deleteConfirmMultipleSnippets": "選択された{{count}}個のスニペットを完全に削除してもよろしいですか?", "emptyTrash": "ゴミ箱内のすべてのスニペットを完全に削除してもよろしいですか?", "clearDb": "データベースをクリアしてもよろしいですか?", "migrateDb": [ "移行してもよろしいですか?", "移行中、現在のライブラリは上書きされます。" ] }, "success": { "copied": "クリップボードにコピーしました", "migrate": "データベースの移行が完了しました。", "backup": { "created": "バックアップが正常に作成されました。", "restored": "バックアップが正常に復元されました。", "deleted": "バックアップが正常に削除されました。" } }, "warning": { "noUndo": "この操作は取り消せません。", "allSnippetsMoveToTrash": "このフォルダ内のすべてのスニペットはゴミ箱に移動されます。", "deleteTag": "このタグを持つすべてのスニペットからタグが削除されます。", "createDb": "別のフォルダを選択してください", "clearDb": "これによりデータベースからすべてのスニペット、フォルダ、タグが完全に削除されます。", "htmlCssPreview": "結果を表示するにはHTMLフラグメントを追加してください。スタイリングにはCSSを、インタラクティブ性にはJavaScriptを追加してください。", "codeBlockRenderer": [ "Codemirrorを使用する場合、コードブロックに設定する言語は", "languagesの値の1つに対応している必要があります" ] }, "error": {}, "description": { "storage": "iCloud Drive、Google Drive、Dropboxなどの同期サービスを使用するには、対応する同期フォルダにストレージを移動するだけです", "migrate": { "fromV3": "massCode v3から移行するには、JSONファイルを含むフォルダを選択してください。", "fromSnippetsLab": "SnippetsLabから移行するには、JSONファイルを選択してください。", "snippetsLabLimitations": [ "移行時の制限事項:", "JSONファイル(v2.1以下)はネストされたフォルダを表現できないため、すべてのフォルダは第一階層になります。", "サポートされていない言語のスニペットはデフォルトのPlain Textに設定されます。" ] } }, "special": { "supportMessage": "こんにちは、Antonです 👋

\nmassCodeをご利用いただきありがとうございます。このアプリが役立つと感じられましたら、{{-tagStart}}寄付{{-tagEnd}}をご検討ください。プロジェクトの開発を継続する励みになります。", "unsponsored": "未スポンサー" }, "update": { "available": "バージョン{{newVersion}}がダウンロード可能です。\n現在のバージョンは{{oldVersion}}です。", "noAvailable": "現在利用可能なアップデートはありません。" } } ================================================ FILE: src/main/i18n/locales/ja_JP/preferences.json ================================================ { "label": "環境設定", "storage": { "label": "ストレージ", "migrate": "移行", "count": "カウント", "clearDatabase": "データベースをクリア" }, "editor": { "label": "エディタ", "fontSize": "フォントサイズ", "fontFamily": "フォントファミリー", "wrap": { "label": "折り返し", "wordWrap": "ワードラップ", "off": "オフ" }, "tabSize": "タブサイズ", "showInvisibles": "不可視文字を表示", "highlightLine": "現在行をハイライト", "highlightGutter": "ガッターをハイライト", "matchBrackets": "括弧の対応を表示", "prettier": { "label": "Prettier", "trailingComma": { "label": "末尾のカンマ", "none": "なし", "all": "すべて", "es5": "ES5" }, "semi": "セミコロン", "singleQuote": "シングルクォート" } }, "appearance": { "label": "外観", "theme": { "label": "テーマ", "light": "ライト", "dark": "ダーク" } }, "language": { "label": "言語" }, "markdown": { "label": "Markdown", "codeRenderer": "コードブロックレンダラー" }, "api": { "label": "APIポート", "port": { "label": "APIポート", "description": "APIサーバーのポート番号(アプリの再起動が必要です)。有効範囲:1024-65535。" } } } ================================================ FILE: src/main/i18n/locales/ja_JP/ui.json ================================================ { "total": "合計", "line": "行", "column": "列", "fragment": "フラグメント", "path": "パス", "button": { "back": "戻る", "cancel": "キャンセル", "clear": "クリア", "confirm": "確認", "copy": "コピー", "fit": "フィット", "generate": "生成", "ok": "OK", "revers": "反転", "saveAs": "名前を付けて保存", "sort": "並べ替え", "update": ["GitHubへ移動", "OK"], "zoomIn": "拡大", "zoomOut": "縮小", "darkMode": "ダークモード", "toggleDarkMode": "ダークモードの切り替え", "background": "背景", "goToDownload": "ダウンロードへ", "refreshPreview": "プレビューを更新", "laserPointer": "レーザーポインター", "fullscreen": "フルスクリーン", "prev": "前へ", "next": "次へ" }, "action": { "close": "閉じる", "defaultLanguage": "デフォルト言語", "duplicate": "複製", "rename": "名前変更", "restore": "復元", "setCustomIcon": "アイコンを設定", "removeCustomIcon": "アイコンを削除", "show": "表示", "hide": "非表示", "showSidebar": "サイドバーを表示", "hideSidebar": "サイドバーを非表示", "new": { "storage": "新規ストレージ", "folder": "新規フォルダ", "snippet": "新規スニペット", "fragment": "新規フラグメント" }, "add": { "description": "説明を追加", "tag": "タグを追加", "toFavorites": "お気に入りに追加" }, "open": { "storage": "ストレージを開く" }, "move": { "storage": "ストレージを移動", "toTrash": "ゴミ箱へ移動" }, "remove": { "fromFavorites": "お気に入りから削除" }, "reload": { "storage": "ストレージを再読み込み" }, "delete": { "common": "削除", "now": "今すぐ削除", "allData": "すべてのデータを削除", "trash": "ゴミ箱を空にする" }, "migrate": { "fromSnippetsLab": "SnippetsLabから", "fromV3": "massCode v3から" }, "export": { "toHtml": "HTMLにエクスポート" }, "copy": { "snippetLink": "スニペットリンクをコピー" } }, "sidebar": { "inbox": "受信トレイ", "favorites": "お気に入り", "allSnippets": "すべてのスニペット", "trash": "ゴミ箱", "folders": "フォルダ", "library": "ライブラリ", "tags": "タグ" }, "folder": { "untitled": "無題のフォルダ", "plural": "フォルダ", "collapseAll": "すべて折りたたむ", "expandAll": "すべて展開" }, "snippet": { "untitled": "無題のスニペット", "plural": "スニペット", "emptyName": "スニペット名を入力", "selectedMultiple": "{{count}}個のスニペットを選択", "noSelected": "スニペットが選択されていません" }, "placeholder": { "emptyTagList": "タグを追加するとここに表示されます", "emptyFoldersList": "フォルダーなし", "emptySnippetsList": "スニペットなし", "search": "検索", "addTag": "タグを追加" } } ================================================ FILE: src/main/i18n/locales/pl_PL/devtools.json ================================================ { "label": "Narzędzia deweloperskie", "generators": { "label": "Generatory", "lorem": { "label": "Generator Lorem Ipsum", "description": "Generuj tekst zastępczy", "selectType": "Wybierz typ", "maxCount": "Maks {{count}}", "types": { "words": "Słowa", "sentences": "Zdania", "paragraphs": "Akapity" } }, "json": { "label": "Generator JSON", "description": "Generuj losowe dane JSON z różnymi typami pól", "fields": "Pola", "fieldName": "Nazwa pola", "selectType": "Wybierz typ", "addField": "Dodaj pole", "rowCount": "Liczba wierszy", "maxRows": "Maks 1000", "categories": { "general": "Ogólne", "person": "Osoba", "internet": "Internet", "location": "Lokalizacja", "finance": "Finanse", "commerce": "Handel", "company": "Firma", "lorem": "Lorem", "date": "Data", "number": "Liczba", "phone": "Telefon", "image": "Obraz" }, "types": { "rowNumber": "Numer wiersza", "firstName": "Imię", "lastName": "Nazwisko", "fullName": "Pełne imię", "gender": "Płeć", "jobTitle": "Stanowisko", "email": "Adres e-mail", "username": "Nazwa użytkownika", "password": "Hasło", "url": "URL", "ipv4": "Adres IP v4", "ipv6": "Adres IP v6", "userAgent": "User Agent", "city": "Miasto", "country": "Kraj", "streetAddress": "Adres", "zipCode": "Kod pocztowy", "latitude": "Szerokość geograficzna", "longitude": "Długość geograficzna", "amount": "Kwota", "currencyCode": "Kod waluty", "creditCardNumber": "Numer karty kredytowej", "productName": "Nazwa produktu", "price": "Cena", "department": "Dział", "companyName": "Nazwa firmy", "catchPhrase": "Hasło reklamowe", "word": "Słowo", "sentence": "Zdanie", "paragraph": "Akapit", "past": "Przeszła data", "future": "Przyszła data", "recent": "Ostatnia data", "birthdate": "Data urodzenia", "int": "Liczba całkowita", "float": "Liczba zmiennoprzecinkowa", "boolean": "Wartość logiczna", "phoneNumber": "Numer telefonu", "imei": "IMEI", "avatar": "URL awatara", "imageUrl": "URL obrazu" } } }, "converters": { "label": "Konwertery", "caseConverter": { "label": "Konwerter wielkości liter", "description": "Przekształcanie tekstu do różnych formatów", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Tekst na Unicode", "description": "Konwertowanie tekstu na Unicode i odwrotnie", "modes": { "textToUnicode": "Tekst → Unicode", "unicodeToText": "Unicode → Tekst" } }, "textToAscii": { "label": "Tekst na ASCII Binary", "description": "Konwertowanie tekstu na ASCII binary i odwrotnie", "modes": { "textToAscii": "Tekst → ASCII", "asciiToText": "ASCII → Tekst" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Kodowanie lub dekodowanie tekstu do Base64", "modes": { "textToBase64": "Tekst → Base64", "base64ToText": "Base64 → Tekst" } }, "jsonToYaml": { "label": "JSON na YAML", "description": "Konwertowanie JSON na YAML i odwrotnie", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON na TOML", "description": "Konwertowanie JSON na TOML i odwrotnie", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON na XML", "description": "Konwertowanie JSON na XML i odwrotnie", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Konwerter kolorów", "description": "Konwertowanie kolorów między różnymi formatami" } }, "crypto": { "label": "Kryptografia / Bezpieczeństwo", "hash": { "label": "Generator hash", "description": "Generowanie hashy z tekstu" }, "hmac": { "label": "Generator HMAC", "description": "Generowanie kodu uwierzytelniania wiadomości opartego na hash (HMAC) złożonego z klucza i wiadomości" }, "password": { "label": "Generator haseł", "description": "Generowanie bezpiecznego hasła" }, "uuid": { "label": "Generator UUID", "description": "Generowanie uniwersalnego unikalnego identyfikatora (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "Parser URL", "description": "Parsowanie URL na komponenty" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Kodowanie lub dekodowanie URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Konwertowanie tekstu na slug przyjazny URL" } }, "form": { "input": "Wejście", "output": "Wyjście", "inputString": "Ciąg wejściowy", "outputString": "Ciąg wyjściowy", "inputUrl": "URL wejściowy", "outputUrl": "URL wyjściowy", "parsedUrl": "Sparsowany URL", "splitQueryString": "Podziel Query String", "key": "Klucz", "value": "Wartość", "component": "Komponent", "result": "Wynik", "secretKey": "Klucz tajny", "algorithm": "Algorytm", "version": "Wersja", "amount": "Ilość", "type": "Typ", "length": "Długość", "options": "Opcje", "numbers": "Cyfry", "symbols": "Symbole", "lowercase": "Małe litery", "uppercase": "Wielkie litery", "placeholder": { "text": "Wprowadź tekst", "value": "Wprowadź wartość", "secretKey": "Wprowadź klucz tajny", "url": "Wprowadź URL" } } } ================================================ FILE: src/main/i18n/locales/pl_PL/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Preferencje", "devtools": "Narzędzia deweloperskie", "update": "Sprawdź aktualizacje...", "quit": "Zakończ massCode", "about": "O massCode", "hide": "Ukryj massCode" }, "help": { "label": "Pomoc", "website": "Strona internetowa", "documentation": "Dokumentacja", "viewInGitHub": "Zobacz na GitHub", "changeLog": "Lista zmian", "reportIssue": "Zgłoś problem", "giveStar": "Dodaj gwiazdkę", "extension": { "vscode": "Rozszerzenie VS Code", "raycast": "Rozszerzenie Raycast", "alfred": "Rozszerzenie Alfred" }, "donate": { "openCollective": "Wesprzyj przez Open Collective", "payPal": "Wesprzyj przez PayPal", "gumroad": "Wesprzyj przez Gumroad (Visa, Mastercard, itp.)" }, "twitter": "X", "devTools": "Przełącz narzędzia deweloperskie", "links": { "snippets": "Kolekcja fragmentów" } }, "edit": { "label": "Edycja", "find": "Znajdź" }, "view": { "label": "Widok", "sortBy": { "label": "Sortuj fragmenty według", "dateModified": "Data modyfikacji", "dateCreated": "Data utworzenia", "name": "Nazwa" }, "compactMode": "Tryb kompaktowy", "showSidebar": "Pokaż/ukryj pasek boczny" }, "editor": { "label": "Edytor", "copy": "Kopiuj fragment do schowka", "format": "Formatuj", "previewCode": "Podgląd kodu", "previewScreenshot": "Podgląd zrzutu ekranu", "previewJson": "Podgląd JSON", "fontSizeIncrease": "Zwiększ rozmiar czcionki", "fontSizeDecrease": "Zmniejsz rozmiar czcionki", "fontSizeReset": "Resetuj rozmiar czcionki" }, "markdown": { "label": "Markdown", "presentationMode": "Tryb prezentacji", "preview": "Podgląd", "previewMarkdown": "Podgląd Markdown", "previewMindmap": "Podgląd mapy myśli" }, "history": { "label": "Historia", "back": "Wstecz", "forward": "Dalej" }, "devtools": { "label": "Narzędzia deweloperskie" } } ================================================ FILE: src/main/i18n/locales/pl_PL/messages.json ================================================ { "confirm": { "delete": "Czy na pewno chcesz usunąć \"{{name}}\"?", "deletePermanently": "Czy na pewno chcesz trwale usunąć \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Czy na pewno chcesz trwale usunąć {{count}} wybranych fragmentów?", "emptyTrash": "Czy na pewno chcesz trwale usunąć wszystkie fragmenty z Kosza?", "clearDb": "Czy na pewno chcesz wyczyścić bazę danych?", "migrateDb": [ "Czy na pewno chcesz przeprowadzić migrację?", "Podczas migracji obecna biblioteka zostanie nadpisana." ] }, "success": { "copied": "Skopiowano do schowka", "migrate": "Pomyślnie przeprowadzono migrację bazy danych.", "backup": { "created": "Kopia zapasowa została pomyślnie utworzona.", "restored": "Kopia zapasowa została pomyślnie przywrócona.", "deleted": "Kopia zapasowa została pomyślnie usunięta." } }, "warning": { "noUndo": "Tej operacji nie można cofnąć.", "allSnippetsMoveToTrash": "Wszystkie fragmenty z tego folderu zostaną przeniesione do kosza.", "deleteTag": "Spowoduje to również usunięcie tego tagu ze wszystkich fragmentów.", "createDb": "Proszę wybrać inny folder", "clearDb": "Spowoduje to trwałe usunięcie wszystkich Fragmentów, Folderów i Tagów z bazy danych.", "htmlCssPreview": "Dodaj fragment HTML, aby zobaczyć wynik. Dodaj CSS do stylizacji i JavaScript do interaktywności.", "codeBlockRenderer": [ "Podczas używania Codemirror, język ustawiony dla bloku kodu musi odpowiadać jednej z wartości", "languages" ] }, "error": {}, "description": { "storage": "Aby korzystać z usług synchronizacji takich jak iCloud Drive, Google Drive lub Dropbox, wystarczy przenieść magazyn do odpowiednich folderów synchronizacji", "migrate": { "fromV3": "Aby przeprowadzić migrację z massCode v3, wybierz folder zawierający plik JSON.", "fromSnippetsLab": "Aby przeprowadzić migrację ze SnippetsLab, wybierz plik JSON.", "snippetsLabLimitations": [ "Pewne ograniczenia podczas migracji ze SnippetsLab:", "Wszystkie foldery będą na pierwszym poziomie, ponieważ plik JSON (poniżej v2.1) nie obsługuje zagnieżdżonych folderów.", "Fragmenty z nieobsługiwanymi językami zostaną ustawione na domyślny Plain Text." ] } }, "special": { "supportMessage": "Cześć, tu Anton 👋

\nDziękuję za korystanie z massCode. Jeśli uważasz, że ta aplikacja jest przydatna, proszę rozważ {{-tagStart}}wsparcie{{-tagEnd}}. To zmotywuje mnie do dalszego rozwoju projektu.", "unsponsored": "Bez sponsora" }, "update": { "available": "Wersja {{newVersion}} jest dostępna do pobrania.\nTwoja wersja to {{oldVersion}}.", "noAvailable": "Obecnie nie ma dostępnych aktualizacji." } } ================================================ FILE: src/main/i18n/locales/pl_PL/preferences.json ================================================ { "label": "Preferencje", "storage": { "label": "Magazyn", "migrate": "Migruj", "count": "Liczba", "clearDatabase": "Wyczyść bazę danych" }, "editor": { "label": "Edytor", "fontSize": "Rozmiar czcionki", "fontFamily": "Rodzina czcionek", "wrap": { "label": "Zawijanie", "wordWrap": "Zawijanie wierszy", "off": "Wyłączone" }, "tabSize": "Rozmiar tabulacji", "showInvisibles": "Pokaż niewidoczne znaki", "highlightLine": "Podświetl linię", "highlightGutter": "Podświetl marginesy", "matchBrackets": "Dopasuj nawiasy", "prettier": { "label": "Prettier", "trailingComma": { "label": "Końcowy przecinek", "none": "Brak", "all": "Wszystkie", "es5": "ES5" }, "semi": "Średnik", "singleQuote": "Pojedynczy cudzysłów" } }, "appearance": { "label": "Wygląd", "theme": { "label": "Motyw", "light": "Jasny", "dark": "Ciemny" } }, "language": { "label": "Język" }, "markdown": { "label": "Markdown", "codeRenderer": "Renderer bloków kodu" }, "api": { "label": "Port API", "port": { "label": "Port API", "description": "Numer portu dla serwera API (wymaga ponownego uruchomienia aplikacji). Prawidłowy zakres: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/pl_PL/ui.json ================================================ { "total": "Łącznie", "line": "Wiersz", "column": "Kolumna", "fragment": "Fragment", "path": "Ścieżka", "button": { "back": "Wstecz", "cancel": "Anuluj", "clear": "Wyczyść", "confirm": "Potwierdź", "copy": "Kopiuj", "fit": "Dopasuj", "generate": "Generuj", "ok": "OK", "revers": "Odwróć", "saveAs": "Zapisz jako", "sort": "Sortuj", "update": ["Przejdź do GitHub", "OK"], "zoomIn": "Powiększ", "zoomOut": "Pomniejsz", "darkMode": "Tryb ciemny", "toggleDarkMode": "Przełącz tryb ciemny", "background": "Tło", "goToDownload": "Przejdź do pobierania", "refreshPreview": "Odśwież podgląd", "laserPointer": "Wskaźnik laserowy", "fullscreen": "Pełny ekran", "prev": "Poprzedni", "next": "Następny" }, "action": { "close": "Zamknij", "defaultLanguage": "Domyślny język", "duplicate": "Duplikuj", "rename": "Zmień nazwę", "restore": "Przywróć", "setCustomIcon": "Ustaw ikonę", "removeCustomIcon": "Usuń ikonę", "show": "Pokaż", "hide": "Ukryj", "showSidebar": "Pokaż pasek boczny", "hideSidebar": "Ukryj pasek boczny", "new": { "storage": "Nowy magazyn", "folder": "Nowy folder", "snippet": "Nowy fragment kodu", "fragment": "Nowy fragment" }, "add": { "description": "Dodaj opis", "tag": "Dodaj tag", "toFavorites": "Dodaj do ulubionych" }, "open": { "storage": "Otwórz magazyn" }, "move": { "storage": "Przenieś magazyn", "toTrash": "Przenieś do kosza" }, "remove": { "fromFavorites": "Usuń z ulubionych" }, "reload": { "storage": "Przeładuj magazyn" }, "delete": { "common": "Usuń", "now": "Usuń teraz", "allData": "Usuń wszystkie dane", "trash": "Opróżnij kosz" }, "migrate": { "fromSnippetsLab": "Ze SnippetsLab", "fromV3": "Z massCode v3" }, "export": { "toHtml": "Eksportuj do HTML" }, "copy": { "snippetLink": "Kopiuj link do fragmentu" } }, "sidebar": { "inbox": "Skrzynka odbiorcza", "favorites": "Ulubione", "allSnippets": "Wszystkie fragmenty", "trash": "Kosz", "folders": "Foldery", "library": "Biblioteka", "tags": "Tagi" }, "folder": { "untitled": "Folder bez nazwy", "plural": "Foldery", "collapseAll": "Zwiń wszystkie", "expandAll": "Rozwiń wszystkie" }, "snippet": { "untitled": "Fragment bez nazwy", "plural": "Fragmenty", "emptyName": "Wpisz nazwę fragmentu", "selectedMultiple": "Wybrano {{count}} fragmentów", "noSelected": "Nie wybrano fragmentu" }, "placeholder": { "emptyTagList": "Dodaj tagi do fragmentów, aby zobaczyć je tutaj", "emptyFoldersList": "Brak folderów", "emptySnippetsList": "Brak snippetów", "search": "Szukaj", "addTag": "Dodaj tag" } } ================================================ FILE: src/main/i18n/locales/pt_BR/devtools.json ================================================ { "label": "Ferramentas de Desenvolvimento", "generators": { "label": "Geradores", "lorem": { "label": "Gerador Lorem Ipsum", "description": "Gerar texto de espaço reservado", "selectType": "Selecionar tipo", "maxCount": "Máx {{count}}", "types": { "words": "Palavras", "sentences": "Frases", "paragraphs": "Parágrafos" } }, "json": { "label": "Gerador JSON", "description": "Gerar dados JSON aleatórios com vários tipos de campos", "fields": "Campos", "fieldName": "Nome do campo", "selectType": "Selecionar tipo", "addField": "Adicionar campo", "rowCount": "Número de linhas", "maxRows": "Máx 1000", "categories": { "general": "Geral", "person": "Pessoa", "internet": "Internet", "location": "Localização", "finance": "Finanças", "commerce": "Comércio", "company": "Empresa", "lorem": "Lorem", "date": "Data", "number": "Número", "phone": "Telefone", "image": "Imagem" }, "types": { "rowNumber": "Número da linha", "firstName": "Primeiro nome", "lastName": "Sobrenome", "fullName": "Nome completo", "gender": "Gênero", "jobTitle": "Cargo", "email": "Endereço de e-mail", "username": "Nome de usuário", "password": "Senha", "url": "URL", "ipv4": "Endereço IP v4", "ipv6": "Endereço IP v6", "userAgent": "User Agent", "city": "Cidade", "country": "País", "streetAddress": "Endereço", "zipCode": "CEP", "latitude": "Latitude", "longitude": "Longitude", "amount": "Valor", "currencyCode": "Código da moeda", "creditCardNumber": "Número do cartão de crédito", "productName": "Nome do produto", "price": "Preço", "department": "Departamento", "companyName": "Nome da empresa", "catchPhrase": "Slogan", "word": "Palavra", "sentence": "Frase", "paragraph": "Parágrafo", "past": "Data passada", "future": "Data futura", "recent": "Data recente", "birthdate": "Data de nascimento", "int": "Inteiro", "float": "Ponto flutuante", "boolean": "Booleano", "phoneNumber": "Número de telefone", "imei": "IMEI", "avatar": "URL do avatar", "imageUrl": "URL da imagem" } } }, "converters": { "label": "Conversores", "caseConverter": { "label": "Conversor de Maiúsculas", "description": "Transformar texto em diferentes casos", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Texto para Unicode", "description": "Converter texto para Unicode e vice-versa", "modes": { "textToUnicode": "Texto → Unicode", "unicodeToText": "Unicode → Texto" } }, "textToAscii": { "label": "Texto para ASCII Binary", "description": "Converter texto para ASCII binary e vice-versa", "modes": { "textToAscii": "Texto → ASCII", "asciiToText": "ASCII → Texto" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Codificar ou decodificar texto para Base64", "modes": { "textToBase64": "Texto → Base64", "base64ToText": "Base64 → Texto" } }, "jsonToYaml": { "label": "JSON para YAML", "description": "Converter JSON para YAML e vice-versa", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON para TOML", "description": "Converter JSON para TOML e vice-versa", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON para XML", "description": "Converter JSON para XML e vice-versa", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Conversor de Cores", "description": "Converter cores entre diferentes formatos" } }, "crypto": { "label": "Criptografia / Segurança", "hash": { "label": "Gerador de Hash", "description": "Gerar hashes a partir de texto" }, "hmac": { "label": "Gerador HMAC", "description": "Gerar código de autenticação de mensagem baseado em hash (HMAC) composto por uma chave e uma mensagem" }, "password": { "label": "Gerador de Senhas", "description": "Gerar uma senha segura" }, "uuid": { "label": "Gerador UUID", "description": "Gerar um identificador único universal (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "Analisador de URL", "description": "Analisar uma URL em seus componentes" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Codificar ou decodificar URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Converter texto em um slug amigável para URL" } }, "form": { "input": "Entrada", "output": "Saída", "inputString": "String de Entrada", "outputString": "String de Saída", "inputUrl": "URL de Entrada", "outputUrl": "URL de Saída", "parsedUrl": "URL Analisada", "splitQueryString": "Dividir Query String", "key": "Chave", "value": "Valor", "component": "Componente", "result": "Resultado", "secretKey": "Chave Secreta", "algorithm": "Algoritmo", "version": "Versão", "amount": "Quantidade", "type": "Tipo", "length": "Comprimento", "options": "Opções", "numbers": "Números", "symbols": "Símbolos", "lowercase": "Minúsculas", "uppercase": "Maiúsculas", "placeholder": { "text": "Digite um texto", "value": "Digite um valor", "secretKey": "Digite uma chave secreta", "url": "Digite uma URL" } } } ================================================ FILE: src/main/i18n/locales/pt_BR/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Preferências", "devtools": "Ferramentas de Desenvolvedor", "update": "Verificar Atualizações...", "quit": "Sair do massCode", "about": "Sobre o massCode", "hide": "Ocultar massCode" }, "help": { "label": "Ajuda", "website": "Website", "documentation": "Documentação", "viewInGitHub": "Ver no GitHub", "changeLog": "Log de Alterações", "reportIssue": "Reportar Problema", "giveStar": "Dar uma Estrela", "extension": { "vscode": "Extensão VS Code", "raycast": "Extensão Raycast", "alfred": "Extensão Alfred" }, "donate": { "openCollective": "Doar no Open Collective", "payPal": "Doar via PayPal", "gumroad": "Doar via Gumroad (Visa, Mastercard, etc.)" }, "twitter": "X", "devTools": "Alternar Ferramentas de Desenvolvedor", "links": { "snippets": "Coleção de Snippets" } }, "edit": { "label": "Editar", "find": "Procurar" }, "view": { "label": "Visualizar", "sortBy": { "label": "Ordenar Snippets Por", "dateModified": "Data de Modificação", "dateCreated": "Data de Criação", "name": "Nome" }, "compactMode": "Modo Compacto", "showSidebar": "Mostrar/ocultar barra lateral" }, "editor": { "label": "Editor", "copy": "Copiar Snippet para Área de Transferência", "format": "Formatar", "previewCode": "Visualizar Código", "previewScreenshot": "Visualizar Screenshot", "previewJson": "Prévia do JSON", "fontSizeIncrease": "Aumentar Tamanho da Fonte", "fontSizeDecrease": "Diminuir Tamanho da Fonte", "fontSizeReset": "Redefinir Tamanho da Fonte" }, "markdown": { "label": "Markdown", "presentationMode": "Modo de Apresentação", "preview": "Visualizar", "previewMarkdown": "Visualizar Markdown", "previewMindmap": "Visualizar Mindmap" }, "history": { "label": "Histórico", "back": "Voltar", "forward": "Avançar" }, "devtools": { "label": "Ferramentas de Desenvolvedor" } } ================================================ FILE: src/main/i18n/locales/pt_BR/messages.json ================================================ { "confirm": { "delete": "Tem certeza que deseja excluir \"{{name}}\"?", "deletePermanently": "Tem certeza que deseja excluir permanentemente \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Tem certeza que deseja excluir permanentemente {{count}} snippets selecionados?", "emptyTrash": "Tem certeza que deseja excluir permanentemente todos os snippets na Lixeira?", "clearDb": "Tem certeza que deseja limpar o database?", "migrateDb": [ "Tem certeza que deseja migrar?", "Durante a migração, a biblioteca atual será sobrescrita." ] }, "success": { "copied": "Copiado para a área de transferência", "migrate": "DB migrado com sucesso.", "backup": { "created": "Backup criado com sucesso.", "restored": "Backup restaurado com sucesso.", "deleted": "Backup excluído com sucesso." } }, "warning": { "noUndo": "Você não pode desfazer esta ação.", "allSnippetsMoveToTrash": "Todos os snippets nesta pasta serão movidos para a lixeira.", "deleteTag": "Isso também fará com que todas as tags sejam removidas dos snippets.", "createDb": "Por favor, selecione outra pasta", "clearDb": "Isso excluirá permanentemente todos os Snippets, Pastas e Tags do database.", "htmlCssPreview": "Adicione um fragmento HTML para ver o resultado. Adicione CSS para estilização e JavaScript para interatividade.", "codeBlockRenderer": [ "Ao usar Codemirror, a linguagem a ser definida para o bloco de código deve corresponder a um dos valores das", "languages" ] }, "error": {}, "description": { "storage": "Para usar serviços de sincronização como iCloud Drive, Google Drive ou Dropbox, simplesmente mova o armazenamento para as pastas sincronizadas correspondentes", "migrate": { "fromV3": "Para migrar do massCode v3, selecione a pasta contendo o arquivo JSON.", "fromSnippetsLab": "Para migrar do SnippetsLab, selecione o arquivo JSON.", "snippetsLabLimitations": [ "Algumas Limitações. Durante a migração do SnippetsLab:", "Todas as pastas serão de primeiro nível, pois o arquivo JSON (abaixo da v2.1) não representa pastas aninhadas.", "Snippets com linguagens não suportadas serão definidos como Plain Text padrão." ] } }, "special": { "supportMessage": "Olá, aqui é o Anton 👋

\nObrigado por usar o massCode. Se você achar este app útil, por favor {{-tagStart}}doe{{-tagEnd}}. Isso me inspirará a continuar o desenvolvimento do projeto.", "unsponsored": "Sem patrocínio" }, "update": { "available": "A versão {{newVersion}} está disponível para download.\nSua versão é {{oldVersion}}.", "noAvailable": "Não há atualizações disponíveis no momento." } } ================================================ FILE: src/main/i18n/locales/pt_BR/preferences.json ================================================ { "label": "Preferências", "storage": { "label": "Storage", "migrate": "Migrar", "count": "Contagem", "clearDatabase": "Limpar Database" }, "editor": { "label": "Editor", "fontSize": "Tamanho da Fonte", "fontFamily": "Família da Fonte", "wrap": { "label": "Quebra", "wordWrap": "Quebra de Palavra", "off": "Desligado" }, "tabSize": "Tamanho do Tab", "showInvisibles": "Mostrar Invisíveis", "highlightLine": "Destacar Linha", "highlightGutter": "Destacar Gutter", "matchBrackets": "Corresponder Colchetes", "prettier": { "label": "Prettier", "trailingComma": { "label": "Vírgula Final", "none": "Nenhum", "all": "Todos", "es5": "ES5" }, "semi": "Ponto e Vírgula", "singleQuote": "Aspas Simples" } }, "appearance": { "label": "Aparência", "theme": { "label": "Tema", "light": "Claro", "dark": "Escuro" } }, "language": { "label": "Idioma" }, "markdown": { "label": "Markdown", "codeRenderer": "Renderizador de Bloco de Código" }, "api": { "label": "Porta API", "port": { "label": "Porta API", "description": "Número da porta para o servidor API (requer reinicialização do aplicativo). Faixa válida: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/pt_BR/ui.json ================================================ { "total": "Total", "line": "Linha", "column": "Coluna", "fragment": "Fragment", "path": "Caminho", "button": { "back": "Voltar", "cancel": "Cancelar", "clear": "Limpar", "confirm": "Confirmar", "copy": "Copiar", "fit": "Ajustar", "generate": "Gerar", "ok": "OK", "revers": "Reverter", "saveAs": "Salvar como", "sort": "Ordenar", "update": ["Ir para GitHub", "OK"], "zoomIn": "Aumentar Zoom", "zoomOut": "Diminuir Zoom", "darkMode": "Modo Escuro", "toggleDarkMode": "Alternar modo escuro", "background": "Plano de Fundo", "goToDownload": "Ir para Download", "refreshPreview": "Atualizar visualização", "laserPointer": "Ponteiro laser", "fullscreen": "Tela cheia", "prev": "Anterior", "next": "Próximo" }, "action": { "close": "Fechar", "defaultLanguage": "Linguagem Padrão", "duplicate": "Duplicar", "rename": "Renomear", "restore": "Restaurar", "setCustomIcon": "Definir Ícone", "removeCustomIcon": "Remover Ícone", "show": "Mostrar", "hide": "Ocultar", "showSidebar": "Mostrar barra lateral", "hideSidebar": "Ocultar barra lateral", "new": { "storage": "Novo Storage", "folder": "Nova Pasta", "snippet": "Novo Snippet", "fragment": "Novo Fragment" }, "add": { "description": "Adicionar Descrição", "tag": "Adicionar Tag", "toFavorites": "Adicionar aos Favoritos" }, "open": { "storage": "Abrir Storage" }, "move": { "storage": "Mover Storage", "toTrash": "Mover para Lixeira" }, "remove": { "fromFavorites": "Remover dos Favoritos" }, "reload": { "storage": "Recarregar Storage" }, "delete": { "common": "Excluir", "now": "Excluir Agora", "allData": "Excluir Todos os Dados", "trash": "Esvaziar Lixeira" }, "migrate": { "fromSnippetsLab": "Do SnippetsLab", "fromV3": "Do massCode v3" }, "export": { "toHtml": "Exportar para HTML" }, "copy": { "snippetLink": "Copiar Link do Snippet" } }, "sidebar": { "inbox": "Caixa de Entrada", "favorites": "Favoritos", "allSnippets": "Todos os Snippets", "trash": "Lixeira", "folders": "Pastas", "library": "Biblioteca", "tags": "Tags" }, "folder": { "untitled": "Pasta sem título", "plural": "Pastas", "collapseAll": "Recolher Tudo", "expandAll": "Expandir Tudo" }, "snippet": { "untitled": "Snippet sem título", "plural": "Snippets", "emptyName": "Digite o nome do snippet", "selectedMultiple": "{{count}} Snippets Selecionados", "noSelected": "Nenhum Snippet Selecionado" }, "placeholder": { "emptyTagList": "Adicione tags aos snippets para vê-las aqui", "emptyFoldersList": "Sem pastas", "emptySnippetsList": "Sem snippets", "search": "Pesquisar", "addTag": "Adicionar Tag" } } ================================================ FILE: src/main/i18n/locales/ro_RO/devtools.json ================================================ { "label": "Instrumente pentru Dezvoltatori", "generators": { "label": "Generatoare", "lorem": { "label": "Generator Lorem Ipsum", "description": "Generează text substituent", "selectType": "Selectează tipul", "maxCount": "Max {{count}}", "types": { "words": "Cuvinte", "sentences": "Propoziții", "paragraphs": "Paragrafe" } }, "json": { "label": "Generator JSON", "description": "Generează date JSON aleatorii cu diferite tipuri de câmpuri", "fields": "Câmpuri", "fieldName": "Nume câmp", "selectType": "Selectează tipul", "addField": "Adaugă câmp", "rowCount": "Număr de rânduri", "maxRows": "Max 1000", "categories": { "general": "General", "person": "Persoană", "internet": "Internet", "location": "Locație", "finance": "Finanțe", "commerce": "Comerț", "company": "Companie", "lorem": "Lorem", "date": "Dată", "number": "Număr", "phone": "Telefon", "image": "Imagine" }, "types": { "rowNumber": "Număr rând", "firstName": "Prenume", "lastName": "Nume de familie", "fullName": "Nume complet", "gender": "Gen", "jobTitle": "Titlu job", "email": "Adresă email", "username": "Nume utilizator", "password": "Parolă", "url": "URL", "ipv4": "Adresă IP v4", "ipv6": "Adresă IP v6", "userAgent": "User Agent", "city": "Oraș", "country": "Țară", "streetAddress": "Adresă stradă", "zipCode": "Cod poștal", "latitude": "Latitudine", "longitude": "Longitudine", "amount": "Sumă", "currencyCode": "Cod monedă", "creditCardNumber": "Număr card credit", "productName": "Nume produs", "price": "Preț", "department": "Departament", "companyName": "Nume companie", "catchPhrase": "Slogan", "word": "Cuvânt", "sentence": "Propoziție", "paragraph": "Paragraf", "past": "Dată trecută", "future": "Dată viitoare", "recent": "Dată recentă", "birthdate": "Dată naștere", "int": "Întreg", "float": "Zecimal", "boolean": "Boolean", "phoneNumber": "Număr telefon", "imei": "IMEI", "avatar": "URL avatar", "imageUrl": "URL imagine" } } }, "converters": { "label": "Convertoare", "caseConverter": { "label": "Convertor de Majuscule", "description": "Transformă textul în diferite formate de majuscule", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Text în Unicode", "description": "Convertește textul în Unicode și invers", "modes": { "textToUnicode": "Text → Unicode", "unicodeToText": "Unicode → Text" } }, "textToAscii": { "label": "Text în ASCII Binary", "description": "Convertește textul în ASCII binary și invers", "modes": { "textToAscii": "Text → ASCII", "asciiToText": "ASCII → Text" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Codifică sau decodifică textul în Base64", "modes": { "textToBase64": "Text → Base64", "base64ToText": "Base64 → Text" } }, "jsonToYaml": { "label": "JSON în YAML", "description": "Convertește JSON în YAML și invers", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON în TOML", "description": "Convertește JSON în TOML și invers", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON în XML", "description": "Convertește JSON în XML și invers", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Convertor de Culori", "description": "Convertește culorile între diferite formate" } }, "crypto": { "label": "Criptografie / Securitate", "hash": { "label": "Generator Hash", "description": "Generează hash-uri din text" }, "hmac": { "label": "Generator HMAC", "description": "Generează cod de autentificare a mesajului bazat pe hash (HMAC) compus dintr-o cheie și un mesaj" }, "password": { "label": "Generator de Parole", "description": "Generează o parolă sigură" }, "uuid": { "label": "Generator UUID", "description": "Generează un identificator unic universal (UUID)" } }, "web": { "label": "Web", "urlParser": { "label": "Analizor URL", "description": "Analizează un URL în componentele sale" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Codifică sau decodifică URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Convertește textul într-un slug prietenos cu URL" } }, "form": { "input": "Intrare", "output": "Ieșire", "inputString": "Șir de Intrare", "outputString": "Șir de Ieșire", "inputUrl": "URL de Intrare", "outputUrl": "URL de Ieșire", "parsedUrl": "URL Analizat", "splitQueryString": "Împarte Query String", "key": "Cheie", "value": "Valoare", "component": "Componentă", "result": "Rezultat", "secretKey": "Cheie Secretă", "algorithm": "Algoritm", "version": "Versiune", "amount": "Cantitate", "type": "Tip", "length": "Lungime", "options": "Opțiuni", "numbers": "Numere", "symbols": "Simboluri", "lowercase": "Minuscule", "uppercase": "Majuscule", "placeholder": { "text": "Introduceți un text", "value": "Introduceți o valoare", "secretKey": "Introduceți o cheie secretă", "url": "Introduceți un URL" } } } ================================================ FILE: src/main/i18n/locales/ro_RO/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Preferințe", "devtools": "Instrumente pentru Dezvoltatori", "update": "Verifică Actualizări...", "quit": "Închide massCode", "about": "Despre massCode", "hide": "Ascunde massCode" }, "help": { "label": "Ajutor", "website": "Website", "documentation": "Documentație", "viewInGitHub": "Vezi pe GitHub", "changeLog": "Jurnal de Modificări", "reportIssue": "Raportează o Problemă", "giveStar": "Dă o Stea", "extension": { "vscode": "Extensie VS Code", "raycast": "Extensie Raycast", "alfred": "Extensie Alfred" }, "donate": { "openCollective": "Donează pe Open Collective", "payPal": "Donează prin PayPal", "gumroad": "Donează prin Gumroad (Visa, Mastercard, etc.)" }, "twitter": "X", "devTools": "Comută Instrumentele de Dezvoltare", "links": { "snippets": "Colecție de Snippets" } }, "edit": { "label": "Editare", "find": "Căutare" }, "view": { "label": "Vizualizare", "sortBy": { "label": "Sortează Snippets După", "dateModified": "Data Modificării", "dateCreated": "Data Creării", "name": "Nume" }, "compactMode": "Mod Compact", "showSidebar": "Afișează/ascunde bara laterală" }, "editor": { "label": "Editor", "copy": "Copiază Snippet în Clipboard", "format": "Formatare", "previewCode": "Previzualizare Cod", "previewScreenshot": "Previzualizare Screenshot", "previewJson": "Previzualizare JSON", "fontSizeIncrease": "Mărește Dimensiunea Fontului", "fontSizeDecrease": "Micșorează Dimensiunea Fontului", "fontSizeReset": "Resetează Dimensiunea Fontului" }, "markdown": { "label": "Markdown", "presentationMode": "Mod Prezentare", "preview": "Previzualizare", "previewMarkdown": "Previzualizare Markdown", "previewMindmap": "Previzualizare Mindmap" }, "history": { "label": "Istoric", "back": "Înapoi", "forward": "Înainte" }, "devtools": { "label": "Instrumente pentru Dezvoltatori" } } ================================================ FILE: src/main/i18n/locales/ro_RO/messages.json ================================================ { "confirm": { "delete": "Sigur doriți să ștergeți \"{{name}}\"?", "deletePermanently": "Sigur doriți să ștergeți definitiv \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Sigur doriți să ștergeți definitiv {{count}} snippets selectate?", "emptyTrash": "Sigur doriți să ștergeți definitiv toate snippets din Coșul de gunoi?", "clearDb": "Sigur doriți să ștergeți database-ul?", "migrateDb": [ "Sigur doriți să migrați?", "În timpul migrării, biblioteca curentă va fi suprascrisă." ] }, "success": { "copied": "Copiat în clipboard", "migrate": "DB a fost migrat cu succes.", "backup": { "created": "Backup creat cu succes.", "restored": "Backup restaurat cu succes.", "deleted": "Backup șters cu succes." } }, "warning": { "noUndo": "Nu puteți anula această acțiune.", "allSnippetsMoveToTrash": "Toate snippets din acest folder vor fi mutate în coșul de gunoi.", "deleteTag": "Acest lucru va determina și eliminarea tuturor tag-urilor din snippets.", "createDb": "Vă rugăm să selectați un alt folder", "clearDb": "Aceasta va șterge definitiv toate Snippets, Folders și Tags din database.", "htmlCssPreview": "Adăugați un fragment HTML pentru a vedea rezultatul. Adăugați CSS pentru stilizare și JavaScript pentru interactivitate.", "codeBlockRenderer": [ "Când utilizați Codemirror, limbajul setat pentru blocul de cod trebuie să corespundă uneia dintre valorile", "languages" ] }, "error": {}, "description": { "storage": "Pentru a utiliza servicii de sincronizare precum iCloud Drive, Google Drive sau Dropbox, mutați storage-ul în folderele sincronizate corespunzătoare", "migrate": { "fromV3": "Pentru a migra de la massCode v3, selectați folderul care conține fișierul JSON.", "fromSnippetsLab": "Pentru a migra de la SnippetsLab, selectați fișierul JSON.", "snippetsLabLimitations": [ "Câteva limitări. În timpul migrării de la SnippetsLab:", "Toate folderele vor fi de primul nivel, deoarece fișierul JSON (sub v2.1) nu reprezintă foldere imbricate.", "Snippets cu limbaje neacceptate vor fi setate la Plain Text implicit." ] } }, "special": { "supportMessage": "Bună, sunt Anton 👋

\nMulțumesc că folosești massCode. Dacă găsești această aplicație utilă, te rog {{-tagStart}}donează{{-tagEnd}}. Mă va inspira să continui dezvoltarea proiectului.", "unsponsored": "Nesponsorizat" }, "update": { "available": "Versiunea {{newVersion}} este disponibilă pentru descărcare.\nVersiunea ta este {{oldVersion}}.", "noAvailable": "Nu există actualizări disponibile în prezent." } } ================================================ FILE: src/main/i18n/locales/ro_RO/preferences.json ================================================ { "label": "Preferințe", "storage": { "label": "Storage", "migrate": "Migrare", "count": "Număr", "clearDatabase": "Șterge Database" }, "editor": { "label": "Editor", "fontSize": "Dimensiune Font", "fontFamily": "Familie Font", "wrap": { "label": "Încadrare", "wordWrap": "Încadrare Cuvinte", "off": "Oprit" }, "tabSize": "Dimensiune Tab", "showInvisibles": "Arată Caractere Invizibile", "highlightLine": "Evidențiere Linie", "highlightGutter": "Evidențiere Gutter", "matchBrackets": "Potrivire Paranteze", "prettier": { "label": "Prettier", "trailingComma": { "label": "Virgulă la Final", "none": "Niciuna", "all": "Toate", "es5": "ES5" }, "semi": "Punct și Virgulă", "singleQuote": "Ghilimele Simple" } }, "appearance": { "label": "Aspect", "theme": { "label": "Temă", "light": "Luminos", "dark": "Întunecat" } }, "language": { "label": "Limbă" }, "markdown": { "label": "Markdown", "codeRenderer": "Renderer Bloc de Cod" }, "api": { "label": "Port API", "port": { "label": "Port API", "description": "Numărul portului pentru serverul API (necesită repornirea aplicației). Interval valid: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/ro_RO/ui.json ================================================ { "total": "Total", "line": "Linie", "column": "Coloană", "fragment": "Fragment", "path": "Cale", "button": { "back": "Înapoi", "cancel": "Anulare", "clear": "Șterge", "confirm": "Confirmă", "copy": "Copiază", "fit": "Potrivește", "generate": "Generează", "ok": "OK", "revers": "Inversează", "saveAs": "Salvează ca", "sort": "Sortează", "update": ["Mergi la GitHub", "OK"], "zoomIn": "Mărește", "zoomOut": "Micșorează", "darkMode": "Mod Întunecat", "toggleDarkMode": "Comută modul întunecat", "background": "Fundal", "goToDownload": "Mergi la Descărcare", "refreshPreview": "Reîmprospătează previzualizarea", "laserPointer": "Pointer laser", "fullscreen": "Ecran complet", "prev": "Anterior", "next": "Următor" }, "action": { "close": "Închide", "defaultLanguage": "Limbaj Implicit", "duplicate": "Duplică", "rename": "Redenumește", "restore": "Restaurează", "setCustomIcon": "Setează Iconiță", "removeCustomIcon": "Elimină Iconița", "show": "Arată", "hide": "Ascunde", "showSidebar": "Afișează bara laterală", "hideSidebar": "Ascunde bara laterală", "new": { "storage": "Storage Nou", "folder": "Folder Nou", "snippet": "Snippet Nou", "fragment": "Fragment Nou" }, "add": { "description": "Adaugă Descriere", "tag": "Adaugă Tag", "toFavorites": "Adaugă la Favorite" }, "open": { "storage": "Deschide Storage" }, "move": { "storage": "Mută Storage", "toTrash": "Mută la Coșul de Gunoi" }, "remove": { "fromFavorites": "Elimină din Favorite" }, "reload": { "storage": "Reîncarcă Storage" }, "delete": { "common": "Șterge", "now": "Șterge Acum", "allData": "Șterge Toate Datele", "trash": "Golește Coșul de Gunoi" }, "migrate": { "fromSnippetsLab": "Din SnippetsLab", "fromV3": "Din massCode v3" }, "export": { "toHtml": "Exportă în HTML" }, "copy": { "snippetLink": "Copiază Link-ul Snippet-ului" } }, "sidebar": { "inbox": "Inbox", "favorites": "Favorite", "allSnippets": "Toate Snippets", "trash": "Coș de Gunoi", "folders": "Foldere", "library": "Bibliotecă", "tags": "Tags" }, "folder": { "untitled": "Folder fără titlu", "plural": "Foldere", "collapseAll": "Restrânge Tot", "expandAll": "Extinde Tot" }, "snippet": { "untitled": "Snippet fără titlu", "plural": "Snippets", "emptyName": "Introduceți numele snippet-ului", "selectedMultiple": "{{count}} Snippets Selectate", "noSelected": "Niciun Snippet Selectat" }, "placeholder": { "emptyTagList": "Adăugați tags la snippets pentru a le vedea aici", "emptyFoldersList": "Fără foldere", "emptySnippetsList": "Fără fragmente", "search": "Caută", "addTag": "Adaugă Tag" } } ================================================ FILE: src/main/i18n/locales/ru_RU/devtools.json ================================================ { "label": "Инструменты разработчика", "generators": { "label": "Генераторы", "lorem": { "label": "Lorem Ipsum генератор", "description": "Генерация текста-заполнителя", "selectType": "Выберите тип", "maxCount": "Максимум {{count}}", "types": { "words": "Слова", "sentences": "Предложения", "paragraphs": "Параграфы" } }, "json": { "label": "JSON генератор", "description": "Генерация случайных JSON данных с различными типами полей", "fields": "Поля", "fieldName": "Имя поля", "selectType": "Выберите тип", "addField": "Добавить поле", "rowCount": "Количество строк", "maxRows": "Максимум 1000", "categories": { "general": "Общие", "person": "Персона", "internet": "Интернет", "location": "Локация", "finance": "Финансы", "commerce": "Торговля", "company": "Компания", "lorem": "Lorem", "date": "Дата", "number": "Число", "phone": "Телефон", "image": "Изображение" }, "types": { "rowNumber": "Номер строки", "firstName": "Имя", "lastName": "Фамилия", "fullName": "Полное имя", "gender": "Пол", "jobTitle": "Должность", "email": "Email адрес", "username": "Имя пользователя", "password": "Пароль", "url": "URL", "ipv4": "IP адрес v4", "ipv6": "IP адрес v6", "userAgent": "User Agent", "city": "Город", "country": "Страна", "streetAddress": "Адрес", "zipCode": "Почтовый индекс", "latitude": "Широта", "longitude": "Долгота", "amount": "Сумма", "currencyCode": "Код валюты", "creditCardNumber": "Номер кредитной карты", "productName": "Название товара", "price": "Цена", "department": "Отдел", "companyName": "Название компании", "catchPhrase": "Слоган", "word": "Слово", "sentence": "Предложение", "paragraph": "Параграф", "past": "Прошедшая дата", "future": "Будущая дата", "recent": "Недавняя дата", "birthdate": "Дата рождения", "int": "Целое число", "float": "Дробное число", "boolean": "Булево", "phoneNumber": "Номер телефона", "imei": "IMEI", "avatar": "URL аватара", "imageUrl": "URL изображения" } } }, "converters": { "label": "Конвертеры", "caseConverter": { "label": "Конвертер регистра", "description": "Преобразование текста в различные регистры", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Текст в Unicode", "description": "Конвертация текста в Unicode и обратно", "modes": { "textToUnicode": "Текст → Unicode", "unicodeToText": "Unicode → Текст" } }, "textToAscii": { "label": "Текст в ASCII Binary", "description": "Конвертация текста в ASCII binary и обратно", "modes": { "textToAscii": "Текст → ASCII", "asciiToText": "ASCII → Текст" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Кодирование или декодирование текста в Base64", "modes": { "textToBase64": "Текст → Base64", "base64ToText": "Base64 → Текст" } }, "jsonToYaml": { "label": "JSON в YAML", "description": "Конвертация JSON в YAML и обратно", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON в TOML", "description": "Конвертация JSON в TOML и обратно", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON в XML", "description": "Конвертация JSON в XML и обратно", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Конвертер цветов", "description": "Конвертация цветов между различными форматами" } }, "crypto": { "label": "Криптография / Безопасность", "hash": { "label": "Генератор хешей", "description": "Генерация хешей из текста" }, "hmac": { "label": "HMAC Генератор", "description": "Генерация кода аутентификации сообщений на основе хеша (HMAC) из ключа и сообщения" }, "password": { "label": "Генератор паролей", "description": "Генерация безопасного пароля" }, "uuid": { "label": "UUID Генератор", "description": "Генерация универсального уникального идентификатора (UUID)" } }, "web": { "label": "Веб", "urlParser": { "label": "URL Парсер", "description": "Разбор URL на компоненты" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Кодирование или декодирование URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Преобразование текста в URL-совместимый slug" } }, "form": { "input": "Ввод", "output": "Вывод", "inputString": "Входная строка", "outputString": "Выходная строка", "inputUrl": "Входной URL", "outputUrl": "Выходной URL", "parsedUrl": "Разобранный URL", "splitQueryString": "Разделить Query String", "key": "Ключ", "value": "Значение", "component": "Компонент", "result": "Результат", "secretKey": "Секретный ключ", "algorithm": "Алгоритм", "version": "Версия", "amount": "Количество", "type": "Тип", "length": "Длина", "options": "Опции", "numbers": "Числа", "symbols": "Символы", "lowercase": "Строчные", "uppercase": "Заглавные", "placeholder": { "text": "Введите текст", "value": "Введите значение", "secretKey": "Введите секретный ключ", "url": "Введите URL" } } } ================================================ FILE: src/main/i18n/locales/ru_RU/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Настройки", "devtools": "Инструменты разработчика", "update": "Проверить обновления...", "quit": "Выйти из massCode", "about": "О massCode", "hide": "Скрыть massCode" }, "help": { "label": "Помощь", "website": "Веб-сайт", "documentation": "Документация", "viewInGitHub": "Открыть на GitHub", "changeLog": "История изменений", "reportIssue": "Сообщить о проблеме", "giveStar": "Поставить звезду", "extension": { "vscode": "Расширение VS Code", "raycast": "Расширение Raycast", "alfred": "Расширение Alfred" }, "donate": { "openCollective": "Поддержать через Open Collective", "payPal": "Поддержать через PayPal", "gumroad": "Поддержать через Gumroad (Visa, Mastercard и др.)" }, "twitter": "X", "devTools": "Инструменты разработчика", "links": { "snippets": "Коллекция сниппетов" } }, "edit": { "label": "Правка", "find": "Найти" }, "view": { "label": "Вид", "sortBy": { "label": "Сортировать сниппеты по", "dateModified": "Дате изменения", "dateCreated": "Дате создания", "name": "Имени" }, "compactMode": "Компактный режим", "showSidebar": "Показать/скрыть боковую панель" }, "editor": { "label": "Редактор", "copy": "Копировать сниппет в буфер обмена", "format": "Форматировать", "previewCode": "Предпросмотр кода", "previewScreenshot": "Предпросмотр скриншота", "previewJson": "Предпросмотр JSON", "fontSizeIncrease": "Увеличить размер шрифта", "fontSizeDecrease": "Уменьшить размер шрифта", "fontSizeReset": "Сбросить размер шрифта" }, "markdown": { "label": "Markdown", "presentationMode": "Режим презентации", "preview": "Предпросмотр", "previewMarkdown": "Предпросмотр Markdown", "previewMindmap": "Предпросмотр диаграммы связей" }, "history": { "label": "История", "back": "Назад", "forward": "Вперед" }, "devtools": { "label": "Инструменты разработчика" } } ================================================ FILE: src/main/i18n/locales/ru_RU/messages.json ================================================ { "confirm": { "delete": "Вы уверены, что хотите удалить \"{{name}}\"?", "deletePermanently": "Вы уверены, что хотите навсегда удалить \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Вы уверены, что хотите навсегда удалить {{count}} выбранных сниппетов?", "emptyTrash": "Вы уверены, что хотите навсегда удалить все сниппеты из Корзины?", "clearDb": "Вы уверены, что хотите очистить базу данных?", "migrateDb": [ "Вы уверены, что хотите выполнить миграцию?", "Во время миграции текущая библиотека будет перезаписана." ], "migrateToMarkdown": [ "Мигрировать в Markdown Vault?", "Выбранный vault будет перезаписан текущей библиотекой SQLite." ], "migrateToSqlite": [ "Откатиться на SQLite?", "Текущие данные SQLite будут заменены данными из markdown vault." ] }, "success": { "copied": "Скопировано в буфер обмена", "migrate": "База данных успешно мигрирована.", "migrateToMarkdown": "Выполнена миграция в Markdown Vault. Папок: {{folders}}, сниппетов: {{snippets}}, тегов: {{tags}}.", "migrateToSqlite": "Выполнен откат на SQLite. Папок: {{folders}}, сниппетов: {{snippets}}, тегов: {{tags}}.", "vaultLoaded": "Хранилище успешно загружено.", "backup": { "created": "Резервная копия успешно создана.", "restored": "Резервная копия успешно восстановлена.", "deleted": "Резервная копия успешно удалена." } }, "warning": { "noUndo": "Это действие нельзя отменить.", "allSnippetsMoveToTrash": "Все сниппеты в этой папке будут перемещены в корзину.", "deleteTag": "Это также приведет к удалению этого тега со всех сниппетов.", "createDb": "Пожалуйста, выберите другую папку", "clearDb": "Это навсегда удалит все Сниппеты, Папки и Теги из базы данных.", "htmlCssPreview": "Добавьте HTML-фрагмент, чтобы увидеть результат. Добавьте CSS для стилизации и JavaScript для интерактивности.", "codeBlockRenderer": [ "При использовании Codemirror язык, который будет установлен для блока кода, должен соответствовать одному из значений", "languages" ] }, "error": {}, "description": { "storage": "Директория, в которой хранится база данных SQLite.", "storageEngine": "Markdown Vault теперь является рекомендуемым форматом хранения. SQLite пока доступен для совместимости и отката.", "storageVault": "Выберите директорию для хранилища. Для синхронизации между устройствами выберите папку в iCloud Drive, Google Drive или Dropbox.", "migrate": { "fromV3": "Для миграции с massCode v3 выберите папку, содержащую файл JSON.", "fromSnippetsLab": "Для миграции из SnippetsLab выберите файл JSON.", "snippetsLabLimitations": [ "Некоторые ограничения. При миграции из SnippetsLab:", "Все папки будут первого уровня, так как JSON файл (ниже v2.1) не поддерживает вложенные папки.", "Сниппеты с неподдерживаемыми языками будут установлены в Plain Text по умолчанию." ] } }, "special": { "supportMessage": "Привет, это Антон 👋

\nСпасибо за использование massCode. Если вы находите это приложение полезным, пожалуйста, {{-tagStart}}поддержите проект{{-tagEnd}}. Это вдохновит меня на продолжение разработки проекта.", "unsponsored": "Без спонсорства" }, "update": { "available": "Версия {{newVersion}} доступна для загрузки.\nВаша версия {{oldVersion}}.", "noAvailable": "В настоящее время обновления недоступны." } } ================================================ FILE: src/main/i18n/locales/ru_RU/preferences.json ================================================ { "label": "Настройки", "storage": { "label": "Хранилище", "section": { "migration": "Миграция", "dangerZone": "Опасная зона" }, "migrate": "Миграция", "migrateMarkdownToSqlite": "Откатиться на SQLite", "migrateSqliteToMarkdown": "Мигрировать в Markdown Vault", "count": "Количество", "vaultPath": "Путь к vault", "engine": { "label": "Движок хранилища", "sqlite": "SQLite (устаревающий)", "markdown": "Markdown Vault (рекомендуется)" }, "clearDatabase": "Очистить базу данных" }, "editor": { "label": "Редактор", "fontSize": "Размер шрифта", "fontFamily": "Семейство шрифтов", "wrap": { "label": "Перенос", "wordWrap": "Перенос слов", "off": "Выключен" }, "tabSize": "Размер отступа", "showInvisibles": "Показывать невидимые символы", "highlightLine": "Подсветка строки", "highlightGutter": "Подсветка номеров строк", "matchBrackets": "Подсветка скобок", "prettier": { "label": "Prettier", "trailingComma": { "label": "Замыкающая запятая", "none": "Нет", "all": "Везде", "es5": "ES5" }, "semi": "Точка с запятой", "singleQuote": "Одинарные кавычки" } }, "appearance": { "label": "Внешний вид", "theme": { "label": "Тема", "light": "Светлая", "dark": "Темная" } }, "language": { "label": "Язык" }, "markdown": { "label": "Markdown", "codeRenderer": "Рендер блоков кода" }, "api": { "label": "Порт API", "port": { "label": "Порт API", "description": "Номер порта для API-сервера (требуется перезапуск приложения). Допустимый диапазон: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/ru_RU/ui.json ================================================ { "total": "Всего", "line": "Строка", "column": "Столбец", "fragment": "Фрагмент", "path": "Путь", "button": { "back": "Назад", "cancel": "Отмена", "clear": "Очистить", "confirm": "Подтвердить", "copy": "Копировать", "fit": "По размеру", "generate": "Сгенерировать", "ok": "OK", "revers": "Обратить", "saveAs": "Сохранить как", "sort": "Сортировать", "update": ["Перейти на GitHub", "OK"], "zoomIn": "Увеличить", "zoomOut": "Уменьшить", "darkMode": "Темная тема", "toggleDarkMode": "Переключить тёмную тему", "background": "Фон", "goToDownload": "Перейти к загрузке", "refreshPreview": "Обновить предпросмотр", "laserPointer": "Лазерная указка", "fullscreen": "Полный экран", "prev": "Назад", "next": "Далее" }, "action": { "close": "Закрыть", "defaultLanguage": "Язык по умолчанию", "duplicate": "Дублировать", "rename": "Переименовать", "restore": "Восстановить", "setCustomIcon": "Установить иконку", "removeCustomIcon": "Удалить иконку", "show": "Показать", "hide": "Скрыть", "showSidebar": "Показать боковую панель", "hideSidebar": "Скрыть боковую панель", "new": { "storage": "Новое хранилище", "folder": "Новая папка", "snippet": "Новый сниппет", "fragment": "Новый фрагмент" }, "add": { "description": "Добавить описание", "tag": "Добавить тег", "toFavorites": "Добавить в избранное" }, "open": { "storage": "Открыть хранилище" }, "move": { "storage": "Переместить хранилище", "toTrash": "Переместить в корзину" }, "remove": { "fromFavorites": "Удалить из избранного" }, "reload": { "storage": "Перезагрузить хранилище" }, "delete": { "common": "Удалить", "now": "Удалить сейчас", "allData": "Удалить все данные", "trash": "Очистить корзину" }, "migrate": { "fromSnippetsLab": "Из SnippetsLab", "fromV3": "Из massCode v3" }, "export": { "toHtml": "Экспорт в HTML" }, "copy": { "snippetLink": "Копировать ссылку на сниппет" }, "select": { "directory": "Выбрать директорию" } }, "sidebar": { "inbox": "Входящие", "favorites": "Избранное", "allSnippets": "Все сниппеты", "trash": "Корзина", "folders": "Папки", "library": "Библиотека", "tags": "Теги" }, "folder": { "untitled": "Папка без названия", "plural": "Папки", "collapseAll": "Свернуть все", "expandAll": "Развернуть все" }, "snippet": { "untitled": "Сниппет без названия", "plural": "Сниппеты", "emptyName": "Введите название сниппета", "selectedMultiple": "Выбрано сниппетов: {{count}}", "noSelected": "Нет выбранных сниппетов" }, "mathNotebook": { "label": "Математический блокнот", "sheetList": "Список листов", "newSheet": "Новый лист", "untitled": "Без названия", "copied": "Скопировано", "currencyUnavailable": "Сервис курсов валют недоступен" }, "spaces": { "label": "Пространства", "codeTooltip": "Сниппеты кода", "toolsTooltip": "Инструменты разработчика", "mathTooltip": "Математический блокнот" }, "loading": "Загрузка приложения...", "placeholder": { "emptyTagList": "Добавьте теги к сниппетам, чтобы увидеть их здесь", "emptyFoldersList": "Нет папок", "emptySnippetsList": "Нет сниппетов", "emptySheetList": "Нет листов", "search": "Поиск", "addTag": "Добавить тег" } } ================================================ FILE: src/main/i18n/locales/tr_TR/devtools.json ================================================ { "label": "Geliştirici Araçları", "generators": { "label": "Üreteçler", "lorem": { "label": "Lorem Ipsum Üreteci", "description": "Lorem Ipsum yer tutucu metni oluştur", "selectType": "Tür seç", "maxCount": "Maks {{count}}", "types": { "words": "Kelimeler", "sentences": "Cümleler", "paragraphs": "Paragraflar" } }, "json": { "label": "JSON Üreteci", "description": "Çeşitli alan türleriyle rastgele JSON verileri oluştur", "fields": "Alanlar", "fieldName": "Alan adı", "selectType": "Tür seç", "addField": "Alan ekle", "rowCount": "Satır sayısı", "maxRows": "Maks 1000", "categories": { "general": "Genel", "person": "Kişi", "internet": "İnternet", "location": "Konum", "finance": "Finans", "commerce": "Ticaret", "company": "Şirket", "lorem": "Lorem", "date": "Tarih", "number": "Sayı", "phone": "Telefon", "image": "Resim" }, "types": { "rowNumber": "Satır numarası", "firstName": "Ad", "lastName": "Soyad", "fullName": "Tam ad", "gender": "Cinsiyet", "jobTitle": "İş unvanı", "email": "E-posta adresi", "username": "Kullanıcı adı", "password": "Şifre", "url": "URL", "ipv4": "IP adresi v4", "ipv6": "IP adresi v6", "userAgent": "User Agent", "city": "Şehir", "country": "Ülke", "streetAddress": "Adres", "zipCode": "Posta kodu", "latitude": "Enlem", "longitude": "Boylam", "amount": "Miktar", "currencyCode": "Para birimi kodu", "creditCardNumber": "Kredi kartı numarası", "productName": "Ürün adı", "price": "Fiyat", "department": "Departman", "companyName": "Şirket adı", "catchPhrase": "Slogan", "word": "Kelime", "sentence": "Cümle", "paragraph": "Paragraf", "past": "Geçmiş tarih", "future": "Gelecek tarih", "recent": "Son tarih", "birthdate": "Doğum tarihi", "int": "Tamsayı", "float": "Ondalık sayı", "boolean": "Boolean", "phoneNumber": "Telefon numarası", "imei": "IMEI", "avatar": "Avatar URL'si", "imageUrl": "Resim URL'si" } } }, "converters": { "label": "Dönüştürücüler", "caseConverter": { "label": "Büyük/Küçük Harf Dönüştürücü", "description": "Metni farklı büyük/küçük harf biçimlerine dönüştür", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Metin Unicode'a", "description": "Metni Unicode'a dönüştür ve tersi", "modes": { "textToUnicode": "Metin → Unicode", "unicodeToText": "Unicode → Metin" } }, "textToAscii": { "label": "Metin ASCII Binary'ye", "description": "Metni ASCII binary'ye dönüştür ve tersi", "modes": { "textToAscii": "Metin → ASCII", "asciiToText": "ASCII → Metin" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Metni Base64'e kodla veya çöz", "modes": { "textToBase64": "Metin → Base64", "base64ToText": "Base64 → Metin" } }, "jsonToYaml": { "label": "JSON'dan YAML'a", "description": "JSON'u YAML'a dönüştür ve tersi", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON'dan TOML'a", "description": "JSON'u TOML'a dönüştür ve tersi", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON'dan XML'e", "description": "JSON'u XML'e dönüştür ve tersi", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Renk Dönüştürücü", "description": "Renkleri farklı formatlar arasında dönüştür" } }, "crypto": { "label": "Kriptografi / Güvenlik", "hash": { "label": "Hash Üretici", "description": "Metinden hash üret" }, "hmac": { "label": "HMAC Üretici", "description": "Anahtar ve mesajdan oluşan hash tabanlı mesaj kimlik doğrulama kodu (HMAC) üret" }, "password": { "label": "Şifre Üretici", "description": "Güvenli şifre üret" }, "uuid": { "label": "UUID Üretici", "description": "Evrensel benzersiz tanımlayıcı (UUID) üret" } }, "web": { "label": "Web", "urlParser": { "label": "URL Ayrıştırıcı", "description": "URL'yi bileşenlerine ayrıştır" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "URL'yi kodla veya çöz", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Metni URL dostu slug'a dönüştür" } }, "form": { "input": "Giriş", "output": "Çıkış", "inputString": "Giriş Dizesi", "outputString": "Çıkış Dizesi", "inputUrl": "Giriş URL", "outputUrl": "Çıkış URL", "parsedUrl": "Ayrıştırılmış URL", "splitQueryString": "Query String'i Böl", "key": "Anahtar", "value": "Değer", "component": "Bileşen", "result": "Sonuç", "secretKey": "Gizli Anahtar", "algorithm": "Algoritma", "version": "Sürüm", "amount": "Miktar", "type": "Tür", "length": "Uzunluk", "options": "Seçenekler", "numbers": "Sayılar", "symbols": "Semboller", "lowercase": "Küçük harf", "uppercase": "Büyük harf", "placeholder": { "text": "Metin girin", "value": "Değer girin", "secretKey": "Gizli anahtar girin", "url": "URL girin" } } } ================================================ FILE: src/main/i18n/locales/tr_TR/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Tercihler", "devtools": "Geliştirici Araçları", "update": "Güncellemeleri Kontrol Et...", "quit": "massCode'dan Çık", "about": "massCode Hakkında", "hide": "massCode'u Gizle" }, "help": { "label": "Yardım", "website": "Web Sitesi", "documentation": "Dokümantasyon", "viewInGitHub": "GitHub'da Görüntüle", "changeLog": "Değişiklik Günlüğü", "reportIssue": "Sorun Bildir", "giveStar": "Yıldız Ver", "extension": { "vscode": "VS Code Eklentisi", "raycast": "Raycast Eklentisi", "alfred": "Alfred Eklentisi" }, "donate": { "openCollective": "Open Collective'de Bağış Yap", "payPal": "PayPal ile Bağış Yap", "gumroad": "Gumroad ile Bağış Yap (Visa, Mastercard, vb.)" }, "twitter": "X", "devTools": "Geliştirici Araçlarını Aç/Kapat", "links": { "snippets": "Snippet Koleksiyonu" } }, "edit": { "label": "Düzenle", "find": "Bul" }, "view": { "label": "Görünüm", "sortBy": { "label": "Snippet'leri Sırala", "dateModified": "Değiştirilme Tarihi", "dateCreated": "Oluşturulma Tarihi", "name": "İsim" }, "compactMode": "Kompakt Mod", "showSidebar": "Kenar Çubuğunu Göster/Gizle" }, "editor": { "label": "Editör", "copy": "Snippet'i Panoya Kopyala", "format": "Biçimlendir", "previewCode": "Kodu Önizle", "previewScreenshot": "Ekran Görüntüsünü Önizle", "previewJson": "JSON Önizleme", "fontSizeIncrease": "Yazı Boyutunu Artır", "fontSizeDecrease": "Yazı Boyutunu Azalt", "fontSizeReset": "Yazı Boyutunu Sıfırla" }, "markdown": { "label": "Markdown", "presentationMode": "Sunum Modu", "preview": "Önizleme", "previewMarkdown": "Markdown Önizle", "previewMindmap": "Mindmap Önizle" }, "history": { "label": "Geçmiş", "back": "Geri", "forward": "İleri" }, "devtools": { "label": "Geliştirici Araçları" } } ================================================ FILE: src/main/i18n/locales/tr_TR/messages.json ================================================ { "confirm": { "delete": "\"{{name}}\" öğesini silmek istediğinizden emin misiniz?", "deletePermanently": "\"{{name}}\" öğesini kalıcı olarak silmek istediğinizden emin misiniz?", "deleteConfirmMultipleSnippets": "{{count}} seçili snippet'i kalıcı olarak silmek istediğinizden emin misiniz?", "emptyTrash": "Çöp Kutusu'ndaki tüm snippet'leri kalıcı olarak silmek istediğinizden emin misiniz?", "clearDb": "Database'i temizlemek istediğinizden emin misiniz?", "migrateDb": [ "Taşımak istediğinizden emin misiniz?", "Taşıma sırasında mevcut kütüphane üzerine yazılacaktır." ] }, "success": { "copied": "Panoya kopyalandı", "migrate": "Database başarıyla taşındı.", "backup": { "created": "Yedek başarıyla oluşturuldu.", "restored": "Yedek başarıyla geri yüklendi.", "deleted": "Yedek başarıyla silindi." } }, "warning": { "noUndo": "Bu işlemi geri alamazsınız.", "allSnippetsMoveToTrash": "Bu klasördeki tüm snippet'ler çöp kutusuna taşınacak.", "deleteTag": "Bu, tüm snippet'lerden bu etiketin kaldırılmasına neden olacaktır.", "createDb": "Lütfen başka bir klasör seçin", "clearDb": "Bu, database'deki tüm Snippet'leri, Klasörleri ve Etiketleri kalıcı olarak silecektir.", "htmlCssPreview": "Sonucu görmek için HTML parçası ekleyin. Stil için CSS ve etkileşim için JavaScript ekleyin.", "codeBlockRenderer": [ "Codemirror kullanırken, kod bloğu için ayarlanacak dilin", "languages" ] }, "error": {}, "description": { "storage": "iCloud Drive, Google Drive veya Dropbox gibi senkronizasyon servislerini kullanmak için depolamayı ilgili senkronize klasörlere taşımanız yeterlidir", "migrate": { "fromV3": "massCode v3'ten taşımak için JSON dosyasını içeren klasörü seçin.", "fromSnippetsLab": "SnippetsLab'den taşımak için JSON dosyasını seçin.", "snippetsLabLimitations": [ "Bazı Sınırlamalar. SnippetsLab'den taşıma sırasında:", "JSON dosyası (v2.1'in altında) iç içe klasörleri temsil etmediğinden tüm klasörler birinci seviye olacaktır.", "Desteklenmeyen dillere sahip snippet'ler varsayılan Plain Text olarak ayarlanacaktır." ] } }, "special": { "supportMessage": "Merhaba, ben Anton 👋

\nmassCode'u kullandığınız için teşekkürler. Bu uygulamayı faydalı buluyorsanız, lütfen {{-tagStart}}bağış yapın{{-tagEnd}}. Bu beni projenin geliştirilmesine devam etmem için teşvik edecektir.", "unsponsored": "Sponsorsuz" }, "update": { "available": "{{newVersion}} sürümü artık indirilebilir.\nSizin sürümünüz {{oldVersion}}.", "noAvailable": "Şu anda mevcut güncelleme yok." } } ================================================ FILE: src/main/i18n/locales/tr_TR/preferences.json ================================================ { "label": "Tercihler", "storage": { "label": "Depolama", "migrate": "Taşı", "count": "Sayı", "clearDatabase": "Database'i Temizle" }, "editor": { "label": "Editör", "fontSize": "Yazı Boyutu", "fontFamily": "Yazı Tipi", "wrap": { "label": "Kaydırma", "wordWrap": "Kelime Kaydırma", "off": "Kapalı" }, "tabSize": "Sekme Boyutu", "showInvisibles": "Görünmezleri Göster", "highlightLine": "Satırı Vurgula", "highlightGutter": "Kenar Boşluğunu Vurgula", "matchBrackets": "Parantezleri Eşleştir", "prettier": { "label": "Prettier", "trailingComma": { "label": "Sondaki Virgül", "none": "Yok", "all": "Hepsi", "es5": "ES5" }, "semi": "Noktalı Virgül", "singleQuote": "Tek Tırnak" } }, "appearance": { "label": "Görünüm", "theme": { "label": "Tema", "light": "Açık", "dark": "Koyu" } }, "language": { "label": "Dil" }, "markdown": { "label": "Markdown", "codeRenderer": "Kod Bloğu Görüntüleyici" }, "api": { "label": "API Portu", "port": { "label": "API Portu", "description": "API sunucusu için port numarası (uygulamayı yeniden başlatmak gerekir). Geçerli aralık: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/tr_TR/ui.json ================================================ { "total": "Toplam", "line": "Satır", "column": "Sütun", "fragment": "Fragment", "path": "Yol", "button": { "back": "Geri", "cancel": "İptal", "clear": "Temizle", "confirm": "Onayla", "copy": "Kopyala", "fit": "Sığdır", "generate": "Oluştur", "ok": "Tamam", "revers": "Ters Çevir", "saveAs": "Farklı Kaydet", "sort": "Sırala", "update": ["GitHub'a Git", "Tamam"], "zoomIn": "Yakınlaştır", "zoomOut": "Uzaklaştır", "darkMode": "Karanlık Mod", "toggleDarkMode": "Karanlık modu değiştir", "background": "Arka Plan", "goToDownload": "İndirmeye Git", "refreshPreview": "Önizlemeyi yenile", "laserPointer": "Lazer işaretçi", "fullscreen": "Tam ekran", "prev": "Önceki", "next": "Sonraki" }, "action": { "close": "Kapat", "defaultLanguage": "Varsayılan Dil", "duplicate": "Çoğalt", "rename": "Yeniden Adlandır", "restore": "Geri Yükle", "setCustomIcon": "İkon Ayarla", "removeCustomIcon": "İkonu Kaldır", "show": "Göster", "hide": "Gizle", "showSidebar": "Kenar Çubuğunu Göster", "hideSidebar": "Kenar Çubuğunu Gizle", "new": { "storage": "Yeni Depolama", "folder": "Yeni Klasör", "snippet": "Yeni Snippet", "fragment": "Yeni Fragment" }, "add": { "description": "Açıklama Ekle", "tag": "Etiket Ekle", "toFavorites": "Favorilere Ekle" }, "open": { "storage": "Depolama Aç" }, "move": { "storage": "Depolamayı Taşı", "toTrash": "Çöp Kutusuna Taşı" }, "remove": { "fromFavorites": "Favorilerden Kaldır" }, "reload": { "storage": "Depolamayı Yenile" }, "delete": { "common": "Sil", "now": "Şimdi Sil", "allData": "Tüm Verileri Sil", "trash": "Çöp Kutusunu Boşalt" }, "migrate": { "fromSnippetsLab": "SnippetsLab'den", "fromV3": "massCode v3'ten" }, "export": { "toHtml": "HTML Olarak Dışa Aktar" }, "copy": { "snippetLink": "Snippet Bağlantısını Kopyala" } }, "sidebar": { "inbox": "Gelen Kutusu", "favorites": "Favoriler", "allSnippets": "Tüm Snippet'ler", "trash": "Çöp Kutusu", "folders": "Klasörler", "library": "Kütüphane", "tags": "Etiketler" }, "folder": { "untitled": "İsimsiz klasör", "plural": "Klasörler", "collapseAll": "Tümünü Daralt", "expandAll": "Tümünü Genişlet" }, "snippet": { "untitled": "İsimsiz snippet", "plural": "Snippet'ler", "emptyName": "Snippet adını yazın", "selectedMultiple": "{{count}} Snippet Seçildi", "noSelected": "Snippet Seçilmedi" }, "placeholder": { "emptyTagList": "Burada görmek için snippet'lere etiket ekleyin", "emptyFoldersList": "Klasör yok", "emptySnippetsList": "Snippet yok", "search": "Ara", "addTag": "Etiket Ekle" } } ================================================ FILE: src/main/i18n/locales/uk_UA/devtools.json ================================================ { "label": "Інструменти розробника", "generators": { "label": "Генератори", "lorem": { "label": "Генератор Lorem Ipsum", "description": "Генерація тексту-заповнювача", "selectType": "Виберіть тип", "maxCount": "Макс {{count}}", "types": { "words": "Слова", "sentences": "Речення", "paragraphs": "Параграфи" } }, "json": { "label": "JSON генератор", "description": "Генерувати випадкові JSON дані з різними типами полів", "fields": "Поля", "fieldName": "Назва поля", "selectType": "Обрати тип", "addField": "Додати поле", "rowCount": "Кількість рядків", "maxRows": "Макс 1000", "categories": { "general": "Загальне", "person": "Особа", "internet": "Інтернет", "location": "Місцезнаходження", "finance": "Фінанси", "commerce": "Торгівля", "company": "Компанія", "lorem": "Lorem", "date": "Дата", "number": "Число", "phone": "Телефон", "image": "Зображення" }, "types": { "rowNumber": "Номер рядка", "firstName": "Ім'я", "lastName": "Прізвище", "fullName": "Повне ім'я", "gender": "Стать", "jobTitle": "Посада", "email": "Адреса електронної пошти", "username": "Ім'я користувача", "password": "Пароль", "url": "URL", "ipv4": "IP адреса v4", "ipv6": "IP адреса v6", "userAgent": "User Agent", "city": "Місто", "country": "Країна", "streetAddress": "Адреса", "zipCode": "Поштовий індекс", "latitude": "Широта", "longitude": "Довгота", "amount": "Сума", "currencyCode": "Код валюти", "creditCardNumber": "Номер кредитної картки", "productName": "Назва товару", "price": "Ціна", "department": "Відділ", "companyName": "Назва компанії", "catchPhrase": "Слоган", "word": "Слово", "sentence": "Речення", "paragraph": "Абзац", "past": "Минула дата", "future": "Майбутня дата", "recent": "Недавня дата", "birthdate": "Дата народження", "int": "Ціле число", "float": "Дробове число", "boolean": "Булевий", "phoneNumber": "Номер телефону", "imei": "IMEI", "avatar": "URL аватара", "imageUrl": "URL зображення" } } }, "converters": { "label": "Конвертери", "caseConverter": { "label": "Конвертер регістру", "description": "Перетворення тексту в різні регістри", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "Текст в Unicode", "description": "Конвертація тексту в Unicode і навпаки", "modes": { "textToUnicode": "Текст → Unicode", "unicodeToText": "Unicode → Текст" } }, "textToAscii": { "label": "Текст в ASCII Binary", "description": "Конвертація тексту в ASCII binary і навпаки", "modes": { "textToAscii": "Текст → ASCII", "asciiToText": "ASCII → Текст" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "Кодування або декодування тексту в Base64", "modes": { "textToBase64": "Текст → Base64", "base64ToText": "Base64 → Текст" } }, "jsonToYaml": { "label": "JSON в YAML", "description": "Конвертація JSON в YAML і навпаки", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON в TOML", "description": "Конвертація JSON в TOML і навпаки", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON в XML", "description": "Конвертація JSON в XML і навпаки", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "Конвертер кольорів", "description": "Конвертація кольорів між різними форматами" } }, "crypto": { "label": "Криптографія / Безпека", "hash": { "label": "Генератор хешів", "description": "Генерація хешів з тексту" }, "hmac": { "label": "HMAC Генератор", "description": "Генерація коду автентифікації повідомлень на основі хешу (HMAC) з ключа та повідомлення" }, "password": { "label": "Генератор паролів", "description": "Генерація безпечного пароля" }, "uuid": { "label": "UUID Генератор", "description": "Генерація універсального унікального ідентифікатора (UUID)" } }, "web": { "label": "Веб", "urlParser": { "label": "URL Парсер", "description": "Розбір URL на компоненти" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "Кодування або декодування URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "Перетворення тексту в URL-сумісний slug" } }, "form": { "input": "Введення", "output": "Виведення", "inputString": "Вхідний рядок", "outputString": "Вихідний рядок", "inputUrl": "Вхідний URL", "outputUrl": "Вихідний URL", "parsedUrl": "Розібраний URL", "splitQueryString": "Розділити Query String", "key": "Ключ", "value": "Значення", "component": "Компонент", "result": "Результат", "secretKey": "Секретний ключ", "algorithm": "Алгоритм", "version": "Версія", "amount": "Кількість", "type": "Тип", "length": "Довжина", "options": "Опції", "numbers": "Цифри", "symbols": "Символи", "lowercase": "Малі літери", "uppercase": "Великі літери", "placeholder": { "text": "Введіть текст", "value": "Введіть значення", "secretKey": "Введіть секретний ключ", "url": "Введіть URL" } } } ================================================ FILE: src/main/i18n/locales/uk_UA/menu.json ================================================ { "app": { "label": "massCode", "preferences": "Налаштування", "devtools": "Інструменти розробника", "update": "Перевірити оновлення...", "quit": "Вийти з massCode", "about": "Про massCode", "hide": "Приховати massCode" }, "help": { "label": "Допомога", "website": "Веб-сайт", "documentation": "Документація", "viewInGitHub": "Переглянути на GitHub", "changeLog": "Журнал змін", "reportIssue": "Повідомити про проблему", "giveStar": "Поставити зірку", "extension": { "vscode": "Розширення VS Code", "raycast": "Розширення Raycast", "alfred": "Розширення Alfred" }, "donate": { "openCollective": "Підтримати через Open Collective", "payPal": "Підтримати через PayPal", "gumroad": "Підтримати через Gumroad (Visa, Mastercard, тощо)" }, "twitter": "X", "devTools": "Інструменти розробника", "links": { "snippets": "Колекція сніпетів" } }, "edit": { "label": "Редагувати", "find": "Знайти" }, "view": { "label": "Вигляд", "sortBy": { "label": "Сортувати сніпети за", "dateModified": "Датою зміни", "dateCreated": "Датою створення", "name": "Назвою" }, "compactMode": "Компактний режим", "showSidebar": "Показати/приховати бічну панель" }, "editor": { "label": "Редактор", "copy": "Копіювати сніпет в буфер обміну", "format": "Форматувати", "previewCode": "Попередній перегляд коду", "previewScreenshot": "Попередній перегляд знімка екрану", "previewJson": "Попередній перегляд JSON", "fontSizeIncrease": "Збільшити розмір шрифту", "fontSizeDecrease": "Зменшити розмір шрифту", "fontSizeReset": "Скинути розмір шрифту" }, "markdown": { "label": "Markdown", "presentationMode": "Режим презентації", "preview": "Попередній перегляд", "previewMarkdown": "Попередній перегляд Markdown", "previewMindmap": "Попередній перегляд Mindmap" }, "history": { "label": "Історія", "back": "Назад", "forward": "Вперед" }, "devtools": { "label": "Інструменти розробника" } } ================================================ FILE: src/main/i18n/locales/uk_UA/messages.json ================================================ { "confirm": { "delete": "Ви впевнені, що хочете видалити \"{{name}}\"?", "deletePermanently": "Ви впевнені, що хочете назавжди видалити \"{{name}}\"?", "deleteConfirmMultipleSnippets": "Ви впевнені, що хочете назавжди видалити {{count}} вибраних сніпетів?", "emptyTrash": "Ви впевнені, що хочете назавжди видалити всі сніпети у Кошику?", "clearDb": "Ви впевнені, що хочете очистити базу даних?", "migrateDb": [ "Ви впевнені, що хочете виконати міграцію?", "Під час міграції поточна бібліотека буде перезаписана." ] }, "success": { "copied": "Скопійовано в буфер обміну", "migrate": "База даних успішно мігрована.", "backup": { "created": "Резервну копію успішно створено.", "restored": "Резервну копію успішно відновлено.", "deleted": "Резервну копію успішно видалено." } }, "warning": { "noUndo": "Ви не зможете скасувати цю дію.", "allSnippetsMoveToTrash": "Всі сніпети в цій папці будуть переміщені до кошика.", "deleteTag": "Це також призведе до видалення цього тегу з усіх сніпетів.", "createDb": "Будь ласка, виберіть іншу папку", "clearDb": "Це назавжди видалить всі Сніпети, Папки та Теги з бази даних.", "htmlCssPreview": "Додайте HTML-фрагмент, щоб побачити результат. Додайте CSS для стилізації та JavaScript для інтерактивності.", "codeBlockRenderer": [ "При використанні Codemirror мова для блоку коду повинна відповідати одному зі значень", "languages" ] }, "error": {}, "description": { "storage": "Щоб використовувати сервіси синхронізації, такі як iCloud Drive, Google Drive або Dropbox, просто перемістіть сховище у відповідні синхронізовані папки", "migrate": { "fromV3": "Для міграції з massCode v3 виберіть папку, що містить JSON файл.", "fromSnippetsLab": "Для міграції зі SnippetsLab виберіть JSON файл.", "snippetsLabLimitations": [ "Деякі обмеження. Під час міграції зі SnippetsLab:", "Всі папки будуть першого рівня, оскільки JSON файл (нижче v2.1) не представляє вкладені папки.", "Сніпети з непідтримуваними мовами будуть встановлені за замовчуванням як Plain Text." ] } }, "special": { "supportMessage": "Привіт, це Антон 👋

\nДякую за використання massCode. Якщо ви вважаєте цей додаток корисним, будь ласка, {{-tagStart}}підтримайте проект{{-tagEnd}}. Це надихне мене продовжувати розробку проекту.", "unsponsored": "Без спонсора" }, "update": { "available": "Версія {{newVersion}} доступна для завантаження.\nВаша версія {{oldVersion}}.", "noAvailable": "На даний момент оновлень немає." } } ================================================ FILE: src/main/i18n/locales/uk_UA/preferences.json ================================================ { "label": "Налаштування", "storage": { "label": "Сховище", "migrate": "Міграція", "count": "Кількість", "clearDatabase": "Очистити базу даних" }, "editor": { "label": "Редактор", "fontSize": "Розмір шрифту", "fontFamily": "Сімейство шрифтів", "wrap": { "label": "Перенесення", "wordWrap": "Перенесення слів", "off": "Вимкнено" }, "tabSize": "Розмір табуляції", "showInvisibles": "Показати невидимі символи", "highlightLine": "Підсвічування рядка", "highlightGutter": "Підсвічування відступів", "matchBrackets": "Парні дужки", "prettier": { "label": "Prettier", "trailingComma": { "label": "Кома в кінці", "none": "Немає", "all": "Всюди", "es5": "ES5" }, "semi": "Крапка з комою", "singleQuote": "Одинарні лапки" } }, "appearance": { "label": "Зовнішній вигляд", "theme": { "label": "Тема", "light": "Світла", "dark": "Темна" } }, "language": { "label": "Мова" }, "markdown": { "label": "Markdown", "codeRenderer": "Відображення блоків коду" }, "api": { "label": "Порт API", "port": { "label": "Порт API", "description": "Номер порту для API-сервера (потребує перезапуску додатку). Допустимий діапазон: 1024-65535." } } } ================================================ FILE: src/main/i18n/locales/uk_UA/ui.json ================================================ { "total": "Всього", "line": "Рядок", "column": "Стовпець", "fragment": "Fragment", "path": "Шлях", "button": { "back": "Назад", "cancel": "Скасувати", "clear": "Очистити", "confirm": "Підтвердити", "copy": "Копіювати", "fit": "За розміром", "generate": "Згенерувати", "ok": "OK", "revers": "Реверс", "saveAs": "Зберегти як", "sort": "Сортувати", "update": ["Перейти на GitHub", "OK"], "zoomIn": "Збільшити", "zoomOut": "Зменшити", "darkMode": "Темний режим", "toggleDarkMode": "Перемкнути темний режим", "background": "Фон", "goToDownload": "Перейти до завантаження", "refreshPreview": "Оновити попередній перегляд", "laserPointer": "Лазерна указка", "fullscreen": "Повний екран", "prev": "Попередній", "next": "Наступний" }, "action": { "close": "Закрити", "defaultLanguage": "Мова за замовчуванням", "duplicate": "Дублювати", "rename": "Перейменувати", "restore": "Відновити", "setCustomIcon": "Встановити іконку", "removeCustomIcon": "Видалити іконку", "show": "Показати", "hide": "Приховати", "showSidebar": "Показати бічну панель", "hideSidebar": "Сховати бічну панель", "new": { "storage": "Нове сховище", "folder": "Нова папка", "snippet": "Новий сніпет", "fragment": "Новий фрагмент" }, "add": { "description": "Додати опис", "tag": "Додати тег", "toFavorites": "Додати до обраного" }, "open": { "storage": "Відкрити сховище" }, "move": { "storage": "Перемістити сховище", "toTrash": "Перемістити до кошика" }, "remove": { "fromFavorites": "Видалити з обраного" }, "reload": { "storage": "Перезавантажити сховище" }, "delete": { "common": "Видалити", "now": "Видалити зараз", "allData": "Видалити всі дані", "trash": "Очистити кошик" }, "migrate": { "fromSnippetsLab": "Зі SnippetsLab", "fromV3": "З massCode v3" }, "export": { "toHtml": "Експортувати в HTML" }, "copy": { "snippetLink": "Копіювати посилання на сніпет" } }, "sidebar": { "inbox": "Вхідні", "favorites": "Обране", "allSnippets": "Всі сніпети", "trash": "Кошик", "folders": "Папки", "library": "Бібліотека", "tags": "Теги" }, "folder": { "untitled": "Папка без назви", "plural": "Папки", "collapseAll": "Згорнути все", "expandAll": "Розгорнути все" }, "snippet": { "untitled": "Сніпет без назви", "plural": "Сніпети", "emptyName": "Введіть назву сніпета", "selectedMultiple": "Вибрано {{count}} сніпетів", "noSelected": "Сніпети не вибрані" }, "placeholder": { "emptyTagList": "Додайте теги до сніпетів, щоб побачити їх тут", "emptyFoldersList": "Немає папок", "emptySnippetsList": "Немає сніппетів", "search": "Пошук", "addTag": "Додати тег" } } ================================================ FILE: src/main/i18n/locales/zh_CN/devtools.json ================================================ { "label": "开发者工具", "generators": { "label": "生成器", "lorem": { "label": "Lorem Ipsum 生成器", "description": "生成占位符文本", "selectType": "选择类型", "maxCount": "最大 {{count}}", "types": { "words": "单词", "sentences": "句子", "paragraphs": "段落" } }, "json": { "label": "JSON 生成器", "description": "使用各种字段类型生成随机 JSON 数据", "fields": "字段", "fieldName": "字段名称", "selectType": "选择类型", "addField": "添加字段", "rowCount": "行数", "maxRows": "最大 1000", "categories": { "general": "通用", "person": "人员", "internet": "互联网", "location": "位置", "finance": "财务", "commerce": "商业", "company": "公司", "lorem": "Lorem", "date": "日期", "number": "数字", "phone": "电话", "image": "图片" }, "types": { "rowNumber": "行号", "firstName": "名", "lastName": "姓", "fullName": "全名", "gender": "性别", "jobTitle": "职位", "email": "电子邮件地址", "username": "用户名", "password": "密码", "url": "URL", "ipv4": "IP 地址 v4", "ipv6": "IP 地址 v6", "userAgent": "User Agent", "city": "城市", "country": "国家", "streetAddress": "街道地址", "zipCode": "邮政编码", "latitude": "纬度", "longitude": "经度", "amount": "金额", "currencyCode": "货币代码", "creditCardNumber": "信用卡号", "productName": "产品名称", "price": "价格", "department": "部门", "companyName": "公司名称", "catchPhrase": "标语", "word": "单词", "sentence": "句子", "paragraph": "段落", "past": "过去日期", "future": "未来日期", "recent": "最近日期", "birthdate": "出生日期", "int": "整数", "float": "浮点数", "boolean": "布尔值", "phoneNumber": "电话号码", "imei": "IMEI", "avatar": "头像 URL", "imageUrl": "图片 URL" } } }, "converters": { "label": "转换器", "caseConverter": { "label": "大小写转换器", "description": "将文本转换为不同的大小写格式", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "文本转Unicode", "description": "将文本转换为Unicode,反之亦然", "modes": { "textToUnicode": "文本 → Unicode", "unicodeToText": "Unicode → 文本" } }, "textToAscii": { "label": "文本转ASCII Binary", "description": "将文本转换为ASCII binary,反之亦然", "modes": { "textToAscii": "文本 → ASCII", "asciiToText": "ASCII → 文本" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "将文本编码或解码为Base64", "modes": { "textToBase64": "文本 → Base64", "base64ToText": "Base64 → 文本" } }, "jsonToYaml": { "label": "JSON转YAML", "description": "将JSON转换为YAML,反之亦然", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON转TOML", "description": "将JSON转换为TOML,反之亦然", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON转XML", "description": "将JSON转换为XML,反之亦然", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "颜色转换器", "description": "在不同格式之间转换颜色" } }, "crypto": { "label": "加密 / 安全", "hash": { "label": "哈希生成器", "description": "从文本生成哈希值" }, "hmac": { "label": "HMAC生成器", "description": "生成由密钥和消息组成的基于哈希的消息认证码(HMAC)" }, "password": { "label": "密码生成器", "description": "生成安全密码" }, "uuid": { "label": "UUID生成器", "description": "生成通用唯一标识符(UUID)" } }, "web": { "label": "网络", "urlParser": { "label": "URL解析器", "description": "将URL解析为其组件" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "编码或解码URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "将文本转换为URL友好的slug" } }, "form": { "input": "输入", "output": "输出", "inputString": "输入字符串", "outputString": "输出字符串", "inputUrl": "输入URL", "outputUrl": "输出URL", "parsedUrl": "解析的URL", "splitQueryString": "分割Query String", "key": "键", "value": "值", "component": "组件", "result": "结果", "secretKey": "密钥", "algorithm": "算法", "version": "版本", "amount": "数量", "type": "类型", "length": "长度", "options": "选项", "numbers": "数字", "symbols": "符号", "lowercase": "小写", "uppercase": "大写", "placeholder": { "text": "输入文本", "value": "输入值", "secretKey": "输入密钥", "url": "输入URL" } } } ================================================ FILE: src/main/i18n/locales/zh_CN/menu.json ================================================ { "app": { "label": "massCode", "preferences": "首选项", "devtools": "开发者工具", "update": "检查更新...", "quit": "退出 massCode", "about": "关于 massCode", "hide": "隐藏 massCode" }, "help": { "label": "帮助", "website": "网站", "documentation": "文档", "viewInGitHub": "在 GitHub 中查看", "changeLog": "更新日志", "reportIssue": "报告问题", "giveStar": "点个赞", "extension": { "vscode": "VS Code 扩展", "raycast": "Raycast 扩展", "alfred": "Alfred 扩展" }, "donate": { "openCollective": "在 Open Collective 上捐赠", "payPal": "通过 PayPal 捐赠", "gumroad": "通过 Gumroad 捐赠(Visa、Mastercard 等)" }, "twitter": "X", "devTools": "切换开发者工具", "links": { "snippets": "代码片段集合" } }, "edit": { "label": "编辑", "find": "查找" }, "view": { "label": "视图", "sortBy": { "label": "代码片段排序方式", "dateModified": "修改日期", "dateCreated": "创建日期", "name": "名称" }, "compactMode": "紧凑模式", "showSidebar": "显示/隐藏侧边栏" }, "editor": { "label": "编辑器", "copy": "复制代码片段到剪贴板", "format": "格式化", "previewCode": "预览代码", "previewScreenshot": "预览截图", "previewJson": "预览 JSON", "fontSizeIncrease": "增大字体", "fontSizeDecrease": "减小字体", "fontSizeReset": "重置字体大小" }, "markdown": { "label": "Markdown", "presentationMode": "演示模式", "preview": "预览", "previewMarkdown": "预览 Markdown", "previewMindmap": "预览思维导图" }, "history": { "label": "历史", "back": "后退", "forward": "前进" }, "devtools": { "label": "开发者工具" } } ================================================ FILE: src/main/i18n/locales/zh_CN/messages.json ================================================ { "confirm": { "delete": "您确定要删除 \"{{name}}\" 吗?", "deletePermanently": "您确定要永久删除 \"{{name}}\" 吗?", "deleteConfirmMultipleSnippets": "您确定要永久删除已选择的 {{count}} 个代码片段吗?", "emptyTrash": "您确定要永久删除回收站中的所有代码片段吗?", "clearDb": "您确定要清空数据库吗?", "migrateDb": [ "您确定要进行迁移吗?", "迁移期间,当前库将被覆盖。" ] }, "success": { "copied": "已复制到剪贴板", "migrate": "数据库迁移成功。", "backup": { "created": "备份创建成功。", "restored": "备份恢复成功。", "deleted": "备份删除成功。" } }, "warning": { "noUndo": "此操作无法撤消。", "allSnippetsMoveToTrash": "此文件夹中的所有代码片段将被移至回收站。", "deleteTag": "这也将导致所有带有该标签的代码片段移除此标签。", "createDb": "请选择其他文件夹", "clearDb": "这将永久删除数据库中的所有代码片段、文件夹和标签。", "htmlCssPreview": "添加HTML片段以查看结果。添加CSS进行样式设计,添加JavaScript实现交互功能。", "codeBlockRenderer": [ "使用 Codemirror 时,代码块设置的语言必须对应", "languages" ] }, "error": {}, "description": { "storage": "要使用 iCloud Drive、Google Drive 或 Dropbox 等同步服务,只需将存储移动到相应的同步文件夹即可", "migrate": { "fromV3": "要从 massCode v3 迁移,请选择包含 JSON 文件的文件夹。", "fromSnippetsLab": "要从 SnippetsLab 迁移,请选择 JSON 文件。", "snippetsLabLimitations": [ "一些限制。从 SnippetsLab 迁移时:", "由于 JSON 文件(2.1 版以下)不支持嵌套文件夹,所有文件夹将位于第一层。", "使用不支持语言的代码片段将被设置为默认的纯文本。" ] } }, "special": { "supportMessage": "你好,我是 Anton 👋

\n感谢使用 massCode。如果您觉得这个应用有用,请{{-tagStart}}捐赠{{-tagEnd}}。这将激励我继续开发这个项目。", "unsponsored": "未赞助" }, "update": { "available": "版本 {{newVersion}} 现已可供下载。\n您的版本是 {{oldVersion}}。", "noAvailable": "目前没有可用的更新。" } } ================================================ FILE: src/main/i18n/locales/zh_CN/preferences.json ================================================ { "label": "首选项", "storage": { "label": "存储", "migrate": "迁移", "count": "数量", "clearDatabase": "清空数据库" }, "editor": { "label": "编辑器", "fontSize": "字体大小", "fontFamily": "字体", "wrap": { "label": "换行", "wordWrap": "自动换行", "off": "关闭" }, "tabSize": "缩进大小", "showInvisibles": "显示不可见字符", "highlightLine": "高亮当前行", "highlightGutter": "高亮行号", "matchBrackets": "匹配括号", "prettier": { "label": "Prettier", "trailingComma": { "label": "尾随逗号", "none": "无", "all": "全部", "es5": "ES5" }, "semi": "分号", "singleQuote": "单引号" } }, "appearance": { "label": "外观", "theme": { "label": "主题", "light": "浅色", "dark": "深色" } }, "language": { "label": "语言" }, "markdown": { "label": "Markdown", "codeRenderer": "代码块渲染器" }, "api": { "label": "API 端口", "port": { "label": "API 端口", "description": "API 服务器的端口号(需要重启应用程序才能生效)。有效范围:1024-65535。" } } } ================================================ FILE: src/main/i18n/locales/zh_CN/ui.json ================================================ { "total": "总计", "line": "行", "column": "列", "fragment": "片段", "path": "路径", "button": { "back": "返回", "cancel": "取消", "clear": "清除", "confirm": "确认", "copy": "复制", "fit": "适应", "generate": "生成", "ok": "确定", "revers": "反转", "saveAs": "另存为", "sort": "排序", "update": ["前往 GitHub", "确定"], "zoomIn": "放大", "zoomOut": "缩小", "darkMode": "深色模式", "toggleDarkMode": "切换深色模式", "background": "背景", "goToDownload": "前往下载", "refreshPreview": "刷新预览", "laserPointer": "激光指针", "fullscreen": "全屏", "prev": "上一个", "next": "下一个" }, "action": { "close": "关闭", "defaultLanguage": "默认语言", "duplicate": "复制", "rename": "重命名", "restore": "恢复", "setCustomIcon": "设置图标", "removeCustomIcon": "删除图标", "show": "显示", "hide": "隐藏", "showSidebar": "显示侧边栏", "hideSidebar": "隐藏侧边栏", "new": { "storage": "新建存储", "folder": "新建文件夹", "snippet": "新建代码片段", "fragment": "新建片段" }, "add": { "description": "添加描述", "tag": "添加标签", "toFavorites": "添加到收藏" }, "open": { "storage": "打开存储" }, "move": { "storage": "移动存储", "toTrash": "移到回收站" }, "remove": { "fromFavorites": "从收藏中移除" }, "reload": { "storage": "重新加载存储" }, "delete": { "common": "删除", "now": "立即删除", "allData": "删除所有数据", "trash": "清空回收站" }, "migrate": { "fromSnippetsLab": "从 SnippetsLab 导入", "fromV3": "从 massCode v3 导入" }, "export": { "toHtml": "导出为 HTML" }, "copy": { "snippetLink": "复制代码片段链接" } }, "sidebar": { "inbox": "收件箱", "favorites": "收藏", "allSnippets": "所有代码片段", "trash": "回收站", "folders": "文件夹", "library": "库", "tags": "标签" }, "folder": { "untitled": "未命名文件夹", "plural": "文件夹", "collapseAll": "全部折叠", "expandAll": "全部展开" }, "snippet": { "untitled": "未命名代码片段", "plural": "代码片段", "emptyName": "输入代码片段名称", "selectedMultiple": "已选择 {{count}} 个代码片段", "noSelected": "未选择代码片段" }, "placeholder": { "emptyTagList": "在代码片段中添加标签以在此处查看", "emptyFoldersList": "没有文件夹", "emptySnippetsList": "没有代码片段", "search": "搜索", "addTag": "添加标签" } } ================================================ FILE: src/main/i18n/locales/zh_HK/devtools.json ================================================ { "label": "開發者工具", "generators": { "label": "生成器", "lorem": { "label": "Lorem Ipsum 生成器", "description": "生成占位符文字", "selectType": "選擇類型", "maxCount": "最大 {{count}}", "types": { "words": "單詞", "sentences": "句子", "paragraphs": "段落" } }, "json": { "label": "JSON 生成器", "description": "使用各種欄位類型產生隨機 JSON 資料", "fields": "欄位", "fieldName": "欄位名稱", "selectType": "選擇類型", "addField": "新增欄位", "rowCount": "列數", "maxRows": "最大 1000", "categories": { "general": "一般", "person": "人員", "internet": "網際網路", "location": "位置", "finance": "財務", "commerce": "商業", "company": "公司", "lorem": "Lorem", "date": "日期", "number": "數字", "phone": "電話", "image": "圖片" }, "types": { "rowNumber": "列號", "firstName": "名", "lastName": "姓", "fullName": "全名", "gender": "性別", "jobTitle": "職稱", "email": "電子郵件地址", "username": "使用者名稱", "password": "密碼", "url": "URL", "ipv4": "IP 地址 v4", "ipv6": "IP 地址 v6", "userAgent": "User Agent", "city": "城市", "country": "國家", "streetAddress": "街道地址", "zipCode": "郵遞區號", "latitude": "緯度", "longitude": "經度", "amount": "金額", "currencyCode": "貨幣代碼", "creditCardNumber": "信用卡號", "productName": "產品名稱", "price": "價格", "department": "部門", "companyName": "公司名稱", "catchPhrase": "標語", "word": "單字", "sentence": "句子", "paragraph": "段落", "past": "過去日期", "future": "未來日期", "recent": "最近日期", "birthdate": "出生日期", "int": "整數", "float": "浮點數", "boolean": "布林值", "phoneNumber": "電話號碼", "imei": "IMEI", "avatar": "頭像 URL", "imageUrl": "圖片 URL" } } }, "converters": { "label": "轉換器", "caseConverter": { "label": "大小寫轉換器", "description": "將文字轉換為不同的大小寫格式", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "文字轉Unicode", "description": "將文字轉換為Unicode,反之亦然", "modes": { "textToUnicode": "文字 → Unicode", "unicodeToText": "Unicode → 文字" } }, "textToAscii": { "label": "文字轉ASCII Binary", "description": "將文字轉換為ASCII binary,反之亦然", "modes": { "textToAscii": "文字 → ASCII", "asciiToText": "ASCII → 文字" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "將文字編碼或解碼為Base64", "modes": { "textToBase64": "文字 → Base64", "base64ToText": "Base64 → 文字" } }, "jsonToYaml": { "label": "JSON轉YAML", "description": "將JSON轉換為YAML,反之亦然", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON轉TOML", "description": "將JSON轉換為TOML,反之亦然", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON轉XML", "description": "將JSON轉換為XML,反之亦然", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "顏色轉換器", "description": "在不同格式之間轉換顏色" } }, "crypto": { "label": "加密 / 安全", "hash": { "label": "雜湊產生器", "description": "從文字產生雜湊值" }, "hmac": { "label": "HMAC產生器", "description": "產生由金鑰和訊息組成的基於雜湊的訊息認證碼(HMAC)" }, "password": { "label": "密碼產生器", "description": "產生安全密碼" }, "uuid": { "label": "UUID產生器", "description": "產生通用唯一識別碼(UUID)" } }, "web": { "label": "網絡", "urlParser": { "label": "URL解析器", "description": "將URL解析為其組件" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "編碼或解碼URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "將文字轉換為URL友好的slug" } }, "form": { "input": "輸入", "output": "輸出", "inputString": "輸入字串", "outputString": "輸出字串", "inputUrl": "輸入URL", "outputUrl": "輸出URL", "parsedUrl": "解析的URL", "splitQueryString": "分割Query String", "key": "金鑰", "value": "值", "component": "組件", "result": "結果", "secretKey": "秘密金鑰", "algorithm": "演算法", "version": "版本", "amount": "數量", "type": "類型", "length": "長度", "options": "選項", "numbers": "數字", "symbols": "符號", "lowercase": "小寫", "uppercase": "大寫", "placeholder": { "text": "輸入文字", "value": "輸入值", "secretKey": "輸入秘密金鑰", "url": "輸入URL" } } } ================================================ FILE: src/main/i18n/locales/zh_HK/menu.json ================================================ { "app": { "label": "massCode", "preferences": "偏好設置", "devtools": "開發者工具", "update": "檢查更新...", "quit": "退出 massCode", "about": "關於 massCode", "hide": "隱藏 massCode" }, "help": { "label": "幫助", "website": "網站", "documentation": "文檔", "viewInGitHub": "在 GitHub 中查看", "changeLog": "更新日誌", "reportIssue": "報告問題", "giveStar": "點個讚", "extension": { "vscode": "VS Code 擴展", "raycast": "Raycast 擴展", "alfred": "Alfred 擴展" }, "donate": { "openCollective": "在 Open Collective 上捐贈", "payPal": "通過 PayPal 捐贈", "gumroad": "通過 Gumroad 捐贈(Visa、Mastercard 等)" }, "twitter": "X", "devTools": "切換開發者工具", "links": { "snippets": "程式碼片段集合" } }, "edit": { "label": "編輯", "find": "尋找" }, "view": { "label": "視圖", "sortBy": { "label": "程式碼片段排序方式", "dateModified": "修改日期", "dateCreated": "創建日期", "name": "名稱" }, "compactMode": "緊湊模式", "showSidebar": "顯示/隱藏側邊欄" }, "editor": { "label": "編輯器", "copy": "複製程式碼片段到剪貼板", "format": "格式化", "previewCode": "預覽程式碼", "previewScreenshot": "預覽截圖", "previewJson": "預覽 JSON", "fontSizeIncrease": "增大字體", "fontSizeDecrease": "減小字體", "fontSizeReset": "重置字體大小" }, "markdown": { "label": "Markdown", "presentationMode": "演示模式", "preview": "預覽", "previewMarkdown": "預覽 Markdown", "previewMindmap": "預覽思維導圖" }, "history": { "label": "歷史", "back": "後退", "forward": "前進" }, "devtools": { "label": "開發者工具" } } ================================================ FILE: src/main/i18n/locales/zh_HK/messages.json ================================================ { "confirm": { "delete": "您確定要刪除 \"{{name}}\" 嗎?", "deletePermanently": "您確定要永久刪除 \"{{name}}\" 嗎?", "deleteConfirmMultipleSnippets": "您確定要永久刪除已選擇的 {{count}} 個程式碼片段嗎?", "emptyTrash": "您確定要永久刪除回收桶中的所有程式碼片段嗎?", "clearDb": "您確定要清空資料庫嗎?", "migrateDb": [ "您確定要進行遷移嗎?", "遷移期間,當前庫將被覆蓋。" ] }, "success": { "copied": "已複製", "backup": { "created": "備份已創建", "restored": "備份已恢復" }, "migrate": "資料庫遷移成功。" }, "warning": { "noUndo": "此操作無法撤消。", "allSnippetsMoveToTrash": "此資料夾中的所有程式碼片段將被移至回收桶。", "deleteTag": "這也將導致所有帶有該標籤的程式碼片段移除此標籤。", "createDb": "請選擇其他資料夾", "clearDb": "這將永久刪除資料庫中的所有程式碼片段、資料夾和標籤。", "htmlCssPreview": "添加HTML片段以查看結果。添加CSS進行樣式設計,添加JavaScript實現互動功能。", "codeBlockRenderer": [ "使用 Codemirror 時,程式碼區塊設置的語言必須對應", "languages" ] }, "error": {}, "description": { "storage": "要使用 iCloud Drive、Google Drive 或 Dropbox 等同步服務,只需將存儲移動到相應的同步資料夾即可", "migrate": { "fromV3": "要從 massCode v3 遷移,請選擇包含 JSON 檔案的資料夾。", "fromSnippetsLab": "要從 SnippetsLab 遷移,請選擇 JSON 檔案。", "snippetsLabLimitations": [ "一些限制。從 SnippetsLab 遷移時:", "由於 JSON 檔案(2.1 版以下)不支持嵌套資料夾,所有資料夾將位於第一層。", "使用不支持語言的程式碼片段將被設置為預設的純文字。" ] } }, "special": { "supportMessage": "你好,我是 Anton 👋

\n感謝使用 massCode。如果您覺得這個應用有用,請{{-tagStart}}捐贈{{-tagEnd}}。這將激勵我繼續開發這個項目。", "unsponsored": "未贊助" }, "update": { "available": "版本 {{newVersion}} 現已可供下載。\n您的版本是 {{oldVersion}}。", "noAvailable": "目前沒有可用的更新。" } } ================================================ FILE: src/main/i18n/locales/zh_HK/preferences.json ================================================ { "label": "偏好設置", "storage": { "label": "存儲", "migrate": "遷移", "count": "數量", "clearDatabase": "清空數據庫" }, "editor": { "label": "編輯器", "fontSize": "字體大小", "fontFamily": "字體", "wrap": { "label": "換行", "wordWrap": "自動換行", "off": "關閉" }, "tabSize": "縮進大小", "showInvisibles": "顯示不可見字符", "highlightLine": "高亮當前行", "highlightGutter": "高亮行號", "matchBrackets": "匹配括號", "prettier": { "label": "Prettier", "trailingComma": { "label": "尾隨逗號", "none": "無", "all": "全部", "es5": "ES5" }, "semi": "分號", "singleQuote": "單引號" } }, "appearance": { "label": "外觀", "theme": { "label": "主題", "light": "淺色", "dark": "深色" } }, "language": { "label": "語言" }, "markdown": { "label": "Markdown", "codeRenderer": "程式碼區塊渲染器" }, "api": { "label": "API 端口", "port": { "label": "API 端口", "description": "API 伺服器的端口號(需要重新啟動應用程式)。有效範圍:1024-65535。" } } } ================================================ FILE: src/main/i18n/locales/zh_HK/ui.json ================================================ { "total": "總計", "line": "行", "column": "列", "fragment": "片段", "path": "路徑", "button": { "back": "返回", "cancel": "取消", "clear": "清除", "confirm": "確認", "copy": "複製", "fit": "適應", "generate": "生成", "ok": "確定", "revers": "反轉", "saveAs": "另存為", "sort": "排序", "update": ["前往 GitHub", "確定"], "zoomIn": "放大", "zoomOut": "縮小", "darkMode": "深色模式", "toggleDarkMode": "切換深色模式", "background": "背景", "goToDownload": "前往下載", "refreshPreview": "刷新預覽", "laserPointer": "激光指針", "fullscreen": "全屏", "prev": "上一個", "next": "下一個" }, "action": { "close": "關閉", "defaultLanguage": "預設語言", "duplicate": "複製", "rename": "重命名", "restore": "恢復", "setCustomIcon": "設置圖標", "removeCustomIcon": "刪除圖標", "show": "顯示", "hide": "隱藏", "showSidebar": "顯示側邊欄", "hideSidebar": "隱藏側邊欄", "new": { "storage": "新建存儲", "folder": "新建資料夾", "snippet": "新建程式碼片段", "fragment": "新建片段" }, "add": { "description": "添加描述", "tag": "添加標籤", "toFavorites": "添加到收藏" }, "open": { "storage": "打開存儲" }, "move": { "storage": "移動存儲", "toTrash": "移到回收桶" }, "remove": { "fromFavorites": "從收藏中移除" }, "reload": { "storage": "重新加載存儲" }, "delete": { "common": "刪除", "now": "立即刪除", "allData": "刪除所有數據", "trash": "清空回收桶" }, "migrate": { "fromSnippetsLab": "從 SnippetsLab 導入", "fromV3": "從 massCode v3 導入" }, "export": { "toHtml": "導出為 HTML" }, "copy": { "snippetLink": "複製程式碼片段鏈接" } }, "sidebar": { "inbox": "收件箱", "favorites": "收藏", "allSnippets": "所有程式碼片段", "trash": "回收桶", "folders": "資料夾", "library": "庫", "tags": "標籤" }, "folder": { "untitled": "未命名資料夾", "plural": "資料夾", "collapseAll": "全部折疊", "expandAll": "全部展開" }, "snippet": { "untitled": "未命名程式碼片段", "plural": "程式碼片段", "emptyName": "輸入程式碼片段名稱", "selectedMultiple": "已選擇 {{count}} 個程式碼片段", "noSelected": "未選擇程式碼片段" }, "placeholder": { "emptyTagList": "在程式碼片段中添加標籤以在此處查看", "emptyFoldersList": "沒有資料夾", "emptySnippetsList": "沒有程式碼片段", "search": "搜索", "addTag": "添加標籤" } } ================================================ FILE: src/main/i18n/locales/zh_TW/devtools.json ================================================ { "label": "開發者工具", "generators": { "label": "生成器", "lorem": { "label": "Lorem Ipsum 生成器", "description": "生成占位符文字", "selectType": "選擇類型", "maxCount": "最大 {{count}}", "types": { "words": "單詞", "sentences": "句子", "paragraphs": "段落" } }, "json": { "label": "JSON 生成器", "description": "使用各種欄位類型產生隨機 JSON 資料", "fields": "欄位", "fieldName": "欄位名稱", "selectType": "選擇類型", "addField": "新增欄位", "rowCount": "列數", "maxRows": "最大 1000", "categories": { "general": "一般", "person": "人員", "internet": "網際網路", "location": "位置", "finance": "財務", "commerce": "商業", "company": "公司", "lorem": "Lorem", "date": "日期", "number": "數字", "phone": "電話", "image": "圖片" }, "types": { "rowNumber": "列號", "firstName": "名", "lastName": "姓", "fullName": "全名", "gender": "性別", "jobTitle": "職稱", "email": "電子郵件地址", "username": "使用者名稱", "password": "密碼", "url": "URL", "ipv4": "IP 地址 v4", "ipv6": "IP 地址 v6", "userAgent": "User Agent", "city": "城市", "country": "國家", "streetAddress": "街道地址", "zipCode": "郵遞區號", "latitude": "緯度", "longitude": "經度", "amount": "金額", "currencyCode": "貨幣代碼", "creditCardNumber": "信用卡號", "productName": "產品名稱", "price": "價格", "department": "部門", "companyName": "公司名稱", "catchPhrase": "標語", "word": "單字", "sentence": "句子", "paragraph": "段落", "past": "過去日期", "future": "未來日期", "recent": "最近日期", "birthdate": "出生日期", "int": "整數", "float": "浮點數", "boolean": "布林值", "phoneNumber": "電話號碼", "imei": "IMEI", "avatar": "頭像 URL", "imageUrl": "圖片 URL" } } }, "converters": { "label": "轉換器", "caseConverter": { "label": "大小寫轉換器", "description": "將文字轉換為不同的大小寫格式", "caseType": { "uppercase": "Uppercase", "lowercase": "Lowercase", "camelcase": "Camelcase", "capitalize": "Capitalize", "constantcase": "Constantcase", "snakecase": "Snakecase", "kebabcase": "Kebabcase", "pascalcase": "Pascalcase", "dotcase": "Dotcase", "pathcase": "Pathcase" } }, "textToUnicode": { "label": "文字轉Unicode", "description": "將文字轉換為Unicode,反之亦然", "modes": { "textToUnicode": "文字 → Unicode", "unicodeToText": "Unicode → 文字" } }, "textToAscii": { "label": "文字轉ASCII Binary", "description": "將文字轉換為ASCII binary,反之亦然", "modes": { "textToAscii": "文字 → ASCII", "asciiToText": "ASCII → 文字" } }, "base64": { "label": "Base64 Encoder / Decoder", "description": "將文字編碼或解碼為Base64", "modes": { "textToBase64": "文字 → Base64", "base64ToText": "Base64 → 文字" } }, "jsonToYaml": { "label": "JSON轉YAML", "description": "將JSON轉換為YAML,反之亦然", "modes": { "jsonToYaml": "JSON → YAML", "yamlToJson": "YAML → JSON" } }, "jsonToToml": { "label": "JSON轉TOML", "description": "將JSON轉換為TOML,反之亦然", "modes": { "jsonToToml": "JSON → TOML", "tomlToJson": "TOML → JSON" } }, "jsonToXml": { "label": "JSON轉XML", "description": "將JSON轉換為XML,反之亦然", "modes": { "jsonToXml": "JSON → XML", "xmlToJson": "XML → JSON" } }, "colorConverter": { "label": "顏色轉換器", "description": "在不同格式之間轉換顏色" } }, "crypto": { "label": "加密 / 安全", "hash": { "label": "雜湊產生器", "description": "從文字產生雜湊值" }, "hmac": { "label": "HMAC產生器", "description": "產生由金鑰和訊息組成的基於雜湊的訊息認證碼(HMAC)" }, "password": { "label": "密碼產生器", "description": "產生安全密碼" }, "uuid": { "label": "UUID產生器", "description": "產生通用唯一識別碼(UUID)" } }, "web": { "label": "網路", "urlParser": { "label": "URL解析器", "description": "將URL解析為其組件" }, "urlEncoder": { "label": "URL Encoder / Decoder", "description": "編碼或解碼URL", "modes": { "urlEncode": "URL Encode", "urlDecode": "URL Decode" } }, "slugify": { "label": "Slugify", "description": "將文字轉換為URL友好的slug" } }, "form": { "input": "輸入", "output": "輸出", "inputString": "輸入字串", "outputString": "輸出字串", "inputUrl": "輸入URL", "outputUrl": "輸出URL", "parsedUrl": "解析的URL", "splitQueryString": "分割Query String", "key": "金鑰", "value": "值", "component": "組件", "result": "結果", "secretKey": "秘密金鑰", "algorithm": "演算法", "version": "版本", "amount": "數量", "type": "類型", "length": "長度", "options": "選項", "numbers": "數字", "symbols": "符號", "lowercase": "小寫", "uppercase": "大寫", "placeholder": { "text": "輸入文字", "value": "輸入值", "secretKey": "輸入秘密金鑰", "url": "輸入URL" } } } ================================================ FILE: src/main/i18n/locales/zh_TW/menu.json ================================================ { "app": { "label": "massCode", "preferences": "偏好設定", "devtools": "開發者工具", "update": "檢查更新...", "quit": "退出 massCode", "about": "關於 massCode", "hide": "隱藏 massCode" }, "help": { "label": "幫助", "website": "網站", "documentation": "文檔", "viewInGitHub": "在 GitHub 上查看", "changeLog": "更新日誌", "reportIssue": "報告問題", "giveStar": "給個星星", "extension": { "vscode": "VS Code 擴展", "raycast": "Raycast 擴展", "alfred": "Alfred 擴展" }, "donate": { "openCollective": "在 Open Collective 上贊助", "payPal": "通過 PayPal 贊助", "gumroad": "通過 Gumroad 贊助(Visa、Mastercard 等)" }, "twitter": "X", "devTools": "切換開發者工具", "links": { "snippets": "程式碼片段集合" } }, "edit": { "label": "編輯", "find": "尋找" }, "view": { "label": "檢視", "sortBy": { "label": "程式碼片段排序方式", "dateModified": "修改日期", "dateCreated": "創建日期", "name": "名稱" }, "compactMode": "緊湊模式", "showSidebar": "顯示/隱藏側邊欄" }, "editor": { "label": "編輯器", "copy": "複製程式碼片段到剪貼板", "format": "格式化", "previewCode": "預覽程式碼", "previewScreenshot": "預覽截圖", "previewJson": "預覽 JSON", "fontSizeIncrease": "增大字體", "fontSizeDecrease": "減小字體", "fontSizeReset": "重置字體大小" }, "markdown": { "label": "Markdown", "presentationMode": "演示模式", "preview": "預覽", "previewMarkdown": "預覽 Markdown", "previewMindmap": "預覽思維導圖" }, "history": { "label": "歷史", "back": "後退", "forward": "前進" }, "devtools": { "label": "開發者工具" } } ================================================ FILE: src/main/i18n/locales/zh_TW/messages.json ================================================ { "confirm": { "delete": "您確定要刪除 \"{{name}}\" 嗎?", "deletePermanently": "您確定要永久刪除 \"{{name}}\" 嗎?", "deleteConfirmMultipleSnippets": "您確定要永久刪除已選擇的 {{count}} 個程式碼片段嗎?", "emptyTrash": "您確定要永久刪除回收桶中的所有程式碼片段嗎?", "clearDb": "您確定要清空資料庫嗎?", "migrateDb": [ "您確定要進行遷移嗎?", "在遷移過程中,當前的程式庫將被覆蓋。" ] }, "success": { "copied": "已複製", "backup": { "created": "備份已建立", "restored": "備份已還原" }, "migrate": "資料庫遷移成功。" }, "warning": { "noUndo": "此操作無法撤銷。", "allSnippetsMoveToTrash": "此資料夾中的所有程式碼片段將被移至回收桶。", "deleteTag": "這也將導致所有具有該標籤的程式碼片段移除標籤。", "createDb": "請選擇其他資料夾", "clearDb": "這將永久刪除資料庫中的所有程式碼片段、資料夾和標籤。", "htmlCssPreview": "添加HTML片段以查看結果。添加CSS進行樣式設計,添加JavaScript實現互動功能。", "codeBlockRenderer": [ "使用 Codemirror 時,代碼塊的語言設置必須對應於", "languages" ] }, "error": {}, "description": { "storage": "要使用 iCloud Drive、Google Drive 或 Dropbox 等同步服務,只需將儲存位置移至相應的同步資料夾", "migrate": { "fromV3": "要從 massCode v3 遷移,請選擇包含 JSON 文件的資料夾。", "fromSnippetsLab": "要從 SnippetsLab 遷移,請選擇 JSON 文件。", "snippetsLabLimitations": [ "一些限制。從 SnippetsLab 遷移時:", "所有資料夾將為第一層級,因為 JSON 文件(2.1 版以下)不支援巢狀資料夾。", "不支援的語言的程式碼片段將設置為預設的純文字。" ] } }, "special": { "supportMessage": "嗨,我是 Anton 👋

\n感謝使用 massCode。如果您覺得這個應用程式有用,請{{-tagStart}}贊助{{-tagEnd}}。這將激勵我繼續開發這個專案。", "unsponsored": "未贊助" }, "update": { "available": "版本 {{newVersion}} 現已可供下載。\n您的版本是 {{oldVersion}}。", "noAvailable": "目前沒有可用的更新。" } } ================================================ FILE: src/main/i18n/locales/zh_TW/preferences.json ================================================ { "label": "偏好設定", "storage": { "label": "儲存庫", "migrate": "遷移", "count": "數量", "clearDatabase": "清空資料庫" }, "editor": { "label": "編輯器", "fontSize": "字體大小", "fontFamily": "字體", "wrap": { "label": "換行", "wordWrap": "自動換行", "off": "關閉" }, "tabSize": "縮排大小", "showInvisibles": "顯示不可見字符", "highlightLine": "高亮當前行", "highlightGutter": "高亮行號", "matchBrackets": "括號匹配", "prettier": { "label": "Prettier", "trailingComma": { "label": "尾隨逗號", "none": "無", "all": "全部", "es5": "ES5" }, "semi": "分號", "singleQuote": "單引號" } }, "appearance": { "label": "外觀", "theme": { "label": "主題", "light": "淺色", "dark": "深色" } }, "language": { "label": "語言" }, "markdown": { "label": "Markdown", "codeRenderer": "代碼塊渲染器" }, "api": { "label": "API 連接埠", "port": { "label": "API 連接埠", "description": "API 伺服器的連接埠號碼(需要重新啟動應用程式)。有效範圍:1024-65535。" } } } ================================================ FILE: src/main/i18n/locales/zh_TW/ui.json ================================================ { "total": "總計", "line": "行", "column": "列", "fragment": "片段", "path": "路徑", "button": { "back": "返回", "cancel": "取消", "clear": "清除", "confirm": "確認", "copy": "複製", "fit": "適應", "generate": "生成", "ok": "確定", "revers": "反轉", "saveAs": "另存為", "sort": "排序", "update": ["前往 GitHub", "確定"], "zoomIn": "放大", "zoomOut": "縮小", "darkMode": "深色模式", "toggleDarkMode": "切換深色模式", "background": "背景", "goToDownload": "前往下載", "refreshPreview": "重新整理預覽", "laserPointer": "雷射指標", "fullscreen": "全螢幕", "prev": "上一個", "next": "下一個" }, "action": { "close": "關閉", "defaultLanguage": "預設語言", "duplicate": "複製", "rename": "重命名", "restore": "還原", "setCustomIcon": "設置圖標", "removeCustomIcon": "刪除圖標", "show": "顯示", "hide": "隱藏", "showSidebar": "顯示側邊欄", "hideSidebar": "隱藏側邊欄", "new": { "storage": "新建儲存庫", "folder": "新建資料夾", "snippet": "新建程式碼片段", "fragment": "新建片段" }, "add": { "description": "添加描述", "tag": "添加標籤", "toFavorites": "添加到收藏" }, "open": { "storage": "開啟儲存庫" }, "move": { "storage": "移動儲存庫", "toTrash": "移至回收桶" }, "remove": { "fromFavorites": "從收藏中移除" }, "reload": { "storage": "重新載入儲存庫" }, "delete": { "common": "刪除", "now": "立即刪除", "allData": "刪除所有數據", "trash": "清空回收桶" }, "migrate": { "fromSnippetsLab": "從 SnippetsLab", "fromV3": "從 massCode v3" }, "export": { "toHtml": "匯出為 HTML" }, "copy": { "snippetLink": "複製程式碼片段連結" } }, "sidebar": { "inbox": "收件匣", "favorites": "收藏", "allSnippets": "所有程式碼片段", "trash": "回收桶", "folders": "資料夾", "library": "程式庫", "tags": "標籤" }, "folder": { "untitled": "未命名資料夾", "plural": "資料夾", "collapseAll": "全部摺疊", "expandAll": "全部展開" }, "snippet": { "untitled": "未命名程式碼片段", "plural": "程式碼片段", "emptyName": "輸入程式碼片段名稱", "selectedMultiple": "已選擇 {{count}} 個程式碼片段", "noSelected": "未選擇程式碼片段" }, "placeholder": { "emptyTagList": "在程式碼片段中添加標籤以在此處查看", "emptyFoldersList": "沒有資料夾", "emptySnippetsList": "沒有程式碼片段", "search": "搜尋", "addTag": "添加標籤" } } ================================================ FILE: src/main/index.ts ================================================ /* eslint-disable node/prefer-global/process */ import { readFileSync } from 'node:fs' import path from 'node:path' import { app, BrowserWindow, ipcMain, Menu } from 'electron' import { version } from '../../package.json' import { initApi } from './api' import { startAutoBackup } from './db' import { migrateJsonToSqlite } from './db/migrate' import { registerIPC } from './ipc' import { startThemeWatcher, stopThemeWatcher } from './ipc/handlers/theme' import { mainMenu } from './menu/main' import { store } from './store' import { checkForUpdates } from './updates' import { log } from './utils' process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true' // Отключаем security warnings const isDev = process.env.NODE_ENV === 'development' const gotTheLock = app.requestSingleInstanceLock() let mainWindow: BrowserWindow let isQuitting = false // TODO: Удаление уведомления о функции в версии 5.0.0 const SQLITE_SUNSET_VERSION = '5.0.0' function shouldShowFeatureNotice(): boolean { const lastSeenVersion = store.app.get('lastSeenReleaseNoticeVersion') const lastSeenMajor = Number.parseInt( (lastSeenVersion || '').split('.')[0] || '0', 10, ) const currentMajor = Number.parseInt(version.split('.')[0] || '0', 10) if (lastSeenMajor >= currentMajor) { return false } return currentMajor === 4 } function showFeatureNotice() { if (!shouldShowFeatureNotice()) { return } mainWindow.webContents.send('system:feature-notice', { sqliteSunsetVersion: SQLITE_SUNSET_VERSION, }) store.app.set('lastSeenReleaseNoticeVersion', version) } if (process.defaultApp) { if (process.argv.length >= 2) { app.setAsDefaultProtocolClient('masscode', process.execPath, [ path.resolve(process.argv[1]), ]) } } else { app.setAsDefaultProtocolClient('masscode') } function createWindow() { const bounds = store.app.get('bounds') mainWindow = new BrowserWindow({ width: 1200, height: 800, ...bounds, titleBarStyle: process.platform === 'darwin' ? 'hidden' : 'default', webPreferences: { preload: path.join(__dirname, 'preload.js'), nodeIntegration: true, webSecurity: false, }, }) Menu.setApplicationMenu(mainMenu) if (isDev) { mainWindow.loadURL('http://localhost:5173') mainWindow.webContents.openDevTools() } else { mainWindow.loadFile( path.join(__dirname, '../../build/renderer/index.html'), ) } ipcMain.once('system:renderer-ready', () => { showFeatureNotice() }) mainWindow.on('close', (event) => { store.app.set('bounds', mainWindow.getBounds()) if (process.platform === 'darwin' && !isQuitting) { event.preventDefault() mainWindow.hide() return } mainWindow.destroy() }) } if (!gotTheLock) { app.quit() } else { app.whenReady().then(async () => { try { createWindow() } catch (error) { log('Error creating window', error) } try { registerIPC() } catch (error) { log('Error registering IPC', error) } try { startThemeWatcher() } catch (error) { log('Error starting theme watcher', error) } try { await initApi() } catch (error) { log('Error initializing API', error) } try { checkForUpdates() } catch (error) { log('Error checking for updates', error) } try { await startAutoBackup() } catch (error) { log('Error starting auto backup', error) } if (store.app.get('isAutoMigratedFromJson')) { return } try { const jsonDbPath = `${store.preferences.get('storagePath')}/db.json` const jsonData = readFileSync(jsonDbPath, 'utf8') migrateJsonToSqlite(JSON.parse(jsonData)) store.app.set('isAutoMigratedFromJson', true) } catch (err) { log('Error on auto migration JSON to SQLite', err) } }) app.on('activate', () => { mainWindow.show() }) app.on('before-quit', () => { isQuitting = true stopThemeWatcher() }) app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit() }) app.on('second-instance', (_, argv) => { if (mainWindow) { mainWindow.isMinimized() ? mainWindow.restore() : mainWindow.focus() } if (process.platform !== 'darwin') { const url = argv.find(i => i.startsWith('masscode://')) BrowserWindow.getFocusedWindow()?.webContents.send( 'system:deep-link', url, ) } }) app.on('open-url', (_, url) => { BrowserWindow.getFocusedWindow()?.webContents.send('system:deep-link', url) }) // Global error handlers process.on('uncaughtException', (err) => { BrowserWindow.getFocusedWindow()?.webContents.send('system:error', { source: 'main', message: err.message, stack: err.stack, }) }) process.on('unhandledRejection', (reason) => { const err = reason instanceof Error ? reason : new Error(String(reason)) BrowserWindow.getFocusedWindow()?.webContents.send('system:error', { source: 'main', message: err.message, stack: err.stack, }) }) } ================================================ FILE: src/main/ipc/handlers/db.ts ================================================ import type { Backup } from '../../db/types' import { ipcMain } from 'electron' import { readFileSync } from 'fs-extra' import { clearDB, createBackup, deleteBackup, getBackupList, moveBackupStorage, moveDB, reloadDB, restoreFromBackup, startAutoBackup, stopAutoBackup, } from '../../db' import { migrateJsonToSqlite } from '../../db/migrate' import { migrateMarkdownToSqliteStorage, migrateSqliteToMarkdownStorage, } from '../../storage/providers/markdown' import { store } from '../../store' import '../../types' function assertSqliteEngine(action: string): void { const engine = store.preferences.get('storage.engine') if (engine !== 'sqlite') { throw new Error(`${action} is available only in SQLite storage mode`) } } export function registerDBHandlers() { ipcMain.handle('db:relaod', (_, payload) => { return new Promise((resolve) => { assertSqliteEngine('Database reload') store.preferences.set('storagePath', payload) reloadDB() resolve() }) }) ipcMain.handle('db:move', async (_, payload) => { assertSqliteEngine('Database move') await moveDB(payload) }) ipcMain.handle('db:clear', () => { return new Promise((resolve) => { assertSqliteEngine('Database clear') clearDB() resolve() }) }) ipcMain.handle('db:migrate', async (_, payload) => { assertSqliteEngine('Migration from v3') const jsonData = readFileSync(payload, 'utf8') await migrateJsonToSqlite(JSON.parse(jsonData)) }) ipcMain.handle< undefined, { folders: number, snippets: number, tags: number } >('db:migrate-to-markdown', async () => { return migrateSqliteToMarkdownStorage() }) ipcMain.handle< undefined, { folders: number, snippets: number, tags: number } >('db:migrate-to-sqlite', async () => { return migrateMarkdownToSqliteStorage() }) ipcMain.handle('db:backup', async (_, payload) => { assertSqliteEngine('Backup') await createBackup(payload) }) ipcMain.handle('db:restore', async (_, payload) => { assertSqliteEngine('Backup restore') await restoreFromBackup(payload) }) ipcMain.handle('db:backup-list', async () => { assertSqliteEngine('Backup list') return await getBackupList() }) ipcMain.handle('db:delete-backup', async (_, payload) => { assertSqliteEngine('Backup delete') await deleteBackup(payload) }) ipcMain.handle('db:move-backup', async (_, payload) => { assertSqliteEngine('Backup move') await moveBackupStorage(payload) }) ipcMain.handle('db:start-auto-backup', async () => { assertSqliteEngine('Auto backup') await startAutoBackup() }) ipcMain.handle('db:stop-auto-backup', async () => { stopAutoBackup() }) } ================================================ FILE: src/main/ipc/handlers/dialog.ts ================================================ import type { DialogOptions } from '../../types/ipc' import { BrowserWindow, dialog, ipcMain } from 'electron' export function registerDialogHandlers() { ipcMain.handle('main-menu:open-dialog', (event, payload) => { return new Promise((resolve) => { const { properties, filters } = payload const dir = dialog.showOpenDialogSync(BrowserWindow.getFocusedWindow()!, { properties: properties || ['openDirectory', 'createDirectory'], filters: filters || [{ name: '*', extensions: ['.db'] }], }) if (dir) { resolve(dir[0]) } else { resolve('') } }) }) } ================================================ FILE: src/main/ipc/handlers/fs.ts ================================================ import { Buffer } from 'node:buffer' import { join, parse } from 'node:path' import { ipcMain } from 'electron' import { ensureDirSync, writeFileSync } from 'fs-extra' import { nanoid } from 'nanoid' import slash from 'slash' import { store } from '../../store' const ASSETS_DIR = 'assets' export function registerFsHandlers() { ipcMain.handle('fs:assets', (event, { buffer, fileName }) => { const storagePath = store.preferences.get('storagePath') return new Promise((resolve, reject) => { try { const assetsPath = join(storagePath, ASSETS_DIR) const { ext } = parse(fileName) const name = `${nanoid()}${ext}` const dest = join(assetsPath, name) ensureDirSync(assetsPath) writeFileSync(dest, Buffer.from(buffer)) resolve(slash(join(ASSETS_DIR, name))) } catch (error) { reject(error) } }) }) } ================================================ FILE: src/main/ipc/handlers/prettier.ts ================================================ import type { PrettierOptions } from '../../types/ipc' import { ipcMain } from 'electron' import prettier from 'prettier' import { store } from '../../store' export async function format(source: string, parser: string) { const editor = store.preferences.get('editor') return prettier.format(source, { parser, tabWidth: Number(editor.tabSize), trailingComma: editor.trailingComma, semi: editor.semi, singleQuote: editor.singleQuote, }) } export function registerPrettierHandlers() { ipcMain.handle('prettier:format', (event, payload) => { const { text, parser } = payload return format(text, parser) }) } ================================================ FILE: src/main/ipc/handlers/spaces.ts ================================================ import type { MathNotebookStore } from '../../store/types' import { ipcMain } from 'electron' import { ensureSpaceDirectory, getSpaceStatePath, } from '../../storage/providers/markdown/runtime/spaces' import { readSpaceState, writeSpaceState, } from '../../storage/providers/markdown/runtime/spaceState' import { store } from '../../store' function getVaultPath(): string | null { return store.preferences.get('storage.vaultPath') as string | null } function isMarkdownEngine(): boolean { return store.preferences.get('storage.engine') === 'markdown' } export function registerSpacesHandlers() { ipcMain.handle('spaces:math:read', () => { if (!isMarkdownEngine()) { return { sheets: store.mathNotebook.get('sheets') ?? [], activeSheetId: store.mathNotebook.get('activeSheetId') ?? null, } satisfies MathNotebookStore } const vaultPath = getVaultPath() if (!vaultPath) { return { sheets: [], activeSheetId: null, } satisfies MathNotebookStore } ensureSpaceDirectory(vaultPath, 'math') const statePath = getSpaceStatePath(vaultPath, 'math') const state = readSpaceState(statePath) if (state) { return { sheets: Array.isArray(state.sheets) ? state.sheets : [], activeSheetId: state.activeSheetId ?? null, } satisfies MathNotebookStore } // Migration: read from electron-store, write to vault const legacy: MathNotebookStore = { sheets: store.mathNotebook.get('sheets') ?? [], activeSheetId: store.mathNotebook.get('activeSheetId') ?? null, } if (legacy.sheets.length > 0) { writeSpaceState(statePath, legacy) } return legacy }) ipcMain.handle('spaces:math:write', (_, data: MathNotebookStore) => { if (!isMarkdownEngine()) { store.mathNotebook.set('sheets', data.sheets) store.mathNotebook.set('activeSheetId', data.activeSheetId) return } const vaultPath = getVaultPath() if (!vaultPath) { return } ensureSpaceDirectory(vaultPath, 'math') const statePath = getSpaceStatePath(vaultPath, 'math') writeSpaceState(statePath, data) }) } ================================================ FILE: src/main/ipc/handlers/system.ts ================================================ import { app, ipcMain, shell } from 'electron' import { getCurrencyRates } from '../../currencyRates' export function registerSystemHandlers() { ipcMain.handle('system:currency-rates', () => { return getCurrencyRates() }) ipcMain.handle('system:reload', () => { app.relaunch() app.quit() }) ipcMain.handle('system:open-external', (_, url: string) => { shell.openExternal(url) }) } ================================================ FILE: src/main/ipc/handlers/theme.ts ================================================ import type { ChokidarOptions, FSWatcher } from 'chokidar' import type { ThemeFile, ThemeListItem, ThemeType, } from '../../store/types/theme' import { homedir } from 'node:os' import path from 'node:path' import { BrowserWindow, ipcMain, shell } from 'electron' import { ensureDirSync, existsSync, readdirSync, readFileSync, writeFileSync, } from 'fs-extra' import { importEsm, log } from '../../utils' import '../../types' const THEMES_ROOT_DIR = path.join(homedir(), '.massCode') const THEMES_DIR = path.join(THEMES_ROOT_DIR, 'themes') const THEME_FILE_EXT = '.json' const THEME_CHANGED_DEBOUNCE_MS = 250 const THEME_TEMPLATE_BASE_NAME = 'new-theme' const THEME_TEMPLATE: ThemeFile = { name: 'New Theme (Rose Pine)', author: '', type: 'light', colors: { 'primary': 'hsl(277, 22%, 57%)', 'primary-foreground': 'hsl(0, 0%, 100%)', 'background': 'hsl(35, 67%, 96%)', 'foreground': 'hsl(245, 18%, 40%)', 'accent': 'hsl(34, 38%, 89%)', 'accent-hover': 'hsl(34, 42%, 92%)', 'accent-foreground': 'hsl(245, 18%, 40%)', 'muted': 'hsl(34, 52%, 91%)', 'muted-foreground': 'hsl(270, 10%, 53%)', 'card': 'hsl(35, 50%, 94%)', 'popover': 'hsl(35, 67%, 96%)', 'popover-foreground': 'hsl(245, 18%, 40%)', 'border': 'hsl(30, 24%, 88%)', 'scrollbar': 'hsla(270, 14%, 73%, 0.5)', }, editorColors: { 'editor-keyword': 'hsl(277, 22%, 57%)', 'editor-string': 'hsl(35, 78%, 56%)', 'editor-comment': 'hsl(270, 8%, 61%)', 'editor-number': 'hsl(2, 57%, 66%)', 'editor-atom': 'hsl(340, 37%, 53%)', 'editor-variable': 'hsl(245, 18%, 40%)', 'editor-def': 'hsl(198, 52%, 36%)', 'editor-property': 'hsl(187, 34%, 47%)', 'editor-tag': 'hsl(340, 37%, 53%)', 'editor-attribute': 'hsl(198, 52%, 36%)', 'editor-operator': 'hsl(277, 22%, 57%)', 'editor-bracket': 'hsl(245, 18%, 40%)', }, } const TOKEN_MIGRATION_MAP: Record = { 'color-primary': 'primary', 'color-bg': 'background', 'color-fg': 'foreground', 'color-text': 'foreground', 'color-text-muted': 'muted-foreground', 'color-border': 'border', 'color-button': 'muted', 'color-list-selection': 'accent', 'color-list-selection-fg': 'accent-foreground', 'color-scrollbar': 'scrollbar', } const DROPPED_TOKENS = new Set(['color-button-hover']) let themeWatcher: FSWatcher | null = null let themeWatcherTimer: NodeJS.Timeout | null = null let watchedThemesDir: string | null = null let watcherStartToken = 0 let chokidarWatchLoader: Promise | null = null const reportedThemeIssues = new Map() type ChokidarWatch = ( path: string | readonly string[], options?: ChokidarOptions, ) => FSWatcher async function getChokidarWatch(): Promise { if (chokidarWatchLoader) { return chokidarWatchLoader } chokidarWatchLoader = importEsm('chokidar') .then((module) => { const chokidarModule = module as { default?: { watch?: unknown } watch?: unknown } const watch = chokidarModule.default?.watch || chokidarModule.watch if (typeof watch !== 'function') { throw new TypeError('chokidar.watch is not available') } return watch as ChokidarWatch }) .catch((error) => { chokidarWatchLoader = null throw error }) return chokidarWatchLoader } function ensureThemesDir(): string { ensureDirSync(THEMES_DIR) return THEMES_DIR } function reportThemeIssue( fileName: string, reason: string, error?: unknown, ): void { const message = `${fileName}: ${reason}` if (reportedThemeIssues.get(fileName) === message) { return } reportedThemeIssues.set(fileName, message) if (error) { console.warn(`[theme] ${message}`, error) return } console.warn(`[theme] ${message}`) } function isThemeType(value: unknown): value is ThemeType { return value === 'light' || value === 'dark' } function isStringRecord(value: unknown): value is Record { if (!value || typeof value !== 'object' || Array.isArray(value)) { return false } return Object.values(value).every(v => typeof v === 'string') } function parseThemeFile(raw: unknown, fileName: string): ThemeFile | null { if (!raw || typeof raw !== 'object' || Array.isArray(raw)) { reportThemeIssue(fileName, 'Invalid JSON object') return null } const data = raw as { name?: unknown author?: unknown type?: unknown colors?: unknown editorColors?: unknown } if (typeof data.name !== 'string' || !data.name.trim()) { reportThemeIssue(fileName, 'Invalid name') return null } if (!isThemeType(data.type)) { reportThemeIssue(fileName, 'Invalid type') return null } if (data.author !== undefined && typeof data.author !== 'string') { reportThemeIssue(fileName, 'Invalid author') return null } if (data.colors !== undefined && !isStringRecord(data.colors)) { reportThemeIssue(fileName, 'Invalid colors') return null } if (data.editorColors !== undefined && !isStringRecord(data.editorColors)) { reportThemeIssue(fileName, 'Invalid editorColors') return null } reportedThemeIssues.delete(fileName) return { name: data.name.trim(), author: data.author, type: data.type, colors: data.colors, editorColors: data.editorColors, } } function normalizeThemeId(id: string): string | null { const normalized = id.trim() if (!normalized) { return null } if (normalized.includes('\0')) { return null } if (normalized.includes('/') || normalized.includes('\\')) { return null } if (normalized === '.' || normalized === '..') { return null } return normalized } function resolveThemeFilePath(id: string): string | null { const normalizedId = normalizeThemeId(id) if (!normalizedId) { return null } const themesDir = ensureThemesDir() const filePath = path.resolve(themesDir, `${normalizedId}${THEME_FILE_EXT}`) const relative = path.relative(themesDir, filePath) if (relative.startsWith('..') || path.isAbsolute(relative)) { return null } return filePath } function migrateThemeColors(colors: Record): { migrated: Record changed: boolean } { const result: Record = {} let changed = false for (const [key, value] of Object.entries(colors)) { if (DROPPED_TOKENS.has(key)) { changed = true continue } const newKey = TOKEN_MIGRATION_MAP[key] if (newKey) { result[newKey] = value changed = true } else { result[key] = value } } return { migrated: result, changed } } function readThemeFromFile( filePath: string, fileName: string, ): ThemeFile | null { try { const content = readFileSync(filePath, 'utf8') const parsed = JSON.parse(content) as unknown const theme = parseThemeFile(parsed, fileName) if (!theme) { return null } if (theme.colors) { const { migrated, changed } = migrateThemeColors(theme.colors) if (changed) { theme.colors = migrated try { const raw = parsed as Record raw.colors = migrated writeFileSync(filePath, `${JSON.stringify(raw, null, 2)}\n`, 'utf8') console.warn(`[theme] Migrated ${fileName} to new token format`) } catch (writeError) { console.warn( `[theme] Failed to write migrated theme ${fileName}`, writeError, ) } } } return theme } catch (error) { reportThemeIssue(fileName, 'Failed to read or parse JSON', error) return null } } function listThemes(): ThemeListItem[] { const themesDir = ensureThemesDir() const entries = readdirSync(themesDir, { withFileTypes: true }) const themes: ThemeListItem[] = [] entries.forEach((entry) => { if (!entry.isFile()) { return } if (path.extname(entry.name).toLowerCase() !== THEME_FILE_EXT) { return } const filePath = path.join(themesDir, entry.name) const theme = readThemeFromFile(filePath, entry.name) if (!theme) { return } const id = path.parse(entry.name).name themes.push({ id, name: theme.name, author: theme.author, type: theme.type, }) }) themes.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base', }), ) return themes } function getTheme(id: string): ThemeFile | null { const filePath = resolveThemeFilePath(id) if (!filePath || !existsSync(filePath)) { return null } return readThemeFromFile(filePath, path.basename(filePath)) } async function openThemesDir(): Promise { const themesDir = ensureThemesDir() const openError = await shell.openPath(themesDir) if (openError) { log('theme:open-dir', new Error(openError)) } } function resolveThemeTemplatePath(): string { const themesDir = ensureThemesDir() const maxAttempts = 1000 for (let index = 0; index < maxAttempts; index++) { const suffix = index === 0 ? '' : `-${index}` const fileName = `${THEME_TEMPLATE_BASE_NAME}${suffix}${THEME_FILE_EXT}` const filePath = path.join(themesDir, fileName) if (!existsSync(filePath)) { return filePath } } throw new Error( `Could not find available theme template name after ${maxAttempts} attempts`, ) } function createThemeTemplate(): string { const templatePath = resolveThemeTemplatePath() const templateContent = `${JSON.stringify(THEME_TEMPLATE, null, 2)}\n` writeFileSync(templatePath, templateContent, 'utf8') return templatePath } function scheduleThemeChanged(): void { if (themeWatcherTimer) { clearTimeout(themeWatcherTimer) themeWatcherTimer = null } themeWatcherTimer = setTimeout(() => { BrowserWindow.getAllWindows().forEach((window) => { window.webContents.send('theme:changed') }) }, THEME_CHANGED_DEBOUNCE_MS) } export function stopThemeWatcher(): void { watcherStartToken += 1 if (themeWatcherTimer) { clearTimeout(themeWatcherTimer) themeWatcherTimer = null } if (themeWatcher) { void themeWatcher.close() themeWatcher = null } watchedThemesDir = null } export function startThemeWatcher(): void { const themesDir = ensureThemesDir() if (themeWatcher && watchedThemesDir === themesDir) { return } stopThemeWatcher() const startToken = ++watcherStartToken void getChokidarWatch() .then((watch) => { if (startToken !== watcherStartToken) { return } const watcher = watch(themesDir, { awaitWriteFinish: { pollInterval: 100, stabilityThreshold: 200, }, ignoreInitial: true, persistent: true, }) watcher .on('add', scheduleThemeChanged) .on('change', scheduleThemeChanged) .on('unlink', scheduleThemeChanged) .on('addDir', scheduleThemeChanged) .on('unlinkDir', scheduleThemeChanged) .on('error', (error: unknown) => { log('theme:watcher-error', error) }) if (startToken !== watcherStartToken) { void watcher.close() return } themeWatcher = watcher watchedThemesDir = themesDir }) .catch((error) => { if (startToken === watcherStartToken) { watchedThemesDir = null } log('theme:watcher-start', error) }) } export function registerThemeHandlers() { ipcMain.handle('theme:list', async () => { startThemeWatcher() return listThemes() }) ipcMain.handle('theme:get', async (_, payload) => { startThemeWatcher() return getTheme(payload) }) ipcMain.handle('theme:open-dir', async () => { startThemeWatcher() await openThemesDir() }) ipcMain.handle('theme:create-template', async () => { startThemeWatcher() return createThemeTemplate() }) } ================================================ FILE: src/main/ipc/index.ts ================================================ import type { Channel } from '../types/ipc' import { BrowserWindow } from 'electron' import { registerDBHandlers } from './handlers/db' import { registerDialogHandlers } from './handlers/dialog' import { registerFsHandlers } from './handlers/fs' import { registerPrettierHandlers } from './handlers/prettier' import { registerSpacesHandlers } from './handlers/spaces' import { registerSystemHandlers } from './handlers/system' import { registerThemeHandlers } from './handlers/theme' export function send(channel: Channel, payload?: unknown) { BrowserWindow.getFocusedWindow()?.webContents.send(channel, payload) } export function registerIPC() { registerDialogHandlers() registerDBHandlers() registerSystemHandlers() registerPrettierHandlers() registerFsHandlers() registerThemeHandlers() registerSpacesHandlers() } ================================================ FILE: src/main/menu/main.ts ================================================ /* eslint-disable node/prefer-global/process */ import type { MenuConfig } from './utils' import os from 'node:os' import { app, BrowserWindow, dialog, type MenuItemConstructorOptions, shell, } from 'electron' import { repository } from '../../../package.json' import i18n from '../i18n' import { send } from '../ipc' import { fetchUpdates } from '../updates' import { createMenu, createPlatformMenuItems } from './utils' const year = new Date().getFullYear() const version = app.getVersion() const isDev = process.env.NODE_ENV === 'development' function aboutApp() { dialog.showMessageBox(BrowserWindow.getFocusedWindow()!, { title: 'massCode', message: 'massCode', type: 'info', detail: ` Version: ${version} Electron: ${process.versions.electron} Chrome: ${process.versions.chrome} Node.js: ${process.versions.node} V8: ${process.versions.v8} OS: ${os.type()} ${os.arch()} ${os.release()} ©2019-${year} Anton Reshetov `, }) } const appMenuItems: MenuConfig[] = [ { id: 'about', label: i18n.t('menu:app.about'), platforms: ['darwin'], click: () => aboutApp(), }, { id: 'update', label: i18n.t('menu:app.update'), click: async () => { const latestVersion = await fetchUpdates() if (latestVersion) { const buttonId = dialog.showMessageBoxSync( BrowserWindow.getFocusedWindow()!, { message: i18n.t('messages:update.available', { newVersion: latestVersion, oldVersion: version, }), buttons: [i18n.t('button.update.0'), i18n.t('button.update.1')], defaultId: 0, cancelId: 1, }, ) if (buttonId === 0) { shell.openExternal(`${repository}/releases`) } } else { dialog.showMessageBoxSync(BrowserWindow.getFocusedWindow()!, { message: i18n.t('messages:update.noAvailable'), }) } }, }, { type: 'separator', }, { id: 'preferences', label: i18n.t('menu:app.preferences'), accelerator: 'CommandOrControl+,', click: () => send('main-menu:goto-preferences'), }, { type: 'separator' as any, platforms: ['darwin'], }, { id: 'devtools', label: i18n.t('menu:app.devtools'), accelerator: 'CommandOrControl+.', click: () => send('main-menu:goto-devtools'), }, { id: 'math-notebook', label: i18n.t('menu:app.mathNotebook'), accelerator: 'CommandOrControl+Shift+.', click: () => send('main-menu:goto-math-notebook'), }, { type: 'separator' as any, }, { label: i18n.t('menu:app.hide'), platforms: ['darwin'], role: 'hide', }, { platforms: ['darwin'], role: 'hideOthers', }, { platforms: ['darwin'], role: 'unhide', }, { type: 'separator' as any, platforms: ['darwin'], }, { label: i18n.t('menu:app.quit'), platforms: ['darwin'], role: 'quit', }, ] const helpMenuItems: MenuConfig[] = [ { label: i18n.t('menu:app.about'), click: () => aboutApp(), }, { label: i18n.t('menu:help.website'), click: () => { shell.openExternal('https://masscode.io') }, }, { label: i18n.t('menu:help.documentation'), click: () => { shell.openExternal('https://masscode.io/documentation') }, }, { label: i18n.t('menu:help.twitter'), click: () => { shell.openExternal('https://twitter.com/anton_reshetov') }, }, { type: 'separator', }, { label: i18n.t('menu:help.viewInGitHub'), click: () => { shell.openExternal('https://github.com/massCodeIO/massCode') }, }, { label: i18n.t('menu:help.changeLog'), click: () => { shell.openExternal('https://github.com/massCodeIO/massCode/releases') }, }, { label: i18n.t('menu:help.reportIssue'), click: () => { shell.openExternal( 'https://github.com/massCodeIO/massCode/issues/new/choose', ) }, }, { label: i18n.t('menu:help.giveStar'), click: () => { shell.openExternal('https://github.com/massCodeIO/massCode/stargazers') }, }, { type: 'separator', }, { label: i18n.t('menu:help.extension.vscode'), click: () => { shell.openExternal( 'https://marketplace.visualstudio.com/items?itemName=AntonReshetov.masscode-assistant', ) }, }, // { // label: i18n.t('menu:help.extension.raycast'), // click: () => { // shell.openExternal('https://www.raycast.com/antonreshetov/masscode') // }, // }, { type: 'separator', }, { label: i18n.t('menu:help.links.snippets'), click: () => { shell.openExternal('https://masscode.io/snippets') }, }, { type: 'separator', }, { label: i18n.t('menu:help.donate.openCollective'), click: () => { shell.openExternal('https://opencollective.com/masscode') }, }, { label: i18n.t('menu:help.donate.gumroad'), click: () => { shell.openExternal('https://antonreshetov.gumroad.com/l/masscode') }, }, { label: i18n.t('menu:help.donate.payPal'), click: () => { shell.openExternal('https://www.paypal.com/paypalme/antongithub') }, }, { type: 'separator', }, { label: i18n.t('menu:help.devTools'), role: 'toggleDevTools', }, ] if (isDev) { helpMenuItems.push({ label: 'Reload', role: 'reload', }) } const fileMenuItems: MenuConfig[] = [ { label: i18n.t('action.new.snippet'), click: () => send('main-menu:new-snippet'), accelerator: 'CommandOrControl+N', }, { label: i18n.t('action.new.fragment'), click: () => send('main-menu:new-fragment'), accelerator: 'CommandOrControl+T', }, { label: i18n.t('action.add.description'), click: () => send('main-menu:add-description'), accelerator: 'CommandOrControl+Shift+T', }, { type: 'separator', }, { label: i18n.t('action.new.folder'), click: () => send('main-menu:new-folder'), accelerator: 'CommandOrControl+Shift+N', }, ] const editMenuItems: MenuConfig[] = [ { role: 'undo', }, { role: 'redo', }, { type: 'separator', }, { role: 'cut', }, { role: 'copy', }, { role: 'paste', }, { role: 'delete', }, { type: 'separator', }, { role: 'selectAll', }, { type: 'separator', }, { label: i18n.t('menu:edit.find'), accelerator: 'CommandOrControl+F', click: () => send('main-menu:find'), }, ] const editorMenuItems: MenuConfig[] = [ { label: i18n.t('menu:editor.copy'), click: () => send('main-menu:copy-snippet'), accelerator: 'CommandOrControl+Shift+C', }, { label: i18n.t('menu:editor.format'), accelerator: 'Shift+CommandOrControl+F', click: () => send('main-menu:format'), }, { label: i18n.t('menu:editor.previewCode'), click: () => send('main-menu:preview-code'), accelerator: 'Alt+CommandOrControl+P', }, { label: i18n.t('menu:editor.previewJson'), click: () => send('main-menu:preview-json'), accelerator: 'Alt+CommandOrControl+J', }, { type: 'separator', }, { label: i18n.t('menu:editor.fontSizeIncrease'), accelerator: 'CommandOrControl+=', click: () => send('main-menu:font-size-increase'), }, { label: i18n.t('menu:editor.fontSizeDecrease'), accelerator: 'CommandOrControl+-', click: () => send('main-menu:font-size-decrease'), }, { label: i18n.t('menu:editor.fontSizeReset'), accelerator: 'CommandOrControl+0', click: () => send('main-menu:font-size-reset'), }, ] const viewMenuItems: MenuConfig[] = [ { label: i18n.t('menu:view.showSidebar'), click: () => send('main-menu:toggle-sidebar'), accelerator: 'Alt+CommandOrControl+B', }, ] const markdownMenuItems: MenuConfig[] = [ { label: i18n.t('menu:markdown.preview'), click: () => send('main-menu:preview-markdown'), accelerator: 'CommandOrControl+Shift+M', }, { label: i18n.t('menu:markdown.previewMindmap'), click: () => send('main-menu:preview-mindmap'), accelerator: 'CommandOrControl+Shift+I', }, { type: 'separator', }, { label: i18n.t('menu:markdown.presentationMode'), click: () => send('main-menu:presentation-mode'), accelerator: 'CommandOrControl+Shift+P', }, ] const menuItems: MenuItemConstructorOptions[] = [ { label: i18n.t('menu:app.label'), submenu: createPlatformMenuItems(appMenuItems), }, { label: 'File', submenu: createPlatformMenuItems(fileMenuItems), }, { role: 'editMenu', submenu: createPlatformMenuItems(editMenuItems), }, { label: i18n.t('menu:view.label'), submenu: createPlatformMenuItems(viewMenuItems), }, { label: i18n.t('menu:editor.label'), submenu: createPlatformMenuItems(editorMenuItems), }, { label: i18n.t('menu:markdown.label'), submenu: createPlatformMenuItems(markdownMenuItems), }, { role: 'windowMenu', }, { label: i18n.t('menu:help.label'), submenu: createPlatformMenuItems(helpMenuItems), }, ] export const mainMenu = createMenu(menuItems) ================================================ FILE: src/main/menu/utils/index.ts ================================================ /* eslint-disable node/prefer-global/process */ import type { MenuItemConstructorOptions } from 'electron' import { Menu } from 'electron' export type Platform = 'darwin' | 'win32' export interface MenuConfig extends MenuItemConstructorOptions { platforms?: Platform[] } export function createPlatformMenuItems( items: MenuConfig[], currentPlatform: Platform = process.platform as Platform, ): MenuItemConstructorOptions[] { return items .filter( item => !item.platforms || item.platforms.includes(currentPlatform), ) .map((item) => { const { id, platforms, ...menuItem } = item return menuItem as MenuItemConstructorOptions }) } export function createMenu(template: MenuItemConstructorOptions[]) { const menu = Menu.buildFromTemplate(template) return menu } ================================================ FILE: src/main/preload.ts ================================================ import type { AppStore, MathNotebookStore, PreferencesStore, } from './store/types' import type { EventCallback } from './types' import type { Channel } from './types/ipc' import { contextBridge, ipcRenderer } from 'electron' import i18n from './i18n' import { store } from './store' contextBridge.exposeInMainWorld('electron', { ipc: { on: (channel: Channel, cb: EventCallback) => ipcRenderer.on(channel, cb), send: (channel: Channel, data: any, cb: EventCallback) => { ipcRenderer.send(channel, data) if (cb && typeof cb === 'function') { ipcRenderer.on(channel, cb) } }, invoke: (channel: Channel, data: any) => ipcRenderer.invoke(channel, data), removeListener: (channel: Channel, cb: EventCallback) => ipcRenderer.removeListener(channel, cb), removeListeners: (channel: Channel) => ipcRenderer.removeAllListeners(channel), }, db: { query: (sql: string, params: any[] = []) => ipcRenderer.invoke('db-query', { sql, params }), }, store: { app: { get: (name: keyof AppStore) => store.app.get(name), set: (name: T, value: AppStore[T]) => store.app.set(name, value), delete: (name: keyof AppStore) => store.app.delete(name), }, preferences: { get: (name: keyof PreferencesStore) => store.preferences.get(name), set: ( name: T, value: PreferencesStore[T], ) => store.preferences.set(name, value), delete: (name: keyof PreferencesStore) => store.preferences.delete(name), }, mathNotebook: { get: (name: keyof MathNotebookStore) => store.mathNotebook.get(name), set: ( name: T, value: MathNotebookStore[T], ) => store.mathNotebook.set(name, value), delete: (name: keyof MathNotebookStore) => store.mathNotebook.delete(name), }, }, i18n: { t: (key: string, options?: any) => i18n.t(key, options), }, }) ================================================ FILE: src/main/storage/contracts.ts ================================================ export interface TagRecord { id: number name: string } export interface FolderRecord { id: number name: string createdAt: number updatedAt: number icon: string | null parentId: number | null isOpen: number defaultLanguage: string orderIndex: number } export interface FolderTreeRecord extends FolderRecord { children: FolderTreeRecord[] } export interface FolderCreateInput { name: string parentId?: number | null } export interface FolderUpdateInput { name?: string icon?: string | null defaultLanguage?: string parentId?: number | null isOpen?: number orderIndex?: number } export interface FolderUpdateResult { invalidInput: boolean notFound: boolean } export interface FoldersStorage { createFolder: (input: FolderCreateInput) => { id: number } deleteFolder: (id: number) => { deleted: boolean } getFolders: () => FolderRecord[] getFoldersTree: () => FolderTreeRecord[] updateFolder: (id: number, input: FolderUpdateInput) => FolderUpdateResult } export interface SnippetTagRecord { id: number name: string } export interface SnippetFolderRecord { id: number name: string } export interface SnippetContentRecord { id: number label: string language: string value: string | null } export interface SnippetRecord { id: number name: string description: string | null tags: SnippetTagRecord[] folder: SnippetFolderRecord | null contents: SnippetContentRecord[] isFavorites: number isDeleted: number createdAt: number updatedAt: number } export interface SnippetsQueryInput { search?: string order?: 'ASC' | 'DESC' folderId?: number tagId?: number isFavorites?: number isDeleted?: number isInbox?: number } export interface SnippetCreateInput { name: string folderId?: number | null } export interface SnippetUpdateInput { name?: string folderId?: number | null description?: string | null isDeleted?: number isFavorites?: number } export interface SnippetContentCreateInput { label: string value: string | null language: string } export interface SnippetContentUpdateInput { label?: string value?: string | null language?: string } export interface SnippetUpdateResult { invalidInput: boolean notFound: boolean } export interface SnippetContentUpdateResult { invalidInput: boolean notFound: boolean parentNotFound: boolean } export interface SnippetTagRelationResult { notFound: false snippetFound: boolean tagFound: boolean } export interface SnippetTagDeleteRelationResult { notFound: false snippetFound: boolean tagFound: boolean relationFound: boolean } export interface SnippetsCount { total: number trash: number } export interface SnippetsStorage { addTagToSnippet: ( snippetId: number, tagId: number, ) => SnippetTagRelationResult createSnippet: (input: SnippetCreateInput) => { id: number } createSnippetContent: ( snippetId: number, input: SnippetContentCreateInput, ) => { id: number } deleteSnippet: (id: number) => { deleted: boolean } deleteSnippetContent: (contentId: number) => { deleted: boolean } deleteTagFromSnippet: ( snippetId: number, tagId: number, ) => SnippetTagDeleteRelationResult emptyTrash: () => { deletedCount: number } getSnippets: (query: SnippetsQueryInput) => SnippetRecord[] getSnippetsCounts: () => SnippetsCount updateSnippet: (id: number, input: SnippetUpdateInput) => SnippetUpdateResult updateSnippetContent: ( snippetId: number, contentId: number, input: SnippetContentUpdateInput, ) => SnippetContentUpdateResult } export interface TagsStorage { createTag: (name: string) => { id: number } deleteTag: (id: number) => { deleted: boolean } getTags: () => TagRecord[] } export interface StorageProvider { folders: FoldersStorage snippets: SnippetsStorage tags: TagsStorage } ================================================ FILE: src/main/storage/index.ts ================================================ import type { StorageProvider } from './contracts' import { store } from '../store' import { createMarkdownStorageProvider, startMarkdownWatcher, stopMarkdownWatcher, } from './providers/markdown' import { sqliteStorageProvider } from './providers/sqlite' const markdownStorageProvider = createMarkdownStorageProvider() let resolvedEngine: string | null = null let resolvedProvider: StorageProvider | null = null function resolveProvider(engine: string): StorageProvider { if (resolvedProvider && resolvedEngine === engine) { return resolvedProvider } if (engine === 'markdown') { startMarkdownWatcher() resolvedEngine = engine resolvedProvider = markdownStorageProvider return resolvedProvider } stopMarkdownWatcher() resolvedEngine = engine resolvedProvider = sqliteStorageProvider return resolvedProvider } export function useStorage(): StorageProvider { const engine = store.preferences.get('storage.engine') as string return resolveProvider(engine) } ================================================ FILE: src/main/storage/providers/markdown/index.ts ================================================ export { migrateMarkdownToSqliteStorage, migrateSqliteToMarkdownStorage, } from './migrations' export { getMarkdownStorageErrorMessage, resetRuntimeCache } from './runtime' export { createMarkdownStorageProvider } from './storages' export { startMarkdownWatcher, stopMarkdownWatcher } from './watcher' ================================================ FILE: src/main/storage/providers/markdown/migrations.ts ================================================ import type { FolderRecord } from '../../contracts' import path from 'node:path' import fs from 'fs-extra' import { clearDB, useDB } from '../../../db' import { assertNotReservedRootFolderName, buildFolderPathMap, buildSnippetTargetPath, createDefaultState, depthOfRelativePath, ensureStateFile, findFolderById, getPaths, getVaultPath, INVALID_NAME_CHARS_RE, loadSnippets, type MarkdownSnippet, type MarkdownState, type MarkdownTagState, META_DIR_NAME, type Paths, saveState, setRuntimeCache, type SqliteSnippetContentRow, type SqliteSnippetRow, type SqliteSnippetTagRow, syncCounters, syncFolderMetadataFiles, syncRuntimeWithDisk, throwStorageError, validateEntryName, WINDOWS_RESERVED_NAME_RE, writeSnippetToFile, } from './runtime' function clearVaultForMigration(paths: Paths): void { fs.ensureDirSync(paths.vaultPath) const entries = fs.readdirSync(paths.vaultPath) for (const entry of entries) { if (entry === META_DIR_NAME) { continue } fs.removeSync(path.join(paths.vaultPath, entry)) } fs.ensureDirSync(paths.inboxDirPath) fs.ensureDirSync(paths.trashDirPath) fs.emptyDirSync(paths.inboxDirPath) fs.emptyDirSync(paths.trashDirPath) } const RESERVED_ROOT_FOLDER_NAMES = new Set(['.masscode', 'inbox', 'trash']) function removeControlChars(value: string): string { return [...value].filter(char => char.charCodeAt(0) > 0x1F).join('') } function sanitizeEntryNameForMigration( name: string | null | undefined, kind: 'folder' | 'snippet', ): string { const fallback = kind === 'folder' ? 'Untitled folder' : 'Untitled snippet' let candidate = typeof name === 'string' ? name.trim() : '' candidate = removeControlChars(candidate) candidate = candidate.replace(INVALID_NAME_CHARS_RE, ' ') candidate = candidate.replace(/\s+/g, ' ').trim() candidate = candidate.replace(/[. ]+$/g, '').trim() if (!candidate || candidate === '.' || candidate === '..') { candidate = fallback } if (WINDOWS_RESERVED_NAME_RE.test(candidate)) { candidate = `${candidate} 1` } try { return validateEntryName(candidate, kind) } catch { return fallback } } function getUniqueFolderName( baseName: string, parentId: number | null, occupiedSiblingNames: Set, ): string { for (let suffix = 0; suffix <= 10_000; suffix += 1) { const candidate = suffix === 0 ? baseName : `${baseName} ${suffix}` const lowerCaseCandidate = candidate.toLowerCase() if ( parentId === null && RESERVED_ROOT_FOLDER_NAMES.has(lowerCaseCandidate) ) { continue } try { const validated = validateEntryName(candidate, 'folder') assertNotReservedRootFolderName(parentId, validated) const key = validated.toLowerCase() if (occupiedSiblingNames.has(key)) { continue } occupiedSiblingNames.add(key) return validated } catch { continue } } throwStorageError( 'NAME_CONFLICT', `Cannot generate unique folder name for "${baseName}"`, ) } function normalizeFoldersForMigration(folders: FolderRecord[]): FolderRecord[] { const knownFolderIds = new Set(folders.map(folder => folder.id)) const occupiedNamesByParent = new Map>() return folders.map((folder) => { const parentId = folder.parentId !== null && folder.parentId !== folder.id && knownFolderIds.has(folder.parentId) ? folder.parentId : null const parentKey = String(parentId ?? 'root') const occupiedSiblingNames = occupiedNamesByParent.get(parentKey) || new Set() const normalizedBaseName = sanitizeEntryNameForMigration( folder.name, 'folder', ) const normalizedName = getUniqueFolderName( normalizedBaseName, parentId, occupiedSiblingNames, ) occupiedNamesByParent.set(parentKey, occupiedSiblingNames) return { ...folder, name: normalizedName, parentId, } }) } function appendSnippetNameSuffix(name: string, suffix: number): string { if (!name.toLowerCase().endsWith('.md')) { return `${name} ${suffix}` } const nameWithoutExtension = name.slice(0, -3).trimEnd() || 'Untitled snippet' return `${nameWithoutExtension} ${suffix}.md` } function resolveUniqueSnippetPathForMigration( state: MarkdownState, snippet: MarkdownSnippet, occupiedSnippetPaths: Set, ): string { const normalizedBaseName = sanitizeEntryNameForMigration( snippet.name, 'snippet', ) for (let suffix = 0; suffix <= 10_000; suffix += 1) { const candidateName = suffix === 0 ? normalizedBaseName : appendSnippetNameSuffix(normalizedBaseName, suffix) try { snippet.name = validateEntryName(candidateName, 'snippet') } catch { continue } const candidatePath = buildSnippetTargetPath(state, snippet) const candidatePathKey = candidatePath.toLowerCase() if (occupiedSnippetPaths.has(candidatePathKey)) { continue } occupiedSnippetPaths.add(candidatePathKey) return candidatePath } throwStorageError( 'NAME_CONFLICT', `Cannot generate unique snippet name for "${snippet.name}"`, ) } export function migrateSqliteToMarkdownStorage(): { folders: number snippets: number tags: number } { const db = useDB() const paths = getPaths(getVaultPath()) ensureStateFile(paths) const folders = db .prepare( ` SELECT id, name, createdAt, updatedAt, icon, parentId, isOpen, defaultLanguage, orderIndex FROM folders `, ) .all() as FolderRecord[] const tags = db .prepare( ` SELECT id, name, createdAt, updatedAt FROM tags `, ) .all() as MarkdownTagState[] const snippets = db .prepare( ` SELECT id, name, description, folderId, isDeleted, isFavorites, createdAt, updatedAt FROM snippets `, ) .all() as SqliteSnippetRow[] const snippetContents = db .prepare( ` SELECT id, snippetId, label, value, language FROM snippet_contents ORDER BY id ASC `, ) .all() as SqliteSnippetContentRow[] const snippetTags = db .prepare( ` SELECT snippetId, tagId FROM snippet_tags `, ) .all() as SqliteSnippetTagRow[] const contentBySnippet = new Map() snippetContents.forEach((content) => { const collection = contentBySnippet.get(content.snippetId) || [] collection.push(content) contentBySnippet.set(content.snippetId, collection) }) const tagsBySnippet = new Map() snippetTags.forEach((relation) => { const collection = tagsBySnippet.get(relation.snippetId) || [] collection.push(relation.tagId) tagsBySnippet.set(relation.snippetId, collection) }) clearVaultForMigration(paths) const state = createDefaultState() state.folders = normalizeFoldersForMigration(folders) state.tags = tags const folderPathMap = buildFolderPathMap(state) const orderedFolderPaths = [...folderPathMap.values()].sort((a, b) => { const depthA = depthOfRelativePath(a) const depthB = depthOfRelativePath(b) if (depthA !== depthB) { return depthA - depthB } return a.localeCompare(b) }) orderedFolderPaths.forEach((folderPath) => { fs.ensureDirSync(path.join(paths.vaultPath, folderPath)) }) syncFolderMetadataFiles(paths, state) const occupiedSnippetPaths = new Set() snippets.forEach((snippet) => { const folderId = snippet.folderId !== null && findFolderById(state, snippet.folderId) ? snippet.folderId : null const markdownSnippet: MarkdownSnippet = { contents: (contentBySnippet.get(snippet.id) || []).map( (content, index) => ({ id: content.id, label: content.label || `Fragment ${index + 1}`, language: content.language || 'plain_text', value: content.value, }), ), createdAt: snippet.createdAt, description: snippet.description, filePath: '', folderId, id: snippet.id, isDeleted: snippet.isDeleted, isFavorites: snippet.isFavorites, name: sanitizeEntryNameForMigration(snippet.name, 'snippet'), tags: tagsBySnippet.get(snippet.id) || [], updatedAt: snippet.updatedAt, } const filePath = resolveUniqueSnippetPathForMigration( state, markdownSnippet, occupiedSnippetPaths, ) markdownSnippet.filePath = filePath writeSnippetToFile(paths, markdownSnippet) state.snippets.push({ filePath, id: snippet.id, }) }) const runtimeSnippets = loadSnippets(paths, state) syncCounters(state, runtimeSnippets) saveState(paths, state, { immediate: true }) setRuntimeCache(paths, state, runtimeSnippets) return { folders: state.folders.length, snippets: state.snippets.length, tags: state.tags.length, } } export function migrateMarkdownToSqliteStorage(): { folders: number snippets: number tags: number } { const paths = getPaths(getVaultPath()) const { state, snippets } = syncRuntimeWithDisk(paths) const db = useDB() clearDB() const folderIds = new Set(state.folders.map(folder => folder.id)) const tagIds = new Set(state.tags.map(tag => tag.id)) const maxFolderId = state.folders.reduce( (maxId, folder) => Math.max(maxId, folder.id), 0, ) const maxTagId = state.tags.reduce( (maxId, tag) => Math.max(maxId, tag.id), 0, ) const maxSnippetId = snippets.reduce( (maxId, snippet) => Math.max(maxId, snippet.id), 0, ) const maxContentId = snippets.reduce((maxId, snippet) => { const snippetMaxContentId = snippet.contents.reduce( (contentMaxId, content) => Math.max(contentMaxId, content.id), 0, ) return Math.max(maxId, snippetMaxContentId) }, 0) const insertFolder = db.prepare(` INSERT INTO folders ( id, name, defaultLanguage, parentId, isOpen, orderIndex, icon, createdAt, updatedAt ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) `) const insertTag = db.prepare(` INSERT INTO tags ( id, name, createdAt, updatedAt ) VALUES (?, ?, ?, ?) `) const insertSnippet = db.prepare(` INSERT INTO snippets ( id, name, description, folderId, isDeleted, isFavorites, createdAt, updatedAt ) VALUES (?, ?, ?, ?, ?, ?, ?, ?) `) const insertSnippetContent = db.prepare(` INSERT INTO snippet_contents ( id, snippetId, label, value, language ) VALUES (?, ?, ?, ?, ?) `) const insertSnippetTag = db.prepare(` INSERT INTO snippet_tags ( snippetId, tagId ) VALUES (?, ?) `) const insertSequence = db.prepare(` INSERT INTO sqlite_sequence (name, seq) VALUES (?, ?) `) const transaction = db.transaction(() => { state.folders.forEach((folder) => { insertFolder.run( folder.id, folder.name, folder.defaultLanguage || 'plain_text', folder.parentId, folder.isOpen, folder.orderIndex, folder.icon, folder.createdAt || Date.now(), folder.updatedAt || Date.now(), ) }) state.tags.forEach((tag) => { insertTag.run( tag.id, tag.name, tag.createdAt || Date.now(), tag.updatedAt || Date.now(), ) }) snippets.forEach((snippet) => { insertSnippet.run( snippet.id, snippet.name, snippet.description, snippet.folderId !== null && folderIds.has(snippet.folderId) ? snippet.folderId : null, snippet.isDeleted ? 1 : 0, snippet.isFavorites ? 1 : 0, snippet.createdAt, snippet.updatedAt, ) snippet.contents.forEach((content) => { insertSnippetContent.run( content.id, snippet.id, content.label, content.value, content.language, ) }) snippet.tags.forEach((tagId) => { if (tagIds.has(tagId)) { insertSnippetTag.run(snippet.id, tagId) } }) }) db.prepare( ` DELETE FROM sqlite_sequence WHERE name IN ('folders', 'tags', 'snippets', 'snippet_contents') `, ).run() if (maxFolderId > 0) { insertSequence.run('folders', maxFolderId) } if (maxTagId > 0) { insertSequence.run('tags', maxTagId) } if (maxSnippetId > 0) { insertSequence.run('snippets', maxSnippetId) } if (maxContentId > 0) { insertSequence.run('snippet_contents', maxContentId) } }) transaction() return { folders: state.folders.length, snippets: snippets.length, tags: state.tags.length, } } ================================================ FILE: src/main/storage/providers/markdown/runtime/constants.ts ================================================ import type { MarkdownRuntimeCache } from './types' export const META_DIR_NAME = '.masscode' export const STATE_FILE_NAME = 'state.json' export const INBOX_DIR_NAME = 'inbox' export const TRASH_DIR_NAME = 'trash' export const SPACES_DIR_NAME = '__spaces__' export const META_FILE_NAME = '.meta.yaml' export const SPACE_STATE_FILE_NAME = '.state.yaml' export const LEGACY_FOLDER_META_FILE_NAME = '.masscode-folder.yml' export const INBOX_RELATIVE_PATH = `${META_DIR_NAME}/${INBOX_DIR_NAME}` export const TRASH_RELATIVE_PATH = `${META_DIR_NAME}/${TRASH_DIR_NAME}` export const LEGACY_INBOX_RELATIVE_PATH = INBOX_DIR_NAME export const LEGACY_TRASH_RELATIVE_PATH = TRASH_DIR_NAME export const RESERVED_ROOT_NAMES = new Set([ INBOX_DIR_NAME, TRASH_DIR_NAME, SPACES_DIR_NAME, ]) export const NEW_LINE_SPLIT_RE = /\r?\n/ export const SEARCH_DIACRITICS_RE = /[\u0300-\u036F]/g export const SEARCH_WORD_RE = /[\p{L}\p{N}_]+/gu export const STATE_WRITE_DEBOUNCE_MS = 100 export const INVALID_NAME_CHARS_RE = /[<>:"/\\|?*]/g export const INVALID_NAME_CHARS = new Set([ '<', '>', ':', '"', '/', '\\', '|', '?', '*', ]) export const WINDOWS_RESERVED_NAME_RE = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i // Shared mutable state (singleton for Electron main process) // Using an object so mutations are visible across all importers export const runtimeRef: { cache: MarkdownRuntimeCache | null } = { cache: null, } export const pendingStateWriteByPath = new Map() export const stateContentCacheByPath = new Map() export const stateFlushTimerByPath = new Map() export function peekRuntimeCache(): MarkdownRuntimeCache | null { return runtimeRef.cache } ================================================ FILE: src/main/storage/providers/markdown/runtime/index.ts ================================================ // Constants export { INBOX_DIR_NAME, INVALID_NAME_CHARS_RE, LEGACY_FOLDER_META_FILE_NAME, META_DIR_NAME, META_FILE_NAME, peekRuntimeCache, SPACE_STATE_FILE_NAME, SPACES_DIR_NAME, TRASH_DIR_NAME, WINDOWS_RESERVED_NAME_RE, } from './constants' // Normalizers export { normalizeFlag, normalizeFolderOrderIndices } from './normalizers' // Parser export { readYamlObjectFile, writeFolderMetadataFile, writeYamlObjectFile, } from './parser' // Paths export { buildFolderPathMap, buildPathToFolderIdMap, depthOfRelativePath, findFolderById, getFolderPathById, getNextFolderOrder, getPaths, getVaultPath, normalizeDirectoryPath, } from './paths' // Search export { getSnippetIdsBySearchQuery } from './search' // Snippets export { buildSnippetTargetPath, createSnippetRecord, findSnippetByContentId, findSnippetById, getSnippetTargetDirectory, loadSnippets, persistSnippet, writeSnippetToFile, } from './snippets' // Spaces export { ensureSpaceDirectory, getSpaceDirPath, getSpaceStatePath, } from './spaces' // Space State export { readSpaceState, writeSpaceState, writeSpaceStateImmediate, } from './spaceState' // State export { createDefaultState, ensureStateFile, loadState, saveState, } from './state' // Sync & Cache export { getRuntimeCache, resetRuntimeCache, setRuntimeCache, syncCounters, syncFolderMetadataFiles, syncRuntimeWithDisk, syncSnippetFileWithDisk, syncStateWithDisk, } from './sync' // Types export type { DirectoryEntriesCache, MarkdownBodyFragment, MarkdownErrorCode, MarkdownFolderDiskEntry, MarkdownFolderMetadataFile, MarkdownFolderUIState, MarkdownFrontmatterContent, MarkdownRuntimeCache, MarkdownSnippet, MarkdownSnippetFrontmatter, MarkdownSnippetIndexItem, MarkdownState, MarkdownStateFile, MarkdownTagState, Paths, PersistSnippetOptions, SaveStateOptions, SqliteSnippetContentRow, SqliteSnippetRow, SqliteSnippetTagRow, } from './types' // Validation export { assertDirectoryNameAvailable, assertNotReservedRootFolderName, assertUniqueSiblingFolderName, getMarkdownStorageErrorMessage, resolveUniqueSiblingFolderName, throwStorageError, validateEntryName, } from './validation' ================================================ FILE: src/main/storage/providers/markdown/runtime/normalizers.ts ================================================ import type { FolderRecord } from '../../../contracts' import type { MarkdownFolderUIState } from './types' export function normalizeNumber(value: unknown, fallback = 0): number { const parsed = Number(value) return Number.isFinite(parsed) ? parsed : fallback } export function normalizeFlag(value: unknown, fallback = 0): number { return normalizeNumber(value, fallback) ? 1 : 0 } export function normalizePositiveInteger(value: unknown): number | null { const parsed = Number(value) if (!Number.isFinite(parsed)) { return null } const integer = Math.trunc(parsed) return integer > 0 ? integer : null } export function normalizeNullableNumber(value: unknown): number | null { if (value === null || value === undefined) { return null } const parsed = Number(value) return Number.isFinite(parsed) ? parsed : null } export function normalizeErrorMessage(error: unknown): string { if (error instanceof Error) { return error.message } return 'Unexpected storage error' } export function normalizeFolderUiState( value: unknown, ): Record { if (!value || typeof value !== 'object') { return {} } const normalized: Record = {} for (const [rawFolderId, rawUiState] of Object.entries(value)) { const folderId = normalizePositiveInteger(rawFolderId) if (!folderId) { continue } const isOpen = rawUiState && typeof rawUiState === 'object' ? normalizeFlag((rawUiState as { isOpen?: number }).isOpen) : 0 normalized[String(folderId)] = { isOpen } } return normalized } export function normalizeFolderOrderIndices(folders: FolderRecord[]): void { const childrenByParent = new Map() for (const folder of folders) { const siblings = childrenByParent.get(folder.parentId) if (siblings) { siblings.push(folder) } else { childrenByParent.set(folder.parentId, [folder]) } } for (const siblings of childrenByParent.values()) { siblings.sort((a, b) => { if (a.orderIndex !== b.orderIndex) { return a.orderIndex - b.orderIndex } return a.id - b.id }) for (let i = 0; i < siblings.length; i++) { siblings[i].orderIndex = i } } } ================================================ FILE: src/main/storage/providers/markdown/runtime/parser.ts ================================================ import type { FolderRecord } from '../../../contracts' import type { MarkdownBodyFragment, MarkdownFolderMetadataFile, MarkdownSnippet, MarkdownSnippetFrontmatter, Paths, } from './types' import path from 'node:path' import fs from 'fs-extra' import yaml from 'js-yaml' import { LEGACY_FOLDER_META_FILE_NAME, META_FILE_NAME, NEW_LINE_SPLIT_RE, } from './constants' export function readYamlObjectFile(filePath: string): T | null { if (!fs.pathExistsSync(filePath)) { return null } try { const source = fs.readFileSync(filePath, 'utf8') const parsed = yaml.load(source) if (!parsed || typeof parsed !== 'object') { return null } return parsed as T } catch { return null } } export function writeYamlObjectFile( filePath: string, data: Record, ): void { const body = yaml .dump(data, { lineWidth: -1, noRefs: true, sortKeys: false, }) .trim() fs.ensureDirSync(path.dirname(filePath)) fs.writeFileSync(filePath, `${body}\n`, 'utf8') } export function readFolderMetadata( paths: Paths, folderRelativePath: string, ): MarkdownFolderMetadataFile { const folderAbsPath = path.join(paths.vaultPath, folderRelativePath) const metaPath = path.join(folderAbsPath, META_FILE_NAME) const legacyPath = path.join(folderAbsPath, LEGACY_FOLDER_META_FILE_NAME) // Step 1: Try .meta.yaml const metaData = readYamlObjectFile(metaPath) if (metaData) { return metaData } // Step 2: Try legacy .masscode-folder.yml const legacyData = readYamlObjectFile(legacyPath) if (!legacyData) { return {} } // Step 3: Migrate legacy → .meta.yaml const migrated: MarkdownFolderMetadataFile = { ...legacyData } if (migrated.masscode_id !== undefined && migrated.masscode_id !== null) { migrated.id = migrated.masscode_id delete migrated.masscode_id } try { writeYamlObjectFile(metaPath, migrated as Record) fs.removeSync(legacyPath) } catch { // Migration failed — non-critical, we still have the data } return migrated } export function serializeFolderMetadata( folder: FolderRecord, ): Record { return { id: folder.id, createdAt: folder.createdAt, defaultLanguage: folder.defaultLanguage, icon: folder.icon, name: folder.name, orderIndex: folder.orderIndex, updatedAt: folder.updatedAt, } } export function writeFolderMetadataFile( paths: Paths, folderRelativePath: string, folder: FolderRecord, ): void { const folderAbsPath = path.join(paths.vaultPath, folderRelativePath) const metaPath = path.join(folderAbsPath, META_FILE_NAME) const payload = serializeFolderMetadata(folder) const body = yaml .dump(payload, { lineWidth: -1, noRefs: true, sortKeys: false, }) .trim() const nextContent = `${body}\n` if (fs.pathExistsSync(metaPath)) { const currentContent = fs.readFileSync(metaPath, 'utf8') if (currentContent === nextContent) { return } } fs.ensureDirSync(folderAbsPath) fs.writeFileSync(metaPath, nextContent, 'utf8') // Clean up legacy file if it exists const legacyPath = path.join(folderAbsPath, LEGACY_FOLDER_META_FILE_NAME) if (fs.pathExistsSync(legacyPath)) { try { fs.removeSync(legacyPath) } catch { // Non-critical } } } export function splitFrontmatter(source: string): { body: string frontmatter: MarkdownSnippetFrontmatter } { const match = source.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/) if (!match) { return { body: source, frontmatter: {} } } const parsed = yaml.load(match[1]) return { body: match[2] || '', frontmatter: parsed && typeof parsed === 'object' ? (parsed as MarkdownSnippetFrontmatter) : {}, } } export function parseBodyFragments(body: string): MarkdownBodyFragment[] { const fragments: MarkdownBodyFragment[] = [] const lines = body.split(NEW_LINE_SPLIT_RE) let lineIndex = 0 while (lineIndex < lines.length) { const line = lines[lineIndex] if (!line.startsWith('## Fragment:')) { lineIndex += 1 continue } const label = line.slice('## Fragment:'.length).trim() || 'Fragment' lineIndex += 1 if (lineIndex >= lines.length || !lines[lineIndex].startsWith('```')) { continue } const language = lines[lineIndex].slice(3).trim() || 'plain_text' lineIndex += 1 const valueLines: string[] = [] while (lineIndex < lines.length && !lines[lineIndex].startsWith('```')) { valueLines.push(lines[lineIndex]) lineIndex += 1 } if (lineIndex < lines.length && lines[lineIndex].startsWith('```')) { lineIndex += 1 } fragments.push({ label, language, value: valueLines.join('\n'), }) } if (fragments.length === 0 && body.trim()) { fragments.push({ label: 'Fragment 1', language: 'plain_text', value: body, }) } return fragments } export function serializeSnippet(snippet: MarkdownSnippet): string { const frontmatter: MarkdownSnippetFrontmatter = { contents: snippet.contents.map(content => ({ id: content.id, label: content.label, language: content.language, })), createdAt: snippet.createdAt, description: snippet.description, folderId: snippet.folderId, id: snippet.id, isDeleted: snippet.isDeleted, isFavorites: snippet.isFavorites, name: snippet.name, tags: snippet.tags, updatedAt: snippet.updatedAt, } const frontmatterText = yaml .dump(frontmatter, { lineWidth: -1, noRefs: true, sortKeys: false, }) .trim() const body = snippet.contents .map((content) => { const label = content.label.replace(/\r?\n/g, ' ').trim() || 'Fragment' const language = content.language.trim() || 'plain_text' const value = content.value || '' return `## Fragment: ${label}\n\`\`\`${language}\n${value}\n\`\`\`` }) .join('\n\n') if (!body) { return `---\n${frontmatterText}\n---\n` } return `---\n${frontmatterText}\n---\n\n${body}\n` } ================================================ FILE: src/main/storage/providers/markdown/runtime/paths.ts ================================================ import type { FolderRecord } from '../../../contracts' import type { MarkdownState, Paths } from './types' import path from 'node:path' import { store } from '../../../../store' import { INBOX_DIR_NAME, META_DIR_NAME, runtimeRef, TRASH_DIR_NAME, } from './constants' export function getVaultPath(): string { const configuredVaultPath = store.preferences.get('storage.vaultPath') as | string | null | undefined if (configuredVaultPath && configuredVaultPath.trim()) { return configuredVaultPath } const storagePath = store.preferences.get('storagePath') as string return path.join(storagePath, 'markdown-vault') } export function getPaths(vaultPath: string): Paths { const metaDirPath = path.join(vaultPath, META_DIR_NAME) return { inboxDirPath: path.join(metaDirPath, INBOX_DIR_NAME), metaDirPath, statePath: path.join(metaDirPath, 'state.json'), trashDirPath: path.join(metaDirPath, TRASH_DIR_NAME), vaultPath, } } export function toPosixPath(filePath: string): string { return filePath.replaceAll('\\', '/') } export function depthOfRelativePath(relativePath: string): number { if (!relativePath) { return 0 } return relativePath.split('/').length } export function normalizeDirectoryPath(relativePath: string): string { if (!relativePath || relativePath === '.') { return '' } return toPosixPath(relativePath) } export function buildFolderPathMap(state: MarkdownState): Map { const folderById = new Map() state.folders.forEach(folder => folderById.set(folder.id, folder)) const resolvedMap = new Map() const visiting = new Set() const resolveFolderPath = (folderId: number): string => { const existingPath = resolvedMap.get(folderId) if (existingPath !== undefined) { return existingPath } const folder = folderById.get(folderId) if (!folder) { return '' } if (visiting.has(folderId)) { return folder.name } visiting.add(folderId) const parentPath = folder.parentId !== null ? resolveFolderPath(folder.parentId) : '' const currentPath = parentPath ? path.posix.join(parentPath, folder.name) : folder.name resolvedMap.set(folderId, currentPath) visiting.delete(folderId) return currentPath } state.folders.forEach(folder => resolveFolderPath(folder.id)) return resolvedMap } export function buildPathToFolderIdMap( state: MarkdownState, ): Map { const folderPathMap = buildFolderPathMap(state) const pathMap = new Map() folderPathMap.forEach((folderPath, folderId) => { pathMap.set(folderPath, folderId) }) return pathMap } export function findFolderById( state: MarkdownState, folderId: number, ): FolderRecord | undefined { const cache = runtimeRef.cache const runtimeCache = cache?.state === state ? cache : null if (runtimeCache) { if (runtimeCache.folderById.size !== state.folders.length) { runtimeCache.folderById = new Map( state.folders.map(folder => [folder.id, folder]), ) } const folderFromIndex = runtimeCache.folderById.get(folderId) if (folderFromIndex) { return folderFromIndex } } const folder = state.folders.find(item => item.id === folderId) if (folder && runtimeCache) { runtimeCache.folderById.set(folderId, folder) } return folder } export function getFolderPathById( state: MarkdownState, folderId: number, ): string | null { const folderPathMap = buildFolderPathMap(state) return folderPathMap.get(folderId) || null } export function getFolderSiblings( state: MarkdownState, parentId: number | null, excludeId?: number, ): FolderRecord[] { return state.folders.filter((folder) => { if (folder.parentId !== parentId) { return false } if (excludeId !== undefined && folder.id === excludeId) { return false } return true }) } export function getNextFolderOrder( state: MarkdownState, parentId: number | null, ): number { return ( state.folders .filter(folder => folder.parentId === parentId) .reduce((maxOrder, folder) => Math.max(maxOrder, folder.orderIndex), -1) + 1 ) } ================================================ FILE: src/main/storage/providers/markdown/runtime/search.ts ================================================ import type { MarkdownSnippet } from './types' import { runtimeRef, SEARCH_DIACRITICS_RE, SEARCH_WORD_RE } from './constants' function normalizeSearchValue(value: string | null | undefined): string { if (!value) { return '' } return value .normalize('NFD') .replace(SEARCH_DIACRITICS_RE, '') .toLocaleLowerCase() } function splitSearchWords(value: string): string[] { return value.match(SEARCH_WORD_RE) || [] } function createWordTrigrams(value: string): string[] { if (value.length < 3) { return [] } const trigrams: string[] = [] for (let index = 0; index <= value.length - 3; index += 1) { trigrams.push(value.slice(index, index + 3)) } return trigrams } function buildSearchTokens(normalizedText: string): string[] { const uniqueTokens = new Set() const words = splitSearchWords(normalizedText) words.forEach((word) => { uniqueTokens.add(`w:${word}`) createWordTrigrams(word).forEach(trigram => uniqueTokens.add(`g:${trigram}`), ) }) return [...uniqueTokens] } function getSnippetSearchText(snippet: MarkdownSnippet): string { return normalizeSearchValue( [ snippet.name, snippet.description || '', ...snippet.contents.map(content => content.value || ''), ].join('\n'), ) } export function buildSearchIndex(snippets: MarkdownSnippet[]): { searchSnippetTextById: Map searchTokenToSnippetIds: Map> searchTokensBySnippetId: Map } { const searchSnippetTextById = new Map() const searchTokenToSnippetIds = new Map>() const searchTokensBySnippetId = new Map() snippets.forEach((snippet) => { const searchText = getSnippetSearchText(snippet) const tokens = buildSearchTokens(searchText) searchSnippetTextById.set(snippet.id, searchText) searchTokensBySnippetId.set(snippet.id, tokens) tokens.forEach((token) => { const tokenBucket = searchTokenToSnippetIds.get(token) || new Set() tokenBucket.add(snippet.id) searchTokenToSnippetIds.set(token, tokenBucket) }) }) return { searchSnippetTextById, searchTokenToSnippetIds, searchTokensBySnippetId, } } export function invalidateRuntimeSearchIndex(state: { version: number }): void { const cache = runtimeRef.cache if (!cache || cache.state !== state) { return } cache.searchIndexDirty = true cache.searchQueryCache.clear() } function ensureRuntimeSearchIndex( snippets: MarkdownSnippet[], ): typeof runtimeRef.cache { const cache = runtimeRef.cache const runtimeCache = cache?.snippets === snippets ? cache : null if (!runtimeCache) { return null } if (!runtimeCache.searchIndexDirty) { return runtimeCache } const { searchSnippetTextById, searchTokenToSnippetIds, searchTokensBySnippetId, } = buildSearchIndex(snippets) runtimeCache.searchSnippetTextById = searchSnippetTextById runtimeCache.searchTokenToSnippetIds = searchTokenToSnippetIds runtimeCache.searchTokensBySnippetId = searchTokensBySnippetId runtimeCache.searchQueryCache.clear() runtimeCache.searchIndexDirty = false return runtimeCache } function intersectSnippetIdSets( firstSet: Set, secondSet: Set, ): Set { const [smallSet, largeSet] = firstSet.size <= secondSet.size ? [firstSet, secondSet] : [secondSet, firstSet] const intersection = new Set() smallSet.forEach((id) => { if (largeSet.has(id)) { intersection.add(id) } }) return intersection } export function getSnippetIdsBySearchQuery( snippets: MarkdownSnippet[], searchQuery: string, ): Set { const normalizedSearchQuery = normalizeSearchValue(searchQuery).trim() if (!normalizedSearchQuery) { return new Set(snippets.map(snippet => snippet.id)) } const runtimeCache = ensureRuntimeSearchIndex(snippets) if (!runtimeCache) { return new Set( snippets .filter((snippet) => { const searchText = getSnippetSearchText(snippet) return searchText.includes(normalizedSearchQuery) }) .map(snippet => snippet.id), ) } const cachedResult = runtimeCache.searchQueryCache.get(normalizedSearchQuery) if (cachedResult) { return new Set(cachedResult) } const queryWords = splitSearchWords(normalizedSearchQuery) let candidateSnippetIds: Set | null = null if (queryWords.length > 0) { for (const word of queryWords) { const wordTrigrams = createWordTrigrams(word) let wordCandidates: Set | null = null for (const trigram of wordTrigrams) { const trigramSnippetIds = runtimeCache.searchTokenToSnippetIds.get( `g:${trigram}`, ) if (!trigramSnippetIds || trigramSnippetIds.size === 0) { wordCandidates = new Set() break } wordCandidates = wordCandidates === null ? new Set(trigramSnippetIds) : intersectSnippetIdSets(wordCandidates, trigramSnippetIds) if (wordCandidates.size === 0) { break } } if (wordCandidates === null) { const exactWordSnippetIds = runtimeCache.searchTokenToSnippetIds.get(`w:${word}`) || new Set() wordCandidates = exactWordSnippetIds } candidateSnippetIds = candidateSnippetIds === null ? wordCandidates : intersectSnippetIdSets(candidateSnippetIds, wordCandidates) if (candidateSnippetIds.size === 0) { runtimeCache.searchQueryCache.set(normalizedSearchQuery, []) return new Set() } } } const matchedSnippetIds: number[] = [] const snippetIdsToCheck = candidateSnippetIds || new Set(snippets.map(snippet => snippet.id)) snippetIdsToCheck.forEach((snippetId) => { const searchText = runtimeCache.searchSnippetTextById.get(snippetId) || '' if (searchText.includes(normalizedSearchQuery)) { matchedSnippetIds.push(snippetId) } }) runtimeCache.searchQueryCache.set(normalizedSearchQuery, matchedSnippetIds) return new Set(matchedSnippetIds) } ================================================ FILE: src/main/storage/providers/markdown/runtime/snippets.ts ================================================ import type { SnippetRecord } from '../../../contracts' import type { DirectoryEntriesCache, MarkdownSnippet, MarkdownSnippetIndexItem, MarkdownState, Paths, PersistSnippetOptions, } from './types' import path from 'node:path' import fs from 'fs-extra' import { INBOX_DIR_NAME, INBOX_RELATIVE_PATH, LEGACY_INBOX_RELATIVE_PATH, LEGACY_TRASH_RELATIVE_PATH, META_DIR_NAME, runtimeRef, SPACES_DIR_NAME, TRASH_DIR_NAME, TRASH_RELATIVE_PATH, } from './constants' import { normalizeNullableNumber, normalizeNumber } from './normalizers' import { parseBodyFragments, serializeSnippet, splitFrontmatter, } from './parser' import { buildPathToFolderIdMap, findFolderById, getFolderPathById, normalizeDirectoryPath, toPosixPath, } from './paths' import { throwStorageError, toSnippetFileName } from './validation' export function isInboxSnippetDirectory(directoryPath: string): boolean { return ( directoryPath === '' || directoryPath === INBOX_RELATIVE_PATH || directoryPath === LEGACY_INBOX_RELATIVE_PATH ) } export function isTrashSnippetDirectory(directoryPath: string): boolean { return ( directoryPath === TRASH_RELATIVE_PATH || directoryPath === LEGACY_TRASH_RELATIVE_PATH ) } export function listMarkdownFiles( rootPath: string, currentPath = rootPath, ): string[] { if (!fs.pathExistsSync(currentPath)) { return [] } const entries = fs.readdirSync(currentPath, { withFileTypes: true }) const files: string[] = [] entries.forEach((entry) => { const absolutePath = path.join(currentPath, entry.name) const isHiddenEntry = entry.name.startsWith('.') if (entry.isDirectory()) { if (currentPath === rootPath && entry.name === SPACES_DIR_NAME) { return } if (currentPath === rootPath && entry.name === META_DIR_NAME) { const inboxPath = path.join(absolutePath, INBOX_DIR_NAME) const trashPath = path.join(absolutePath, TRASH_DIR_NAME) files.push(...listMarkdownFiles(rootPath, inboxPath)) files.push(...listMarkdownFiles(rootPath, trashPath)) return } if (isHiddenEntry) { return } files.push(...listMarkdownFiles(rootPath, absolutePath)) return } if (entry.isFile() && !isHiddenEntry && entry.name.endsWith('.md')) { const relativePath = path.relative(rootPath, absolutePath) files.push(toPosixPath(relativePath)) } }) return files } export function readFrontmatterIdFromSnippetFile( snippetPath: string, ): number | null { if (!fs.pathExistsSync(snippetPath)) { return null } const source = fs.readFileSync(snippetPath, 'utf8') const { frontmatter } = splitFrontmatter(source) const id = normalizeNumber(frontmatter.id) return id > 0 ? id : null } export function readSnippetFromFile( paths: Paths, entry: MarkdownSnippetIndexItem, pathToFolderIdMap: ReadonlyMap, ): MarkdownSnippet | null { const snippetPath = path.join(paths.vaultPath, entry.filePath) if (!fs.pathExistsSync(snippetPath)) { return null } const source = fs.readFileSync(snippetPath, 'utf8') const { body, frontmatter } = splitFrontmatter(source) const fragments = parseBodyFragments(body) const metaContents = Array.isArray(frontmatter.contents) ? frontmatter.contents : [] const contents = fragments.length ? fragments.map((fragment, index) => { const meta = metaContents[index] const metaId = normalizeNumber(meta?.id) return { id: metaId > 0 ? metaId : index + 1, label: fragment.label, language: fragment.language, value: fragment.value, } }) : metaContents.map((meta, index) => { const metaId = normalizeNumber(meta.id) return { id: metaId > 0 ? metaId : index + 1, label: meta.label || `Fragment ${index + 1}`, language: meta.language || 'plain_text', value: '', } }) const normalizedFileDirectory = normalizeDirectoryPath( path.posix.dirname(entry.filePath), ) let folderId = normalizeNullableNumber(frontmatter.folderId) if (isInboxSnippetDirectory(normalizedFileDirectory)) { folderId = null } else if (!isTrashSnippetDirectory(normalizedFileDirectory)) { folderId = pathToFolderIdMap.get(normalizedFileDirectory) || null } const tags = Array.isArray(frontmatter.tags) ? frontmatter.tags .map(tagId => normalizeNumber(tagId)) .filter(tagId => tagId > 0) : [] const inferredName = path.posix.basename(entry.filePath, '.md') return { contents, createdAt: normalizeNumber(frontmatter.createdAt, Date.now()), description: typeof frontmatter.description === 'string' || frontmatter.description === null ? frontmatter.description : null, filePath: entry.filePath, folderId, id: entry.id, isDeleted: isTrashSnippetDirectory(normalizedFileDirectory) ? 1 : normalizeNumber(frontmatter.isDeleted), isFavorites: normalizeNumber(frontmatter.isFavorites), name: typeof frontmatter.name === 'string' ? frontmatter.name : inferredName, tags, updatedAt: normalizeNumber(frontmatter.updatedAt, Date.now()), } } export function loadSnippets( paths: Paths, state: MarkdownState, ): MarkdownSnippet[] { const pathToFolderIdMap = buildPathToFolderIdMap(state) return state.snippets .map(item => readSnippetFromFile(paths, item, pathToFolderIdMap)) .filter((snippet): snippet is MarkdownSnippet => !!snippet) } export function writeSnippetToFile( paths: Paths, snippet: MarkdownSnippet, ): void { const snippetPath = path.join(paths.vaultPath, snippet.filePath) const nextContent = serializeSnippet(snippet) fs.ensureDirSync(path.dirname(snippetPath)) if (fs.pathExistsSync(snippetPath)) { const currentContent = fs.readFileSync(snippetPath, 'utf8') if (currentContent === nextContent) { return } } fs.writeFileSync(snippetPath, nextContent, 'utf8') } function upsertSnippetIndex( state: MarkdownState, snippet: MarkdownSnippet, ): void { const index = state.snippets.findIndex(item => item.id === snippet.id) if (index === -1) { state.snippets.push({ filePath: snippet.filePath, id: snippet.id, }) return } state.snippets[index].filePath = snippet.filePath } export function getSnippetTargetDirectory( state: MarkdownState, snippet: Pick, ): string { if (snippet.isDeleted === 1) { return TRASH_RELATIVE_PATH } if (snippet.folderId === null) { return INBOX_RELATIVE_PATH } const folderPath = getFolderPathById(state, snippet.folderId) return folderPath || INBOX_RELATIVE_PATH } export function buildSnippetTargetPath( state: MarkdownState, snippet: MarkdownSnippet, ): string { const directory = getSnippetTargetDirectory(state, snippet) const fileName = toSnippetFileName(snippet.name) return directory ? path.posix.join(directory, fileName) : fileName } function getCachedDirectoryEntries( directoryPath: string, directoryEntriesCache?: DirectoryEntriesCache, ): string[] { if (!directoryEntriesCache) { return fs.readdirSync(directoryPath) } const cachedEntries = directoryEntriesCache.get(directoryPath) if (cachedEntries) { return cachedEntries } const entries = fs.readdirSync(directoryPath) directoryEntriesCache.set(directoryPath, [...entries]) return entries } function removeDirectoryEntryFromCache( directoryPath: string, fileName: string, directoryEntriesCache?: DirectoryEntriesCache, ): void { if (!directoryEntriesCache) { return } const entries = directoryEntriesCache.get(directoryPath) if (!entries) { return } const normalizedFileName = fileName.toLowerCase() const nextEntries = entries.filter( entry => entry.toLowerCase() !== normalizedFileName, ) directoryEntriesCache.set(directoryPath, nextEntries) } function upsertDirectoryEntryInCache( directoryPath: string, fileName: string, directoryEntriesCache?: DirectoryEntriesCache, ): void { if (!directoryEntriesCache) { return } const entries = directoryEntriesCache.get(directoryPath) || fs.readdirSync(directoryPath) const normalizedFileName = fileName.toLowerCase() const nextEntries = entries.filter( entry => entry.toLowerCase() !== normalizedFileName, ) nextEntries.push(fileName) directoryEntriesCache.set(directoryPath, nextEntries) } function assertSnippetPathAvailable( paths: Paths, targetRelativePath: string, excludeRelativePath?: string, directoryEntriesCache?: DirectoryEntriesCache, ): void { const targetAbsolutePath = path.join(paths.vaultPath, targetRelativePath) const targetDirectory = path.dirname(targetAbsolutePath) const targetFileName = path.basename(targetAbsolutePath) const excludeAbsolutePath = excludeRelativePath ? path.join(paths.vaultPath, excludeRelativePath) : null fs.ensureDirSync(targetDirectory) const entries = getCachedDirectoryEntries( targetDirectory, directoryEntriesCache, ) for (const entry of entries) { const entryAbsolutePath = path.join(targetDirectory, entry) if (excludeAbsolutePath && entryAbsolutePath === excludeAbsolutePath) { continue } if (entry.toLowerCase() === targetFileName.toLowerCase()) { throwStorageError( 'NAME_CONFLICT', 'Snippet with this name already exists on this level', ) } } } function getUniqueSnippetPath( paths: Paths, targetRelativePath: string, excludeRelativePath?: string, directoryEntriesCache?: DirectoryEntriesCache, ): string { const targetAbsolutePath = path.join(paths.vaultPath, targetRelativePath) const targetDirectory = path.dirname(targetAbsolutePath) const targetFileName = path.basename(targetAbsolutePath) const excludeAbsolutePath = excludeRelativePath ? path.join(paths.vaultPath, excludeRelativePath) : null fs.ensureDirSync(targetDirectory) const entries = getCachedDirectoryEntries( targetDirectory, directoryEntriesCache, ) const hasCaseInsensitiveConflict = (candidateFileName: string): boolean => { return entries.some((entry) => { const entryAbsolutePath = path.join(targetDirectory, entry) if (excludeAbsolutePath && entryAbsolutePath === excludeAbsolutePath) { return false } return entry.toLowerCase() === candidateFileName.toLowerCase() }) } if (!hasCaseInsensitiveConflict(targetFileName)) { return targetRelativePath } const extension = path.extname(targetFileName) const baseName = extension ? targetFileName.slice(0, -extension.length) : targetFileName const parentDirectory = normalizeDirectoryPath( path.posix.dirname(targetRelativePath), ) for (let suffix = 1; suffix <= 10_000; suffix += 1) { const candidateFileName = `${baseName} ${suffix}${extension}` if (!hasCaseInsensitiveConflict(candidateFileName)) { return parentDirectory ? path.posix.join(parentDirectory, candidateFileName) : candidateFileName } } throwStorageError( 'NAME_CONFLICT', 'Cannot generate unique snippet name in this directory', ) } export function persistSnippet( paths: Paths, state: MarkdownState, snippet: MarkdownSnippet, previousFilePath?: string, options?: PersistSnippetOptions, ): void { let targetPath = buildSnippetTargetPath(state, snippet) const sourcePath = previousFilePath ?? snippet.filePath const directoryEntriesCache = options?.directoryEntriesCache if (options?.allowRenameOnConflict) { targetPath = getUniqueSnippetPath( paths, targetPath, sourcePath, directoryEntriesCache, ) snippet.name = path.posix.basename(targetPath, '.md') } else { assertSnippetPathAvailable( paths, targetPath, sourcePath, directoryEntriesCache, ) } const sourceAbsolutePath = sourcePath ? path.join(paths.vaultPath, sourcePath) : null const targetAbsolutePath = path.join(paths.vaultPath, targetPath) if ( sourceAbsolutePath && sourcePath && sourcePath !== targetPath && fs.pathExistsSync(sourceAbsolutePath) ) { fs.ensureDirSync(path.dirname(targetAbsolutePath)) fs.moveSync(sourceAbsolutePath, targetAbsolutePath, { overwrite: false }) removeDirectoryEntryFromCache( path.dirname(sourceAbsolutePath), path.basename(sourceAbsolutePath), directoryEntriesCache, ) } snippet.filePath = targetPath writeSnippetToFile(paths, snippet) upsertDirectoryEntryInCache( path.dirname(targetAbsolutePath), path.basename(targetAbsolutePath), directoryEntriesCache, ) upsertSnippetIndex(state, snippet) } export function createSnippetRecord( snippet: MarkdownSnippet, state: MarkdownState, ): SnippetRecord { const folder = snippet.folderId !== null ? findFolderById(state, snippet.folderId) : undefined const tags = snippet.tags .map((tagId) => { const tag = state.tags.find(item => item.id === tagId) if (!tag) { return null } return { id: tag.id, name: tag.name, } }) .filter((tag): tag is { id: number, name: string } => !!tag) return { contents: snippet.contents, createdAt: snippet.createdAt, description: snippet.description, folder: folder ? { id: folder.id, name: folder.name, } : null, id: snippet.id, isDeleted: snippet.isDeleted, isFavorites: snippet.isFavorites, name: snippet.name, tags, updatedAt: snippet.updatedAt, } } export function findSnippetById( snippets: MarkdownSnippet[], id: number, ): MarkdownSnippet | undefined { const cache = runtimeRef.cache const runtimeCache = cache?.snippets === snippets ? cache : null if (runtimeCache) { if (runtimeCache.snippetById.size !== snippets.length) { runtimeCache.snippetById = new Map( snippets.map(snippet => [snippet.id, snippet]), ) } const snippetFromIndex = runtimeCache.snippetById.get(id) if (snippetFromIndex) { return snippetFromIndex } } const snippet = snippets.find(item => item.id === id) if (snippet && runtimeCache) { runtimeCache.snippetById.set(id, snippet) } return snippet } export function findSnippetByContentId( snippets: MarkdownSnippet[], contentId: number, ): { contentIndex: number snippet: MarkdownSnippet } | null { const cache = runtimeRef.cache const runtimeCache = cache?.snippets === snippets ? cache : null if (runtimeCache) { const indexedOwner = runtimeCache.contentOwnerByContentId.get(contentId) if ( indexedOwner && indexedOwner.snippet.contents[indexedOwner.contentIndex]?.id === contentId ) { return indexedOwner } } for (const snippet of snippets) { const contentIndex = snippet.contents.findIndex( content => content.id === contentId, ) if (contentIndex !== -1) { const ownedContent = { contentIndex, snippet, } if (runtimeCache) { runtimeCache.contentOwnerByContentId.set(contentId, ownedContent) } return ownedContent } } if (runtimeCache) { runtimeCache.contentOwnerByContentId.delete(contentId) } return null } export function getStateSnippetIndexByFilePath( state: MarkdownState, filePath: string, ): number { const normalizedFilePath = filePath.toLowerCase() return state.snippets.findIndex( item => item.filePath.toLowerCase() === normalizedFilePath, ) } ================================================ FILE: src/main/storage/providers/markdown/runtime/spaceState.ts ================================================ import path from 'node:path' import fs from 'fs-extra' import yaml from 'js-yaml' import { pendingStateWriteByPath, STATE_WRITE_DEBOUNCE_MS, stateContentCacheByPath, stateFlushTimerByPath, } from './constants' export function readSpaceState(statePath: string): T | null { const pending = pendingStateWriteByPath.get(statePath) if (pending !== undefined) { try { const parsed = yaml.load(pending) return parsed && typeof parsed === 'object' ? (parsed as T) : null } catch { return null } } const cached = stateContentCacheByPath.get(statePath) if (cached !== undefined) { try { const parsed = yaml.load(cached) return parsed && typeof parsed === 'object' ? (parsed as T) : null } catch { return null } } if (!fs.pathExistsSync(statePath)) { return null } try { const content = fs.readFileSync(statePath, 'utf8') stateContentCacheByPath.set(statePath, content) const parsed = yaml.load(content) return parsed && typeof parsed === 'object' ? (parsed as T) : null } catch { return null } } function serializeToYaml(data: unknown): string { return yaml.dump(data, { lineWidth: -1, noRefs: true, sortKeys: false, }) } function flushSpaceStateWrite(statePath: string): void { const pendingContent = pendingStateWriteByPath.get(statePath) if (pendingContent === undefined) { return } const flushTimer = stateFlushTimerByPath.get(statePath) if (flushTimer) { clearTimeout(flushTimer) stateFlushTimerByPath.delete(statePath) } const cached = stateContentCacheByPath.get(statePath) if (cached !== pendingContent) { fs.ensureDirSync(path.dirname(statePath)) fs.writeFileSync(statePath, pendingContent, 'utf8') } stateContentCacheByPath.set(statePath, pendingContent) pendingStateWriteByPath.delete(statePath) } function scheduleSpaceStateFlush(statePath: string): void { const existing = stateFlushTimerByPath.get(statePath) if (existing) { clearTimeout(existing) } const timer = setTimeout( () => flushSpaceStateWrite(statePath), STATE_WRITE_DEBOUNCE_MS, ) stateFlushTimerByPath.set(statePath, timer) } export function writeSpaceState(statePath: string, data: unknown): void { const content = serializeToYaml(data) pendingStateWriteByPath.set(statePath, content) scheduleSpaceStateFlush(statePath) } export function writeSpaceStateImmediate( statePath: string, data: unknown, ): void { const content = serializeToYaml(data) pendingStateWriteByPath.set(statePath, content) flushSpaceStateWrite(statePath) } ================================================ FILE: src/main/storage/providers/markdown/runtime/spaces.ts ================================================ import path from 'node:path' import fs from 'fs-extra' import { SPACE_STATE_FILE_NAME, SPACES_DIR_NAME } from './constants' export function getSpaceDirPath(vaultPath: string, spaceId: string): string { return path.join(vaultPath, SPACES_DIR_NAME, spaceId) } export function ensureSpaceDirectory( vaultPath: string, spaceId: string, ): string { const dirPath = getSpaceDirPath(vaultPath, spaceId) fs.ensureDirSync(dirPath) return dirPath } export function getSpaceStatePath(vaultPath: string, spaceId: string): string { return path.join(getSpaceDirPath(vaultPath, spaceId), SPACE_STATE_FILE_NAME) } ================================================ FILE: src/main/storage/providers/markdown/runtime/state.ts ================================================ import type { MarkdownFolderUIState, MarkdownState, MarkdownStateFile, Paths, SaveStateOptions, } from './types' import path from 'node:path' import process from 'node:process' import fs from 'fs-extra' import { pendingStateWriteByPath, STATE_WRITE_DEBOUNCE_MS, stateContentCacheByPath, stateFlushTimerByPath, } from './constants' import { normalizeFlag, normalizeFolderUiState } from './normalizers' import { invalidateRuntimeSearchIndex } from './search' let stateWriteHooksRegistered = false export function createDefaultState(): MarkdownState { return { counters: { contentId: 0, folderId: 0, snippetId: 0, tagId: 0, }, folderUi: {}, folders: [], snippets: [], tags: [], version: 2, } } export function syncFolderUiWithFolders(state: MarkdownState): void { const nextFolderUi: Record = {} state.folders.forEach((folder) => { const isOpen = normalizeFlag(folder.isOpen) folder.isOpen = isOpen nextFolderUi[String(folder.id)] = { isOpen } }) state.folderUi = nextFolderUi } function getPersistedStateContent(statePath: string): string { const cachedStateContent = stateContentCacheByPath.get(statePath) if (cachedStateContent !== undefined) { return cachedStateContent } const persistedStateContent = fs.pathExistsSync(statePath) ? fs.readFileSync(statePath, 'utf8') : '' stateContentCacheByPath.set(statePath, persistedStateContent) return persistedStateContent } function flushPendingStateWriteByPath(statePath: string): void { const pendingStateContent = pendingStateWriteByPath.get(statePath) if (pendingStateContent === undefined) { return } const flushTimer = stateFlushTimerByPath.get(statePath) if (flushTimer) { clearTimeout(flushTimer) stateFlushTimerByPath.delete(statePath) } const persistedStateContent = getPersistedStateContent(statePath) if (persistedStateContent !== pendingStateContent) { fs.ensureDirSync(path.dirname(statePath)) fs.writeFileSync(statePath, pendingStateContent, 'utf8') } stateContentCacheByPath.set(statePath, pendingStateContent) pendingStateWriteByPath.delete(statePath) } function scheduleStateFlush(statePath: string): void { const flushTimer = stateFlushTimerByPath.get(statePath) if (flushTimer) { clearTimeout(flushTimer) } const nextFlushTimer = setTimeout( () => flushPendingStateWriteByPath(statePath), STATE_WRITE_DEBOUNCE_MS, ) stateFlushTimerByPath.set(statePath, nextFlushTimer) } export function flushPendingStateWrite(paths: Paths): void { flushPendingStateWriteByPath(paths.statePath) } export function flushPendingStateWrites(): void { const pathsWithPendingWrites = [...pendingStateWriteByPath.keys()] pathsWithPendingWrites.forEach(statePath => flushPendingStateWriteByPath(statePath), ) } function registerStateWriteHooks(): void { if (stateWriteHooksRegistered) { return } stateWriteHooksRegistered = true process.once('beforeExit', flushPendingStateWrites) process.once('exit', flushPendingStateWrites) } export function ensureStateFile(paths: Paths): void { registerStateWriteHooks() fs.ensureDirSync(paths.vaultPath) fs.ensureDirSync(paths.metaDirPath) fs.ensureDirSync(paths.inboxDirPath) fs.ensureDirSync(paths.trashDirPath) if (!fs.pathExistsSync(paths.statePath)) { const defaultStateContent = `${JSON.stringify(createDefaultState(), null, 2)}\n` fs.writeFileSync(paths.statePath, defaultStateContent, 'utf8') stateContentCacheByPath.set(paths.statePath, defaultStateContent) } } export function loadState(paths: Paths): MarkdownState { ensureStateFile(paths) const defaultState = createDefaultState() const rawState = fs.readJSONSync(paths.statePath) as MarkdownStateFile const legacyFolders = Array.isArray(rawState.folders) ? rawState.folders : [] const folderUi = normalizeFolderUiState(rawState.folderUi) if (Object.keys(folderUi).length === 0 && legacyFolders.length) { legacyFolders.forEach((folder) => { folderUi[String(folder.id)] = { isOpen: normalizeFlag(folder.isOpen), } }) } return { counters: { ...defaultState.counters, ...rawState.counters, }, folderUi, folders: legacyFolders, snippets: Array.isArray(rawState.snippets) ? rawState.snippets : [], tags: Array.isArray(rawState.tags) ? rawState.tags : [], version: typeof rawState.version === 'number' ? rawState.version : defaultState.version, } } export function saveState( paths: Paths, state: MarkdownState, options?: SaveStateOptions, ): void { syncFolderUiWithFolders(state) invalidateRuntimeSearchIndex(state) const nextVersion = Math.max(state.version, 2) state.version = nextVersion const persistedState: MarkdownStateFile = { counters: state.counters, folderUi: state.folderUi, snippets: state.snippets, tags: state.tags, version: nextVersion, } const nextContent = `${JSON.stringify(persistedState, null, 2)}\n` const statePath = paths.statePath const pendingContent = pendingStateWriteByPath.get(statePath) if (pendingContent === nextContent) { return } const persistedContent = getPersistedStateContent(statePath) if (persistedContent === nextContent && pendingContent === undefined) { return } pendingStateWriteByPath.set(statePath, nextContent) if (options?.immediate) { flushPendingStateWrite(paths) return } scheduleStateFlush(statePath) } ================================================ FILE: src/main/storage/providers/markdown/runtime/sync.ts ================================================ import type { FolderRecord } from '../../../contracts' import type { MarkdownFolderDiskEntry, MarkdownRuntimeCache, MarkdownSnippet, MarkdownState, Paths, } from './types' import path from 'node:path' import fs from 'fs-extra' import { INBOX_DIR_NAME, META_DIR_NAME, runtimeRef, SPACES_DIR_NAME, TRASH_DIR_NAME, } from './constants' import { normalizeFlag, normalizeFolderOrderIndices, normalizeNumber, normalizePositiveInteger, } from './normalizers' import { readFolderMetadata, writeFolderMetadataFile } from './parser' import { buildFolderPathMap, buildPathToFolderIdMap, depthOfRelativePath, findFolderById, normalizeDirectoryPath, toPosixPath, } from './paths' import { buildSearchIndex } from './search' import { getStateSnippetIndexByFilePath, isInboxSnippetDirectory, isTrashSnippetDirectory, listMarkdownFiles, loadSnippets, readFrontmatterIdFromSnippetFile, readSnippetFromFile, } from './snippets' import { flushPendingStateWrite, flushPendingStateWrites, loadState, saveState, syncFolderUiWithFolders, } from './state' function isTechnicalRootFolder(name: string): boolean { return ( name === META_DIR_NAME || name === INBOX_DIR_NAME || name === TRASH_DIR_NAME || name === SPACES_DIR_NAME ) } export function listUserFolders( paths: Paths, currentPath = paths.vaultPath, ): MarkdownFolderDiskEntry[] { if (!fs.pathExistsSync(currentPath)) { return [] } const entries = fs.readdirSync(currentPath, { withFileTypes: true }) const folders: MarkdownFolderDiskEntry[] = [] entries.forEach((entry) => { if (!entry.isDirectory()) { return } if (currentPath === paths.vaultPath && isTechnicalRootFolder(entry.name)) { return } const absolutePath = path.join(currentPath, entry.name) const relativePath = toPosixPath( path.relative(paths.vaultPath, absolutePath), ) folders.push({ metadata: readFolderMetadata(paths, relativePath), path: relativePath, }) folders.push(...listUserFolders(paths, absolutePath)) }) return folders } function syncFoldersWithDisk(paths: Paths, state: MarkdownState): void { const diskFolders = listUserFolders(paths) const oldFoldersById = new Map( state.folders.map(folder => [folder.id, folder]), ) const oldFolderPathMap = buildFolderPathMap(state) const oldFolderIdByPath = new Map() oldFolderPathMap.forEach((folderPath, folderId) => { oldFolderIdByPath.set(folderPath, folderId) }) const orderedDiskFolders = [...diskFolders].sort((a, b) => { const depthA = depthOfRelativePath(a.path) const depthB = depthOfRelativePath(b.path) if (depthA !== depthB) { return depthA - depthB } return a.path.localeCompare(b.path) }) const nextFoldersState: FolderRecord[] = [] const pathToFolderId = new Map() const usedFolderIds = new Set() let nextFolderId = Math.max( state.counters.folderId, ...state.folders.map(folder => folder.id), ) for (const diskFolder of orderedDiskFolders) { const metadata = diskFolder.metadata const folderPath = diskFolder.path const parentPath = normalizeDirectoryPath(path.posix.dirname(folderPath)) const parentId = parentPath ? pathToFolderId.get(parentPath) || null : null const metadataFolderId = normalizePositiveInteger( metadata.id ?? metadata.masscode_id, ) const pathFolderId = oldFolderIdByPath.get(folderPath) || null let folderId = metadataFolderId && !usedFolderIds.has(metadataFolderId) ? metadataFolderId : null if (!folderId && pathFolderId && !usedFolderIds.has(pathFolderId)) { folderId = pathFolderId } if (!folderId) { nextFolderId += 1 folderId = nextFolderId } usedFolderIds.add(folderId) pathToFolderId.set(folderPath, folderId) const previousFolder = oldFoldersById.get(folderId) const now = Date.now() const createdAt = normalizeNumber( metadata.createdAt, previousFolder?.createdAt ?? now, ) const updatedAt = normalizeNumber( metadata.updatedAt, previousFolder?.updatedAt ?? createdAt, ) const defaultLanguage = typeof metadata.defaultLanguage === 'string' && metadata.defaultLanguage.trim() ? metadata.defaultLanguage : previousFolder?.defaultLanguage || 'plain_text' const icon = metadata.icon === null ? null : typeof metadata.icon === 'string' ? metadata.icon : (previousFolder?.icon ?? null) const fallbackOrderIndex = nextFoldersState .filter(folder => folder.parentId === parentId) .reduce( (maxOrder, folder) => Math.max(maxOrder, folder.orderIndex), -1, ) + 1 const orderIndex = Math.max( 0, Math.trunc( normalizeNumber( metadata.orderIndex, previousFolder?.orderIndex ?? fallbackOrderIndex, ), ), ) nextFoldersState.push({ createdAt, defaultLanguage, icon, id: folderId, isOpen: normalizeFlag( state.folderUi[String(folderId)]?.isOpen, previousFolder?.isOpen ?? 0, ), name: path.posix.basename(folderPath), orderIndex, parentId, updatedAt, }) } state.folders = nextFoldersState state.counters.folderId = Math.max(state.counters.folderId, nextFolderId) normalizeFolderOrderIndices(state.folders) syncFolderUiWithFolders(state) } export function syncFolderMetadataFiles( paths: Paths, state: MarkdownState, ): void { const folderPathMap = buildFolderPathMap(state) folderPathMap.forEach((folderPath, folderId) => { const folder = findFolderById(state, folderId) if (!folder) { return } writeFolderMetadataFile(paths, folderPath, folder) }) } export function syncCounters( state: MarkdownState, snippets: MarkdownSnippet[], ): void { const maxFolderId = state.folders.reduce( (maxId, folder) => Math.max(maxId, folder.id), 0, ) const maxTagId = state.tags.reduce( (maxId, tag) => Math.max(maxId, tag.id), 0, ) const maxSnippetId = state.snippets.reduce( (maxId, snippet) => Math.max(maxId, snippet.id), 0, ) const maxContentId = snippets.reduce((maxId, snippet) => { const snippetMaxContentId = snippet.contents.reduce( (contentMaxId, content) => Math.max(contentMaxId, content.id), 0, ) return Math.max(maxId, snippetMaxContentId) }, 0) state.counters.folderId = Math.max(state.counters.folderId, maxFolderId) state.counters.tagId = Math.max(state.counters.tagId, maxTagId) state.counters.snippetId = Math.max(state.counters.snippetId, maxSnippetId) state.counters.contentId = Math.max(state.counters.contentId, maxContentId) } export function syncStateWithDisk(paths: Paths): MarkdownState { flushPendingStateWrite(paths) const state = loadState(paths) syncFoldersWithDisk(paths, state) const relativeSnippetFiles = listMarkdownFiles(paths.vaultPath) const fileSet = new Set(relativeSnippetFiles) const existingIdSet = new Set(state.snippets.map(item => item.id)) state.snippets = state.snippets.filter(item => fileSet.has(item.filePath)) relativeSnippetFiles.forEach((filePath) => { const knownSnippet = state.snippets.find( item => item.filePath === filePath, ) if (knownSnippet) { return } const snippetAbsolutePath = path.join(paths.vaultPath, filePath) let snippetId = readFrontmatterIdFromSnippetFile(snippetAbsolutePath) if (!snippetId || existingIdSet.has(snippetId)) { snippetId = state.counters.snippetId + 1 state.counters.snippetId = snippetId } existingIdSet.add(snippetId) state.snippets.push({ filePath, id: snippetId }) }) const snippets = loadSnippets(paths, state) syncCounters(state, snippets) syncFolderMetadataFiles(paths, state) saveState(paths, state, { immediate: true }) return state } export function setRuntimeCache( paths: Paths, state: MarkdownState, snippets: MarkdownSnippet[], ): MarkdownRuntimeCache { const folderById = new Map() state.folders.forEach(folder => folderById.set(folder.id, folder)) const snippetById = new Map() const contentOwnerByContentId = new Map< number, { contentIndex: number snippet: MarkdownSnippet } >() snippets.forEach((snippet) => { snippetById.set(snippet.id, snippet) snippet.contents.forEach((content, contentIndex) => { contentOwnerByContentId.set(content.id, { contentIndex, snippet, }) }) }) const { searchSnippetTextById, searchTokenToSnippetIds, searchTokensBySnippetId, } = buildSearchIndex(snippets) runtimeRef.cache = { contentOwnerByContentId, folderById, paths, searchIndexDirty: false, searchQueryCache: new Map(), searchSnippetTextById, searchTokenToSnippetIds, searchTokensBySnippetId, snippetById, snippets, state, } return runtimeRef.cache } export function resetRuntimeCache(): void { flushPendingStateWrites() runtimeRef.cache = null } export function syncRuntimeWithDisk(paths: Paths): MarkdownRuntimeCache { const state = syncStateWithDisk(paths) const snippets = loadSnippets(paths, state) return setRuntimeCache(paths, state, snippets) } export function getRuntimeCache(paths: Paths): MarkdownRuntimeCache { if ( !runtimeRef.cache || runtimeRef.cache.paths.vaultPath !== paths.vaultPath ) { return syncRuntimeWithDisk(paths) } return runtimeRef.cache } export function syncSnippetFileWithDisk( paths: Paths, changedFilePath: string, ): MarkdownRuntimeCache | null { if ( !runtimeRef.cache || runtimeRef.cache.paths.vaultPath !== paths.vaultPath ) { return null } const normalizedFilePath = toPosixPath(changedFilePath).trim() if ( !normalizedFilePath || path.posix.extname(normalizedFilePath).toLowerCase() !== '.md' ) { return null } const state = runtimeRef.cache.state const snippets = runtimeRef.cache.snippets const snippetAbsolutePath = path.join(paths.vaultPath, normalizedFilePath) const normalizedFileDirectory = normalizeDirectoryPath( path.posix.dirname(normalizedFilePath), ) const pathToFolderIdMap = buildPathToFolderIdMap(state) if ( !isInboxSnippetDirectory(normalizedFileDirectory) && !isTrashSnippetDirectory(normalizedFileDirectory) && normalizedFileDirectory && !pathToFolderIdMap.has(normalizedFileDirectory) ) { return null } const snippetIndexInState = getStateSnippetIndexByFilePath( state, normalizedFilePath, ) const snippetExistsOnDisk = fs.pathExistsSync(snippetAbsolutePath) if (!snippetExistsOnDisk) { if (snippetIndexInState === -1) { return runtimeRef.cache } const removedSnippetId = state.snippets[snippetIndexInState].id state.snippets.splice(snippetIndexInState, 1) const snippetIndexInRuntime = snippets.findIndex( snippet => snippet.id === removedSnippetId, ) if (snippetIndexInRuntime !== -1) { snippets.splice(snippetIndexInRuntime, 1) } saveState(paths, state) return setRuntimeCache(paths, state, snippets) } let snippetIndexItem = snippetIndexInState !== -1 ? state.snippets[snippetIndexInState] : null if (!snippetIndexItem) { const existingSnippetIds = new Set( state.snippets.map(item => item.id), ) let snippetId = readFrontmatterIdFromSnippetFile(snippetAbsolutePath) if (!snippetId || existingSnippetIds.has(snippetId)) { snippetId = state.counters.snippetId + 1 state.counters.snippetId = snippetId } snippetIndexItem = { filePath: normalizedFilePath, id: snippetId, } state.snippets.push(snippetIndexItem) } else { snippetIndexItem.filePath = normalizedFilePath } const syncedSnippet = readSnippetFromFile( paths, snippetIndexItem, pathToFolderIdMap, ) if (!syncedSnippet) { return null } const snippetIndexInRuntime = snippets.findIndex( snippet => snippet.id === syncedSnippet.id, ) if (snippetIndexInRuntime === -1) { snippets.push(syncedSnippet) } else { snippets[snippetIndexInRuntime] = syncedSnippet } const maxSnippetContentId = syncedSnippet.contents.reduce( (maxId, content) => Math.max(maxId, content.id), 0, ) state.counters.snippetId = Math.max( state.counters.snippetId, syncedSnippet.id, ) state.counters.contentId = Math.max( state.counters.contentId, maxSnippetContentId, ) saveState(paths, state) return setRuntimeCache(paths, state, snippets) } ================================================ FILE: src/main/storage/providers/markdown/runtime/types.ts ================================================ import type { FolderRecord, TagRecord } from '../../../contracts' export interface MarkdownTagState extends TagRecord { createdAt: number updatedAt: number } export interface MarkdownSnippetIndexItem { filePath: string id: number } export interface MarkdownFolderMetadataFile { createdAt?: number defaultLanguage?: string icon?: string | null id?: number /** @deprecated Use `id` instead. Kept for legacy `.masscode-folder.yml` migration. */ masscode_id?: number name?: string orderIndex?: number updatedAt?: number } export interface MarkdownFolderDiskEntry { metadata: MarkdownFolderMetadataFile path: string } export interface MarkdownFolderUIState { isOpen: number } export interface MarkdownStateFile { counters?: { contentId?: number folderId?: number snippetId?: number tagId?: number } folderUi?: Record folders?: FolderRecord[] snippets?: MarkdownSnippetIndexItem[] tags?: MarkdownTagState[] version?: number } export interface MarkdownState { counters: { contentId: number folderId: number snippetId: number tagId: number } folderUi: Record folders: FolderRecord[] snippets: MarkdownSnippetIndexItem[] tags: MarkdownTagState[] version: number } export interface MarkdownFrontmatterContent { id?: number label?: string language?: string } export interface MarkdownSnippetFrontmatter { contents?: MarkdownFrontmatterContent[] createdAt?: number description?: string | null folderId?: number | null id?: number isDeleted?: number isFavorites?: number name?: string tags?: number[] updatedAt?: number } export interface MarkdownBodyFragment { label: string language: string value: string | null } export interface MarkdownSnippet { contents: { id: number label: string language: string value: string | null }[] createdAt: number description: string | null filePath: string folderId: number | null id: number isDeleted: number isFavorites: number name: string tags: number[] updatedAt: number } export interface MarkdownRuntimeCache { contentOwnerByContentId: Map< number, { contentIndex: number snippet: MarkdownSnippet } > folderById: Map paths: Paths searchQueryCache: Map searchSnippetTextById: Map searchTokenToSnippetIds: Map> searchTokensBySnippetId: Map searchIndexDirty: boolean snippetById: Map snippets: MarkdownSnippet[] state: MarkdownState } export interface SaveStateOptions { immediate?: boolean } export interface SqliteSnippetRow { createdAt: number description: string | null folderId: number | null id: number isDeleted: number isFavorites: number name: string updatedAt: number } export interface SqliteSnippetContentRow { id: number label: string | null language: string | null snippetId: number value: string | null } export interface SqliteSnippetTagRow { snippetId: number tagId: number } export interface Paths { inboxDirPath: string metaDirPath: string statePath: string trashDirPath: string vaultPath: string } export type MarkdownErrorCode = | 'FOLDER_NOT_FOUND' | 'INVALID_NAME' | 'NAME_CONFLICT' | 'RESERVED_NAME' | 'SNIPPET_NOT_FOUND' export type DirectoryEntriesCache = Map export interface PersistSnippetOptions { allowRenameOnConflict?: boolean directoryEntriesCache?: Map } ================================================ FILE: src/main/storage/providers/markdown/runtime/validation.ts ================================================ import type { MarkdownErrorCode, MarkdownState, Paths } from './types' import path from 'node:path' import fs from 'fs-extra' import { INVALID_NAME_CHARS, META_DIR_NAME, RESERVED_ROOT_NAMES, SPACES_DIR_NAME, WINDOWS_RESERVED_NAME_RE, } from './constants' import { normalizeErrorMessage } from './normalizers' import { getFolderSiblings } from './paths' export function throwStorageError( code: MarkdownErrorCode, message: string, ): never { throw new Error(`${code}:${message}`) } export function getMarkdownStorageErrorMessage(error: unknown): string { return normalizeErrorMessage(error) } function normalizeName(name: string): string { return name.trim() } function hasInvalidNameChars(name: string): boolean { for (const char of name) { if (INVALID_NAME_CHARS.has(char)) { return true } if (char.charCodeAt(0) <= 0x1F) { return true } } return false } export function validateEntryName( name: string, kind: 'folder' | 'snippet', ): string { const normalized = normalizeName(name) if (!normalized || normalized === '.' || normalized === '..') { throwStorageError('INVALID_NAME', `${kind} name is empty or invalid`) } if (hasInvalidNameChars(normalized)) { throwStorageError( 'INVALID_NAME', `${kind} name contains invalid characters`, ) } if (normalized.endsWith('.') || normalized.endsWith(' ')) { throwStorageError( 'INVALID_NAME', `${kind} name cannot end with a space or dot`, ) } if (WINDOWS_RESERVED_NAME_RE.test(normalized)) { throwStorageError('INVALID_NAME', `${kind} name is reserved on Windows`) } return normalized } export function toSnippetFileName(name: string): string { const normalized = validateEntryName(name, 'snippet') if (normalized.toLowerCase().endsWith('.md')) { return normalized } return `${normalized}.md` } export function assertNotReservedRootFolderName( parentId: number | null, name: string, ): void { const normalizedName = name.toLowerCase() if (normalizedName === META_DIR_NAME || normalizedName === SPACES_DIR_NAME) { throwStorageError('RESERVED_NAME', 'This folder name is reserved') } if (parentId === null && RESERVED_ROOT_NAMES.has(normalizedName)) { throwStorageError( 'RESERVED_NAME', 'This folder name is reserved for technical folder', ) } } export function assertUniqueSiblingFolderName( state: MarkdownState, parentId: number | null, name: string, excludeId?: number, ): void { const normalizedName = name.toLowerCase() const hasConflict = getFolderSiblings(state, parentId, excludeId).some( folder => folder.name.toLowerCase() === normalizedName, ) if (hasConflict) { throwStorageError( 'NAME_CONFLICT', 'Folder with this name already exists on this level', ) } } export function resolveUniqueSiblingFolderName( state: MarkdownState, parentId: number | null, name: string, excludeId?: number, ): string { const siblings = getFolderSiblings(state, parentId, excludeId) const siblingNames = new Set( siblings.map(folder => folder.name.toLowerCase()), ) if (!siblingNames.has(name.toLowerCase())) { return name } for (let suffix = 1; suffix <= 10_000; suffix += 1) { const candidateName = `${name} ${suffix}` if (!siblingNames.has(candidateName.toLowerCase())) { return candidateName } } throwStorageError( 'NAME_CONFLICT', 'Cannot generate unique folder name on this level', ) } export function assertDirectoryNameAvailable( paths: Paths, parentRelativePath: string, folderName: string, excludeRelativePath?: string, ): void { const parentAbsolutePath = parentRelativePath ? path.join(paths.vaultPath, parentRelativePath) : paths.vaultPath fs.ensureDirSync(parentAbsolutePath) const excludeAbsolutePath = excludeRelativePath ? path.join(paths.vaultPath, excludeRelativePath) : null const entries = fs.readdirSync(parentAbsolutePath) const normalizedFolderName = folderName.toLowerCase() for (const entry of entries) { const entryAbsolutePath = path.join(parentAbsolutePath, entry) if (excludeAbsolutePath && entryAbsolutePath === excludeAbsolutePath) { continue } if (entry.toLowerCase() === normalizedFolderName) { throwStorageError( 'NAME_CONFLICT', 'Folder with this name already exists on this level', ) } } } ================================================ FILE: src/main/storage/providers/markdown/storages/folders.ts ================================================ import type { FolderRecord, FoldersStorage, FolderTreeRecord, FolderUpdateResult, } from '../../../contracts' import path from 'node:path' import fs from 'fs-extra' import { assertDirectoryNameAvailable, assertNotReservedRootFolderName, assertUniqueSiblingFolderName, buildFolderPathMap, buildSnippetTargetPath, depthOfRelativePath, findFolderById, getFolderPathById, getNextFolderOrder, getPaths, getRuntimeCache, getVaultPath, normalizeDirectoryPath, normalizeFlag, persistSnippet, resolveUniqueSiblingFolderName, saveState, syncFolderMetadataFiles, throwStorageError, validateEntryName, } from '../runtime' function createFolderTree(folders: FolderRecord[]): FolderTreeRecord[] { const folderMap = new Map() const rootFolders: FolderTreeRecord[] = [] folders.forEach((folder) => { folderMap.set(folder.id, { ...folder, children: [], }) }) folderMap.forEach((folder) => { if (folder.parentId === null) { rootFolders.push(folder) return } const parent = folderMap.get(folder.parentId) if (parent) { parent.children.push(folder) } }) return rootFolders } function sortFoldersForTree(folders: FolderRecord[]): FolderRecord[] { const folderByParent = new Map() const knownFolderIds = new Set(folders.map(folder => folder.id)) folders.forEach((folder) => { const parentId = folder.parentId !== null && knownFolderIds.has(folder.parentId) ? folder.parentId : null const siblings = folderByParent.get(parentId) || [] siblings.push(folder) folderByParent.set(parentId, siblings) }) folderByParent.forEach((siblings, parentId) => { siblings.sort((firstFolder, secondFolder) => { if (firstFolder.orderIndex !== secondFolder.orderIndex) { return firstFolder.orderIndex - secondFolder.orderIndex } return firstFolder.id - secondFolder.id }) folderByParent.set(parentId, siblings) }) const orderedFolders: FolderRecord[] = [] const visitedFolderIds = new Set() const visitChildren = (parentId: number | null): void => { const children = folderByParent.get(parentId) || [] children.forEach((child) => { if (visitedFolderIds.has(child.id)) { return } visitedFolderIds.add(child.id) orderedFolders.push(child) visitChildren(child.id) }) } visitChildren(null) folders.forEach((folder) => { if (visitedFolderIds.has(folder.id)) { return } orderedFolders.push(folder) visitChildren(folder.id) }) return orderedFolders } function findFolderDescendants( folders: FolderRecord[], folderId: number, ): number[] { const directChildren = folders .filter(folder => folder.parentId === folderId) .map(folder => folder.id) let descendants = [...directChildren] for (const childId of directChildren) { descendants = descendants.concat(findFolderDescendants(folders, childId)) } return descendants } export function createFoldersStorage(): FoldersStorage { return { getFolders: () => { const paths = getPaths(getVaultPath()) const { state } = getRuntimeCache(paths) return [...state.folders].sort((a, b) => b.createdAt - a.createdAt) }, getFoldersTree: () => { const paths = getPaths(getVaultPath()) const { state } = getRuntimeCache(paths) return createFolderTree(sortFoldersForTree([...state.folders])) }, createFolder: (input) => { const paths = getPaths(getVaultPath()) const { state } = getRuntimeCache(paths) const name = validateEntryName(input.name, 'folder') const parentId = input.parentId ?? null if (parentId !== null && !findFolderById(state, parentId)) { throwStorageError('FOLDER_NOT_FOUND', 'Parent folder not found') } assertNotReservedRootFolderName(parentId, name) assertUniqueSiblingFolderName(state, parentId, name) const parentPath = parentId !== null ? getFolderPathById(state, parentId) : '' const normalizedParentPath = normalizeDirectoryPath(parentPath || '') assertDirectoryNameAvailable(paths, normalizedParentPath, name) const targetDirectory = normalizedParentPath ? path.join(paths.vaultPath, normalizedParentPath, name) : path.join(paths.vaultPath, name) fs.ensureDirSync(targetDirectory) const now = Date.now() const id = state.counters.folderId + 1 state.counters.folderId = id state.folders.push({ createdAt: now, defaultLanguage: 'plain_text', icon: null, id, isOpen: 0, name, orderIndex: getNextFolderOrder(state, parentId), parentId, updatedAt: now, }) syncFolderMetadataFiles(paths, state) saveState(paths, state) return { id } }, updateFolder: (id, input): FolderUpdateResult => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const folder = findFolderById(state, id) if (!folder) { return { invalidInput: false, notFound: true, } } const hasAnyField = 'name' in input || 'icon' in input || 'defaultLanguage' in input || 'parentId' in input || 'isOpen' in input || 'orderIndex' in input if (!hasAnyField) { return { invalidInput: true, notFound: false, } } const oldFolderPathMap = buildFolderPathMap(state) const oldFolderPath = oldFolderPathMap.get(folder.id) || '' let targetName = 'name' in input ? validateEntryName(input.name || folder.name, 'folder') : folder.name const targetParentId = 'parentId' in input ? (input.parentId ?? null) : folder.parentId if (targetParentId !== null && !findFolderById(state, targetParentId)) { throwStorageError('FOLDER_NOT_FOUND', 'Parent folder not found') } const descendants = findFolderDescendants(state.folders, id) if (targetParentId !== null && descendants.includes(targetParentId)) { throwStorageError( 'INVALID_NAME', 'Folder cannot be moved into its own subtree', ) } assertNotReservedRootFolderName(targetParentId, targetName) const isParentChanged = targetParentId !== folder.parentId if (isParentChanged) { targetName = resolveUniqueSiblingFolderName( state, targetParentId, targetName, id, ) } else { assertUniqueSiblingFolderName(state, targetParentId, targetName, id) } const currentParentId = folder.parentId const currentOrderIndex = folder.orderIndex const targetOrderIndex = 'orderIndex' in input ? (input.orderIndex ?? currentOrderIndex) : currentOrderIndex if ( targetParentId !== currentParentId || targetOrderIndex !== currentOrderIndex ) { if (targetParentId === currentParentId) { if (targetOrderIndex > currentOrderIndex) { state.folders.forEach((item) => { if ( item.id !== folder.id && item.parentId === currentParentId && item.orderIndex > currentOrderIndex && item.orderIndex <= targetOrderIndex ) { item.orderIndex -= 1 } }) } else { state.folders.forEach((item) => { if ( item.id !== folder.id && item.parentId === currentParentId && item.orderIndex >= targetOrderIndex && item.orderIndex < currentOrderIndex ) { item.orderIndex += 1 } }) } } else { state.folders.forEach((item) => { if ( item.id !== folder.id && item.parentId === currentParentId && item.orderIndex > currentOrderIndex ) { item.orderIndex -= 1 } }) state.folders.forEach((item) => { if ( item.id !== folder.id && item.parentId === targetParentId && item.orderIndex >= targetOrderIndex ) { item.orderIndex += 1 } }) } folder.parentId = targetParentId folder.orderIndex = targetOrderIndex } if ('name' in input || folder.name !== targetName) { folder.name = targetName } if ('icon' in input) { folder.icon = input.icon ?? null } if ('defaultLanguage' in input) { folder.defaultLanguage = input.defaultLanguage || folder.defaultLanguage } if ('isOpen' in input) { folder.isOpen = normalizeFlag(input.isOpen, folder.isOpen) } folder.updatedAt = Date.now() const newFolderPathMap = buildFolderPathMap(state) const newFolderPath = newFolderPathMap.get(folder.id) || '' if (oldFolderPath !== newFolderPath) { const targetParentPath = normalizeDirectoryPath( path.posix.dirname(newFolderPath), ) assertDirectoryNameAvailable( paths, targetParentPath, path.posix.basename(newFolderPath), oldFolderPath, ) const oldAbsolutePath = path.join(paths.vaultPath, oldFolderPath) const newAbsolutePath = path.join(paths.vaultPath, newFolderPath) if (fs.pathExistsSync(oldAbsolutePath)) { fs.ensureDirSync(path.dirname(newAbsolutePath)) fs.moveSync(oldAbsolutePath, newAbsolutePath, { overwrite: false }) } const affectedFolderIds = new Set([ id, ...findFolderDescendants(state.folders, id), ]) snippets.forEach((snippet) => { if (snippet.isDeleted === 1) { return } if ( snippet.folderId === null || !affectedFolderIds.has(snippet.folderId) ) { return } const previousPath = snippet.filePath snippet.filePath = buildSnippetTargetPath(state, snippet) const oldSnippetAbsolutePath = path.join( paths.vaultPath, previousPath, ) const newSnippetAbsolutePath = path.join( paths.vaultPath, snippet.filePath, ) if ( previousPath !== snippet.filePath && fs.pathExistsSync(oldSnippetAbsolutePath) && !fs.pathExistsSync(newSnippetAbsolutePath) ) { fs.ensureDirSync(path.dirname(newSnippetAbsolutePath)) fs.moveSync(oldSnippetAbsolutePath, newSnippetAbsolutePath, { overwrite: false, }) } }) } syncFolderMetadataFiles(paths, state) saveState(paths, state) return { invalidInput: false, notFound: false, } }, deleteFolder: (id) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const folder = findFolderById(state, id) if (!folder) { return { deleted: false } } const oldFolderPathMap = buildFolderPathMap(state) const descendantIds = findFolderDescendants(state.folders, id) const removedFolderIds = new Set([id, ...descendantIds]) const directoryEntriesCache = new Map() snippets.forEach((snippet) => { if ( snippet.folderId !== null && removedFolderIds.has(snippet.folderId) ) { const previousPath = snippet.filePath snippet.folderId = null snippet.isDeleted = 1 snippet.updatedAt = Date.now() persistSnippet(paths, state, snippet, previousPath, { allowRenameOnConflict: true, directoryEntriesCache, }) } }) const removedFolderPaths = [...removedFolderIds] .map(folderId => oldFolderPathMap.get(folderId)) .filter((folderPath): folderPath is string => !!folderPath) .sort((a, b) => depthOfRelativePath(b) - depthOfRelativePath(a)) state.folders = state.folders.filter( folder => !removedFolderIds.has(folder.id), ) removedFolderPaths.forEach((folderPath) => { const absolutePath = path.join(paths.vaultPath, folderPath) if (fs.pathExistsSync(absolutePath)) { fs.removeSync(absolutePath) } }) saveState(paths, state) return { deleted: true } }, } } ================================================ FILE: src/main/storage/providers/markdown/storages/index.ts ================================================ import type { StorageProvider } from '../../../contracts' import { createFoldersStorage } from './folders' import { createSnippetsStorage } from './snippets' import { createTagsStorage } from './tags' export function createMarkdownStorageProvider(): StorageProvider { return { folders: createFoldersStorage(), snippets: createSnippetsStorage(), tags: createTagsStorage(), } } ================================================ FILE: src/main/storage/providers/markdown/storages/snippets.ts ================================================ import type { SnippetContentUpdateInput, SnippetContentUpdateResult, SnippetsCount, SnippetsQueryInput, SnippetsStorage, SnippetTagDeleteRelationResult, SnippetTagRelationResult, SnippetUpdateResult, } from '../../../contracts' import path from 'node:path' import fs from 'fs-extra' import { createSnippetRecord, findFolderById, findSnippetByContentId, findSnippetById, getPaths, getRuntimeCache, getSnippetIdsBySearchQuery, getSnippetTargetDirectory, getVaultPath, type MarkdownSnippet, normalizeDirectoryPath, persistSnippet, saveState, throwStorageError, validateEntryName, writeSnippetToFile, } from '../runtime' export function createSnippetsStorage(): SnippetsStorage { return { getSnippets: (query: SnippetsQueryInput) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const searchSnippetIds = query.search?.trim() ? getSnippetIdsBySearchQuery(snippets, query.search) : null const normalizedOrder = query.order || 'DESC' const filteredSnippets = snippets.filter((snippet) => { if (searchSnippetIds && !searchSnippetIds.has(snippet.id)) { return false } if (query.folderId && snippet.folderId !== query.folderId) { return false } if (query.isInbox && snippet.folderId !== null) { return false } if (query.tagId && !snippet.tags.includes(query.tagId)) { return false } if (query.isFavorites && snippet.isFavorites !== 1) { return false } if (query.isDeleted) { if (snippet.isDeleted !== 1) { return false } } else if (snippet.isDeleted !== 0) { return false } return true }) const result = filteredSnippets .map(snippet => createSnippetRecord(snippet, state)) .sort((a, b) => { if (normalizedOrder === 'ASC') { return a.createdAt - b.createdAt } return b.createdAt - a.createdAt }) return result }, getSnippetsCounts: (): SnippetsCount => { const paths = getPaths(getVaultPath()) const { snippets } = getRuntimeCache(paths) return { total: snippets.length, trash: snippets.filter(snippet => snippet.isDeleted === 1).length, } }, createSnippet: (input) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const name = validateEntryName(input.name, 'snippet') const folderId = input.folderId ?? null if (folderId !== null && !findFolderById(state, folderId)) { throwStorageError('FOLDER_NOT_FOUND', 'Folder not found') } const id = state.counters.snippetId + 1 state.counters.snippetId = id const now = Date.now() const snippet: MarkdownSnippet = { contents: [], createdAt: now, description: null, filePath: '', folderId, id, isDeleted: 0, isFavorites: 0, name, tags: [], updatedAt: now, } persistSnippet(paths, state, snippet) snippets.push(snippet) saveState(paths, state) return { id } }, createSnippetContent: (snippetId, input) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const snippet = findSnippetById(snippets, snippetId) if (!snippet) { throwStorageError('SNIPPET_NOT_FOUND', 'Snippet not found') } const contentId = state.counters.contentId + 1 state.counters.contentId = contentId snippet.contents.push({ id: contentId, label: input.label, language: input.language, value: input.value, }) snippet.updatedAt = Date.now() writeSnippetToFile(paths, snippet) saveState(paths, state) return { id: contentId } }, updateSnippet: (id, input): SnippetUpdateResult => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const snippet = findSnippetById(snippets, id) if (!snippet) { return { invalidInput: false, notFound: true, } } const hasAnyField = 'name' in input || 'description' in input || 'folderId' in input || 'isFavorites' in input || 'isDeleted' in input if (!hasAnyField) { return { invalidInput: true, notFound: false, } } const previousPath = snippet.filePath const wasDeleted = snippet.isDeleted if ('name' in input) { snippet.name = validateEntryName(input.name || snippet.name, 'snippet') } if ('description' in input) { snippet.description = input.description ?? null } if ('folderId' in input) { const nextFolderId = input.folderId ?? null if (nextFolderId !== null && !findFolderById(state, nextFolderId)) { throwStorageError('FOLDER_NOT_FOUND', 'Folder not found') } snippet.folderId = nextFolderId } if ('isFavorites' in input) { snippet.isFavorites = input.isFavorites || 0 } if ('isDeleted' in input) { snippet.isDeleted = input.isDeleted || 0 } const movedToTrash = wasDeleted !== 1 && snippet.isDeleted === 1 const previousDirectory = normalizeDirectoryPath( path.posix.dirname(previousPath), ) const nextDirectory = getSnippetTargetDirectory(state, snippet) const movedBetweenDirectories = previousDirectory !== nextDirectory snippet.updatedAt = Date.now() persistSnippet(paths, state, snippet, previousPath, { allowRenameOnConflict: movedToTrash || movedBetweenDirectories, }) saveState(paths, state) return { invalidInput: false, notFound: false, } }, updateSnippetContent: ( snippetId, contentId, input: SnippetContentUpdateInput, ): SnippetContentUpdateResult => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const hasAnyField = 'label' in input || 'value' in input || 'language' in input if (!hasAnyField) { return { invalidInput: true, notFound: false, parentNotFound: false, } } const ownedContent = findSnippetByContentId(snippets, contentId) if (!ownedContent) { return { invalidInput: false, notFound: true, parentNotFound: false, } } const { contentIndex, snippet: contentOwnerSnippet } = ownedContent const content = contentOwnerSnippet.contents[contentIndex] if ('label' in input) { content.label = input.label || content.label } if ('value' in input) { content.value = input.value ?? null } if ('language' in input) { content.language = input.language || content.language } let parentNotFound = false if (contentOwnerSnippet.id === snippetId) { contentOwnerSnippet.updatedAt = Date.now() writeSnippetToFile(paths, contentOwnerSnippet) } else { writeSnippetToFile(paths, contentOwnerSnippet) const targetSnippet = findSnippetById(snippets, snippetId) if (targetSnippet) { targetSnippet.updatedAt = Date.now() writeSnippetToFile(paths, targetSnippet) } else { parentNotFound = true } } saveState(paths, state) return { invalidInput: false, notFound: false, parentNotFound, } }, addTagToSnippet: (snippetId, tagId): SnippetTagRelationResult => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const snippet = findSnippetById(snippets, snippetId) if (!snippet) { return { notFound: false, snippetFound: false, tagFound: true, } } const tag = state.tags.find(item => item.id === tagId) if (!tag) { return { notFound: false, snippetFound: true, tagFound: false, } } if (!snippet.tags.includes(tagId)) { snippet.tags.push(tagId) writeSnippetToFile(paths, snippet) saveState(paths, state) } return { notFound: false, snippetFound: true, tagFound: true, } }, deleteTagFromSnippet: ( snippetId, tagId, ): SnippetTagDeleteRelationResult => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const snippet = findSnippetById(snippets, snippetId) if (!snippet) { return { notFound: false, relationFound: true, snippetFound: false, tagFound: true, } } const tag = state.tags.find(item => item.id === tagId) if (!tag) { return { notFound: false, relationFound: true, snippetFound: true, tagFound: false, } } const relationFound = snippet.tags.includes(tagId) if (relationFound) { snippet.tags = snippet.tags.filter(item => item !== tagId) writeSnippetToFile(paths, snippet) saveState(paths, state) } return { notFound: false, relationFound, snippetFound: true, tagFound: true, } }, deleteSnippet: (id) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const snippetIndex = state.snippets.findIndex( snippet => snippet.id === id, ) if (snippetIndex === -1) { return { deleted: false } } const snippet = state.snippets[snippetIndex] fs.removeSync(path.join(paths.vaultPath, snippet.filePath)) state.snippets.splice(snippetIndex, 1) const snippetRuntimeIndex = snippets.findIndex( snippet => snippet.id === id, ) if (snippetRuntimeIndex !== -1) { snippets.splice(snippetRuntimeIndex, 1) } saveState(paths, state) return { deleted: true } }, emptyTrash: () => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const deletedSnippetIds = new Set( snippets .filter(snippet => snippet.isDeleted === 1) .map(snippet => snippet.id), ) if (!deletedSnippetIds.size) { return { deletedCount: 0 } } state.snippets = state.snippets.filter((snippet) => { if (deletedSnippetIds.has(snippet.id)) { fs.removeSync(path.join(paths.vaultPath, snippet.filePath)) return false } return true }) const nextSnippets = snippets.filter( snippet => !deletedSnippetIds.has(snippet.id), ) snippets.splice(0, snippets.length, ...nextSnippets) saveState(paths, state) return { deletedCount: deletedSnippetIds.size } }, deleteSnippetContent: (contentId) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const ownedContent = findSnippetByContentId(snippets, contentId) if (!ownedContent) { return { deleted: false } } ownedContent.snippet.contents.splice(ownedContent.contentIndex, 1) ownedContent.snippet.updatedAt = Date.now() writeSnippetToFile(paths, ownedContent.snippet) saveState(paths, state) return { deleted: true } }, } } ================================================ FILE: src/main/storage/providers/markdown/storages/tags.ts ================================================ import type { TagsStorage } from '../../../contracts' import { getPaths, getRuntimeCache, getVaultPath, saveState, writeSnippetToFile, } from '../runtime' export function createTagsStorage(): TagsStorage { return { getTags: () => { const paths = getPaths(getVaultPath()) const { state } = getRuntimeCache(paths) return state.tags .map(tag => ({ id: tag.id, name: tag.name, })) .sort((a, b) => a.name.localeCompare(b.name)) }, createTag: (name) => { const paths = getPaths(getVaultPath()) const { state } = getRuntimeCache(paths) const id = state.counters.tagId + 1 state.counters.tagId = id const now = Date.now() state.tags.push({ createdAt: now, id, name, updatedAt: now, }) saveState(paths, state) return { id } }, deleteTag: (id) => { const paths = getPaths(getVaultPath()) const { state, snippets } = getRuntimeCache(paths) const tagIndex = state.tags.findIndex(tag => tag.id === id) if (tagIndex === -1) { return { deleted: false } } state.tags.splice(tagIndex, 1) snippets.forEach((snippet) => { if (snippet.tags.includes(id)) { snippet.tags = snippet.tags.filter(tagId => tagId !== id) writeSnippetToFile(paths, snippet) } }) saveState(paths, state) return { deleted: true } }, } } ================================================ FILE: src/main/storage/providers/markdown/watcher.ts ================================================ import type { ChokidarOptions, FSWatcher } from 'chokidar' import path from 'node:path' import { BrowserWindow } from 'electron' import { importEsm, log } from '../../../utils' import { ensureStateFile, getPaths, getVaultPath, INBOX_DIR_NAME, META_DIR_NAME, type Paths, peekRuntimeCache, resetRuntimeCache, SPACES_DIR_NAME, syncRuntimeWithDisk, syncSnippetFileWithDisk, TRASH_DIR_NAME, } from './runtime' let markdownWatcher: FSWatcher | null = null let markdownWatchTimer: NodeJS.Timeout | null = null let watchedVaultPath: string | null = null let pendingFilePath: string | null = null let hasPendingFullSync = false let watcherStartToken = 0 let chokidarWatchLoader: Promise | null = null type ChokidarWatch = ( path: string | readonly string[], options?: ChokidarOptions, ) => FSWatcher async function getChokidarWatch(): Promise { if (chokidarWatchLoader) { return chokidarWatchLoader } chokidarWatchLoader = importEsm('chokidar') .then((module) => { const chokidarModule = module as { default?: { watch?: unknown } watch?: unknown } const watch = chokidarModule.default?.watch || chokidarModule.watch if (typeof watch !== 'function') { throw new TypeError('chokidar.watch is not available') } return watch as ChokidarWatch }) .catch((error) => { chokidarWatchLoader = null throw error }) return chokidarWatchLoader } function toPosixPath(filePath: string): string { return filePath.replaceAll('\\', '/') } function normalizeRelativeWatchPath( paths: Paths, changedPath: string, ): string | null { const normalizedChangedPath = changedPath.trim() if (!normalizedChangedPath) { return null } const absolutePath = path.isAbsolute(normalizedChangedPath) ? normalizedChangedPath : path.join(paths.vaultPath, normalizedChangedPath) const relativePath = toPosixPath( path.relative(paths.vaultPath, absolutePath), ) if (!relativePath || relativePath === '.' || relativePath.startsWith('../')) { return null } return relativePath } function shouldIgnoreWatchPath(paths: Paths, watchPath: string): boolean { const relativePath = normalizeRelativeWatchPath(paths, watchPath) if (!relativePath) { return false } const basename = path.posix.basename(relativePath) // Never ignore meta files (both legacy and new) if (basename === '.meta.yaml' || basename === '.masscode-folder.yml') { return false } const normalizedRelativePath = relativePath.toLowerCase() // Never ignore __spaces__/ directory and its contents const spacesPrefix = SPACES_DIR_NAME.toLowerCase() if ( normalizedRelativePath === spacesPrefix || normalizedRelativePath.startsWith(`${spacesPrefix}/`) ) { return false } const metaPrefix = META_DIR_NAME.toLowerCase() if (normalizedRelativePath === metaPrefix) { return false } const inboxPrefix = `${META_DIR_NAME}/${INBOX_DIR_NAME}`.toLowerCase() const trashPrefix = `${META_DIR_NAME}/${TRASH_DIR_NAME}`.toLowerCase() const canContainSnippets = normalizedRelativePath === inboxPrefix || normalizedRelativePath.startsWith(`${inboxPrefix}/`) || normalizedRelativePath === trashPrefix || normalizedRelativePath.startsWith(`${trashPrefix}/`) if (canContainSnippets) { return false } return normalizedRelativePath .split('/') .some(segment => segment.startsWith('.')) } function scheduleStateSync( paths: Paths, changedPath: string | null, forceFullSync = false, ): void { if (forceFullSync || !changedPath) { hasPendingFullSync = true } else if (pendingFilePath && pendingFilePath !== changedPath) { hasPendingFullSync = true } else { pendingFilePath = changedPath } if (markdownWatchTimer) { clearTimeout(markdownWatchTimer) markdownWatchTimer = null } markdownWatchTimer = setTimeout(() => { try { const previousCache = peekRuntimeCache() const changedFilePath = hasPendingFullSync ? null : pendingFilePath hasPendingFullSync = false pendingFilePath = null const nextCache = changedFilePath ? syncSnippetFileWithDisk(paths, changedFilePath) || syncRuntimeWithDisk(paths) : syncRuntimeWithDisk(paths) if (!previousCache || nextCache !== previousCache) { BrowserWindow.getAllWindows().forEach((window) => { window.webContents.send('system:storage-synced') }) } } catch (error) { log('storage:markdown:watcher-sync', error) } }, 250) } export function stopMarkdownWatcher(): void { watcherStartToken += 1 if (markdownWatchTimer) { clearTimeout(markdownWatchTimer) markdownWatchTimer = null } if (markdownWatcher) { void markdownWatcher.close() markdownWatcher = null } watchedVaultPath = null pendingFilePath = null hasPendingFullSync = false resetRuntimeCache() } export function startMarkdownWatcher(): void { const paths = getPaths(getVaultPath()) const runtimeCache = peekRuntimeCache() if (markdownWatcher && watchedVaultPath === paths.vaultPath) { if (!runtimeCache || runtimeCache.paths.vaultPath !== paths.vaultPath) { ensureStateFile(paths) syncRuntimeWithDisk(paths) } return } stopMarkdownWatcher() ensureStateFile(paths) syncRuntimeWithDisk(paths) const startToken = ++watcherStartToken void getChokidarWatch() .then((watch) => { if (startToken !== watcherStartToken) { return } const watcher = watch(paths.vaultPath, { awaitWriteFinish: { pollInterval: 100, stabilityThreshold: 200, }, ignoreInitial: true, ignored: (watchPath: string) => shouldIgnoreWatchPath(paths, watchPath), persistent: true, }) watcher .on('add', (changedPath: string) => { scheduleStateSync( paths, normalizeRelativeWatchPath(paths, changedPath), ) }) .on('change', (changedPath: string) => { scheduleStateSync( paths, normalizeRelativeWatchPath(paths, changedPath), ) }) .on('unlink', (changedPath: string) => { scheduleStateSync( paths, normalizeRelativeWatchPath(paths, changedPath), ) }) .on('addDir', () => { scheduleStateSync(paths, null, true) }) .on('unlinkDir', () => { scheduleStateSync(paths, null, true) }) .on('error', (error: unknown) => { log('storage:markdown:watcher-error', error) }) if (startToken !== watcherStartToken) { void watcher.close() return } markdownWatcher = watcher watchedVaultPath = paths.vaultPath }) .catch((error) => { if (startToken === watcherStartToken) { watchedVaultPath = null } log('storage:markdown:watcher-start', error) }) } ================================================ FILE: src/main/storage/providers/sqlite/folders.ts ================================================ import type { FolderCreateInput, FolderRecord, FoldersStorage, FolderTreeRecord, FolderUpdateInput, FolderUpdateResult, } from '../../contracts' import { useDB } from '../../../db' interface FolderOrderSnapshot { orderIndex: number parentId: number | null } export function createSqliteFoldersStorage(): FoldersStorage { return { getFolders: () => { const db = useDB() const stmt = db.prepare(` SELECT id, name, defaultLanguage, parentId, orderIndex, isOpen, icon, createdAt, updatedAt FROM folders ORDER BY createdAt DESC `) return stmt.all() as FolderRecord[] }, getFoldersTree: () => { const db = useDB() const allFolders = db .prepare( ` SELECT id, name, defaultLanguage, parentId, orderIndex, isOpen, icon, createdAt, updatedAt FROM folders ORDER BY parentId, orderIndex `, ) .all() as FolderRecord[] const folderMap = new Map() const rootFolders: FolderTreeRecord[] = [] allFolders.forEach((folder) => { folderMap.set(folder.id, { ...folder, children: [], }) }) folderMap.forEach((folder) => { if (folder.parentId === null) { rootFolders.push(folder) return } const parent = folderMap.get(folder.parentId) if (parent) { parent.children.push(folder) } }) return rootFolders }, createFolder: (input: FolderCreateInput) => { const db = useDB() const { name, parentId } = input const now = Date.now() const hasParentId = parentId !== undefined && parentId !== null const { maxOrder } = db .prepare( ` SELECT COALESCE(MAX(orderIndex), -1) as maxOrder FROM folders WHERE parentId ${hasParentId ? '= ?' : 'IS NULL'} `, ) .get(...(hasParentId ? [parentId] : [])) as { maxOrder: number } const newOrder = maxOrder + 1 const stmt = db.prepare(` INSERT INTO folders ( name, defaultLanguage, parentId, isOpen, createdAt, updatedAt, orderIndex ) VALUES (?, ?, ?, ?, ?, ?, ?) `) const { lastInsertRowid } = stmt.run( name, 'plain_text', parentId ?? null, 0, now, now, newOrder, ) return { id: Number(lastInsertRowid) } }, updateFolder: ( id: number, input: FolderUpdateInput, ): FolderUpdateResult => { const db = useDB() const now = Date.now() const updateFields: string[] = [] const updateParams: any[] = [] let needOrderUpdate = false let newParentId: number | null | undefined let newOrderIndex: number | undefined if ('name' in input) { updateFields.push('name = ?') updateParams.push(input.name) } if ('icon' in input) { updateFields.push('icon = ?') updateParams.push(input.icon ?? null) } if ('defaultLanguage' in input) { updateFields.push('defaultLanguage = ?') updateParams.push(input.defaultLanguage) } if ('isOpen' in input) { updateFields.push('isOpen = ?') updateParams.push(input.isOpen) } if ('parentId' in input) { updateFields.push('parentId = ?') updateParams.push(input.parentId ?? null) newParentId = input.parentId needOrderUpdate = true } if ('orderIndex' in input) { updateFields.push('orderIndex = ?') updateParams.push(input.orderIndex) newOrderIndex = input.orderIndex needOrderUpdate = true } if (updateFields.length === 0) { return { invalidInput: true, notFound: false, } } updateFields.push('updatedAt = ?') updateParams.push(now) updateParams.push(id) let isNotFound = false const transaction = db.transaction(() => { const folder = db .prepare('SELECT parentId, orderIndex FROM folders WHERE id = ?') .get(id) as FolderOrderSnapshot | undefined if (!folder) { isNotFound = true return } if (needOrderUpdate) { const currentParentId = folder.parentId const currentOrderIndex = folder.orderIndex const targetParentId = newParentId === undefined ? currentParentId : newParentId const targetOrderIndex = newOrderIndex === undefined ? currentOrderIndex : newOrderIndex if ( targetParentId !== currentParentId || targetOrderIndex !== currentOrderIndex ) { if (targetParentId === currentParentId) { if (targetOrderIndex > currentOrderIndex) { db.prepare( `UPDATE folders SET orderIndex = orderIndex - 1 WHERE parentId ${currentParentId === null ? 'IS NULL' : '= ?'} AND orderIndex > ? AND orderIndex <= ?`, ).run( ...(currentParentId === null ? [currentOrderIndex, targetOrderIndex] : [currentParentId, currentOrderIndex, targetOrderIndex]), ) } else { db.prepare( `UPDATE folders SET orderIndex = orderIndex + 1 WHERE parentId ${currentParentId === null ? 'IS NULL' : '= ?'} AND orderIndex >= ? AND orderIndex < ?`, ).run( ...(currentParentId === null ? [targetOrderIndex, currentOrderIndex] : [currentParentId, targetOrderIndex, currentOrderIndex]), ) } } else { db.prepare( `UPDATE folders SET orderIndex = orderIndex - 1 WHERE parentId ${currentParentId === null ? 'IS NULL' : '= ?'} AND orderIndex > ?`, ).run( ...(currentParentId === null ? [currentOrderIndex] : [currentParentId, currentOrderIndex]), ) db.prepare( `UPDATE folders SET orderIndex = orderIndex + 1 WHERE parentId ${targetParentId === null ? 'IS NULL' : '= ?'} AND orderIndex >= ?`, ).run( ...(targetParentId === null ? [targetOrderIndex] : [targetParentId, targetOrderIndex]), ) } } } const updateStmt = db.prepare(` UPDATE folders SET ${updateFields.join(', ')} WHERE id = ? `) updateStmt.run(...updateParams) }) transaction() return { invalidInput: false, notFound: isNotFound, } }, deleteFolder: (id: number) => { const db = useDB() const folder = db .prepare( ` SELECT id FROM folders WHERE id = ? `, ) .get(id) if (!folder) { return { deleted: false } } const transaction = db.transaction(() => { const findAllSubfolders = (parentId: number): number[] => { const childFolders = db .prepare( ` SELECT id FROM folders WHERE parentId = ? `, ) .all(parentId) as { id: number }[] let allSubfolders: number[] = childFolders.map(folder => folder.id) for (const folder of childFolders) { allSubfolders = allSubfolders.concat(findAllSubfolders(folder.id)) } return allSubfolders } const subfolderIds = findAllSubfolders(id) const allFolderIds = [id, ...subfolderIds] db.prepare( ` UPDATE snippets SET isDeleted = 1, folderId = null WHERE folderId IN (${allFolderIds.join(',')}) `, ).run() if (subfolderIds.length > 0) { db.prepare( ` DELETE FROM folders WHERE id IN (${subfolderIds.join(',')}) `, ).run() } db.prepare( ` DELETE FROM folders WHERE id = ? `, ).run(id) }) transaction() return { deleted: true } }, } } ================================================ FILE: src/main/storage/providers/sqlite/index.ts ================================================ import type { StorageProvider } from '../../contracts' import { createSqliteFoldersStorage } from './folders' import { createSqliteSnippetsStorage } from './snippets' import { createSqliteTagsStorage } from './tags' export const sqliteStorageProvider: StorageProvider = { folders: createSqliteFoldersStorage(), snippets: createSqliteSnippetsStorage(), tags: createSqliteTagsStorage(), } ================================================ FILE: src/main/storage/providers/sqlite/snippets.ts ================================================ import type { SnippetContentCreateInput, SnippetContentUpdateInput, SnippetContentUpdateResult, SnippetRecord, SnippetsCount, SnippetsQueryInput, SnippetsStorage, SnippetTagDeleteRelationResult, SnippetTagRelationResult, SnippetUpdateInput, SnippetUpdateResult, } from '../../contracts' import { useDB } from '../../../db' interface SnippetRow { id: number name: string description: string | null tags: string folder: string | null contents: string isFavorites: number isDeleted: number createdAt: number updatedAt: number } export function createSqliteSnippetsStorage(): SnippetsStorage { return { getSnippets: (query: SnippetsQueryInput) => { const db = useDB() const { search, order, folderId, tagId, isFavorites, isDeleted, isInbox, } = query const searchQuery = search ? `%${query.search}%` : undefined const WHERE: string[] = [] const ORDER = order || 'DESC' const params: any[] = [] if (searchQuery) { WHERE.push(`( unicode_lower(s.name) LIKE unicode_lower(?) OR unicode_lower(s.description) LIKE unicode_lower(?) OR EXISTS ( SELECT 1 FROM snippet_contents sc WHERE sc.snippetId = s.id AND unicode_lower(sc.value) LIKE unicode_lower(?) ) )`) params.push(searchQuery, searchQuery, searchQuery) } if (folderId) { WHERE.push('s.folderId = ?') params.push(folderId) } else if (isInbox) { WHERE.push('s.folderId IS NULL') } if (tagId) { WHERE.push( 'EXISTS (SELECT 1 FROM snippet_tags st2 WHERE st2.snippetId = s.id AND st2.tagId = ?)', ) params.push(tagId) } if (isFavorites) { WHERE.push('s.isFavorites = 1') } if (isDeleted) { WHERE.push('s.isDeleted = 1') } else { WHERE.push('s.isDeleted = 0') } const whereCondition = WHERE.length ? `WHERE ${WHERE.join(' AND ')}` : '' const stmt = db.prepare(` WITH snippet_contents_data AS ( SELECT snippetId, json_group_array( json_object( 'id', id, 'label', label, 'value', value, 'language', language ) ) as contents FROM snippet_contents GROUP BY snippetId ), snippet_data AS ( SELECT s.id, s.name, s.description, s.isFavorites, s.isDeleted, s.createdAt, s.updatedAt, CASE WHEN f.id IS NOT NULL THEN json_object( 'id', f.id, 'name', f.name ) ELSE NULL END as folder, json_group_array( json_object( 'id', t.id, 'name', t.name ) ) FILTER (WHERE t.id IS NOT NULL) as tags, COALESCE(scd.contents, '[]') as contents FROM snippets s LEFT JOIN folders f ON s.folderId = f.id LEFT JOIN snippet_tags st ON s.id = st.snippetId LEFT JOIN tags t ON st.tagId = t.id LEFT JOIN snippet_contents_data scd ON s.id = scd.snippetId ${whereCondition} GROUP BY s.id ) SELECT id, name, description, isFavorites, isDeleted, folder, tags, contents, createdAt, updatedAt FROM snippet_data ORDER BY createdAt ${ORDER} `) const rows = stmt.all(...params) as SnippetRow[] const result = rows.map((snippet) => { return { id: snippet.id, name: snippet.name, description: snippet.description, tags: JSON.parse(snippet.tags) as SnippetRecord['tags'], folder: JSON.parse( snippet.folder as unknown as string, ) as SnippetRecord['folder'], contents: JSON.parse(snippet.contents) as SnippetRecord['contents'], isFavorites: snippet.isFavorites, isDeleted: snippet.isDeleted, createdAt: snippet.createdAt, updatedAt: snippet.updatedAt, } }) return result }, getSnippetsCounts: () => { const db = useDB() const stmt = db.prepare(` SELECT COUNT(*) as total, COALESCE(SUM(CASE WHEN isDeleted = 1 THEN 1 ELSE 0 END), 0) as trash FROM snippets `) return stmt.get() as SnippetsCount }, createSnippet: (input) => { const db = useDB() const { name, folderId } = input const stmt = db.prepare(` INSERT INTO snippets (name, description, folderId, isDeleted, isFavorites, createdAt, updatedAt) VALUES (?, ?, ?, ?, ?, ?, ?) `) const now = Date.now() const { lastInsertRowid } = stmt.run( name, null, folderId, 0, 0, now, now, ) return { id: Number(lastInsertRowid) } }, createSnippetContent: (snippetId, input: SnippetContentCreateInput) => { const db = useDB() const { label, value, language } = input const stmt = db.prepare(` INSERT INTO snippet_contents (snippetId, label, value, language) VALUES (?, ?, ?, ?) `) const { lastInsertRowid } = stmt.run( snippetId, label, value || null, language, ) return { id: Number(lastInsertRowid) } }, updateSnippet: (id, input: SnippetUpdateInput): SnippetUpdateResult => { const db = useDB() const updateFields: string[] = [] const updateParams: any[] = [] if ('name' in input) { updateFields.push('name = ?') updateParams.push(input.name) } if ('description' in input) { updateFields.push('description = ?') updateParams.push(input.description) } if ('folderId' in input) { updateFields.push('folderId = ?') updateParams.push(input.folderId) } if ('isFavorites' in input) { updateFields.push('isFavorites = ?') updateParams.push(input.isFavorites) } if ('isDeleted' in input) { updateFields.push('isDeleted = ?') updateParams.push(input.isDeleted) } if (updateFields.length === 0) { return { invalidInput: true, notFound: false, } } updateFields.push('updatedAt = ?') updateParams.push(Date.now()) updateParams.push(id) const stmt = db.prepare(` UPDATE snippets SET ${updateFields.join(', ')} WHERE id = ? `) const result = stmt.run(...updateParams) return { invalidInput: false, notFound: !result.changes, } }, updateSnippetContent: ( snippetId, contentId, input: SnippetContentUpdateInput, ): SnippetContentUpdateResult => { const db = useDB() const updateFields: string[] = [] const updateParams: any[] = [] if ('label' in input) { updateFields.push('label = ?') updateParams.push(input.label) } if ('value' in input) { updateFields.push('value = ?') updateParams.push(input.value) } if ('language' in input) { updateFields.push('language = ?') updateParams.push(input.language) } if (updateFields.length === 0) { return { invalidInput: true, notFound: false, parentNotFound: false, } } updateParams.push(contentId) const contentsStmt = db.prepare(` UPDATE snippet_contents SET ${updateFields.join(', ')} WHERE id = ? `) const contentsResult = contentsStmt.run(...updateParams) if (!contentsResult.changes) { return { invalidInput: false, notFound: true, parentNotFound: false, } } const snippetsStmt = db.prepare(` UPDATE snippets SET updatedAt = ? WHERE id = ? `) const snippetResult = snippetsStmt.run(Date.now(), snippetId) return { invalidInput: false, notFound: false, parentNotFound: !snippetResult.changes, } }, addTagToSnippet: (snippetId, tagId): SnippetTagRelationResult => { const db = useDB() const snippet = db .prepare( ` SELECT id FROM snippets WHERE id = ? `, ) .get(snippetId) if (!snippet) { return { notFound: false, snippetFound: false, tagFound: true, } } const tag = db .prepare( ` SELECT id FROM tags WHERE id = ? `, ) .get(tagId) if (!tag) { return { notFound: false, snippetFound: true, tagFound: false, } } const stmt = db.prepare( ` INSERT INTO snippet_tags (snippetId, tagId) VALUES (?, ?) `, ) stmt.run(snippetId, tagId) return { notFound: false, snippetFound: true, tagFound: true, } }, deleteTagFromSnippet: ( snippetId, tagId, ): SnippetTagDeleteRelationResult => { const db = useDB() const snippet = db .prepare( ` SELECT id FROM snippets WHERE id = ? `, ) .get(snippetId) if (!snippet) { return { notFound: false, snippetFound: false, tagFound: true, relationFound: true, } } const tag = db .prepare( ` SELECT id FROM tags WHERE id = ? `, ) .get(tagId) if (!tag) { return { notFound: false, snippetFound: true, tagFound: false, relationFound: true, } } const stmt = db.prepare( ` DELETE FROM snippet_tags WHERE snippetId = ? AND tagId = ? `, ) const result = stmt.run(snippetId, tagId) return { notFound: false, snippetFound: true, tagFound: true, relationFound: !!result.changes, } }, deleteSnippet: (id) => { const db = useDB() const snippet = db .prepare( ` SELECT id FROM snippets WHERE id = ? `, ) .get(id) if (!snippet) { return { deleted: false } } const transaction = db.transaction(() => { db.prepare( ` DELETE FROM snippet_tags WHERE snippetId = ? `, ).run(id) db.prepare( ` DELETE FROM snippet_contents WHERE snippetId = ? `, ).run(id) db.prepare( ` DELETE FROM snippets WHERE id = ? `, ).run(id) }) transaction() return { deleted: true } }, emptyTrash: () => { const db = useDB() const deletedSnippets = db .prepare( ` SELECT id FROM snippets WHERE isDeleted = 1 `, ) .all() as { id: number }[] if (deletedSnippets.length === 0) { return { deletedCount: 0 } } const transaction = db.transaction(() => { db.prepare( ` DELETE FROM snippet_tags WHERE snippetId IN (SELECT id FROM snippets WHERE isDeleted = 1) `, ).run() db.prepare( ` DELETE FROM snippet_contents WHERE snippetId IN (SELECT id FROM snippets WHERE isDeleted = 1) `, ).run() const result = db .prepare( ` DELETE FROM snippets WHERE isDeleted = 1 `, ) .run() return result.changes }) const deletedCount = transaction() return { deletedCount } }, deleteSnippetContent: (contentId) => { const db = useDB() const result = db .prepare( ` DELETE FROM snippet_contents WHERE id = ? `, ) .run(contentId) return { deleted: !!result.changes } }, } } ================================================ FILE: src/main/storage/providers/sqlite/tags.ts ================================================ import type { TagRecord, TagsStorage } from '../../contracts' import { useDB } from '../../../db' export function createSqliteTagsStorage(): TagsStorage { return { getTags: () => { const db = useDB() const stmt = db.prepare(` SELECT id, name FROM tags ORDER BY name ASC `) return stmt.all() as TagRecord[] }, createTag: (name) => { const db = useDB() const stmt = db.prepare( `INSERT INTO tags (name, createdAt, updatedAt) VALUES (?, ?, ?)`, ) const now = Date.now() const { lastInsertRowid } = stmt.run(name, now, now) return { id: Number(lastInsertRowid) } }, deleteTag: (id) => { const db = useDB() const tag = db .prepare( ` SELECT id FROM tags WHERE id = ? `, ) .get(id) if (!tag) { return { deleted: false } } const transaction = db.transaction(() => { db.prepare( ` DELETE FROM snippet_tags WHERE tagId = ? `, ).run(id) const stmt = db.prepare(`DELETE FROM tags WHERE id = ?`) stmt.run(id) }) transaction() return { deleted: true } }, } } ================================================ FILE: src/main/store/constants.ts ================================================ import type { EditorSettings } from './types' export const APP_DEFAULTS = { sizes: { sidebar: 180, snippetList: 250, tagsList: 50, // в % }, } export const EDITOR_DEFAULTS: EditorSettings = { fontSize: 13, fontFamily: 'SF Mono, Consolas, Menlo, Ubuntu Mono, monospace', wrap: false, tabSize: 2, trailingComma: 'all', semi: false, singleQuote: false, highlightLine: false, matchBrackets: true, } ================================================ FILE: src/main/store/index.ts ================================================ import app from './module/app' import currencyRates from './module/currency-rates' import mathNotebook from './module/math-notebook' import preferences from './module/preferences' export const store = { app, currencyRates, preferences, mathNotebook, } ================================================ FILE: src/main/store/module/app.ts ================================================ import type { AppStore } from '../types' import Store from 'electron-store' import { APP_DEFAULTS } from '../constants' export default new Store({ name: 'app', cwd: 'v2', defaults: { bounds: {}, sizes: { sidebarWidth: APP_DEFAULTS.sizes.sidebar, snippetListWidth: APP_DEFAULTS.sizes.snippetList, tagsListHeight: APP_DEFAULTS.sizes.tagsList, }, state: {}, isAutoMigratedFromJson: false, lastSeenReleaseNoticeVersion: '', lastNotifiedUpdateVersion: '', }, }) ================================================ FILE: src/main/store/module/currency-rates.ts ================================================ import type { CurrencyRatesStore } from '../types' import Store from 'electron-store' export default new Store({ name: 'currency-rates', cwd: 'v2', defaults: { cache: null, }, }) ================================================ FILE: src/main/store/module/math-notebook.ts ================================================ import type { MathNotebookStore } from '../types' import Store from 'electron-store' export default new Store({ name: 'math-notebook', cwd: 'v2', defaults: { sheets: [], activeSheetId: null, }, }) ================================================ FILE: src/main/store/module/preferences.ts ================================================ import type { PreferencesStore } from '../types' import { homedir, platform } from 'node:os' import path from 'node:path' import { app } from 'electron' import Store from 'electron-store' import fs from 'fs-extra' import { EDITOR_DEFAULTS } from '../constants' const isWin = platform() === 'win32' const storagePath = isWin ? `${homedir()}\\massCode` : `${homedir()}/massCode` const backupPath = isWin ? `${storagePath}\\backups` : `${storagePath}/backups` // Detect the correct default engine BEFORE the store constructor merges // defaults into the preferences file. Without this, existing SQLite users // who never had a `storage.engine` key would get 'markdown' as default, // making all their snippets invisible. function detectDefaultEngine(): 'sqlite' | 'markdown' { try { const prefsPath = path.join( app.getPath('userData'), 'v2', 'preferences.json', ) if (fs.existsSync(prefsPath)) { const raw = JSON.parse(fs.readFileSync(prefsPath, 'utf8')) // User already has an explicit engine setting — respect it if (raw.storage?.engine) { return raw.storage.engine } // No engine setting — check if SQLite DB exists (existing user) const userStoragePath = raw.storagePath || storagePath const dbPath = path.join(userStoragePath, 'massCode.db') if (fs.existsSync(dbPath)) { return 'sqlite' } } } catch { // If anything goes wrong reading the file, fall through to default } return 'markdown' } const preferencesStore = new Store({ name: 'preferences', cwd: 'v2', defaults: { storagePath, apiPort: 4321, language: 'en_US', theme: 'auto', editor: EDITOR_DEFAULTS, storage: { engine: detectDefaultEngine(), vaultPath: null, }, markdown: { scale: 1, }, backup: { path: backupPath, enabled: true, interval: 6, maxBackups: 5, }, }, }) export default preferencesStore ================================================ FILE: src/main/store/types/index.ts ================================================ import type ElectronStore from 'electron-store' export interface AppStore { bounds: object sizes: { sidebarWidth: number snippetListWidth: number tagsListHeight: number } state: { snippetId?: number snippetContentIndex?: number folderId?: number tagId?: number libraryFilter?: string isSidebarHidden?: boolean } isAutoMigratedFromJson: boolean nextDonateNotification?: number lastSeenReleaseNoticeVersion?: string lastNotifiedUpdateVersion?: string } export interface EditorSettings { fontSize: number fontFamily: string wrap: boolean tabSize: number trailingComma: 'all' | 'none' | 'es5' semi: boolean singleQuote: boolean highlightLine: boolean matchBrackets: boolean } export interface MarkdownSettings { scale: number } export interface StorageSettings { engine: 'sqlite' | 'markdown' vaultPath: string | null } export interface BackupSettings { path: string enabled: boolean interval: number maxBackups: number lastBackupTime?: number } export interface PreferencesStore { storagePath: string apiPort: number language: string theme: string editor: EditorSettings storage: StorageSettings markdown: MarkdownSettings backup: BackupSettings } export interface MathSheet { id: string name: string content: string createdAt: number updatedAt: number } export interface MathNotebookStore { sheets: MathSheet[] activeSheetId: string | null } export interface CurrencyRatesCache { rates: Record fetchedAt: number } export interface CurrencyRatesStore { cache: CurrencyRatesCache | null } export interface Store { app: ElectronStore preferences: ElectronStore mathNotebook: ElectronStore currencyRates: ElectronStore } ================================================ FILE: src/main/store/types/theme.ts ================================================ export type ThemeType = 'light' | 'dark' export type ThemeColors = Record export type ThemeEditorColors = Record export interface ThemeFile { name: string author?: string type: ThemeType colors?: ThemeColors editorColors?: ThemeEditorColors } export interface ThemeListItem { id: string name: string author?: string type: ThemeType } ================================================ FILE: src/main/types/index.ts ================================================ import type { IpcRendererEvent } from 'electron' import type { Store } from '../store/types' import type { Channel } from './ipc' export interface EventCallback { (event?: IpcRendererEvent, ...args: any[]): void } export interface DBQueryArgs { sql: string params?: unknown[] } declare global { interface Window { electron: { ipc: { on: (channel: Channel, cb: EventCallback) => void send: (channel: Channel, data: any, cb: EventCallback) => void invoke: (channel: Channel, data: T) => Promise removeListener: (channel: Channel, cb: EventCallback) => void removeListeners: (channel: Channel) => void } db: { query: (sql: string, params?: any[]) => Promise } store: Store i18n: { t: (key: string, options?: any) => string } } } // eslint-disable-next-line ts/no-namespace namespace Electron { interface IpcMain { // eslint-disable-next-line ts/method-signature-style handle( channel: Channel, listener: (event: IpcMainInvokeEvent, payload: T) => Promise, ): void } } } ================================================ FILE: src/main/types/ipc.ts ================================================ import type { OpenDialogOptions } from 'electron' export type CombineWith = `${U}:${T}` type MainMenuAction = | 'add-description' | 'copy-snippet' | 'find' | 'font-size-decrease' | 'font-size-increase' | 'font-size-reset' | 'format' | 'goto-preferences' | 'goto-devtools' | 'new-folder' | 'new-fragment' | 'new-snippet' | 'open-dialog' | 'preview-markdown' | 'preview-mindmap' | 'preview-code' | 'preview-json' | 'presentation-mode' | 'toggle-sidebar' | 'goto-math-notebook' type DBAction = | 'relaod' | 'move' | 'migrate' | 'migrate-to-markdown' | 'migrate-to-sqlite' | 'clear' | 'backup' | 'restore' | 'delete-backup' | 'backup-list' | 'start-auto-backup' | 'stop-auto-backup' | 'move-backup' type SystemAction = | 'currency-rates' | 'reload' | 'open-external' | 'deep-link' | 'update-available' | 'feature-notice' | 'renderer-ready' | 'storage-synced' | 'error' type PrettierAction = 'format' type FsAction = 'assets' type ThemeAction = 'list' | 'get' | 'open-dir' | 'create-template' | 'changed' type SpacesAction = 'math:read' | 'math:write' export type MainMenuChannel = CombineWith export type DBChannel = CombineWith export type SystemChannel = CombineWith export type PrettierChannel = CombineWith export type FsChannel = CombineWith export type ThemeChannel = CombineWith export type SpacesChannel = CombineWith export type Channel = | MainMenuChannel | DBChannel | SystemChannel | PrettierChannel | FsChannel | ThemeChannel | SpacesChannel export interface DialogOptions { properties?: OpenDialogOptions['properties'] filters?: OpenDialogOptions['filters'] } export interface PrettierOptions { text: string parser: string } export interface FsAssetsOptions { path: string } ================================================ FILE: src/main/updates/index.ts ================================================ /* eslint-disable node/prefer-global/process */ import { repository, version } from '../../../package.json' import { send } from '../ipc' import { store } from '../store' interface GitHubRelease { tag_name: string } const INTERVAL = 1000 * 60 * 60 * 3 // 3 часа const isDev = process.env.NODE_ENV === 'development' const currentVersionParts = parseVersion(version)! const currentMajorVersion = currentVersionParts[0] function parseVersion(rawVersion: string): [number, number, number] | null { const normalizedVersion = rawVersion.trim().replace(/^v/, '') const match = normalizedVersion.match(/^(\d+)\.(\d+)\.(\d+)$/) if (!match) { return null } return [ Number.parseInt(match[1], 10), Number.parseInt(match[2], 10), Number.parseInt(match[3], 10), ] } function compareVersions( left: [number, number, number], right: [number, number, number], ): 1 | -1 | 0 { for (let i = 0; i < 3; i += 1) { if (left[i] === right[i]) { continue } return left[i] > right[i] ? 1 : -1 } return 0 } function getLatestReleaseVersion(releases: GitHubRelease[]) { let latestParsedVersion: [number, number, number] | null = null for (const release of releases) { const parsedVersion = parseVersion(release.tag_name) if (!parsedVersion || parsedVersion[0] !== currentMajorVersion) { continue } if ( !latestParsedVersion || compareVersions(parsedVersion, latestParsedVersion) > 0 ) { latestParsedVersion = parsedVersion } } return latestParsedVersion?.join('.') } function isNewerVersion(versionToCompare: string) { const parsedVersion = parseVersion(versionToCompare) if (!parsedVersion) { return false } return compareVersions(parsedVersion, currentVersionParts) > 0 } export async function fetchUpdates() { if (isDev) { return } try { const url = `${repository.replace('github.com', 'api.github.com/repos')}/releases` const response = await fetch(url) if (!response.ok) { return } const data = (await response.json()) as GitHubRelease[] if (!Array.isArray(data) || data.length === 0) { return } const latestVersion = getLatestReleaseVersion(data) if (latestVersion && isNewerVersion(latestVersion)) { return latestVersion } } catch (err) { console.error('Error checking for updates:', err) } } async function notifyAboutUpdate() { const latestVersion = await fetchUpdates() if (!latestVersion) { return } const lastNotifiedVersion = store.app.get('lastNotifiedUpdateVersion') if (lastNotifiedVersion === latestVersion) { return } send('system:update-available') store.app.set('lastNotifiedUpdateVersion', latestVersion) } export function checkForUpdates() { void notifyAboutUpdate() setInterval(() => { void notifyAboutUpdate() }, INTERVAL) } ================================================ FILE: src/main/utils/index.ts ================================================ import { BrowserWindow } from 'electron' export function log(context: string, error: unknown): void { const message = error instanceof Error ? error.message : String(error) const stack = error instanceof Error ? error.stack : undefined console.error(`[${context}] ${message}`, error) BrowserWindow.getFocusedWindow()?.webContents.send('system:error', { context, message, stack, }) } export function importEsm(specifier: string) { // eslint-disable-next-line no-new-func return new Function('s', 'return import(s)')(specifier) as Promise } ================================================ FILE: src/renderer/App.vue ================================================ ================================================ FILE: src/renderer/components/app-space-shell/AppSpaceShell.vue ================================================ ================================================ FILE: src/renderer/components/code-space-layout/CodeSpaceLayout.vue ================================================ ================================================ FILE: src/renderer/components/devtools/ShadcnComparison.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/Base64Converter.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/CaseConverter.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/ColorConverter.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/JsonToToml.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/JsonToXml.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/JsonToYaml.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/TextToAsciiBinary.vue ================================================ ================================================ FILE: src/renderer/components/devtools/converters/TextToUnicode.vue ================================================ ================================================ FILE: src/renderer/components/devtools/crypto/Hash.vue ================================================ ================================================ FILE: src/renderer/components/devtools/crypto/Hmac.vue ================================================ ================================================ FILE: src/renderer/components/devtools/crypto/Password.vue ================================================ ================================================ FILE: src/renderer/components/devtools/crypto/Uuid.vue ================================================ ================================================ FILE: src/renderer/components/devtools/generators/JsonGenerator.vue ================================================ ================================================ FILE: src/renderer/components/devtools/generators/LoremIpsumGenerator.vue ================================================ ================================================ FILE: src/renderer/components/devtools/shadcn-comparison/RootUi.vue ================================================ ================================================ FILE: src/renderer/components/devtools/shadcn-comparison/Shadcn2.vue ================================================ ================================================ FILE: src/renderer/components/devtools/shadcn-comparison/copy.ts ================================================ export const surfaceClass = 'rounded-lg border border-border bg-card p-4' export const cardTitleClass = 'mb-3 text-sm font-semibold' export const demoStackClass = 'space-y-3' export const options = ['alpha', 'beta', 'gamma'] as const export const copy = { title: 'shadcn demo', description: 'Сравнение root UI-адаптеров, legacy shadcn и нового набора shadcn перед заменой импортов в приложении.', sections: { rootUi: 'Root UI adapters', rootUiDescription: 'Совместимые обёртки, которые сохраняют текущий API приложения, но уже опираются на shadcn.', legacyShadcn: 'Legacy shadcn', legacyShadcnDescription: 'Текущие компоненты на базе Radix, которые пока используются в приложении.', newShadcn2: 'shadcn', newShadcn2Description: 'CLI-сгенерированные компоненты на базе Reka, приведённые к масштабу 28px и переведённые на shadcn color tokens.', }, cards: { buttons: 'Buttons', inputs: 'Inputs', text: 'Text', textDescription: 'Реальные UI-паттерны приложения, построенные на UiText вместо инлайн Tailwind-классов.', textPatterns: 'UI Patterns', textReference: 'Reference', contentEditable: 'Contenteditable textarea', selection: 'Select and tabs', toggles: 'Checkbox and switch', checkbox: 'Checkbox', switch: 'Switch', overlays: 'Tooltip, popover and dialog', command: 'Command', contextMenu: 'Context menu', resizable: 'Resizable panels', }, states: { default: 'Default', primary: 'Primary', danger: 'Destructive', secondary: 'Secondary', outline: 'Outline', ghostButton: 'Ghost', disabled: 'Disabled', active: 'Active', iconText: 'Icon + text', ghost: 'Ghost', }, text: { inputPlaceholder: 'Введите значение', textareaPlaceholder: 'Введите несколько строк', contentEditablePlaceholder: 'Редактируемый блок описания', description: 'Вспомогательный текст под полем', error: 'Что-то пошло не так', selectPlaceholder: 'Выберите вариант', tabPreview: 'Preview', tabCode: 'Code', previewBody: 'Область предпросмотра', codeBody: 'Область кода', tooltipTrigger: 'Показать tooltip', tooltip: 'Пример tooltip', openPopover: 'Открыть popover', openDialog: 'Открыть dialog', popoverBody: 'Содержимое popover уже использует shadcn tokens и компактные отступы.', dialogTitle: 'Превью dialog', dialogDescription: 'Используйте этот route, чтобы сравнить пропорции перед заменой импортов в боевых экранах.', commandPlaceholder: 'Поиск компонентов...', commandEmpty: 'Ничего не найдено.', commandGroup: 'Actions', rename: 'Rename', duplicate: 'Duplicate', delete: 'Delete', textDefault: 'Default text', textMuted: 'Muted text', textMono: 'Monospace sample', textUppercase: 'Uppercase label', textCaption: 'Caption size', textSemibold: 'Semibold emphasis', // Text demo — real UI patterns sidebarTitle: 'My Workspace', sidebarSection: 'Folders', sidebarFolder1: 'JavaScript', sidebarFolder2: 'TypeScript', sidebarFolder3: 'Vue Components', snippetTitle: 'Array.from() with mapping', snippetFolder: 'JavaScript', snippetDate: '2 hours ago', sectionHeader: 'Request Headers', statusLang: 'TypeScript', statusPosition: 'Ln 42, Col 18', statusEncoding: 'UTF-8', emptyState: 'No snippets found', emptyStateHint: 'Create a new snippet or change the filter', settingLabel: 'Auto-save', settingDescription: 'Automatically save snippets after editing', codeSize: '2.4 KB', codeLines: '84 lines', codeLang: 'typescript', methodGet: 'GET', methodPost: 'POST', methodDelete: 'DELETE', methodGetPath: '/api/snippets', methodPostPath: '/api/snippets', methodDeletePath: '/api/snippets/:id', rightClick: 'Кликните правой кнопкой по триггеру, чтобы открыть меню.', menuTrigger: 'Open menu', resizablePanel: 'Panel', option: { alpha: 'Alpha', beta: 'Beta', gamma: 'Gamma', }, }, } ================================================ FILE: src/renderer/components/devtools/web/Slugify.vue ================================================ ================================================ FILE: src/renderer/components/devtools/web/UrlEncoder.vue ================================================ ================================================ FILE: src/renderer/components/devtools/web/UrlParser.vue ================================================ ================================================ FILE: src/renderer/components/editor/Description.vue ================================================ ================================================ FILE: src/renderer/components/editor/Editor.vue ================================================ ================================================ FILE: src/renderer/components/editor/Footer.vue ================================================ ================================================ FILE: src/renderer/components/editor/Tab.vue ================================================ ================================================ FILE: src/renderer/components/editor/code-image/BackgroundSwitch.vue ================================================ ================================================ FILE: src/renderer/components/editor/code-image/CodeImage.vue ================================================ ================================================ FILE: src/renderer/components/editor/grammars/auxiliary-grammars.ts ================================================ // Технические грамматики для поддержки синтаксиса внутри других языков или специальных случаев export const auxGrammars = [ { source: 'source.sassdoc', language: 'sassdoc', grammar: () => import('./textmate/sassdoc.tmLanguage.json'), }, { source: 'source.scss', language: 'scss2', grammar: () => import('./textmate/scss.tmLanguage.json'), }, { source: 'source.css.nunjucks', language: 'css-nunjucks', grammar: () => import('./textmate/css.tmLanguage.json'), }, { source: 'source.less', language: 'less2', grammar: () => import('./textmate/less.tmLanguage.json'), }, { source: 'source.postcss', language: 'postcss', grammar: () => import('./textmate/postcss.tmLanguage.json'), }, { source: 'source.js.jquery', languages: 'jquery', grammar: () => import('./textmate/javascript.tmLanguage.json'), }, { source: 'source.c++', language: 'c++', grammar: () => import('./textmate/cpp.tmLanguage.json'), }, { source: 'source.c', language: 'c', grammar: () => import('./textmate/cpp.tmLanguage.json'), }, { source: 'source.cpp.embedded.macro', language: 'c-macro', grammar: () => import('./textmate/cpp.embedded.macro.tmLanguage.json'), }, { source: 'source.x86', language: 'x86', grammar: () => import('./textmate/asm.tmLanguage.json'), }, { source: 'source.x86_64', language: 'x86_64', grammar: () => import('./textmate/asm.tmLanguage.json'), }, { source: 'source.json.comments', language: 'json-comment', grammar: () => import('./textmate/jsonc.tmLanguage.json'), }, { source: 'source.js.regexp', language: 'regexp-javascript', grammar: () => import('./textmate/regexp-javascript.tmLanguage.json'), }, { source: 'source.regexp.python', language: 'regexp-python', grammar: () => import('./textmate/regexp-python.tmLanguage.json'), }, { source: 'source.regexp.posix', language: 'regexp-posix', grammar: () => import('./textmate/regexp-posix.tmLanguage.json'), }, { source: 'source.regexp.extended', language: 'regexp-extended', grammar: () => import('./textmate/regexp-extended.tmLanguage.json'), }, { source: 'source.sy', language: 'sy', grammar: () => import('./textmate/syon.tmLanguage.json'), }, { source: 'text.bibtex', language: 'bibtex', grammar: () => import('./textmate/bibtex.tmLanguage.json'), }, { source: 'source.gnuplot', language: 'gnuplot', grammar: () => import('./textmate/gnuplot.tmLanguage.json'), }, { source: 'source.asymptote', language: 'asymptote', grammar: () => import('./textmate/asymptote.tmLanguage.json'), }, { source: 'source.arm', language: 'arm', grammar: () => import('./textmate/arm.tmLanguage.json'), }, { source: 'text.elixir', language: 'elixir2', grammar: () => import('./textmate/eex.tmLanguage.json'), }, { source: 'text.html.derivative', language: 'html-derivative', grammar: () => import('./textmate/html-derivative.tmLanguage.json'), }, { source: 'text.tex.markdown_latex_combined', language: 'markdown-latex-combined', grammar: () => import('./textmate/markdown-latex-combined.tmLanguage.json'), }, { source: 'source.cpp.embedded.latex', language: 'cpp-embedded-latex', grammar: () => import('./textmate/cpp-embedded-latex.tmLanguage.json'), }, { source: 'text.log', language: 'text-log', grammar: () => import('./textmate/log.tmLanguage.json'), }, { source: 'text.git-rebase', language: 'git-rebase', grammar: () => import('./textmate/git-rebase.tmLanguage.json'), }, { source: 'text.git-commit', language: 'git-commit', grammar: () => import('./textmate/git-commit.tmLanguage.json'), }, { source: 'text.html.javadoc', language: 'javadoc', grammar: () => import('./textmate/javadoc.tmLanguage.json'), }, { source: 'source.postscript', language: 'postscript', grammar: () => import('./textmate/postscript.tmLanguage.json'), }, { source: 'etc', language: 'etc', grammar: () => import('./textmate/etc.tmLanguage.json'), }, { source: 'source.cfscript', language: 'cfscript', grammar: () => import('./textmate/cfscript.tmLanguage.json'), }, { source: 'text.html.cfm', language: 'html-cfm', grammar: () => import('./textmate/html-cfml.tmLanguage.json'), }, { source: 'source.js.jsx', language: 'jsx2', grammar: () => import('./textmate/jsx.tmLanguage.json'), }, { source: 'text.html.php', language: 'php2', grammar: () => import('./textmate/php.tmLanguage.json'), }, { source: 'source.xq', language: 'xq', grammar: () => import('./textmate/xquery.tmLanguage.json'), }, { source: 'source.md', language: 'md', grammar: () => import('./textmate/markdown.tmLanguage.json'), }, { source: 'source.erb', language: 'erb', grammar: () => import('./textmate/html-ruby.tmLanguage.json'), }, { source: 'text.jade', language: 'jade', grammar: () => import('./textmate/pug.tmLanguage.json'), }, { source: 'text.slm', language: 'slm', grammar: () => import('./textmate/slm.tmLanguage.json'), }, ] ================================================ FILE: src/renderer/components/editor/grammars/index.ts ================================================ import type { GrammarOption, Language } from '../types' import { activateLanguage, addGrammar } from 'codemirror-textmate' import { auxGrammars } from './auxiliary-grammars' import { languages } from './languages' export async function loadGrammars() { const grammars: Record = {} languages .filter(i => i.grammar) .forEach(async (i) => { if (!i.scopeName || !i.grammar) return grammars[i.scopeName] = { grammar: i.grammar, language: i.value, priority: 'defer', } }) auxGrammars.forEach((i) => { grammars[i.source] = { grammar: i.grammar, language: i.language as Language, priority: 'defer', } }) await Promise.all( Object.keys(grammars).map(async (scopeName) => { const { grammar, language, priority } = grammars[scopeName] const { default: grammarDoc } = await grammar() try { addGrammar(scopeName, grammarDoc) if (language) { const prom = activateLanguage(scopeName, language, priority) if (priority === 'now') { await prom } } } catch (err) { console.error(err) } }), ) } ================================================ FILE: src/renderer/components/editor/grammars/languages.ts ================================================ import type { Language, LanguageOption } from '../types' export const languages: LanguageOption[] = [ { name: 'ABAP', value: 'abap', grammar: () => import('./textmate/abap.tmLanguage.json'), scopeName: 'source.abap', }, // Возможно несоответствие { name: 'ABC', value: 'abc', grammar: () => import('./textmate/abc.tmLanguage.json'), scopeName: 'text.abcnotation', }, { name: 'ActionScript', value: 'actionscript', grammar: () => import('./textmate/actionscript-3.tmLanguage.json'), scopeName: 'source.actionscript.3', }, { name: 'ADA', value: 'ada', grammar: () => import('./textmate/ada.tmLanguage.json'), scopeName: 'source.ada', }, { name: 'Alda', value: 'alda', grammar: () => import('./textmate/alda.tmLanguage.json'), scopeName: 'source.alda', }, { name: 'Apache Conf', value: 'apache_conf', grammar: () => import('./textmate/apache.tmLanguage.json'), scopeName: 'source.apacheconf', }, { name: 'Apex', value: 'apex', grammar: () => import('./textmate/apex.tmLanguage.json'), scopeName: 'source.apex', }, { name: 'Apple Script', value: 'applescript', grammar: () => import('./textmate/applescript.tmLanguage.json'), scopeName: 'source.applescript', }, { name: 'AsciiDoc', value: 'asciidoc', grammar: () => import('./textmate/asciidoctor.tmLanguage.json'), scopeName: 'text.asciidoc', }, { name: 'ASL', value: 'asl', grammar: () => import('./textmate/asl.tmLanguage.json'), scopeName: 'source.asl', }, { name: 'ASP vb.NET (VBScript)', value: 'asp_vb_net', grammar: () => import('./textmate/asp-vb-net.tmlanguage.json'), scopeName: 'source.asp.vb.net', }, { name: 'Assembly x86', value: 'assembly_x86', grammar: () => import('./textmate/asm.tmLanguage.json'), scopeName: 'source.asm', }, { name: 'AutoHotkey / AutoIt', value: 'autohotkey', grammar: () => import('./textmate/autohotkey.tmLanguage.json'), scopeName: 'source.ahk', }, { name: 'Bash', value: 'sh', grammar: () => import('./textmate/shell-unix-bash.tmLanguage.json'), scopeName: 'source.shell', }, { name: 'BatchFile', value: 'batchfile', grammar: () => import('./textmate/batchfile.tmLanguage.json'), scopeName: 'source.batchfile', }, { name: 'Bicep', value: 'bicep', grammar: () => import('./textmate/bicep.tmLanguage.json'), scopeName: 'source.bicep', }, { name: 'C and C++', value: 'c_cpp', grammar: () => import('./textmate/cpp.tmLanguage.json'), scopeName: 'source.cpp', }, { name: 'C#', value: 'csharp', grammar: () => import('./textmate/csharp.tmLanguage.json'), scopeName: 'source.cs', }, { name: 'Cirru', value: 'cirru', grammar: () => import('./textmate/cirru.tmLanguage.json'), scopeName: 'source.cirru', }, { name: 'Clojure', value: 'clojure', grammar: () => import('./textmate/clojure.tmLanguage.json'), scopeName: 'source.clojure', }, { name: 'Cobol', value: 'cobol', grammar: () => import('./textmate/cobol.tmLanguage.json'), scopeName: 'source.cobol', }, { name: 'CoffeeScript', value: 'coffee', grammar: () => import('./textmate/coffee.tmLanguage.json'), scopeName: 'source.coffee', }, { name: 'ColdFusion', value: 'coldfusion', grammar: () => import('./textmate/coldfusion.tmLanguage.json'), scopeName: 'text.cfml.basic', }, { name: 'Crystal', value: 'crystal', grammar: () => import('./textmate/crystal.tmLanguage.json'), scopeName: 'source.crystal', }, { name: 'Csound', value: 'csound_orchestra', grammar: () => import('./textmate/csound.tmLanguage.json'), scopeName: 'source.csound', }, { name: 'Csound Document', value: 'csound_document', grammar: () => import('./textmate/csound-document.tmLanguage.json'), scopeName: 'source.csound-document', }, { name: 'Csound Score', value: 'csound_score', grammar: () => import('./textmate/csound-score.tmLanguage.json'), scopeName: 'source.csound-score', }, { name: 'CSS', value: 'css', grammar: () => import('./textmate/css.tmLanguage.json'), scopeName: 'source.css', }, { name: 'Curly', value: 'curly', grammar: () => import('./textmate/curly.tmLanguage.json'), scopeName: 'text.html.curly', }, { name: 'D', value: 'd', grammar: () => import('./textmate/d.tmLanguage.json'), scopeName: 'source.d', }, { name: 'Dart', value: 'dart', grammar: () => import('./textmate/dart.tmLanguage.json'), scopeName: 'source.dart', }, { name: 'Diff', value: 'diff', grammar: () => import('./textmate/diff.tmLanguage.json'), scopeName: 'source.diff', }, { name: 'Django', value: 'django', grammar: () => import('./textmate/django.tmLanguage.json'), scopeName: 'source.python.django', }, { name: 'Dockerfile', value: 'dockerfile', grammar: () => import('./textmate/docker.tmLanguage.json'), scopeName: 'source.dockerfile', }, { name: 'Dot', value: 'dot', grammar: () => import('./textmate/dot.tmLanguage.json'), scopeName: 'source.dot', }, { name: 'Drools', value: 'drools', grammar: () => import('./textmate/drools.tmLanguage.json'), scopeName: 'source.drools', }, { name: 'Edifact', value: 'edifact', grammar: () => import('./textmate/edifact.tmLanguage.json'), scopeName: 'text.plain.edifact', }, { name: 'Eiffel', value: 'eiffel', grammar: () => import('./textmate/eiffel.tmLanguage.json'), scopeName: 'source.eiffel', }, { name: 'EJS', value: 'ejs', grammar: () => import('./textmate/ejs.tmLanguage.json'), scopeName: 'text.html.js', }, { name: 'Elixir', value: 'elixir', grammar: () => import('./textmate/elixir.tmLanguage.json'), scopeName: 'source.elixir', }, { name: 'Elm', value: 'elm', grammar: () => import('./textmate/elm.tmLanguage.json'), scopeName: 'source.elm', }, { name: 'Erlang', value: 'erlang', grammar: () => import('./textmate/erlang.tmLanguage.json'), scopeName: 'source.erlang', }, { name: 'Forth', value: 'forth', grammar: () => import('./textmate/forth.tmLanguage.json'), scopeName: 'source.forth', }, { name: 'Fortran', value: 'fortran', grammar: () => import('./textmate/fortran.tmLanguage.json'), scopeName: 'source.fortran', }, { name: 'F#', value: 'fsharp', grammar: () => import('./textmate/fsharp.tmLanguage.json'), scopeName: 'source.fsharp', }, { name: 'Gcode', value: 'gcode', grammar: () => import('./textmate/gcode.tmLanguage.json'), scopeName: 'source.gcode', }, { name: 'Gherkin', value: 'gherkin', grammar: () => import('./textmate/gherkin.tmLanguage.json'), scopeName: 'text.gherkin.feature', }, { name: 'Gitignore', value: 'gitignore', grammar: () => import('./textmate/gitignore.tmLanguage.json'), scopeName: 'source.gitignore', }, { name: 'Glsl', value: 'glsl', grammar: () => import('./textmate/glsl.tmLanguage.json'), scopeName: 'source.glsl', }, { name: 'Go', value: 'golang', grammar: () => import('./textmate/go.tmLanguage.json'), scopeName: 'source.go', }, { name: 'GraphQL', value: 'graphqlschema', grammar: () => import('./textmate/graphql.tmLanguage.json'), scopeName: 'source.graphql', }, { name: 'Groovy', value: 'groovy', grammar: () => import('./textmate/groovy.tmLanguage.json'), scopeName: 'source.groovy', }, { name: 'HAML', value: 'haml', grammar: () => import('./textmate/haml.tmLanguage.json'), scopeName: 'text.haml', }, { name: 'Handlebars', value: 'handlebars', grammar: () => import('./textmate/handlebars.tmLanguage.json'), scopeName: 'text.html.handlebars', }, // Возможно несоответствие { name: 'Haskell Cabal', value: 'haskell_cabal', grammar: () => import('./textmate/haskell-cabal.tmLanguage.json'), scopeName: 'source.cabal', }, { name: 'Haskell', value: 'haskell', grammar: () => import('./textmate/haskell.tmLanguage.json'), scopeName: 'source.haskell', }, { name: 'haXe', value: 'haxe', grammar: () => import('./textmate/haxe.tmLanguage.json'), scopeName: 'source.hx', }, { name: 'Hjson', value: 'hjson', grammar: () => import('./textmate/hjson.tmLanguage.json'), scopeName: 'source.hjson', }, { name: 'HTML (Elixir)', value: 'html_elixir', grammar: () => import('./textmate/html-elixir.tmLanguage.json'), scopeName: 'text.html.elixir', }, { name: 'HTML (Ruby)', value: 'html_ruby', grammar: () => import('./textmate/html-ruby.tmLanguage.json'), scopeName: 'text.html.erb', }, { name: 'HTML', value: 'html', grammar: () => import('./textmate/html.tmLanguage.json'), scopeName: 'text.html.basic', }, { name: 'INI', value: 'ini', grammar: () => import('./textmate/ini.tmLanguage.json'), scopeName: 'source.ini', }, { name: 'Io', value: 'io', grammar: () => import('./textmate/io.tmLanguage.json'), scopeName: 'source.io', }, { name: 'Java', value: 'java', grammar: () => import('./textmate/java.tmLanguage.json'), scopeName: 'source.java', }, { name: 'JavaScript', value: 'javascript', grammar: () => import('./textmate/javascript.tmLanguage.json'), scopeName: 'source.js', }, { name: 'JSON', value: 'json', grammar: () => import('./textmate/json.tmLanguage.json'), scopeName: 'source.json', }, { name: 'JSON5', value: 'json5', grammar: () => import('./textmate/json5.tmLanguage.json'), scopeName: 'source.json5', }, { name: 'JSONiq', value: 'jsoniq', grammar: () => import('./textmate/jsoniq.tmLanguage.json'), scopeName: 'source.jsoniq', }, { name: 'JSP', value: 'jsp', grammar: () => import('./textmate/jsp.tmLanguage.json'), scopeName: 'text.html.jsp', }, // TODO: сделать общими стилизованые (.jsx, tsx) грамматики { name: 'JSX', value: 'jsx', grammar: () => import('./textmate/jsx.tmLanguage.json'), scopeName: 'source.jsx', }, { name: 'Julia', value: 'julia', grammar: () => import('./textmate/julia.tmLanguage.json'), scopeName: 'source.julia', }, { name: 'Kotlin', value: 'kotlin', grammar: () => import('./textmate/kotlin.tmLanguage.json'), scopeName: 'source.kotlin', }, { name: 'Kusto (KQL)', value: 'kusto', grammar: () => import('./textmate/kusto.tmLanguage.json'), scopeName: 'source.kusto', }, { name: 'LaTeX', value: 'latex', grammar: () => import('./textmate/latex.tmLanguage.json'), scopeName: 'text.tex.latex', }, { name: 'Latte', value: 'latte', grammar: () => import('./textmate/latte.tmLanguage.json'), scopeName: 'source.latte', }, { name: 'LESS', value: 'less', grammar: () => import('./textmate/less.tmLanguage.json'), scopeName: 'source.css.less', }, { name: 'Liquid', value: 'liquid', grammar: () => import('./textmate/liquid.tmLanguage.json'), scopeName: 'source.liquid', }, { name: 'Lisp', value: 'lisp', grammar: () => import('./textmate/lisp.tmLanguage.json'), scopeName: 'source.lisp', }, { name: 'LiveScript', value: 'livescript', grammar: () => import('./textmate/livescript.tmLanguage.json'), scopeName: 'source.livescript', }, { name: 'LSL', value: 'lsl', grammar: () => import('./textmate/lsl.tmLanguage.json'), scopeName: 'source.lsl', }, { name: 'Lua', value: 'lua', grammar: () => import('./textmate/lua.tmLanguage.json'), scopeName: 'source.lua', }, { name: 'Makefile', value: 'makefile', grammar: () => import('./textmate/make.tmLanguage.json'), scopeName: 'source.makefile', }, { name: 'Markdown', value: 'markdown', grammar: () => import('./textmate/markdown.tmLanguage.json'), scopeName: 'text.html.markdown', }, { name: 'Mask', value: 'mask', grammar: () => import('./textmate/mask.tmLanguage.json'), scopeName: 'source.mask', }, { name: 'MATLAB', value: 'matlab', grammar: () => import('./textmate/matlab.tmLanguage.json'), scopeName: 'source.matlab', }, { name: 'MediaWiki', value: 'mediawiki', grammar: () => import('./textmate/mediawiki.tmLanguage.json'), scopeName: 'text.html.mediawiki', }, { name: 'MEL', value: 'mel', grammar: () => import('./textmate/mel.tmLanguage.json'), scopeName: 'source.mel', }, { name: 'Mikrotik', value: 'mikrotik', grammar: () => import('./textmate/mikrotik.tmLanguage.json'), scopeName: 'source.mikrotik-script', }, { name: 'MIPS', value: 'mips', grammar: () => import('./textmate/mips.tmLanguage.json'), scopeName: 'source.mips', }, { name: 'MySQL', value: 'mysql', grammar: () => import('./textmate/mysql.tmLanguage.json'), scopeName: 'source.sql.mysql', }, { name: 'Nginx', value: 'nginx', grammar: () => import('./textmate/nginx.tmLanguage.json'), scopeName: 'source.nginx', }, { name: 'Nim', value: 'nim', grammar: () => import('./textmate/nim.tmLanguage.json'), scopeName: 'source.nim', }, { name: 'Nix', value: 'nix', grammar: () => import('./textmate/nix.tmLanguage.json'), scopeName: 'source.nix', }, { name: 'Nushell', value: 'nu', grammar: () => import('./textmate/nu.tmLanguage.json'), scopeName: 'source.nushell', }, { name: 'NSIS', value: 'nsis', grammar: () => import('./textmate/nsis.tmLanguage.json'), scopeName: 'source.nsis', }, { name: 'Nunjucks', value: 'nunjucks', grammar: () => import('./textmate/nunjucks.tmLanguage.json'), scopeName: 'text.html.nunjucks', }, { name: 'Objective-C', value: 'objectivec', grammar: () => import('./textmate/objective-c.tmLanguage.json'), scopeName: 'source.objc', }, { name: 'OCaml', value: 'ocaml', grammar: () => import('./textmate/ocaml.tmLanguage.json'), scopeName: 'source.ocaml', }, { name: 'OpenEdge ABL', value: 'oeabl', grammar: () => import('./textmate/oeabl.tmLanguage.json'), scopeName: 'source.oeabl', }, { name: 'OpenGL', value: 'glsl', grammar: () => import('./textmate/glsl.tmLanguage.json'), scopeName: 'source.glsl', }, { name: 'Pascal', value: 'pascal', grammar: () => import('./textmate/pascal.tmLanguage.json'), scopeName: 'source.pascal', }, { name: 'Perl', value: 'perl', grammar: () => import('./textmate/perl.tmLanguage.json'), scopeName: 'source.perl', }, { name: 'pgSQL', value: 'pgsql', grammar: () => import('./textmate/pgsql.tmLanguage.json'), scopeName: 'source.pgsql', }, { name: 'PHP (Blade Template)', value: 'php_laravel_blade', grammar: () => import('./textmate/php-blade.tmLanguage.json'), scopeName: 'text.html.php.blade', }, { name: 'PHP', value: 'php', grammar: () => import('./textmate/php.tmLanguage.json'), scopeName: 'source.php', }, { name: 'Pig', value: 'pig', grammar: () => import('./textmate/pig.tmLanguage.json'), scopeName: 'source.pig', }, { name: 'Plain Text', value: 'plain_text', grammar: () => import('./textmate/plain-text.tmLanguage.json'), scopeName: 'text.plain', }, { name: 'Powershell', value: 'powershell', grammar: () => import('./textmate/powershell.tmLanguage.json'), scopeName: 'source.powershell', }, { name: 'Power Query', value: 'powerquery', grammar: () => import('./textmate/powerquery.tmLanguage.json'), scopeName: 'source.powerquery', }, { name: 'Praat', value: 'praat', grammar: () => import('./textmate/praat.tmLanguage.json'), scopeName: 'source.praat', }, { name: 'Prisma', value: 'prisma', grammar: () => import('./textmate/prisma.tmLanguage.json'), scopeName: 'source.prisma', }, { name: 'Prolog', value: 'prolog', grammar: () => import('./textmate/prolog.tmLanguage.json'), scopeName: 'source.prolog', }, { name: 'Properties', value: 'properties', grammar: () => import('./textmate/properties.tmLanguage.json'), scopeName: 'source.tm-properties', }, { name: 'Protobuf', value: 'protobuf', grammar: () => import('./textmate/protobuf.tmLanguage.json'), scopeName: 'source.proto', }, { name: 'Pug', value: 'pug', grammar: () => import('./textmate/pug.tmLanguage.json'), scopeName: 'text.pug', }, { name: 'Puppet', value: 'puppet', grammar: () => import('./textmate/puppet.tmLanguage.json'), scopeName: 'source.puppet', }, { name: 'Python', value: 'python', grammar: () => import('./textmate/python.tmLanguage.json'), scopeName: 'source.python', }, { name: 'QML', value: 'qml', grammar: () => import('./textmate/qml.tmLanguage.json'), scopeName: 'source.qml', }, { name: 'R', value: 'r', grammar: () => import('./textmate/r.tmLanguage.json'), scopeName: 'source.r', }, { name: 'Raku', value: 'raku', grammar: () => import('./textmate/raku.tmLanguage.json'), scopeName: 'source.perl.6', }, { name: 'Razor', value: 'razor', grammar: () => import('./textmate/razor.tmLanguage.json'), scopeName: 'text.aspnetcorerazor', }, { name: 'Red', value: 'red', grammar: () => import('./textmate/red.tmLanguage.json'), scopeName: 'source.red', }, { name: 'RegExp', value: 'regexp', grammar: () => import('./textmate/regexp.tmLanguage.json'), scopeName: 'source.regexp', }, { name: 'RST', value: 'rst', grammar: () => import('./textmate/rst.tmLanguage.json'), scopeName: 'source.rst', }, { name: 'Ruby', value: 'ruby', grammar: () => import('./textmate/ruby.tmLanguage.json'), scopeName: 'source.ruby', }, { name: 'Rust', value: 'rust', grammar: () => import('./textmate/rust.tmLanguage.json'), scopeName: 'source.rust', }, { name: 'SAS', value: 'sas', grammar: () => import('./textmate/sas.tmLanguage.json'), scopeName: 'source.sas', }, { name: 'SASS', value: 'sass', grammar: () => import('./textmate/sass.tmLanguage.json'), scopeName: 'source.sass', }, { name: 'SCAD', value: 'scad', grammar: () => import('./textmate/scad.tmLanguage.json'), scopeName: 'source.scad', }, { name: 'Scala', value: 'scala', grammar: () => import('./textmate/scala.tmLanguage.json'), scopeName: 'source.scala', }, { name: 'Scheme', value: 'scheme', grammar: () => import('./textmate/scheme.tmLanguage.json'), scopeName: 'source.scheme', }, { name: 'sCrypt', value: 'scrypt', grammar: () => import('./textmate/scrypt.tmLanguage.json'), scopeName: 'source.scrypt', }, { name: 'SCSS', value: 'scss', grammar: () => import('./textmate/scss.tmLanguage.json'), scopeName: 'source.css.scss', }, { name: 'SJS', value: 'sjs', grammar: () => import('./textmate/sjs.tmLanguage.json'), scopeName: 'source.sjs', }, { name: 'Slim', value: 'slim', grammar: () => import('./textmate/slim.tmLanguage.json'), scopeName: 'text.slim', }, { name: 'Smalltalk', value: 'smalltalk', grammar: () => import('./textmate/smalltalk.tmLanguage.json'), scopeName: 'source.smalltalk', }, { name: 'Smarty', value: 'smarty', grammar: () => import('./textmate/smarty.tmLanguage.json'), scopeName: 'source.smarty', }, { name: 'Smithy', value: 'smithy', grammar: () => import('./textmate/smithy.tmLanguage.json'), scopeName: 'source.smithy', }, { name: 'Solidity', value: 'solidity', grammar: () => import('./textmate/solidity.tmLanguage.json'), scopeName: 'source.solidity', }, { name: 'Soy Template', value: 'soy_template', grammar: () => import('./textmate/soytemplate.tmLanguage.json'), scopeName: 'source.soy', }, { name: 'SQL', value: 'sql', grammar: () => import('./textmate/sql.tmLanguage.json'), scopeName: 'source.sql', }, { name: 'SQLServer', value: 'sqlserver', grammar: () => import('./textmate/sql.tmLanguage.json'), scopeName: 'source.sqlserver', }, { name: 'Stylus', value: 'stylus', grammar: () => import('./textmate/less.tmLanguage.json'), scopeName: 'source.stylus', }, { name: 'SVG', value: 'svg', grammar: () => import('./textmate/svg.tmLanguage.json'), scopeName: 'text.xml.svg', }, { name: 'Swift', value: 'swift', grammar: () => import('./textmate/swift.tmLanguage.json'), scopeName: 'source.swift', }, { name: 'Tcl', value: 'tcl', grammar: () => import('./textmate/tcl.tmLanguage.json'), scopeName: 'source.tcl', }, { name: 'Terraform', value: 'terraform', grammar: () => import('./textmate/terraform.tmLanguage.json'), scopeName: 'source.terraform', }, { name: 'Tex', value: 'tex', grammar: () => import('./textmate/tex.tmLanguage.json'), scopeName: 'text.tex', }, { name: 'Textile', value: 'textile', grammar: () => import('./textmate/textile.tmLanguage.json'), scopeName: 'text.html.textile', }, { name: 'TOML', value: 'toml', grammar: () => import('./textmate/toml.tmLanguage.json'), scopeName: 'source.toml', }, { name: 'TSX', value: 'tsx', grammar: () => import('./textmate/tsx.tmLanguage.json'), scopeName: 'source.tsx', }, { name: 'Twig', value: 'twig', grammar: () => import('./textmate/twig.tmLanguage.json'), scopeName: 'text.html.twig', }, { name: 'TypeScript', value: 'typescript', grammar: () => import('./textmate/typescript.tmLanguage.json'), scopeName: 'source.ts', }, { name: 'Vala', value: 'vala', grammar: () => import('./textmate/vala.tmLanguage.json'), scopeName: 'source.vala', }, { name: 'Velocity', value: 'velocity', grammar: () => import('./textmate/velocity.tmLanguage.json'), scopeName: 'text.velocity', }, { name: 'Verilog', value: 'verilog', grammar: () => import('./textmate/systemverilog.tmLanguage.json'), scopeName: 'source.systemverilog', }, { name: 'VHDL', value: 'vhdl', grammar: () => import('./textmate/vhdl.tmLanguage.json'), scopeName: 'source.vhdl', }, { name: 'Visualforce', value: 'visualforce', grammar: () => import('./textmate/visualforce.tmLanguage.json'), scopeName: 'text.visualforce.markup', }, { name: 'Vue', value: 'vue', grammar: () => import('./textmate/vue.tmLanguage.json'), scopeName: 'text.html.vue', }, { name: 'Wollok', value: 'wollok', grammar: () => import('./textmate/wollok.tmLanguage.json'), scopeName: 'source.wollok', }, { name: 'XML', value: 'xml', grammar: () => import('./textmate/xml.tmLanguage.json'), scopeName: 'text.xml', }, { name: 'XSL', value: 'xsl', grammar: () => import('./textmate/xsl.tmLanguage.json'), scopeName: 'text.xml.xsl', }, { name: 'XQuery', value: 'xquery', grammar: () => import('./textmate/xquery.tmLanguage.json'), scopeName: 'source.xquery', }, { name: 'YAML', value: 'yaml', grammar: () => import('./textmate/yaml.tmLanguage.json'), scopeName: 'source.yaml', }, { name: 'Zeek', value: 'zeek', grammar: () => import('./textmate/zeek.tmLanguage.json'), scopeName: 'source.zeek', }, ] // Маппинг с версии v1 export const oldLanguageMap: Record = { 'azcli': 'plain_text', 'bat': 'sh', 'cameligo': 'plain_text', 'coffeescript': 'coffee', 'c': 'c_cpp', 'csp': 'plain_text', 'go': 'golang', 'graphql': 'graphqlschema', 'msdax': 'plain_text', 'objective-c': 'objectivec', 'pascaligo': 'plain_text', 'postiats': 'plain_text', 'pug': 'jade', 'redis': 'plain_text', 'sb': 'plain_text', 'shell': 'sh', 'sol': 'plain_text', 'aes': 'plain_text', 'st': 'plain_text', 'vb': 'vbscript', } ================================================ FILE: src/renderer/components/editor/grammars/textmate/abap.tmLanguage.json ================================================ { "fileTypes": ["abap", "ABAP"], "foldingStartMarker": "/\\*\\*|\\{\\s*$", "foldingStopMarker": "\\*\\*/|^\\s*\\}", "keyEquivalent": "^~A", "name": "abap", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.abap" } }, "match": "^\\*.*\\n?", "name": "comment.line.full.abap" }, { "captures": { "1": { "name": "punctuation.definition.comment.abap" } }, "match": "\".*\\n?", "name": "comment.line.partial.abap" }, { "match": "(?|-|=>))([a-z_/][a-z_0-9/]*)(?=\\s+(?:=|\\+=|-=|\\*=|\\/=|&&=)\\s+)", "name": "variable.other.abap" }, { "match": "\\b[0-9]+(\\b|\\.|,)", "name": "constant.numeric.abap" }, { "match": "(?ix)(^|\\s+)((PUBLIC|PRIVATE|PROTECTED)\\sSECTION)(?=\\s+|:|\\.)", "name": "storage.modifier.class.abap" }, { "begin": "(?]*)+(?=\\s+|\\.)", "captures": { "1": { "name": "storage.modifier.method.abap" } } }, { "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "end": "(?![A-Za-z0-9_])", "patterns": [ { "include": "#generic_names" } ] } ] }, { "begin": "(?ix)^\\s*(INTERFACE)\\s([a-z_\\/][a-z_0-9\\/]*)", "beginCaptures": { "1": { "name": "storage.type.block.abap" }, "2": { "name": "entity.name.type.abap" } }, "end": "\\s*\\.\\s*\\n?", "patterns": [ { "match": "(?ix)(?<=^|\\s)(DEFERRED|PUBLIC)(?=\\s+|\\.)", "name": "storage.modifier.method.abap" } ] }, { "begin": "(?ix)^\\s*(FORM)\\s([a-z_\\/][a-z_0-9\\/]*)", "beginCaptures": { "1": { "name": "storage.type.block.abap" }, "2": { "name": "entity.name.type.abap" } }, "end": "\\s*\\.\\s*\\n?", "patterns": [ { "match": "(?ix)(?<=^|\\s)(USING|TABLES|CHANGING|RAISING)(?=\\s+|\\.)", "name": "storage.modifier.form.abap" }, { "include": "#abaptypes" } ] }, { "match": "(?i)(endclass|endmethod|endform|endinterface)", "name": "storage.type.block.end.abap" }, { "match": "(?i)(<[A-Za-z_][A-Za-z0-9_]*>)", "name": "variable.other.field.symbol.abap" }, { "include": "#keywords" }, { "include": "#abap_constants" }, { "include": "#reserved_names" }, { "include": "#operators" }, { "include": "#builtin_functions" }, { "include": "#abaptypes" }, { "include": "#system_fields" } ], "repository": { "abap_constants": { "match": "(?ix)(?<=\\s)(initial|null|space|abap_true|abap_false|table_line)(?=\\s|\\.|,)", "name": "constant.language.abap" }, "reserved_names": { "match": "(?ix)(?<=\\s)(me|super)(?=\\s|\\.|,|->)", "name": "constant.language.abap" }, "abaptypes": { "patterns": [ { "match": "(?ix)\\s(abap_bool|string|xstring|any|clike|csequence|numeric|xsequence|c|n|i|p|f|d|t|x)(?=\\s|\\.|,)", "name": "support.type.abap" }, { "match": "(?ix)\\s(TYPE|REF|TO|STANDARD|SORTED|HASHED|INDEX|TABLE|WITH|UNIQUE|NON-UNIQUE|SECONDARY|DEFAULT|KEY)(?=\\s|\\.|,)", "name": "keyword.control.simple.abap" } ] }, "arithmetic_operator": { "match": "(?i)(?<=\\s)(\\+|\\-|\\*|\\*\\*|/|%|DIV|MOD|BIT-AND|BIT-OR|BIT-XOR|BIT-NOT)(?=\\s)", "name": "keyword.control.simple.abap" }, "comparison_operator": { "match": "(?i)(?<=\\s)(<|>|<\\=|>\\=|\\=|<>|eq|ne|lt|le|gt|ge|cs|cp|co|cn|ca|na|ns|np|byte-co|byte-cn|byte-ca|byte-na|byte-cs|byte-ns|o|z|m)(?=\\s)", "name": "keyword.control.simple.abap" }, "control_keywords": { "match": "(?ix)(^|\\s)(\n\t at|case|catch|continue|do|elseif|else|endat|endcase|enddo|endif|\n\t endloop|endon|if|loop|on|raise|try)(?=\\s|\\.|:)", "name": "keyword.control.flow.abap" }, "generic_names": { "match": "[A-Za-z_][A-Za-z0-9_]*" }, "keywords": { "patterns": [ { "include": "#main_keywords" }, { "include": "#text_symbols" }, { "include": "#control_keywords" }, { "include": "#keywords_followed_by_braces" } ] }, "logical_operator": { "match": "(?i)(?<=\\s)(not|or|and)(?=\\s)", "name": "keyword.control.simple.abap" }, "system_fields": { "match": "(?ix)\\b(sy)-(abcde|batch|binpt|calld|callr|colno|cpage|cprog|cucol|curow|datar|datlo|datum|dayst|dbcnt|dbnam|dbsysc|dyngr|dynnr|fdayw|fdpos|host|index|langu|ldbpg|lilli|linct|linno|linsz|lisel|listi|loopc|lsind|macol|mandt|marow|modno|msgid|msgli|msgno|msgty|msgv[1-4]|opsysc|pagno|pfkey|repid|saprl|scols|slset|spono|srows|staco|staro|stepl|subrc|sysid|tabix|tcode|tfill|timlo|title|tleng|tvar[0-9]|tzone|ucomm|uline|uname|uzeit|vline|wtitl|zonlo)(?=\\.|\\s)", "captures": { "1": { "name": "variable.language.abap" }, "2": { "name": "variable.language.abap" } } }, "main_keywords": { "match": "(?ix)(?<=^|\\s)(\n\t abstract|access|add|add-corresponding|adjacent|alias|aliases|all|amdp|append|appending|ascending|as|assert|assign|assigned|assigning|association|authority-check|\n\t back|badi|base|begin|between|binary|blanks|block|bound|break-point|by|by\\s+database|byte|\n\t call|calling|cast|casting|cds\\s+session|changing|check|checkbox|class-data|class-events|class-method|class-methods|class-pool|cleanup|clear|client|clients|close|cnt|collect|commit|comment|cond|character|\n\t corresponding|communication|comparing|component|components|compute|concatenate|condense|constants|conv|count|\n\t controls|convert|create|currency|current|\n\t data|database|ddl|decimals|default|define|deferred|delete|descending|describe|destination|detail|display|divide|divide-corresponding|display-mode|distinct|duplicates|\n\t deleting|\n\t editor-call|empty|end|endenhancement|endexec|endfunction|ending|endmodule|end-of-definition|end-of-page|end-of-selection|end-test-injection|end-test-seam|exit-command|extension|\n\t endprovide|endselect|entries|endtry|endwhile|enhancement|enum|event|events|excluding|exec|exit|export|\n\t exporting|extract|exception|exceptions|\n\t field-symbols|field-groups|field|first|fetch|fields|format|frame|free|from|function|find|for|found|function-pool|\n\t generate|get|group|\n\t handle|handler|hide|hashed|header|help-request|\n\t include|import|importing|index|infotypes|initial|initialization|\n\t\tid|implemented|ignoring|is|in|inner|interface|interfaces|interface-pool|intervals|init|input|insert|instance|into|\n\t\tjoin|\n\t\tkey|\n\t language|language\\s+graph|language\\s+sql|left-justified|leave|let|like|line|lines|line-count|line-size|listbox|list-processing|load|local|log-point|length|left|leading|lower|\n\t matchcode|memory|method|mesh|message|message-id|methods|mode|modify|module|move|move-corresponding|multiply|multiply-corresponding|match|modif|\n\t\tnew|new-line|new-page|new-section|next|no|no-display|no-gap|no-gaps|no-sign|no-zero|non-unique|number|\n\t occurrence|object|obligatory|of|order|output|overlay|optional|others|occurrences|occurs|offset|options|\n\t pack|parameter|parameters|partially|perform|pf-status|places|position|preferred|primary|print-control|private|privileged|program|protected|provide|public|pushbutton|put|\n\t radiobutton\\s+group|raising|range|ranges|receive|receiving|redefinition|reduce|reference|refresh|regex|reject|results|requested|\n\t ref|replace|report|required|reserve|respecting|restore|result\\s+xml|result\\s+\\(|return|returning|right|right-justified|rollback|read|read-only|rp-provide-from-last|run|\n\t scan|screen|scroll|search|select|select-options|selection-screen|set|stamp|state|source|subkey|\n\t seconds|selection-table|separated|set|shift|single|skip|sort|sorted|split|stable|standard|stamp|starting|start-of-selection|sum|subscreen|subtract-corresponding|statics|step|stop|structure|submatches|submit|subtract|summary|supplied|suppress|section|syntax-check|syntax-trace|system-call|switch|\n\t tabbed|tables|table|task|testing|test-seam|test-injection|textpool|then|time|times|title|titlebar|to|top-of-page|trailing|transaction|transfer|transformation|translate|transporting|types|type|type-pool|type-pools|\n\t unassign|unique|uline|union|unpack|until|update|upper|using|user-command|\n\t value|value-request|visible|\n\t wait|when|while|window|write|where|with|work|workspace|\n\t\txml)(?=\\s|\\.|:|,)", "name": "keyword.control.simple.abap" }, "text_symbols": { "match": "(?ix)(?<=^|\\s)(text)-([A-Z0-9]{1,3})(?=\\s|\\.|:|,)", "captures": { "1": { "name": "keyword.control.simple.abap" }, "2": { "name": "constant.numeric.abap" } } }, "keywords_followed_by_braces": { "match": "(?ix)\\b(data|value|field-symbol)\\((?)\\)", "captures": { "1": { "name": "keyword.control.simple.abap" }, "2": { "name": "variable.other.abap" } } }, "operators": { "patterns": [ { "include": "#other_operator" }, { "include": "#arithmetic_operator" }, { "include": "#comparison_operator" }, { "include": "#logical_operator" } ] }, "other_operator": { "match": "(?<=\\s)(&&|\\?=|\\+=|-=|\\/=|\\*=|&&=)(?=\\s)", "name": "keyword.control.simple.abap" }, "builtin_functions": { "match": "(?ix)(?<=\\s)(abs|sign|ceil|floor|trunc|frac|acos|asin|atan|cos|sin|tan|cosh|sinh|tanh|exp|log|log10|sqrt|strlen|xstrlen|charlen|lines|numofchar|dbmaxlen|round|rescale|nmax|nmin|cmax|cmin|boolc|boolx|xsdbool|contains|contains_any_of|contains_any_not_of|matches|line_exists|ipow|char_off|count|count_any_of|count_any_not_of|distance|condense|concat_lines_of|escape|find|find_end|find_any_of|find_any_not_of|insert|match|repeat|replace|reverse|segment|shift_left|shift_right|substring|substring_after|substring_from|substring_before|substring_to|to_upper|to_lower|to_mixed|from_mixed|translate|bit-set|line_index)(?=\\()", "name": "entity.name.function.builtin.abap" } }, "scopeName": "source.abap", "uuid": "0357FFB4-EFFF-4DE9-8371-B0F9C8DF1B21" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/abc.tmLanguage.json ================================================ { "scopeName": "text.abcnotation", "fileTypes": ["abc"], "patterns": [ { "comment": "Comments", "match": "%.*", "name": "comment.line" }, { "comment": "Bar lines", "match": "[\\[:]*[|:][|\\]:]*(\\[?[0-9]+)?|(\\[[0-9]+)", "name": "keyword.operator" }, { "match": "^[A-Za-z]:([^%\\\\]*)", "comment": "Header lines", "name": "entity.name.function", "captures": { "1": { "name": "string.unquoted" } } }, { "comment": "Inline fields", "match": "\\[([A-Z]:)(.*?)\\]", "captures": { "1": { "name": "entity.name.function" }, "2": { "name": "string.unquoted" } } }, { "comment": "Notes", "match": "([\\^=_]*)([A-Ga-gz][,']*)([0-9]*/*[><0-9]*)", "captures": { "1": { "name": "constant.language" }, "2": { "name": "constant.character" }, "3": { "name": "constant.numeric" } } }, { "comment": "Chord names + other annotations", "match": "[\\\"!].*?[\\\"!]", "name": "string.quoted" } ], "name": "ABC Notation", "uuid": "431a5f26-5897-4146-8415-25a3c4b859c0" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/actionscript-3.tmLanguage.json ================================================ { "fileTypes": ["as"], "name": "actionscript-3", "patterns": [ { "include": "#comments" }, { "include": "#package" }, { "include": "#class" }, { "include": "#interface" }, { "include": "#namespace_declaration" }, { "include": "#import" }, { "include": "#mxml" }, { "include": "#strings" }, { "include": "#regexp" }, { "include": "#variable_declaration" }, { "include": "#numbers" }, { "include": "#primitive_types" }, { "include": "#primitive_error_types" }, { "include": "#dynamic_type" }, { "include": "#primitive_functions" }, { "include": "#language_constants" }, { "include": "#language_variables" }, { "include": "#guess_type" }, { "include": "#guess_constant" }, { "include": "#other_operators" }, { "include": "#arithmetic_operators" }, { "include": "#logical_operators" }, { "include": "#array_access_operators" }, { "include": "#vector_creation_operators" }, { "include": "#control_keywords" }, { "include": "#other_keywords" }, { "include": "#use_namespace" }, { "include": "#functions" } ], "repository": { "arithmetic_operators": { "match": "(\\+|\\-|/|%|(?)?)|(\\*)))?(?:\\s*(=))?", "end": ",|(?=\\))", "beginCaptures": { "1": { "name": "keyword.operator.actionscript.3" }, "2": { "name": "variable.parameter.actionscript.3" }, "3": { "name": "keyword.operator.actionscript.3" }, "4": { "name": "support.type.actionscript.3" }, "5": { "name": "support.type.actionscript.3" }, "6": { "name": "support.type.actionscript.3" }, "7": { "name": "keyword.operator.actionscript.3" } }, "patterns": [ { "include": "#strings" }, { "include": "#numbers" }, { "include": "#language_constants" }, { "include": "#comments" }, { "include": "#primitive_types" }, { "include": "#primitive_error_types" }, { "include": "#dynamic_type" }, { "include": "#guess_type" }, { "include": "#guess_constant" } ] }, "functions": { "begin": "(?x) \\b(function)\\b (?:\\s+\\b(get|set)\\b\\s+)? \\s* ([a-zA-Z0-9_\\$]+\\b)?", "beginCaptures": { "1": { "name": "storage.type.function.actionscript.3" }, "2": { "name": "storage.modifier.actionscript.3" }, "3": { "name": "entity.name.function.actionscript.3" } }, "end": "($|;|(?=\\{))", "name": "meta.function.actionscript.3", "patterns": [ { "include": "#function_arguments" }, { "include": "#return_type" }, { "include": "#comments" } ] }, "guess_constant": { "captures": { "1": { "name": "constant.other.actionscript.3" } }, "comment": "Following convention, let's guess that anything in all caps/digits (possible underscores) is a constant.", "match": "\\b([A-Z\\$][A-Z0-9_]+)\\b" }, "guess_type": { "captures": { "1": { "name": "support.type.actionscript.3" } }, "comment": "Following convention, let's guess that any word starting with one or more capital letters (that contains at least some lower-case letters so that constants aren't detected) refers to a class/type. May be fully-qualified.", "match": "\\b((?:[A-Za-z0-9_\\$]+\\.)*[A-Z][A-Z0-9]*[a-z]+[A-Za-z0-9_\\$]*)\\b" }, "implements": { "captures": { "1": { "name": "keyword.other.actionscript.3" }, "2": { "name": "entity.other.inherited-class.actionscript.3" }, "3": { "name": "entity.other.inherited-class.actionscript.3" } }, "match": "(?x) \\b(implements)\\b \\s+ ([\\.\\w]+) \\s* (?:, \\s* ([\\.\\w]+))* \\s*", "name": "meta.implements.actionscript.3" }, "import": { "captures": { "2": { "name": "keyword.control.import.actionscript.3" }, "3": { "name": "support.type.actionscript.3" } }, "match": "(?x) (^|\\s+|;) \\b(import)\\b \\s+ ([A-Za-z0-9\\$_\\.]+(?:\\.\\*)?) \\s* (?=;|$)", "name": "meta.import.actionscript.3" }, "interface": { "begin": "(?x) (^|\\s+|;) (\\b(internal|public)\\b\\s+)? (?=\\binterface\\b)", "beginCaptures": { "3": { "name": "storage.modifier.actionscript.3" } }, "end": "\\}", "name": "meta.interface.actionscript.3", "patterns": [ { "include": "#interface_declaration" }, { "include": "#metadata" }, { "include": "#functions" }, { "include": "#comments" } ] }, "interface_declaration": { "begin": "(?x) \\b(interface)\\b \\s+ ([\\.\\w]+)", "beginCaptures": { "1": { "name": "storage.type.interface.actionscript.3" }, "2": { "name": "entity.name.class.actionscript.3" } }, "end": "\\{", "name": "meta.class_declaration.actionscript.3", "patterns": [ { "include": "#extends" }, { "include": "#comments" } ] }, "language_constants": { "match": "\\b(true|false|null|Infinity|-Infinity|NaN|undefined)\\b", "name": "constant.language.actionscript.3" }, "language_variables": { "match": "\\b(super|this|arguments)\\b", "name": "variable.language.actionscript.3" }, "logical_operators": { "match": "(&|<|~|\\||>|\\^|!|\\?)", "name": "keyword.operator.actionscript.3" }, "metadata_info": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#strings" }, { "captures": { "1": { "name": "variable.parameter.actionscript.3" }, "2": { "name": "keyword.operator.actionscript.3" } }, "match": "(\\w+)\\s*(=)" } ] }, "method": { "begin": "(?x) (^|\\s+) ((\\w+)\\s+)? ((\\w+)\\s+)? ((\\w+)\\s+)? ((\\w+)\\s+)? (?=\\bfunction\\b)", "beginCaptures": { "3": { "name": "storage.modifier.actionscript.3" }, "5": { "name": "storage.modifier.actionscript.3" }, "7": { "name": "storage.modifier.actionscript.3" }, "8": { "name": "storage.modifier.actionscript.3" } }, "end": "(?<=(;|\\}))", "name": "meta.method.actionscript.3", "patterns": [ { "include": "#functions" }, { "include": "#code_block" } ] }, "mxml": { "begin": "", "name": "meta.cdata.actionscript.3", "patterns": [ { "include": "#comments" }, { "include": "#import" }, { "include": "#metadata" }, { "include": "#class" }, { "include": "#namespace_declaration" }, { "include": "#use_namespace" }, { "include": "#class_declaration" }, { "include": "#method" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#regexp" }, { "include": "#numbers" }, { "include": "#primitive_types" }, { "include": "#primitive_error_types" }, { "include": "#dynamic_type" }, { "include": "#primitive_functions" }, { "include": "#language_constants" }, { "include": "#language_variables" }, { "include": "#other_keywords" }, { "include": "#guess_type" }, { "include": "#guess_constant" }, { "include": "#other_operators" }, { "include": "#arithmetic_operators" }, { "include": "#array_access_operators" }, { "include": "#vector_creation_operators" }, { "include": "#variable_declaration" } ] }, "numbers": { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b", "name": "constant.numeric.actionscript.3" }, "object_literal": { "begin": "\\{", "end": "\\}", "name": "meta.object_literal.actionscript.3", "patterns": [ { "include": "#object_literal" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#regexp" }, { "include": "#numbers" }, { "include": "#primitive_types" }, { "include": "#primitive_error_types" }, { "include": "#dynamic_type" }, { "include": "#primitive_functions" }, { "include": "#language_constants" }, { "include": "#language_variables" }, { "include": "#guess_type" }, { "include": "#guess_constant" }, { "include": "#array_access_operators" }, { "include": "#vector_creation_operators" }, { "include": "#functions" } ] }, "other_keywords": { "match": "\\b(as|delete|in|instanceof|is|native|new|to|typeof)\\b", "name": "keyword.other.actionscript.3" }, "other_operators": { "match": "(\\.|=)", "name": "keyword.operator.actionscript.3" }, "package": { "begin": "(^|\\s+)(package)\\b", "beginCaptures": { "2": { "name": "keyword.other.actionscript.3" } }, "end": "\\}", "name": "meta.package.actionscript.3", "patterns": [ { "include": "#package_name" }, { "include": "#variable_declaration" }, { "include": "#method" }, { "include": "#comments" }, { "include": "#return_type" }, { "include": "#import" }, { "include": "#use_namespace" }, { "include": "#strings" }, { "include": "#numbers" }, { "include": "#language_constants" }, { "include": "#metadata" }, { "include": "#class" }, { "include": "#interface" }, { "include": "#namespace_declaration" } ] }, "package_name": { "begin": "(?<=package)\\s+([\\w\\._]*)\\b", "end": "\\{", "name": "meta.package_name.actionscript.3" }, "primitive_types": { "captures": { "1": { "name": "support.class.builtin.actionscript.3" } }, "match": "\\b(Array|Boolean|Class|Date|Function|int|JSON|Math|Namespace|Number|Object|QName|RegExp|String|uint|Vector|XML|XMLList|\\*(?<=a))\\b" }, "primitive_error_types": { "captures": { "1": { "name": "support.class.error.actionscript.3" } }, "match": "\\b((Argument|Definition|Eval|Internal|Range|Reference|Security|Syntax|Type|URI|Verify)?Error)\\b" }, "primitive_functions": { "captures": { "1": { "name": "support.function.actionscript.3" } }, "match": "\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|isFinite|isNaN|isXMLName|parseFloat|parseInt|trace|unescape)(?=\\s*\\()" }, "regexp": { "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])", "end": "$|(/)[igm]*", "name": "string.regex.actionscript.3", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.actionscript.3" }, { "match": "\\[(\\\\\\]|[^\\]])*\\]", "name": "constant.character.class.actionscript.3" } ] }, "return_type": { "captures": { "1": { "name": "keyword.operator.actionscript.3" }, "2": { "name": "support.type.actionscript.3" }, "3": { "name": "support.type.actionscript.3" }, "4": { "name": "support.type.actionscript.3" } }, "match": "(\\:)\\s*(?:([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)(?:\\.<([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)>)?)|(\\*)" }, "strings": { "patterns": [ { "begin": "\"", "end": "\"", "name": "string.quoted.double.actionscript.3", "patterns": [ { "include": "#escapes" } ] }, { "begin": "'", "end": "'", "name": "string.quoted.single.actionscript.3", "patterns": [ { "include": "#escapes" } ] } ] }, "metadata": { "begin": "\\[\\s*\\b(\\w+)\\b", "beginCaptures": { "1": { "name": "keyword.other.actionscript.3" } }, "end": "\\]", "name": "meta.metadata_info.actionscript.3", "patterns": [ { "include": "#metadata_info" } ] }, "use_namespace": { "captures": { "2": { "name": "keyword.other.actionscript.3" }, "3": { "name": "keyword.other.actionscript.3" }, "4": { "name": "storage.modifier.actionscript.3" } }, "match": "(?x) (^|\\s+|;) (use\\s+)? (namespace) \\s+ (\\w+) \\s* (;|$)" }, "variable_declaration": { "captures": { "2": { "name": "storage.modifier.actionscript.3" }, "4": { "name": "storage.modifier.actionscript.3" }, "6": { "name": "storage.modifier.actionscript.3" }, "7": { "name": "storage.modifier.actionscript.3" }, "8": { "name": "keyword.operator.actionscript.3" } }, "match": "(?x) ((static)\\s+)? ((\\w+)\\s+)? ((static)\\s+)? (const|var) \\s+ (?:[A-Za-z0-9_\\$]+)(?:\\s*(:))?", "name": "meta.variable_declaration.actionscript.3" }, "vector_creation_operators": { "match": "(<|>)", "name": "keyword.operator.actionscript.3" } }, "scopeName": "source.actionscript.3", "uuid": "aa6f75ba-ab10-466e-8c6f-28c69aca1e9d" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/ada.tmLanguage.json ================================================ { "fileTypes": ["adb", "ads"], "keyEquivalent": "^~A", "uuid": "0AB8A36E-6B1D-11D9-B034-000D93589AF6", "patterns": [ { "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?|\"(?:\\+|-|=|\\*|/)\")", "name": "meta.function.ada", "captures": { "1": { "name": "storage.type.function.ada" }, "2": { "name": "entity.name.function.ada" } } }, { "match": "\\b(?i:(package)(?:\\b\\s+(body))?)\\b\\s+(\\w+(\\.\\w+)*|\"(?:\\+|-|=|\\*|/)\")", "name": "meta.function.ada", "captures": { "1": { "name": "storage.type.package.ada" }, "2": { "name": "keyword.other.body.ada" }, "3": { "name": "entity.name.type.package.ada" } } }, { "match": "\\b(?i:(end))\\b\\s+(\\w+(\\.\\w+)*|\"(\\+|-|=|\\*|/)\")\\s?;", "name": "meta.function.end.ada", "captures": { "1": { "name": "storage.type.function.ada" }, "2": { "name": "entity.name.function.ada" } } }, { "match": "^\\s*(?:(limited)\\s+)?(?:(private)\\s+)?(with)\\s+(\\w+(\\.\\w+)*)\\s*;", "name": "meta.import.ada", "captures": { "3": { "name": "keyword.control.import.ada" }, "1": { "name": "keyword.control.import.limited.ada" }, "4": { "name": "entity.name.function.ada" }, "2": { "name": "keyword.control.import.private.ada" } } }, { "match": "\\b(?i:(begin|end|package))\\b", "name": "keyword.control.ada" }, { "match": "\\b(?i:(\\=>|abort|abs|abstract|accept|access|aliased|all|and|array|at|body|case|constant|declare|delay|delta|digits|do|else|elsif|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor))\\b", "name": "keyword.other.ada" }, { "match": "\\b(?i:([0-9](_?[0-9])*((#[0-9a-f](_?[0-9a-f])*#((e(\\+|-)?[0-9](_?[0-9])*\\b)|\\B))|((\\.[0-9](_?[0-9])*)?(e(\\+|-)?[0-9](_?[0-9])*)?\\b))))", "name": "constant.numeric.ada" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ada" } }, "end": "\"(?!\")", "patterns": [ { "match": "\"\"", "name": "constant.character.escape.ada" }, { "match": "\\n", "name": "invalid.illegal.lf-in-string.ada" } ], "name": "string.quoted.double.ada", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ada" } } }, { "match": "(').(')", "name": "string.quoted.single.ada", "captures": { "1": { "name": "punctuation.definition.string.begin.ada" }, "2": { "name": "punctuation.definition.string.end.ada" } } }, { "begin": "(^[ \\t]+)?(?=--)", "end": "(?!\\G)", "patterns": [ { "begin": "--", "end": "\\n", "name": "comment.line.double-dash.ada", "beginCaptures": { "0": { "name": "punctuation.definition.comment.ada" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.ada" } } } ], "comment": "Ada -- chris@cjack.com. Feel free to modify, distribute, be happy. Share and enjoy.", "name": "Ada", "scopeName": "source.ada" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/alda.tmLanguage.json ================================================ { "scopeName": "source.alda", "fileTypes": ["alda"], "patterns": [ { "match": "^([a-zA-Z]{2}[\\w-]*)(?:\\s(\\\"[a-z]{2}[\\w-]*\\\"))?:", "name": "entity.name.function.part.alda", "captures": { "1": { "name": "entity.name.type.instrument.alda" }, "2": { "name": "string.quoted.double.quickname.alda" } } }, { "match": "^[Vv][0-9]+:", "name": "entity.name.function.voice.alda" }, { "match": "[~.]|(?<=[a-g\\+\\-\\~])\\d+|r\\d*", "name": "variable.parameter.timing.alda" }, { "match": "(?<=[a-g])[\\-\\+]+", "name": "variable.parameter.pitch-shift.alda" }, { "match": "o\\d+", "name": "keyword.operator.octave-set.alda" }, { "match": "%[a-zA-Z]{2}[\\w\\-]*", "name": "entity.name.tag.sync-marker.alda" }, { "match": "@[a-zA-Z]{2}[\\w\\-]*", "name": "entity.name.tag.sync.alda" }, { "match": "[\\<\\>]", "name": "keyword.operator.octave-shift.alda" }, { "match": "/", "name": "keyword.operator.subchord.alda" }, { "match": "\\|", "name": "comment.character.pipe.alda" }, { "match": "#.*$", "name": "comment.line.number-sign.alda" }, { "begin": "\\(\\*", "end": "\\*\\)", "name": "comment.block.alda" } ], "name": "Alda", "uuid": "8e03bdb0-70f9-4e1f-b998-c69d3821bfa1" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/apache.tmLanguage.json ================================================ { "fileTypes": [ "conf", "CONF", "envvars", "htaccess", "HTACCESS", "htgroups", "HTGROUPS", "htpasswd", "HTPASSWD", ".htaccess", ".HTACCESS", ".htgroups", ".HTGROUPS", ".htpasswd", ".HTPASSWD" ], "name": "apache", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.apacheconf" } }, "match": "^(\\s)*(#).*$\\n?", "name": "comment.line.hash.ini" }, { "captures": { "1": { "name": "punctuation.definition.tag.apacheconf" }, "2": { "name": "entity.tag.apacheconf" }, "4": { "name": "string.value.apacheconf" }, "5": { "name": "punctuation.definition.tag.apacheconf" } }, "match": "(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(\\s(.+?))?(>)" }, { "captures": { "1": { "name": "punctuation.definition.tag.apacheconf" }, "2": { "name": "entity.tag.apacheconf" }, "3": { "name": "punctuation.definition.tag.apacheconf" } }, "match": "()" }, { "captures": { "3": { "name": "string.regexp.apacheconf" }, "4": { "name": "string.replacement.apacheconf" } }, "match": "(?<=(Rewrite(Rule|Cond)))\\s+(.+?)\\s+(.+?)($|\\s)" }, { "captures": { "2": { "name": "entity.status.apacheconf" }, "3": { "name": "string.regexp.apacheconf" }, "5": { "name": "string.path.apacheconf" } }, "match": "(?<=RedirectMatch)(\\s+(\\d\\d\\d|permanent|temp|seeother|gone))?\\s+(.+?)\\s+((.+?)($|\\s))?" }, { "captures": { "2": { "name": "entity.status.apacheconf" }, "3": { "name": "string.path.apacheconf" }, "5": { "name": "string.path.apacheconf" } }, "match": "(?<=Redirect)(\\s+(\\d\\d\\d|permanent|temp|seeother|gone))?\\s+(.+?)\\s+((.+?)($|\\s))?" }, { "captures": { "1": { "name": "string.regexp.apacheconf" }, "3": { "name": "string.path.apacheconf" } }, "match": "(?<=ScriptAliasMatch|AliasMatch)\\s+(.+?)\\s+((.+?)\\s)?" }, { "captures": { "1": { "name": "string.path.apacheconf" }, "3": { "name": "string.path.apacheconf" } }, "match": "(?<=RedirectPermanent|RedirectTemp|ScriptAlias|Alias)\\s+(.+?)\\s+((.+?)($|\\s))?" }, { "captures": { "1": { "name": "keyword.core.apacheconf" } }, "match": "\\b(AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|Define|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include(Optional)?|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|Mutex|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|Time(O|o)ut|TraceEnable|UseCanonicalName|Use|ErrorLogFormat|GlobalLog|PHPIniDir|SSLHonorCipherOrder|SSLCompression|SSLUseStapling|SSLStapling\\w+|SSLCARevocationCheck|SSLSRPVerifierFile|SSLSessionTickets|RequestReadTimeout|ProxyHTML\\w+|MaxRanges)\\b" }, { "captures": { "1": { "name": "keyword.mpm.apacheconf" } }, "match": "\\b(AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxConnectionsPerChild|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxRequestWorkers|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b" }, { "captures": { "1": { "name": "keyword.access.apacheconf" } }, "match": "\\b(Allow|Deny|Order)\\b" }, { "captures": { "1": { "name": "keyword.actions.apacheconf" } }, "match": "\\b(Action|Script)\\b" }, { "captures": { "1": { "name": "keyword.alias.apacheconf" } }, "match": "\\b(Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b" }, { "captures": { "1": { "name": "keyword.auth.apacheconf" } }, "match": "\\b(AuthAuthoritative|AuthGroupFile|AuthUserFile|AuthBasicProvider|AuthBasicFake|AuthBasicAuthoritative|AuthBasicUseDigestAlgorithm)\\b" }, { "captures": { "1": { "name": "keyword.auth_anon.apacheconf" } }, "match": "\\b(Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b" }, { "captures": { "1": { "name": "keyword.auth_dbm.apacheconf" } }, "match": "\\b(AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b" }, { "captures": { "1": { "name": "keyword.auth_digest.apacheconf" } }, "match": "\\b(AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize|AuthDigestProvider)\\b" }, { "captures": { "1": { "name": "keyword.auth_ldap.apacheconf" } }, "match": "\\b(AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b" }, { "captures": { "1": { "name": "keyword.autoindex.apacheconf" } }, "match": "\\b(AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|IndexStyleSheet|IndexHeadInsert|ReadmeName)\\b" }, { "captures": { "1": { "name": "keyword.filter.apacheconf" } }, "match": "\\b(BalancerMember|BalancerGrowth|BalancerPersist|BalancerInherit)\\b" }, { "captures": { "1": { "name": "keyword.cache.apacheconf" } }, "match": "\\b(CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b" }, { "captures": { "1": { "name": "keyword.cern_meta.apacheconf" } }, "match": "\\b(MetaDir|MetaFiles|MetaSuffix)\\b" }, { "captures": { "1": { "name": "keyword.cgi.apacheconf" } }, "match": "\\b(ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b" }, { "captures": { "1": { "name": "keyword.cgid.apacheconf" } }, "match": "\\b(ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b" }, { "captures": { "1": { "name": "keyword.charset_lite.apacheconf" } }, "match": "\\b(CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b" }, { "captures": { "1": { "name": "keyword.dav.apacheconf" } }, "match": "\\b(Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b" }, { "captures": { "1": { "name": "keyword.deflate.apacheconf" } }, "match": "\\b(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b" }, { "captures": { "1": { "name": "keyword.dir.apacheconf" } }, "match": "\\b(DirectoryIndex|DirectorySlash|FallbackResource)\\b" }, { "captures": { "1": { "name": "keyword.disk_cache.apacheconf" } }, "match": "\\b(CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b" }, { "captures": { "1": { "name": "keyword.dumpio.apacheconf" } }, "match": "\\b(DumpIOInput|DumpIOOutput)\\b" }, { "captures": { "1": { "name": "keyword.env.apacheconf" } }, "match": "\\b(PassEnv|SetEnv|UnsetEnv)\\b" }, { "captures": { "1": { "name": "keyword.expires.apacheconf" } }, "match": "\\b(ExpiresActive|ExpiresByType|ExpiresDefault)\\b" }, { "captures": { "1": { "name": "keyword.ext_filter.apacheconf" } }, "match": "\\b(ExtFilterDefine|ExtFilterOptions)\\b" }, { "captures": { "1": { "name": "keyword.file_cache.apacheconf" } }, "match": "\\b(CacheFile|MMapFile)\\b" }, { "captures": { "1": { "name": "keyword.filter.apacheconf" } }, "match": "\\b(AddOutputFilterByType|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace)\\b" }, { "captures": { "1": { "name": "keyword.headers.apacheconf" } }, "match": "\\b(Header|RequestHeader)\\b" }, { "captures": { "1": { "name": "keyword.imap.apacheconf" } }, "match": "\\b(ImapBase|ImapDefault|ImapMenu)\\b" }, { "captures": { "1": { "name": "keyword.include.apacheconf" } }, "match": "\\b(SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b" }, { "captures": { "1": { "name": "keyword.isapi.apacheconf" } }, "match": "\\b(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b" }, { "captures": { "1": { "name": "keyword.ldap.apacheconf" } }, "match": "\\b(LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b" }, { "captures": { "1": { "name": "keyword.log.apacheconf" } }, "match": "\\b(BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b" }, { "captures": { "1": { "name": "keyword.mem_cache.apacheconf" } }, "match": "\\b(MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b" }, { "captures": { "1": { "name": "keyword.mime.apacheconf" } }, "match": "\\b(AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b" }, { "captures": { "1": { "name": "keyword.misc.apacheconf" } }, "match": "\\b(ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b" }, { "captures": { "1": { "name": "keyword.negotiation.apacheconf" } }, "match": "\\b(CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b" }, { "captures": { "1": { "name": "keyword.nw_ssl.apacheconf" } }, "match": "\\b(NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b" }, { "captures": { "1": { "name": "keyword.proxy.apacheconf" } }, "match": "\\b(AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassMatch|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b" }, { "captures": { "1": { "name": "keyword.rewrite.apacheconf" } }, "match": "\\b(RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b" }, { "captures": { "1": { "name": "keyword.setenvif.apacheconf" } }, "match": "\\b(BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b" }, { "captures": { "1": { "name": "keyword.so.apacheconf" } }, "match": "\\b(LoadFile|LoadModule)\\b" }, { "captures": { "1": { "name": "keyword.ssl.apacheconf" } }, "match": "\\b(SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|SSLInsecureRenegotiation|SSLOpenSSLConfCmd)\\b" }, { "captures": { "1": { "name": "keyword.substitute.apacheconf" } }, "match": "\\b(Substitute|SubstituteInheritBefore|SubstituteMaxLineLength)\\b" }, { "captures": { "1": { "name": "keyword.usertrack.apacheconf" } }, "match": "\\b(CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b" }, { "captures": { "1": { "name": "keyword.vhost_alias.apacheconf" } }, "match": "\\b(VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b" }, { "captures": { "1": { "name": "keyword.php.apacheconf" }, "3": { "name": "entity.property.apacheconf" }, "5": { "name": "string.value.apacheconf" } }, "match": "\\b(php_value|php_flag|php_admin_value|php_admin_flag)\\b(\\s+(.+?)(\\s+(\".+?\"|.+?))?)?\\s" }, { "captures": { "1": { "name": "punctuation.variable.apacheconf" }, "3": { "name": "variable.env.apacheconf" }, "4": { "name": "variable.misc.apacheconf" }, "5": { "name": "punctuation.variable.apacheconf" } }, "match": "(%\\{)((HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})" }, { "captures": { "1": { "name": "entity.mime-type.apacheconf" } }, "match": "\\b((text|image|application|video|audio)/.+?)\\s" }, { "captures": { "1": { "name": "entity.helper.apacheconf" } }, "match": "\\b(?i)(export|from|unset|set|on|off)\\b" }, { "captures": { "1": { "name": "constant.numeric.integer.decimal.apacheconf" } }, "match": "\\b(\\d+)\\b" }, { "captures": { "1": { "name": "punctuation.definition.flag.apacheconf" }, "2": { "name": "string.flag.apacheconf" }, "3": { "name": "punctuation.definition.flag.apacheconf" } }, "match": "\\s(\\[)(.*?)(\\])\\s" } ], "scopeName": "source.apacheconf", "uuid": "8747d9e4-b308-4fc2-9aa1-66b6919bc7b9" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/apex.tmLanguage.json ================================================ { "name": "apex", "scopeName": "source.apex", "fileTypes": ["apex", "cls", "trigger"], "uuid": "F5FC6824-F257-43B1-B53A-14E1CCD18631", "patterns": [ { "include": "#javadoc-comment" }, { "include": "#comment" }, { "include": "#directives" }, { "include": "#declarations" }, { "include": "#script-top-level" } ], "repository": { "directives": { "patterns": [ { "include": "#punctuation-semicolon" } ] }, "declarations": { "patterns": [ { "include": "#type-declarations" }, { "include": "#punctuation-semicolon" } ] }, "script-top-level": { "patterns": [ { "include": "#method-declaration" }, { "include": "#statement" }, { "include": "#punctuation-semicolon" } ] }, "type-declarations": { "patterns": [ { "include": "#javadoc-comment" }, { "include": "#comment" }, { "include": "#annotation-declaration" }, { "include": "#storage-modifier" }, { "include": "#sharing-modifier" }, { "include": "#class-declaration" }, { "include": "#enum-declaration" }, { "include": "#interface-declaration" }, { "include": "#trigger-declaration" }, { "include": "#punctuation-semicolon" } ] }, "class-or-trigger-members": { "patterns": [ { "include": "#javadoc-comment" }, { "include": "#comment" }, { "include": "#storage-modifier" }, { "include": "#sharing-modifier" }, { "include": "#type-declarations" }, { "include": "#field-declaration" }, { "include": "#property-declaration" }, { "include": "#indexer-declaration" }, { "include": "#variable-initializer" }, { "include": "#constructor-declaration" }, { "include": "#method-declaration" }, { "include": "#punctuation-semicolon" } ] }, "interface-members": { "patterns": [ { "include": "#javadoc-comment" }, { "include": "#comment" }, { "include": "#property-declaration" }, { "include": "#indexer-declaration" }, { "include": "#method-declaration" }, { "include": "#punctuation-semicolon" } ] }, "statement": { "patterns": [ { "include": "#comment" }, { "include": "#while-statement" }, { "include": "#do-statement" }, { "include": "#for-statement" }, { "include": "#switch-statement" }, { "include": "#when-else-statement" }, { "include": "#when-sobject-statement" }, { "include": "#when-statement" }, { "include": "#when-multiple-statement" }, { "include": "#if-statement" }, { "include": "#else-part" }, { "include": "#goto-statement" }, { "include": "#return-statement" }, { "include": "#break-or-continue-statement" }, { "include": "#throw-statement" }, { "include": "#try-statement" }, { "include": "#soql-query-expression" }, { "include": "#local-declaration" }, { "include": "#block" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" } ] }, "expression": { "patterns": [ { "include": "#comment" }, { "include": "#merge-expression" }, { "include": "#support-expression" }, { "include": "#throw-expression" }, { "include": "#this-expression" }, { "include": "#trigger-context-declaration" }, { "include": "#conditional-operator" }, { "include": "#expression-operators" }, { "include": "#soql-query-expression" }, { "include": "#object-creation-expression" }, { "include": "#array-creation-expression" }, { "include": "#invocation-expression" }, { "include": "#member-access-expression" }, { "include": "#element-access-expression" }, { "include": "#cast-expression" }, { "include": "#literal" }, { "include": "#parenthesized-expression" }, { "include": "#initializer-expression" }, { "include": "#identifier" } ] }, "annotation-declaration": { "begin": "([@][_[:alpha:]]+)\\b", "beginCaptures": { "1": { "name": "storage.type.annotation.apex" } }, "end": "(?<=\\)|$)", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [ { "include": "#expression" } ] }, { "include": "#statement" } ] }, "support-expression": { "begin": "(?x)\n(ApexPages|Database|DMLException|Exception|PageReference|Savepoint|SchedulableContext|Schema|SObject|System|Test)(?=\\.|\\s) # supported apex namespaces", "beginCaptures": { "1": { "name": "support.class.apex" } }, "end": "(?<=\\)|$)|(?=\\})|(?=;)|(?=\\)|(?=\\]))|(?=\\,)", "patterns": [ { "include": "#support-type" }, { "match": "(?:(\\.))([[:alpha:]]*)(?=\\()", "captures": { "1": { "name": "punctuation.accessor.apex" }, "2": { "name": "support.function.apex" } } }, { "match": "(?:(\\.))([[:alpha:]]+)", "captures": { "1": { "name": "punctuation.accessor.apex" }, "2": { "name": "support.type.apex" } } }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, { "include": "#comment" }, { "include": "#statement" } ] }, "support-type": { "name": "support.apex", "patterns": [ { "include": "#comment" }, { "include": "#support-class" }, { "include": "#support-functions" }, { "include": "#support-name" } ] }, "support-class": { "match": "\\b(ApexPages|Database|DMLException|Exception|PageReference|Savepoint|SchedulableContext|Schema|SObject|System|Test)\\b", "captures": { "1": { "name": "support.class.apex" } } }, "support-functions": { "match": "\\b(delete|execute|finish|insert|start|undelete|update|upsert)\\b", "captures": { "1": { "name": "support.function.apex" } } }, "support-name": { "patterns": [ { "match": "(\\.)\\s*([[:alpha:]]*)(?=\\()", "captures": { "1": { "name": "punctuation.accessor.apex" }, "2": { "name": "support.function.apex" } } }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, { "match": "(\\.)\\s*([_[:alpha:]]*)", "captures": { "1": { "name": "punctuation.accessor.apex" }, "2": { "name": "support.type.apex" } } } ] }, "support-arguments": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.apex" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.apex" } }, "patterns": [ { "include": "#comment" }, { "include": "#support-type" }, { "include": "#punctuation-comma" } ] }, "merge-expression": { "begin": "(merge)\\b\\s+", "beginCaptures": { "1": { "name": "support.function.apex" } }, "end": "(?<=\\;)", "patterns": [ { "include": "#object-creation-expression" }, { "include": "#merge-type-statement" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" } ] }, "merge-type-statement": { "match": "([_[:alpha:]]*)\\b\\s+([_[:alpha:]]*)\\b\\s*(\\;)", "captures": { "1": { "name": "variable.other.readwrite.apex" }, "2": { "name": "variable.other.readwrite.apex" }, "3": { "name": "punctuation.terminator.statement.apex" } } }, "sharing-modifier": { "name": "sharing.modifier.apex", "match": "(?", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.apex" } }, "patterns": [ { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", "captures": { "1": { "name": "entity.name.type.type-parameter.apex" } } }, { "include": "#comment" }, { "include": "#punctuation-comma" } ] }, "field-declaration": { "begin": "(?x)\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", "beginCaptures": { "1": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] }, "5": { "name": "entity.name.variable.field.apex" } }, "end": "(?=;)", "patterns": [ { "name": "entity.name.variable.field.apex", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" }, { "include": "#comment" }, { "include": "#variable-initializer" }, { "include": "#class-or-trigger-members" } ] }, "property-declaration": { "begin": "(?x)\n(?!.*\\b(?:class|interface|enum)\\b)\\s*\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "7": { "name": "entity.name.variable.property.apex" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#property-accessors" }, { "include": "#expression-body" }, { "include": "#variable-initializer" }, { "include": "#class-or-trigger-members" } ] }, "indexer-declaration": { "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "7": { "name": "keyword.other.this.apex" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#property-accessors" }, { "include": "#expression-body" }, { "include": "#variable-initializer" } ] }, "property-accessors": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.apex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.apex" } }, "patterns": [ { "name": "storage.modifier.apex", "match": "\\b(private|protected)\\b" }, { "name": "keyword.other.get.apex", "match": "\\b(get)\\b" }, { "name": "keyword.other.set.apex", "match": "\\b(set)\\b" }, { "include": "#comment" }, { "include": "#expression-body" }, { "include": "#block" }, { "include": "#punctuation-semicolon" } ] }, "method-declaration": { "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] }, "6": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "7": { "patterns": [ { "include": "#support-type" }, { "include": "#method-name-custom" } ] }, "8": { "patterns": [ { "include": "#type-parameter-list" } ] } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#parenthesized-parameter-list" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "method-name-custom": { "name": "entity.name.function.apex", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, "constructor-declaration": { "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*\\s*\\()", "end": "(?<=\\})|(?=;)", "patterns": [ { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", "captures": { "1": { "name": "entity.name.function.apex" } } }, { "begin": "(:)", "beginCaptures": { "1": { "name": "punctuation.separator.colon.apex" } }, "end": "(?=\\{|=>)", "patterns": [ { "include": "#constructor-initializer" } ] }, { "include": "#parenthesized-parameter-list" }, { "include": "#comment" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "constructor-initializer": { "begin": "\\b(?:(this))\\b\\s*(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.this.apex" } }, "end": "(?<=\\))", "patterns": [ { "include": "#argument-list" } ] }, "block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.apex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.apex" } }, "patterns": [ { "include": "#statement" } ] }, "variable-initializer": { "begin": "(?)", "beginCaptures": { "1": { "name": "keyword.operator.assignment.apex" } }, "end": "(?=[,\\)\\];}])", "patterns": [ { "include": "#expression" } ] }, "expression-body": { "begin": "=>", "beginCaptures": { "0": { "name": "keyword.operator.arrow.apex" } }, "end": "(?=[,\\);}])", "patterns": [ { "include": "#expression" } ] }, "goto-statement": { "begin": "(?\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g)\\b)?", "captures": { "1": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] }, "5": { "name": "entity.name.variable.local.apex" } } } ] }, { "include": "#comment" }, { "include": "#block" } ] }, "local-declaration": { "patterns": [ { "include": "#local-constant-declaration" }, { "include": "#local-variable-declaration" } ] }, "local-variable-declaration": { "begin": "(?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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", "beginCaptures": { "1": { "name": "storage.modifier.apex" }, "2": { "name": "keyword.other.var.apex" }, "3": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] }, "7": { "name": "entity.name.variable.local.apex" } }, "end": "(?=;|\\))", "patterns": [ { "name": "entity.name.variable.local.apex", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" }, { "include": "#comment" }, { "include": "#variable-initializer" } ] }, "local-constant-declaration": { "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", "beginCaptures": { "1": { "name": "storage.modifier.apex" }, "2": { "patterns": [ { "include": "#type" } ] }, "6": { "name": "entity.name.variable.local.apex" } }, "end": "(?=;)", "patterns": [ { "name": "entity.name.variable.local.apex", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" }, { "include": "#comment" }, { "include": "#variable-initializer" } ] }, "throw-expression": { "match": "(?>=|\\|=" }, { "name": "keyword.operator.bitwise.shift.apex", "match": "<<|>>" }, { "name": "keyword.operator.comparison.apex", "match": "==|!=" }, { "name": "keyword.operator.relational.apex", "match": "<=|>=|<|>" }, { "name": "keyword.operator.logical.apex", "match": "\\!|&&|\\|\\|" }, { "name": "keyword.operator.bitwise.apex", "match": "\\&|~|\\^|\\|" }, { "name": "keyword.operator.assignment.apex", "match": "\\=" }, { "name": "keyword.operator.decrement.apex", "match": "--" }, { "name": "keyword.operator.increment.apex", "match": "\\+\\+" }, { "name": "keyword.operator.arithmetic.apex", "match": "%|\\*|/|-|\\+" } ] }, "conditional-operator": { "begin": "(?\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])", "captures": { "1": { "name": "punctuation.parenthesis.open.apex" }, "2": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] }, "6": { "name": "punctuation.parenthesis.close.apex" } } }, "this-expression": { "match": "\\b(?:(this))\\b", "captures": { "1": { "name": "keyword.other.this.apex" } } }, "invocation-expression": { "begin": "(?x)\n(?:(\\??\\.)\\s*)? # safe navigator or accessor\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?\\s*<([^<>]|\\g)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list", "beginCaptures": { "1": { "patterns": [ { "include": "#punctuation-accessor" }, { "include": "#operator-safe-navigation" } ] }, "2": { "name": "entity.name.function.apex" }, "3": { "patterns": [ { "include": "#type-arguments" } ] } }, "end": "(?<=\\))", "patterns": [ { "include": "#argument-list" } ] }, "element-access-expression": { "begin": "(?x)\n(?:(\\??\\.)\\s*)? # safe navigator or accessor\n(?:(@?[_[:alpha:]][_[:alnum:]]*)\\s*)? # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list", "beginCaptures": { "1": { "patterns": [ { "include": "#punctuation-accessor" }, { "include": "#operator-safe-navigation" } ] }, "2": { "name": "variable.other.object.property.apex" }, "3": { "name": "keyword.operator.null-conditional.apex" } }, "end": "(?<=\\])(?!\\s*\\[)", "patterns": [ { "include": "#bracketed-argument-list" } ] }, "member-access-expression": { "patterns": [ { "match": "(?x)\n(\\??\\.)\\s* # safe navigator or accessor\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # property name\n(?![_[:alnum:]]|\\(|(\\?)?\\[|<) # next character is not alpha-numeric, nor a (, [, or <. Also, test for ?[", "captures": { "1": { "patterns": [ { "include": "#punctuation-accessor" }, { "include": "#operator-safe-navigation" } ] }, "2": { "name": "variable.other.object.property.apex" } } }, { "match": "(?x)\n(\\??\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?\\s*<([^<>]|\\g)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", "captures": { "1": { "patterns": [ { "include": "#punctuation-accessor" }, { "include": "#operator-safe-navigation" } ] }, "2": { "name": "variable.other.object.apex" }, "3": { "patterns": [ { "include": "#type-arguments" } ] } } }, { "match": "(?x)\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", "captures": { "1": { "name": "variable.other.object.apex" } } } ] }, "object-creation-expression": { "patterns": [ { "include": "#object-creation-expression-with-parameters" }, { "include": "#object-creation-expression-with-no-parameters" }, { "include": "#punctuation-comma" } ] }, "object-creation-expression-with-parameters": { "begin": "(?x)\n(delete|insert|undelete|update|upsert)?\n\\s*(new)\\s+\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "support.function.apex" }, "2": { "name": "keyword.control.new.apex" }, "3": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] } }, "end": "(?<=\\))", "patterns": [ { "include": "#argument-list" } ] }, "object-creation-expression-with-no-parameters": { "match": "(?x)\n(delete|insert|undelete|update|upsert)?\n\\s*(new)\\s+\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)", "captures": { "1": { "name": "support.function.apex" }, "2": { "name": "keyword.control.new.apex" }, "3": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] } } }, "array-creation-expression": { "begin": "(?x)\n\\b(new)\\b\\s*\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)", "beginCaptures": { "1": { "name": "keyword.control.new.apex" }, "2": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] } }, "end": "(?<=\\])", "patterns": [ { "include": "#bracketed-argument-list" } ] }, "parenthesized-parameter-list": { "begin": "(\\()", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "(\\))", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [ { "include": "#comment" }, { "include": "#parameter" }, { "include": "#punctuation-comma" }, { "include": "#variable-initializer" } ] }, "parameter": { "match": "(?x)\n(?:(?:\\b(this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\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)*\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)", "captures": { "1": { "name": "storage.modifier.apex" }, "2": { "patterns": [ { "include": "#support-type" }, { "include": "#type" } ] }, "6": { "name": "entity.name.variable.parameter.apex" } } }, "argument-list": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.apex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.apex" } }, "patterns": [ { "include": "#named-argument" }, { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "bracketed-argument-list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.apex" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.apex" } }, "patterns": [ { "include": "#soql-query-expression" }, { "include": "#named-argument" }, { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "named-argument": { "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", "beginCaptures": { "1": { "name": "entity.name.variable.parameter.apex" }, "2": { "name": "punctuation.separator.colon.apex" } }, "end": "(?=(,|\\)|\\]))", "patterns": [ { "include": "#expression" } ] }, "type": { "name": "meta.type.apex", "patterns": [ { "include": "#comment" }, { "include": "#type-builtin" }, { "include": "#type-name" }, { "include": "#type-arguments" }, { "include": "#type-array-suffix" }, { "include": "#type-nullable-suffix" } ] }, "type-builtin": { "match": "\\b(Blob|Boolean|byte|Date|Datetime|Decimal|Double|ID|Integer|Long|Object|String|Time|void)\\b", "captures": { "1": { "name": "keyword.type.apex" } } }, "type-name": { "patterns": [ { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.)", "captures": { "1": { "name": "storage.type.apex" }, "2": { "name": "punctuation.accessor.apex" } } }, { "match": "(\\.)\\s*(@?[_[:alpha:]][_[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.apex" }, "2": { "name": "storage.type.apex" } } }, { "name": "storage.type.apex", "match": "@?[_[:alpha:]][_[:alnum:]]*" } ] }, "type-arguments": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.apex" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.apex" } }, "patterns": [ { "include": "#comment" }, { "include": "#support-type" }, { "include": "#type" }, { "include": "#punctuation-comma" } ] }, "type-array-suffix": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.apex" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.apex" } }, "patterns": [ { "include": "#punctuation-comma" } ] }, "type-nullable-suffix": { "match": "\\?", "captures": { "0": { "name": "punctuation.separator.question-mark.apex" } } }, "operator-assignment": { "name": "keyword.operator.assignment.apex", "match": "(?)", "endCaptures": { "1": { "name": "punctuation.definition.tag.apex" } }, "patterns": [ { "include": "#xml-attribute" } ] }, "xml-attribute": { "patterns": [ { "match": "(?x)\n(?:^|\\s+)\n(\n (?:\n ([-_[:alnum:]]+)\n (:)\n )?\n ([-_[:alnum:]]+)\n)\n(=)", "captures": { "1": { "name": "entity.other.attribute-name.apex" }, "2": { "name": "entity.other.attribute-name.namespace.apex" }, "3": { "name": "punctuation.separator.colon.apex" }, "4": { "name": "entity.other.attribute-name.localname.apex" }, "5": { "name": "punctuation.separator.equals.apex" } } }, { "include": "#xml-string" } ] }, "xml-cdata": { "name": "string.unquoted.cdata.apex", "begin": "", "endCaptures": { "0": { "name": "punctuation.definition.string.end.apex" } } }, "xml-string": { "patterns": [ { "name": "string.quoted.single.apex", "begin": "\\'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.apex" } }, "end": "\\'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.apex" } }, "patterns": [ { "include": "#xml-character-entity" } ] }, { "name": "string.quoted.double.apex", "begin": "\\\"", "beginCaptures": { "0": { "name": "punctuation.definition.stringdoublequote.begin.apex" } }, "end": "\\\"", "endCaptures": { "0": { "name": "punctuation.definition.stringdoublequote.end.apex" } }, "patterns": [ { "include": "#xml-character-entity" } ] } ] }, "xml-character-entity": { "patterns": [ { "name": "constant.character.entity.apex", "match": "(?x)\n(&)\n(\n (?:[[:alpha:]:_][[:alnum:]:_.-]*)|\n (?:\\#[[:digit:]]+)|\n (?:\\#x[[:xdigit:]]+)\n)\n(;)", "captures": { "1": { "name": "punctuation.definition.constant.apex" }, "3": { "name": "punctuation.definition.constant.apex" } } }, { "name": "invalid.illegal.bad-ampersand.apex", "match": "&" } ] }, "xml-comment": { "name": "comment.block.apex", "begin": "", "endCaptures": { "0": { "name": "punctuation.definition.comment.apex" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/applescript.tmLanguage.json ================================================ { "fileTypes": ["applescript", "scpt", "script editor"], "firstLineMatch": "^#!.*(osascript)", "keyEquivalent": "^~A", "name": "applescript", "patterns": [ { "include": "#blocks" }, { "include": "#inline" } ], "repository": { "attributes.considering-ignoring": { "patterns": [ { "match": ",", "name": "punctuation.separator.array.attributes.applescript" }, { "match": "\\b(and)\\b", "name": "keyword.control.attributes.and.applescript" }, { "match": "\\b(?i:case|diacriticals|hyphens|numeric\\s+strings|punctuation|white\\s+space)\\b", "name": "constant.other.attributes.text.applescript" }, { "match": "\\b(?i:application\\s+responses)\\b", "name": "constant.other.attributes.application.applescript" } ] }, "blocks": { "patterns": [ { "begin": "^\\s*(script)\\s+(\\w+)", "beginCaptures": { "1": { "name": "keyword.control.script.applescript" }, "2": { "name": "entity.name.type.script-object.applescript" } }, "end": "^\\s*(end(?:\\s+script)?)(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.script.applescript" } }, "name": "meta.block.script.applescript", "patterns": [ { "include": "$self" } ] }, { "begin": "^(?x)\n\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t\t# function name\n\t\t\t\t\t\t(\\()\t\t\t\t\t\t\t# opening paren\n\t\t\t\t\t\t\t((?:[\\s,:\\{\\}]*(?:\\w+)?)*)\t# parameters\n\t\t\t\t\t\t(\\))\t\t\t\t\t\t\t# closing paren\n\t\t\t\t\t", "beginCaptures": { "1": { "name": "keyword.control.function.applescript" }, "2": { "name": "entity.name.function.handler.applescript" }, "3": { "name": "punctuation.definition.parameters.begin.applescript" }, "4": { "name": "variable.parameter.handler.applescript" }, "5": { "name": "punctuation.definition.parameters.end.applescript" } }, "comment": "\n\t\t\t\t\t\tThis is not a very well-designed rule. For now,\n\t\t\t\t\t\twe can leave it like this though, as it sorta works.\n\t\t\t\t\t", "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.function.applescript" } }, "name": "meta.function.positional.applescript", "patterns": [ { "include": "$self" } ] }, { "begin": "^(?x)\n\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t\t# function name\n\t\t\t\t\t\t(?:\\s+\n\t\t\t\t\t\t\t(of|in)\\s+\t\t\t\t\t# \"of\" or \"in\"\n\t\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t# direct parameter\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t(?=\\s+(above|against|apart\\s+from|around|aside\\s+from|at|below|beneath|beside|between|by|for|from|instead\\s+of|into|on|onto|out\\s+of|over|thru|under)\\b)\n\t\t\t\t\t", "beginCaptures": { "1": { "name": "keyword.control.function.applescript" }, "2": { "name": "entity.name.function.handler.applescript" }, "3": { "name": "keyword.control.function.applescript" }, "4": { "name": "variable.parameter.handler.direct.applescript" } }, "comment": "TODO: match `given` parameters", "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.function.applescript" } }, "name": "meta.function.prepositional.applescript", "patterns": [ { "captures": { "1": { "name": "keyword.control.preposition.applescript" }, "2": { "name": "variable.parameter.handler.applescript" } }, "match": "\\b(?i:above|against|apart\\s+from|around|aside\\s+from|at|below|beneath|beside|between|by|for|from|instead\\s+of|into|on|onto|out\\s+of|over|thru|under)\\s+(\\w+)\\b" }, { "include": "$self" } ] }, { "begin": "^(?x)\n\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\t\t\t\t\t\t(\\w+)\t\t\t\t\t\t\t# function name\n\t\t\t\t\t\t(?=\\s*(--.*?)?$)\t\t\t\t# nothing else\n\t\t\t\t\t", "beginCaptures": { "1": { "name": "keyword.control.function.applescript" }, "2": { "name": "entity.name.function.handler.applescript" } }, "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.function.applescript" } }, "name": "meta.function.parameterless.applescript", "patterns": [ { "include": "$self" } ] }, { "include": "#blocks.tell" }, { "include": "#blocks.repeat" }, { "include": "#blocks.statement" }, { "include": "#blocks.other" } ] }, "blocks.other": { "patterns": [ { "begin": "^\\s*(considering)\\b", "end": "^\\s*(end(?:\\s+considering)?)(?=\\s*(--.*?)?$)", "name": "meta.block.considering.applescript", "patterns": [ { "begin": "(?<=considering)", "end": "(?|<|≥|>=|≤|<=)", "name": "keyword.operator.comparison.applescript" }, { "match": "(?ix)\\b\n\t\t\t\t\t\t(and|or|div|mod|as|not\n\t\t\t\t\t\t|(a\\s+)?(ref(\\s+to)?|reference\\s+to)\n\t\t\t\t\t\t|equal(s|\\s+to)|contains?|comes\\s+(after|before)|(start|begin|end)s?\\s+with\n\t\t\t\t\t\t)\n\t\t\t\t\t\\b", "name": "keyword.operator.word.applescript" }, { "comment": "In double quotes so we can use a single quote in the keywords.", "match": "(?ix)\\b\n\t\t\t\t\t\t(is(n't|\\s+not)?(\\s+(equal(\\s+to)?|(less|greater)\\s+than(\\s+or\\s+equal(\\s+to)?)?|in|contained\\s+by))?\n\t\t\t\t\t\t|does(n't|\\s+not)\\s+(equal|come\\s+(before|after)|contain)\n\t\t\t\t\t\t)\n\t\t\t\t\t\\b", "name": "keyword.operator.word.applescript" }, { "match": "\\b(?i:some|every|whose|where|that|id|index|\\d+(st|nd|rd|th)|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|last|front|back|middle|named|beginning|end|from|to|thr(u|ough)|before|(front|back|beginning|end)\\s+of|after|behind|in\\s+(front|back|beginning|end)\\s+of)\\b", "name": "keyword.operator.reference.applescript" }, { "match": "\\b(?i:continue|return|exit(\\s+repeat)?)\\b", "name": "keyword.control.loop.applescript" }, { "match": "\\b(?i:about|above|after|against|and|apart\\s+from|around|as|aside\\s+from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|contains|copy|div|does|eighth|else|end|equal|equals|error|every|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead\\s+of|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|out\\s+of|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\\b", "name": "keyword.other.applescript" } ] }, "built-in.punctuation": { "patterns": [ { "match": "¬", "name": "punctuation.separator.continuation.line.applescript" }, { "comment": "the : in property assignments", "match": ":", "name": "punctuation.separator.key-value.property.applescript" }, { "comment": "the parentheses in groups", "match": "[()]", "name": "punctuation.section.group.applescript" } ] }, "built-in.support": { "patterns": [ { "match": "\\b(?i:POSIX\\s+path|frontmost|id|name|running|version|days?|weekdays?|months?|years?|time|date\\s+string|time\\s+string|length|rest|reverse|items?|contents|quoted\\s+form|characters?|paragraphs?|words?)\\b", "name": "support.function.built-in.property.applescript" }, { "match": "\\b(?i:activate|log|clipboard\\s+info|set\\s+the\\s+clipboard\\s+to|the\\s+clipboard|info\\s+for|list\\s+(disks|folder)|mount\\s+volume|path\\s+to(\\s+resource)?|close\\s+access|get\\s+eof|open\\s+for\\s+access|read|set\\s+eof|write|open\\s+location|current\\s+date|do\\s+shell\\s+script|get\\s+volume\\s+settings|random\\s+number|round|set\\s+volume|system\\s+(attribute|info)|time\\s+to\\s+GMT|load\\s+script|run\\s+script|scripting\\s+components|store\\s+script|copy|count|get|launch|run|set|ASCII\\s+(character|number)|localized\\s+string|offset|summarize|beep|choose\\s+(application|color|file(\\s+name)?|folder|from\\s+list|remote\\s+application|URL)|delay|display\\s+(alert|dialog)|say)\\b", "name": "support.function.built-in.command.applescript" }, { "match": "\\b(?i:get|run)\\b", "name": "support.function.built-in.applescript" }, { "match": "\\b(?i:anything|data|text|upper\\s+case|propert(y|ies))\\b", "name": "support.class.built-in.applescript" }, { "match": "\\b(?i:alias|class)(es)?\\b", "name": "support.class.built-in.applescript" }, { "match": "\\b(?i:app(lication)?|boolean|character|constant|date|event|file(\\s+specification)?|handler|integer|item|keystroke|linked\\s+list|list|machine|number|picture|preposition|POSIX\\s+file|real|record|reference(\\s+form)?|RGB\\s+color|script|sound|text\\s+item|type\\s+class|vector|writing\\s+code(\\s+info)?|zone|((international|styled(\\s+(Clipboard|Unicode))?|Unicode)\\s+)?text|((C|encoded|Pascal)\\s+)?string)s?\\b", "name": "support.class.built-in.applescript" }, { "match": "(?ix)\\b\n\t\t\t\t\t\t(\t(cubic\\s+(centi)?|square\\s+(kilo)?|centi|kilo)met(er|re)s\n\t\t\t\t\t\t|\tsquare\\s+(yards|feet|miles)|cubic\\s+(yards|feet|inches)|miles|inches\n\t\t\t\t\t\t|\tlit(re|er)s|gallons|quarts\n\t\t\t\t\t\t|\t(kilo)?grams|ounces|pounds\n\t\t\t\t\t\t|\tdegrees\\s+(Celsius|Fahrenheit|Kelvin)\n\t\t\t\t\t\t)\n\t\t\t\t\t\\b", "name": "support.class.built-in.unit.applescript" }, { "match": "\\b(?i:seconds|minutes|hours|days)\\b", "name": "support.class.built-in.time.applescript" } ] }, "comments": { "patterns": [ { "begin": "^\\s*(#!)", "captures": { "1": { "name": "punctuation.definition.comment.applescript" } }, "end": "\\n", "name": "comment.line.number-sign.applescript" }, { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.applescript" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.applescript" } }, "end": "\\n", "name": "comment.line.number-sign.applescript" } ] }, { "begin": "(^[ \\t]+)?(?=--)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.applescript" } }, "end": "(?!\\G)", "patterns": [ { "begin": "--", "beginCaptures": { "0": { "name": "punctuation.definition.comment.applescript" } }, "end": "\\n", "name": "comment.line.double-dash.applescript" } ] }, { "begin": "\\(\\*", "captures": { "0": { "name": "punctuation.definition.comment.applescript" } }, "end": "\\*\\)", "name": "comment.block.applescript", "patterns": [ { "include": "#comments.nested" } ] } ] }, "comments.nested": { "patterns": [ { "begin": "\\(\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.applescript" } }, "end": "\\*\\)", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.applescript" } }, "name": "comment.block.applescript", "patterns": [ { "include": "#comments.nested" } ] } ] }, "data-structures": { "patterns": [ { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.applescript" } }, "comment": "We cannot necessarily distinguish \"records\" from \"arrays\", and so this could be either.", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.array.end.applescript" } }, "name": "meta.array.applescript", "patterns": [ { "captures": { "1": { "name": "constant.other.key.applescript" }, "2": { "name": "meta.identifier.applescript" }, "3": { "name": "punctuation.definition.identifier.applescript" }, "4": { "name": "punctuation.definition.identifier.applescript" }, "5": { "name": "punctuation.separator.key-value.applescript" } }, "match": "(\\w+|((\\|)[^|\\n]*(\\|)))\\s*(:)" }, { "match": ":", "name": "punctuation.separator.key-value.applescript" }, { "match": ",", "name": "punctuation.separator.array.applescript" }, { "include": "#inline" } ] }, { "begin": "(?:(?<=application )|(?<=app ))(\")", "captures": { "1": { "name": "punctuation.definition.string.applescript" } }, "end": "(\")", "name": "string.quoted.double.application-name.applescript", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.applescript" } ] }, { "begin": "(\")", "captures": { "1": { "name": "punctuation.definition.string.applescript" } }, "end": "(\")", "name": "string.quoted.double.applescript", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.applescript" } ] }, { "captures": { "1": { "name": "punctuation.definition.identifier.applescript" }, "2": { "name": "punctuation.definition.identifier.applescript" } }, "match": "(\\|)[^|\\n]*(\\|)", "name": "meta.identifier.applescript" }, { "captures": { "1": { "name": "punctuation.definition.data.applescript" }, "2": { "name": "support.class.built-in.applescript" }, "3": { "name": "storage.type.utxt.applescript" }, "4": { "name": "string.unquoted.data.applescript" }, "5": { "name": "punctuation.definition.data.applescript" }, "6": { "name": "keyword.operator.applescript" }, "7": { "name": "support.class.built-in.applescript" } }, "match": "(«)(data) (utxt|utf8)([[:xdigit:]]*)(»)(?:\\s+(as)\\s+(?i:Unicode\\s+text))?", "name": "constant.other.data.utxt.applescript" }, { "begin": "(«)(\\w+)\\b(?=\\s)", "beginCaptures": { "1": { "name": "punctuation.definition.data.applescript" }, "2": { "name": "support.class.built-in.applescript" } }, "end": "(»)", "endCaptures": { "1": { "name": "punctuation.definition.data.applescript" } }, "name": "constant.other.data.raw.applescript" }, { "captures": { "1": { "name": "punctuation.definition.data.applescript" }, "2": { "name": "punctuation.definition.data.applescript" } }, "match": "(«)[^»]*(»)", "name": "invalid.illegal.data.applescript" } ] }, "finder": { "patterns": [ { "match": "\\b(item|container|(computer|disk|trash)-object|disk|folder|((alias|application|document|internet location) )?file|clipping|package)s?\\b", "name": "support.class.finder.items.applescript" }, { "match": "\\b((Finder|desktop|information|preferences|clipping) )windows?\\b", "name": "support.class.finder.window-classes.applescript" }, { "match": "\\b(preferences|(icon|column|list) view options|(label|column|alias list)s?)\\b", "name": "support.class.finder.type-definitions.applescript" }, { "match": "\\b(copy|find|sort|clean up|eject|empty( trash)|erase|reveal|update)\\b", "name": "support.function.finder.items.applescript" }, { "match": "\\b(insertion location|product version|startup disk|desktop|trash|home|computer container|finder preferences)\\b", "name": "support.constant.finder.applescript" }, { "match": "\\b(visible)\\b", "name": "support.variable.finder.applescript" } ] }, "inline": { "patterns": [ { "include": "#comments" }, { "include": "#data-structures" }, { "include": "#built-in" }, { "include": "#standardadditions" } ] }, "itunes": { "patterns": [ { "match": "\\b(artwork|application|encoder|EQ preset|item|source|visual|(EQ |browser )?window|((audio CD|device|shared|URL|file) )?track|playlist window|((audio CD|device|radio tuner|library|folder|user) )?playlist)s?\\b", "name": "support.class.itunes.applescript" }, { "match": "\\b(add|back track|convert|fast forward|(next|previous) track|pause|play(pause)?|refresh|resume|rewind|search|stop|update|eject|subscribe|update(Podcast|AllPodcasts)|download)\\b", "name": "support.function.itunes.applescript" }, { "match": "\\b(current (playlist|stream (title|URL)|track)|player state)\\b", "name": "support.constant.itunes.applescript" }, { "match": "\\b(current (encoder|EQ preset|visual)|EQ enabled|fixed indexing|full screen|mute|player position|sound volume|visuals enabled|visual size)\\b", "name": "support.variable.itunes.applescript" } ] }, "standard-suite": { "patterns": [ { "match": "\\b(colors?|documents?|items?|windows?)\\b", "name": "support.class.standard-suite.applescript" }, { "match": "\\b(close|count|delete|duplicate|exists|make|move|open|print|quit|save|activate|select|data size)\\b", "name": "support.function.standard-suite.applescript" }, { "match": "\\b(name|frontmost|version)\\b", "name": "support.constant.standard-suite.applescript" }, { "match": "\\b(selection)\\b", "name": "support.variable.standard-suite.applescript" }, { "match": "\\b(attachments?|attribute runs?|characters?|paragraphs?|texts?|words?)\\b", "name": "support.class.text-suite.applescript" } ] }, "standardadditions": { "patterns": [ { "match": "\\b((alert|dialog) reply)\\b", "name": "support.class.standardadditions.user-interaction.applescript" }, { "match": "\\b(file information)\\b", "name": "support.class.standardadditions.file.applescript" }, { "match": "\\b(POSIX files?|system information|volume settings)\\b", "name": "support.class.standardadditions.miscellaneous.applescript" }, { "match": "\\b(URLs?|internet address(es)?|web pages?|FTP items?)\\b", "name": "support.class.standardadditions.internet.applescript" }, { "match": "\\b(info for|list (disks|folder)|mount volume|path to( resource)?)\\b", "name": "support.function.standardadditions.file.applescript" }, { "match": "\\b(beep|choose (application|color|file( name)?|folder|from list|remote application|URL)|delay|display (alert|dialog)|say)\\b", "name": "support.function.standardadditions.user-interaction.applescript" }, { "match": "\\b(ASCII (character|number)|localized string|offset|summarize)\\b", "name": "support.function.standardadditions.string.applescript" }, { "match": "\\b(set the clipboard to|the clipboard|clipboard info)\\b", "name": "support.function.standardadditions.clipboard.applescript" }, { "match": "\\b(open for access|close access|read|write|get eof|set eof)\\b", "name": "support.function.standardadditions.file-i-o.applescript" }, { "match": "\\b((load|store|run) script|scripting components)\\b", "name": "support.function.standardadditions.scripting.applescript" }, { "match": "\\b(current date|do shell script|get volume settings|random number|round|set volume|system attribute|system info|time to GMT)\\b", "name": "support.function.standardadditions.miscellaneous.applescript" }, { "match": "\\b(opening folder|(closing|moving) folder window for|adding folder items to|removing folder items from)\\b", "name": "support.function.standardadditions.folder-actions.applescript" }, { "match": "\\b(open location|handle CGI request)\\b", "name": "support.function.standardadditions.internet.applescript" } ] }, "system-events": { "patterns": [ { "match": "\\b(audio (data|file))\\b", "name": "support.class.system-events.audio-file.applescript" }, { "match": "\\b(alias(es)?|(Classic|local|network|system|user) domain objects?|disk( item)?s?|domains?|file( package)?s?|folders?|items?)\\b", "name": "support.class.system-events.disk-folder-file.applescript" }, { "match": "\\b(delete|open|move)\\b", "name": "support.function.system-events.disk-folder-file.applescript" }, { "match": "\\b(folder actions?|scripts?)\\b", "name": "support.class.system-events.folder-actions.applescript" }, { "match": "\\b(attach action to|attached scripts|edit action of|remove action from)\\b", "name": "support.function.system-events.folder-actions.applescript" }, { "match": "\\b(movie data|movie file)\\b", "name": "support.class.system-events.movie-file.applescript" }, { "match": "\\b(log out|restart|shut down|sleep)\\b", "name": "support.function.system-events.power.applescript" }, { "match": "\\b(((application |desk accessory )?process|(check|combo )?box)(es)?|(action|attribute|browser|(busy|progress|relevance) indicator|color well|column|drawer|group|grow area|image|incrementor|list|menu( bar)?( item)?|(menu |pop up |radio )?button|outline|(radio|tab|splitter) group|row|scroll (area|bar)|sheet|slider|splitter|static text|table|text (area|field)|tool bar|UI element|window)s?)\\b", "name": "support.class.system-events.processes.applescript" }, { "match": "\\b(click|key code|keystroke|perform|select)\\b", "name": "support.function.system-events.processes.applescript" }, { "match": "\\b(property list (file|item))\\b", "name": "support.class.system-events.property-list.applescript" }, { "match": "\\b(annotation|QuickTime (data|file)|track)s?\\b", "name": "support.class.system-events.quicktime-file.applescript" }, { "match": "\\b((abort|begin|end) transaction)\\b", "name": "support.function.system-events.system-events.applescript" }, { "match": "\\b(XML (attribute|data|element|file)s?)\\b", "name": "support.class.system-events.xml.applescript" }, { "match": "\\b(print settings|users?|login items?)\\b", "name": "support.class.sytem-events.other.applescript" } ] }, "textmate": { "patterns": [ { "match": "\\b(print settings)\\b", "name": "support.class.textmate.applescript" }, { "match": "\\b(get url|insert|reload bundles)\\b", "name": "support.function.textmate.applescript" } ] } }, "scopeName": "source.applescript", "uuid": "777CF925-14B9-428E-B07B-17FAAB8FA27E" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/arm.tmLanguage.json ================================================ { "scopeName": "source.arm", "fileTypes": ["s", "S"], "patterns": [ { "match": "@.*$", "name": "comment.line" }, { "match": "//.*$", "name": "comment.line" }, { "match": ";.*$", "name": "comment.line" }, { "begin": "^\\s*\\#\\s*if\\s+0\\b", "end": "^\\s*\\#\\s*endif\\b", "name": "comment.preprocessor" }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block" }, { "begin": "(?x)\n\t\t\t^\\s*\\#\\s*(define)\\s+ # define\n\t\t\t((?[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n\t\t\t(?: # and optionally:\n\t\t\t (\\() # an open parenthesis\n\t\t\t (\n\t\t\t \\s* \\g \\s* # first argument\n\t\t\t ((,) \\s* \\g \\s*)* # additional arguments\n\t\t\t (?:\\.\\.\\.)? # varargs ellipsis?\n\t\t\t )\n\t\t\t (\\)) # a close parenthesis\n\t\t\t)?\n\t\t\t", "end": "(?=(?://|/\\*))|$", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" }, { "include": "$base" } ], "name": "meta.preprocessor.macro.c", "beginCaptures": { "1": { "name": "keyword.control.import.define.c" }, "8": { "name": "punctuation.definition.parameters.c" }, "4": { "name": "punctuation.definition.parameters.c" }, "2": { "name": "entity.name.function.preprocessor.c" }, "7": { "name": "punctuation.separator.parameters.c" }, "5": { "name": "variable.parameter.preprocessor.c" } } }, { "begin": "^\\s*#\\s*(error|warning)\\b", "end": "$", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" } ], "name": "meta.preprocessor.diagnostic.c", "captures": { "1": { "name": "keyword.control.import.error.c" } } }, { "begin": "^\\s*#\\s*(include|import)\\b\\s+", "end": "(?=(?://|/\\*))|$", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "end": "\"", "name": "string.quoted.double.include.c", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } } }, { "begin": "<", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "end": ">", "name": "string.quoted.other.lt-gt.include.c", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } } } ], "name": "meta.preprocessor.c.include", "captures": { "1": { "name": "keyword.control.import.include.c" } } }, { "match": "((?i)([xw][0-9]|[xw]1[0-9]||[xw]2[0-9]|[wx]30|wzr|xzr|wsp|fpsr|fpcr|[rcp]1[0-5]|[rcp][0-9]|a[1-4]|v[1-8]|sl|sb|fp|ip|sp|lr|(c|s)psr(_c)?|pc|[sd]3[0-1]|[sd][12][0-9]|[sd][0-9]|fpsid|fpscr|fpexc|q3[0-1]|q2[0-9]|q1[0-9]|q[0-9]|APSR_nzcv|sy)!?(?-i))?\\b", "name": "storage.other.register" }, { "match": "\\.(?i)(globl|global|macro|endm|purgem|if|elseif|else|endif|section|text|arm|align|balign|irp|rept|endr|req|unreq|error|short|func|endfunc|hidden|type|fpu|arch|code|altmacro|object_arch|word|int|string)(?-i)\\b", "name": "keyword.control.directive" }, { "match": "armv(2a?|3m?|4t?|5t?e?6(j|t2|zk?|-m)?|7v?e?(-(a|r|m))?|8-a(\\+crc)?)", "name": "keyword.control.arch.arm" }, { "begin": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef|endif)\\b", "end": "(?=(?://|/\\*))|$", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" } ], "name": "meta.preprocessor.c", "captures": { "1": { "name": "keyword.control.import.c" } } }, { "match": "(?x)\\b((?i)\n\t\t\t\t(\n\t\t\t\t\t(bf(c|i)|(u|s)bfx|(u|s)xta?(h|b)?) |\n\t\t\t\t\t(v(add|cvt|sub|mov|trn|cmp|div|qdmulh|mrs|mul|ld1|qadd|qshrun|st[1234]|addw|mull|mlal|rshrn|swp|qmovun)|qmovun)(\\.([isup]?8|[isupf]?16|[isuf]?32|[isu]?64))* |\n\t\t\t\t\t(and|m(rs|sr)|eor|sub|rsb|add|adc|sbc|rsc|tst|teq|cmp|cmn|orr|mov|bic|mvn |\n\t\t\t\t\t\t(neg) |\n\t\t\t\t\t\t(lsr|lsl|ror|asr) # shift ops either pseudo ops or actual shifts\n\t\t\t\t\t)s? |\n\t\t\t\t\t(mul|mla|mull|smlabb) |\n\t\t\t\t\t(mov(w|t)) |\n\t\t\t\t\trev(8|16)? |\n\t\t\t\t\t(pld|adr|adrl|vswp)\n\t\t\t\t)\n\t\t\t\t(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\\b", "name": "support.function.mnemonic.arithmetic" }, { "match": "(?x)\\b((?i)(\n\t\t\t\t\tswi|svc|wfi|\n\t\t\t\t\tdmb | clrex | dsb | isb |\n\t\t\t\t\tv(ldr|str|push|pop) |\n\t\t\t\t\t(push|pop) |\n\t\t\t\t\t(st|ld)(\n\t\t\t\t\t p |\n\t\t\t\t\t\tr(ex|s?(h|b)|d)? |\n\t\t\t\t\t\tm(\n\t\t\t\t\t\t\t(f|e)(d|a) |\n\t\t\t\t\t\t\t(d|i)(b|a)\n\t\t\t\t\t\t)?\n\t\t\t\t\t) |\n\t\t\t\t\tb(l|x|lx|lr|r)? |\n\t\t\t\t\t(i|e)?ret|\n\t\t\t\t\tb\\.(eq|ne|hs|cs|lo|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|nv)+ |\t\t\t\t\t\n\t\t\t\t\t(c|t)?bn?z|\n\t\t\t\t)+(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))\\b", "name": "support.function.mnemonic.memory" }, { "match": "\\b((?i)(def(b|w|s)|equ|(include|get)(\\s+([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*?)\\.s)?)?(?-i))\\b", "name": "meta.preprocessor.c.include" }, { "match": "\\b((?i)(align)(?-i))?\\b", "name": "storage.type.c.memaccess" }, { "match": "\\s+\\\".+\\\"", "name": "string" }, { "match": "\\b((?i)nop(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\\b", "name": "comment.nop" }, { "begin": "\\s\\[", "end": "\\]", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" }, { "include": "$base" } ], "name": "storage.type.c.memaccess" }, { "match": "(\\b|\\s+)\\=\\b", "name": "keyword.control.evaluation" }, { "match": "(\\b|\\s+)(\\#)?-?(0x|&)[0-9a-fA-F_]+\\b", "name": "constant.numeric.hex" }, { "match": "(\\b|\\s+)\\#-?[0-9a-zA-Z_]+\\b", "name": "constant.numeric.literal" }, { "match": "(\\b|\\s+)[0-9]+\\b", "name": "constant.numeric.dec" }, { "match": "\\b([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*)\\b", "name": "meta.function.source.arm.label" } ], "name": "ARM Assembly", "uuid": "433AE307-8DE5-4856-8113-37659B1AFDA4" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/asciidoctor.tmLanguage.json ================================================ { "scopeName": "text.asciidoc", "fileTypes": ["adoc", "ad", "asciidoc"], "patterns": [ { "include": "#lists" }, { "include": "#blocks" }, { "include": "#section_titles" }, { "include": "#lines" }, { "include": "#inline" }, { "include": "#characters" } ], "repository": { "block_admonition_label": { "comment": "Label of an admonition block.\n\nExamples:\n NOTE: This is a admonition block.\n WARNING: Be aware of them!\n", "match": "^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):(?=\\s+)", "name": "support.constant.admonitionword.asciidoc" }, "mark_double": { "end": "\\#\\#", "begin": "(?x)\n(\\[[^\\]]*?\\])? # might start with an attribute list (indeed, that is its purpose)\n(?>)(?!<)", "comment": "Internal cross-reference\n\nExamples:\n <>\n <>\n", "name": "meta.xref.asciidoc", "captures": { "1": { "name": "constant.character.xref.begin.asciidoc" }, "6": { "name": "constant.character.xref.end.asciidoc" }, "2": { "name": "markup.underline.term.xref.asciidoc" }, "5": { "name": "variable.parameter.xref.asciidoc" } } }, "title_level_4": { "match": "^(=====) (\\w.*)$\\n?", "name": "markup.heading.level.4.asciidoc", "captures": { "1": { "name": "punctuation.definition.heading.asciidoc" }, "2": { "name": "entity.name.section.asciidoc" } } }, "passthrough": { "end": "\\1", "begin": "(\\+\\+\\+|\\$\\$)", "beginCaptures": { "1": { "name": "constant.character.passthru.begin.asciidoc" } }, "contentName": "variable.parameter.passthruinner.asciidoc", "comment": "Inline triple-plus and double dolar passthrough.\n\nExamples:\n Lo+++re++++m +++ipsum dolor+++.\n Lo$$re$$m $$ipsum dolor$$.\n\nNote: Must be dead first among the inlines, so as to take priority.\n", "endCaptures": { "0": { "name": "constant.character.passthru.end.asciidoc" } }, "name": "meta.passthru.inline.asciidoc" }, "blocks": { "patterns": [ { "include": "#block_literal" }, { "include": "#block_comment" }, { "include": "#block_listing" }, { "include": "#block_source_fenced" }, { "include": "#block_sidebar" }, { "include": "#block_pass" }, { "include": "#block_quote" }, { "include": "#block_example" }, { "include": "#block_open" } ] }, "block_source_fenced": { "end": "^\\1\\s*$\\n?", "begin": "^(```)(\\w+)?\\s*$\\n?", "beginCaptures": { "0": { "name": "constant.delimiter.listing.begin.asciidoc" } }, "contentName": "source.block.listing.content.asciidoc", "patterns": [{ "include": "#inline_callout" }], "comment": "Fenced code block (ala Markdown)\n\nExamples:\n ```rb\n puts 'Hello world!'\n ```\n", "endCaptures": { "0": { "name": "constant.delimiter.listing.end.asciidoc" } }, "name": "meta.embedded.block.listing.asciidoc" }, "section_template": { "match": "(?x)^\n(\\[) # in square brackets\n(template\\s*=\\s*)?(\")? # might start with template-equals and might have template name in quotes\n(\nsect\\d|abstract|preface|colophon|dedication|glossary|bibliography|synopsis|appendix|index # fixed list of known templates\n)\n(\".*(\\])|(\\])) # either close the quote (and perhaps go on) and close the bracket, or close the bracket immediately\n\\s*$\\n?", "comment": "fixed list of known template names", "name": "variable.parameter.sectiontemplate.asciidoc", "captures": { "1": { "name": "punctuation.definition.sectiontemplate.begin.asciidoc" }, "6": { "name": "punctuation.definition.sectiontemplate.end.asciidoc" }, "4": { "name": "meta.tag.sectiontemplate.asciidoc" }, "7": { "name": "punctuation.definition.sectiontemplate.end.asciidoc" } } }, "block_id": { "match": "^(\\[\\[)([^\\[].*)(\\]\\])\\s*$\\n?", "comment": "A block id (i.e. anchor).\n\nExamples:\n [[myid]]\n Lorem ipsum dolor.\n", "name": "meta.tag.blockid.asciidoc", "captures": { "1": { "name": "punctuation.definition.blockid.begin.asciidoc" }, "2": { "name": "markup.underline.blockid.id.asciidoc" }, "3": { "name": "punctuation.definition.blockid.end.asciidoc" } } }, "monospaced_double": { "end": "``", "begin": "(?x)\n(\\[[^\\]]*?\\])? # might start with attribute list\n(?)", "comment": "Callout label\n\nExamples:\n <1>\n <42>\n", "name": "constant.other.callout.asciidoc", "captures": { "1": { "name": "punctuation.definition.callout.begin.asciidoc" }, "2": { "name": "punctuation.definition.callout.end.asciidoc" } } }, "block_sidebar": { "end": "^\\1\\s*$\\n?", "begin": "^(\\*{4,})\\s*$\\n?", "beginCaptures": { "0": { "name": "constant.delimiter.block.sidebar.begin.asciidoc" } }, "contentName": "meta.block.sidebar.content.asciidoc", "patterns": [ { "include": "#lists" }, { "include": "#block_comment" }, { "include": "#block_listing" }, { "include": "#lines" }, { "include": "#inline" }, { "include": "#characters" } ], "comment": "Examples:\n ****\n Lorem ipsum\n ****\n\nNote: Might need to add more includes, but these are the ones that arise\nfor me in practice.\n", "endCaptures": { "0": { "name": "constant.delimiter.block.sidebar.end.asciidoc" } }, "name": "string.quoted.block.sidebar.asciidoc" }, "emphasis_double": { "end": "__", "begin": "(?x)\n(\\[[^\\]]*?\\])? # might start with attribute list\n(?)))\\s+(?=\\S)", "comment": "Marker of a callout list item.\n\nExamples:\n <1> a callout\n <42> another callout\n", "name": "markup.list.numbered.callout.asciidoc", "captures": { "3": { "name": "punctuation.definition.calloutlistnumber.begin.asciidoc" }, "1": { "name": "string.unquoted.list.callout.asciidoc" }, "4": { "name": "punctuation.definition.calloutlistnumber.end.asciidoc" }, "2": { "name": "constant.numeric.callout.asciidoc" } } }, "characters": { "patterns": [ { "include": "#attribute_reference" }, { "include": "#entity_number" }, { "include": "#entity_name" }, { "include": "#escape" }, { "include": "#replacement" }, { "include": "#macro_pass" }, { "include": "#macro" }, { "include": "#xref" }, { "include": "#biblio_anchor" }, { "include": "#indexterm_triple" }, { "include": "#indexterm_double" } ] }, "block_title": { "match": "^(\\.)\\w.*$\\n?", "comment": "Title of a block.\n\nExamples:\n .My title\n Lorem ipsum dolor.\n", "name": "markup.heading.block.asciidoc", "captures": { "1": { "name": "punctuation.definition.blockheading.asciidoc" } } }, "replacement": { "match": "(?x)\n(?\n | <\\-\n | =>\n | <=\n)", "name": "constant.character.replacement.asciidoc" }, "block_quote": { "end": "^\\1\\s*$\\n?", "begin": "^(_{4,})\\s*$\\n?", "beginCaptures": { "0": { "name": "constant.delimiter.block.quote.begin.asciidoc" } }, "contentName": "meta.block.quote.content.asciidoc", "patterns": [ { "include": "#lines" }, { "include": "#inline" }, { "include": "#characters" } ], "comment": "Examples:\n ____\n Lorem ipsum\n ____\n\nNote: Might need to add more includes, but these are the ones that arise for me in practice.\n", "endCaptures": { "0": { "name": "constant.delimiter.block.quote.end.asciidoc" } }, "name": "markup.quote.block.asciidoc" }, "olist_item_marker": { "match": "^(\\s*(\\.{1,5}))\\s+(?=\\S)", "comment": "Marker of an ordered (numbered) list item.\n\nExamples:\n . level 1\n .. level 2\n ... level 3\n .... level 4\n ..... level 5\n\nNote: The space distinguishes it from a block title.\n", "name": "markup.list.numbered.dotted.asciidoc", "captures": { "1": { "name": "string.unquoted.list.dotted.asciidoc" }, "2": { "name": "constant.numeric.list.dot.asciidoc" } } }, "emphasis": { "end": "(?x)\n(?<=\\S)(_) # delimiter underscore that must be preceded by a nonspace character\n(?!\\w) # ...and followed by a nonword character", "begin": "(?x)\n(\\[[^\\]]*?\\])? # might be preceded by an attributes list\n(?<=^|\\W)(?:])", "name": "constant.character.escape.asciidoc" }, "inline_comment": { "match": "^(//)([^/\\n].*|)$\\n?", "comment": "Inline comment.\n\nExamples:\n // This is just a comment!\n", "name": "comment.line.double-slash.asciidoc", "captures": { "1": { "name": "punctuation.definition.comment.line.asciidoc" }, "2": { "name": "meta.line.comment.content.asciidoc" } } }, "indexterm_triple": { "match": "(?>|&|\\||\\^|~|\\+\\+|--", "name": "punctuation.math.asl" }, { "match": "==|!=|<|>|<=|>=|&&|\\|\\||!", "name": "punctuation.logical.asl" }, { "match": "=|\\+=|/=|%=|\\*=|-=|<<=|>>=|&=|\\|=|\\^=", "name": "punctuation.assign.asl" }, { "match": "\\[|\\]|\\(|\\)|\\{|\\}", "name": "meta.brackets.asl" }, { "match": "\\b(AccessAs|Acquire|Add|Alias|And|Arg[0-9]|BankField|Break|BreakPoint|Buffer|Case|Concatenate|ConcatenateResTemplate|CondRefOf|Connection|Continue|CopyObject|CreateBitField|CreateByteField|CreateDWordField|CreateField|CreateQWordField|CreateWordField|DataTableRegion|Debug|Decrement|Default|DefinitionBlock|DerefOf|Device|Divide|DMA|DWordIO|DWordMemory|DWordSpace|EisaId|Else|ElseIf|EndDependentFn|Event|ExtendedIO|ExtendedMemory|ExtendedSpace|External|Fatal|Field|FindSetLeftBit|FindSetRightBit|FixedDMA|FixedIO|Fprintf|FromBCD|Function|GpioInt|GpioIo|I2CSerialBusV2|If|Include|Increment|Index|IndexField|Interrupt|IO|IRQ|IRQNoFlags|LAnd|LEqual|LGreater|LGreaterEqual|LLess|LLessEqual|LNot|LNotEqual|Load|LoadTable|Local[0-9]|LOr|Match|Memory24|Memory32|Memory32Fixed|Method|Mid|Mod|Multiply|Mutex|Name|NAnd|NoOp|NOr|Not|Notify|ObjectType|Offset|OperationRegion|Or|Package|PowerResource|Printf|Processor|QWordIO|QWordMemory|QWordSpace|RawDataBuffer|RefOf|Register|Release|Reset|ResourceTemplate|Return|Scope|ShiftLeft|ShiftRight|Signal|SizeOf|Sleep|SPISerialbusV2|Stall|StartDependentFn|StartDependentFnNoPri|Store|Subtract|Switch|ThermalZone|Timer|ToBCD|ToBuffer|ToDecimalString|ToHexString|ToInteger|ToPLD|ToString|ToUUID|Unicode|Unload|UARTSerialBusV2|VendorLong|VendorShort|Wait|While|WordBusNumber|WordIO|WordSpace|Xor)\\b", "name": "support.function.any-method.asl" }, { "match": "\\b(_AC[0-9]|_ADR|_AEI|_ALC|_ALI|_ALN|_ALP|_ALR|_ALT|_ART|_ASI|_ASZ|_ATT|_BAS|_BBN|_BCL|_BCM|_BCT|_BDN|_BIF|_BI[0-9]|_BLT|_BM|_BMA|_BMC|_BMD|_BMS|_BQC|_BST|_BTH|_BTM|_BTP|_CBA|_CDM|_CID|_CLS|_CPC|_CRS|_CRT|_CSD|_CST|_CWS|_DBT|_DCK|_DCS|_DDC|_DDN|_DEC|_DEP|_DGS|_DIS|_DLM|_DMA|_DOS|_DPL|_DRS|_DSD|_DSM|_DSS|_DSW|_DTI|_E[0-9][0-9]|_EC|_EDL|_EJD|_EJ[0-9]|_END|_EVT|_FDE|_FDI|_FDM|_FIF|_FIT|_FI[0-9]|_FLC|_FPS|_FSL|_GAI|_GCP|_GHL|_GL|_GLK|_GPD|_GPE|_GRA|_GRT|_GSB|_GTF|_GTM|_GWS|_HE|_HID|_HOT|_HPP|_HP[0-9]|_HRV|_IFT|_INI|_IOR|_IRC|_L[0-9][0-9]|_LCK|_LEN|_LID|_LIN|_LL|_LPI|_MAF|_MAT|_MA[0-9]|_MBM|_MEM|_MIF|_MIN|_MLS|_MOD|_MSG|_MSM|_MTL|_MTP|_NTT|_OFF|_ON|_OS|_OSI|_OST|_PAI|_PAR|_PCL|_PCT|_PDC|_PDL|_PHA|_PIC|_PIF|_PIN|_PLD|_PMC|_PMD|_PMM|_POL|_PPC|_PPE|_PPI|_PR|_PR0|_PR2|_PR3|_PRE|_PRL|_PRR|_PRS|_PRT|_PRW|_PS0|_PS1|_PS2|_PS3|_PSC|_PSD|_PSE|_PSL|_PSR|_PSS|_PSV|_PSW|_PTC|_PTP|_PTS|_PUR|_P[0-9]M|_RBO|_RBW|_RDI|_REG|_REV|_RMV|_RNG|_ROM|_RST|_RT|_RTV|_RW|_R[0-9]L|_S0|_S1|_S2|_S3|_S4|_S5|_S1D|_S2D|_S3D|_S4D|_S1W|_S2W|_S3W|_S4W|_SB|_SBS|_SCP|_SDD|_SEG|_SHL|_SHR|_SI|_SIZ|_SLI|_SLV|_SPD|_SPE|_SRS|_SRT|_SRV|_STA|_STB|_STM|_STR|_STV|_SUB|_SUN|_SWS|_T_[0-9]|_TC1|_TC2|_TDL|_TFP|_TIP|_TIV|_TMP|_TPC|_TPT|_TRA|_TRS|_TRT|_TSD|_TSF|_TSN|_TSP|_TSS|_TTP|_TTS|_T[0-9]L|_TYP|_TZ|_TZD|_TZM|_TZP|_UID|_UPC|_UPD|_UPP|_VEN|_VPO|_WAK|_W[0-9][0-9])\\b", "name": "variable.other.asl" }, { "match": "\\b(AttribQuick|AttribSendReceive|AttribByte|AttribBytes|AttribRawBytes|AttribRawProcessBytes|AttribWord|AttribBlock|AttribProcessCall|AttribBlockProcessCall|AnyAcc|ByteAcc|WordAcc|DWordAcc|QWordAcc|BufferAcc|AddressRangeMemory|AddressRangeReserved|AddressRangeNVS|AddressRangeACPI|RegionSpaceKeyword|FFixedHW|PCC|AddressingMode7Bit|AddressingMode10Bit|DataBitsFive|DataBitsSix|DataBitsSeven|DataBitsEight|DataBitsNine|BusMaster|NotBusMaster|ClockPhaseFirst|ClockPhaseSecond|ClockPolarityLow|ClockPolarityHigh|SubDecode|PosDecode|BigEndianing|LittleEndian|FlowControlNone|FlowControlXon|FlowControlHardware|Edge|Level|ActiveHigh|ActiveLow|ActiveBoth|Decode16|Decode10|IoRestrictionNone|IoRestrictionInputOnly|IoRestrictionOutputOnly|IoRestrictionNoneAndPreserve|Lock|NoLock|MTR|MEQ|MLE|MLT|MGE|MGT|MaxFixed|MaxNotFixed|Cacheable|WriteCombining|Prefetchable|NonCacheable|MinFixed|MinNotFixed|UnknownObj|IntObj|StrObj|BuffObj|PkgObj|FieldUnitObj|DeviceObj|EventObj|MethodObj|MutexObj|OpRegionObj|PowerResObj|ProcessorObj|ThermalZoneObj|BuffFieldObj|DDBHandleObj|ParityTypeNone|ParityTypeSpace|ParityTypeMark|ParityTypeOdd|ParityTypeEven|PullDefault|PullUp|PullDown|PullNone|PolarityHigh|PolarityLow|ISAOnlyRanges|NonISAOnlyRanges|EntireRange|ReadWrite|ReadOnly|UserDefRegionSpace|SystemIO|SystemMemory|PCI_Config|EmbeddedControl|SMBus|SystemCMOS|PciBarTarget|IPMI|GeneralPurposeIO|GenericSerialBus|ResourceConsumer|ResourceProducer|Serialized|NotSerialized|Shared|Exclusive|SharedAndWake|ExclusiveAndWake|ControllerInitiated|DeviceInitiated|StopBitsZero|StopBitsOne|StopBitsOnePlusHalf|StopBitsTwo|Width8Bit|Width16Bit|Width32Bit|Width64Bit|Width128Bit|Width256Bit|SparseTranslation|DenseTranslation|TypeTranslation|TypeStatic|Preserve|WriteAsOnes|WriteAsZeros|Transfer8|Transfer16|Transfer8_16|ThreeWireMode|FourWireMode)\\b", "name": "keyword.other.asl" }, { "match": "\\b((0(x|X)[0-9a-fA-F]+)|(0[0-7]+)|[0-9]|One|Ones|Zero)\\b", "name": "constant.numeric.asl" }, { "match": "\\b(Revision)\\b", "name": "constant.other.asl" } ] } ================================================ FILE: src/renderer/components/editor/grammars/textmate/asm.tmLanguage.json ================================================ { "fileTypes": ["asm", "nasm", "yasm", "inc", "s"], "name": "asm", "patterns": [ { "include": "#registers" }, { "include": "#mnemonics" }, { "include": "#constants" }, { "include": "#entities" }, { "include": "#support" }, { "include": "#comments" }, { "include": "#preprocessor" }, { "include": "#strings" } ], "repository": { "comments": { "patterns": [ { "match": "(;|(^|\\s)#\\s).*$", "name": "comment.line" }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block" }, { "begin": "^\\s*[\\#%]\\s*if\\s+0\\b", "end": "^\\s*[\\#%]\\s*endif\\b", "name": "comment.preprocessor" } ] }, "constants": { "patterns": [ { "match": "(?i)\\b0[by](?:[01][01_]*)\\.(?:(?:[01][01_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", "name": "constant.numeric.binary.floating-point.asm.x86_64" }, { "match": "(?i)\\b0[by](?:[01][01_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", "name": "constant.numeric.binary.floating-point.asm.x86_64" }, { "match": "(?i)\\b0[oq](?:[0-7][0-7_]*)\\.(?:(?:[0-7][0-7_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", "name": "constant.numeric.octal.floating-point.asm.x86_64" }, { "match": "(?i)\\b0[oq](?:[0-7][0-7_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", "name": "constant.numeric.octal.floating-point.asm.x86_64" }, { "match": "(?i)\\b(?:0[dt])?(?:[0-9][0-9_]*)\\.(?:(?:[0-9][0-9_]*)?(?:e[+-]?(?:[0-9][0-9_]*))?\\b)?", "name": "constant.numeric.decimal.floating-point.asm.x86_64" }, { "match": "(?i)\\b(?:[0-9][0-9_]*)(?:e[+-]?(?:[0-9][0-9_]*))\\b", "name": "constant.numeric.decimal.floating-point.asm.x86_64" }, { "match": "(?i)\\b(?:[0-9][0-9_]*)p(?:[0-9][0-9_]*)?\\b", "name": "constant.numeric.decimal.packed-bcd.asm.x86_64" }, { "match": "(?i)\\b0[xh](?:[[:xdigit:]][[:xdigit:]_]*)\\.(?:(?:[[:xdigit:]][[:xdigit:]_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", "name": "constant.numeric.hex.floating-point.asm.x86_64" }, { "match": "(?i)\\b0[xh](?:[[:xdigit:]][[:xdigit:]_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", "name": "constant.numeric.hex.floating-point.asm.x86_64" }, { "match": "(?i)\\$[0-9]\\_?(?:[[:xdigit:]][[:xdigit:]_]*)?\\.(?:(?:[[:xdigit:]][[:xdigit:]_]*)?(?:p[+-]?(?:[0-9][0-9_]*))?\\b)?", "name": "constant.numeric.hex.floating-point.asm.x86_64" }, { "match": "(?i)\\$[0-9]\\_?(?:[[:xdigit:]][[:xdigit:]_]*)(?:p[+-]?(?:[0-9][0-9_]*))\\b", "name": "constant.numeric.hex.floating-point.asm.x86_64" }, { "match": "(?i)\\b(?:(?:0[by](?:[01][01_]*))|(?:(?:[01][01_]*)[by]))\\b", "name": "constant.numeric.binary.asm.x86_64" }, { "match": "(?i)\\b(?:(?:0[oq](?:[0-7][0-7_]*))|(?:(?:[0-7][0-7_]*)[oq]))\\b", "name": "constant.numeric.octal.asm.x86_64" }, { "match": "(?i)\\b(?:(?:0[dt](?:[0-9][0-9_]*))|(?:(?:[0-9][0-9_]*)[dt]?))\\b", "name": "constant.numeric.decimal.asm.x86_64" }, { "match": "(?i)(?:\\$[0-9]\\_?(?:[[:xdigit:]][[:xdigit:]_]*)?)\\b", "name": "constant.numeric.hex.asm.x86_64" }, { "match": "(?i)\\b(?:(?:0[xh](?:[[:xdigit:]][[:xdigit:]_]*))|(?:(?:[[:xdigit:]][[:xdigit:]_]*)[hxHX]))\\b", "name": "constant.numeric.hex.asm.x86_64" } ] }, "entities": { "patterns": [ { "match": "((section|segment)\\s+)?\\.((ro)?data|bss|text)", "name": "entity.name.section" }, { "match": "^\\.?(globa?l|extern)\\b", "name": "entity.directive" }, { "match": "(\\$\\w+)\\b", "name": "text.variable" }, { "captures": { "1": { "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" }, "2": { "name": "entity.name.function.special.asm.x86_64" }, "3": { "name": "punctuation.separator.asm.x86_64" } }, "match": "(\\.\\.@)((?:[[:alpha:]_?](?:[[:alnum:]_$#@~.?]*)))(?:(\\:)?|\\b)", "name": "entity.name.function.asm.x86_64" }, { "captures": { "1": { "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" }, "2": { "name": "entity.name.function.asm.x86_64" }, "3": { "name": "punctuation.separator.asm.x86_64" } }, "match": "(?:(\\.)?|\\b)((?:[[:alpha:]_?](?:[[:alnum:]_$#@~.?]*)))(?:(\\:))", "name": "entity.name.function.asm.x86_64" }, { "captures": { "1": { "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" }, "2": { "name": "entity.name.function.asm.x86_64" }, "3": { "name": "punctuation.separator.asm.x86_64" } }, "match": "(\\.)([0-9]+(?:[[:alnum:]_$#@~.?]*))(?:(\\:)?|\\b)", "name": "entity.name.function.asm.x86_64" }, { "captures": { "1": { "name": "punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64" }, "2": { "name": "invalid.illegal.entity.name.function.asm.x86_64" }, "3": { "name": "punctuation.separator.asm.x86_64" } }, "match": "(?:(\\.)?|\\b)([0-9$@~](?:[[:alnum:]_$#@~.?]*))(?:(\\:))", "name": "invalid.illegal.entity.name.function.asm.x86_64" } ] }, "mnemonics": { "patterns": [ { "include": "#mnemonics-general-purpose" }, { "include": "#mnemonics-fpu" }, { "include": "#mnemonics-mmx" }, { "include": "#mnemonics-sse" }, { "include": "#mnemonics-sse2" }, { "include": "#mnemonics-sse3" }, { "include": "#mnemonics-sse4" }, { "include": "#mnemonics-aesni" }, { "include": "#mnemonics-avx" }, { "include": "#mnemonics-avx2" }, { "include": "#mnemonics-tsx" }, { "include": "#mnemonics-system" }, { "include": "#mnemonics-64bit" }, { "include": "#mnemonics-vmx" }, { "include": "#mnemonics-smx" }, { "include": "#mnemonics-intel-isa-sgx" }, { "include": "#mnemonics-intel-isa-mpx" }, { "include": "#mnemonics-intel-isa-sha" }, { "include": "#mnemonics-supplemental-amd" }, { "include": "#mnemonics-supplemental-cyrix" }, { "include": "#mnemonics-supplemental-via" }, { "include": "#mnemonics-undocumented" }, { "include": "#mnemonics-future-intel" }, { "include": "#mnemonics-pseudo-ops" } ] }, "mnemonics-64bit": { "patterns": [ { "match": "(?i)\\b(cdqe|cqo|(cmp|lod|mov|sto)sq|cmpxchg16b|mov(ntq|sxd)|scasq|swapgs|sys(call|ret))\\b", "name": "keyword.operator.word.mnemonic.64-bit-mode" } ] }, "mnemonics-aesni": { "patterns": [ { "match": "(?i)\\b(aes((dec|enc)(last)?|imc|keygenassist)|pclmulqdq)\\b", "name": "keyword.operator.word.mnemonic.aesni" } ] }, "mnemonics-avx": { "patterns": [ { "match": "(?i)\\b(v((test|permil|maskmov)p[ds]|zero(all|upper)|(perm2|insert|extract|broadcast)f128|broadcasts[ds]))\\b", "name": "keyword.operator.word.mnemonic.avx" }, { "match": "(?i)\\b(vaes((dec|enc)(last)?|imc|keygenassist)|vpclmulqdq)\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.aes" }, { "match": "(?i)\\b(v((cmp[ps]|u?comis)[ds]|pcmp([ei]str[im]|(eq|gt)[bdqw])))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.comparison" }, { "match": "(?i)\\b(v(cvt(dq2pd|dq2ps|pd2ps|ps2pd|sd2ss|si2sd|si2ss|ss2sd|t?(pd2dq|ps2dq|sd2si|ss2si))))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.conversion" }, { "match": "(?i)\\b(vh((add|sub)p[ds])|vph((add|sub)([dw]|sw)|minposuw))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.horizontal-packed-arithmetic" }, { "match": "(?i)\\b(v((andn?|x?or)p[ds]))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.logical" }, { "match": "(?i)\\b(v(mov(([ahl]|msk|nt|u)p[ds]|(hl|lh)ps|s([ds]|[hl]dup)|q)))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.mov" }, { "match": "(?i)\\b(v((add|div|mul|sub|max|min|round|sqrt)[ps][ds]|(addsub|dp)p[ds]|(rcp|rsqrt)[ps]s))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.packed-arithmetic" }, { "match": "(?i)\\b(v(pack[su]s(dw|wb)|punpck[hl](bw|dq|wd|qdq)|unpck[hl]p[ds]))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.packed-conversion" }, { "match": "(?i)\\b(vp(shuf([bd]|[hl]w))|vshufp[ds])\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.packed-shuffle" }, { "match": "(?i)\\b(vp((abs|sign|(max|min)[su])[bdw]|(add|sub)([bdqw]|u?s[bw])|avg[bw]|extr[bdqw]|madd(wd|ubsw)|mul(hu?w|hrsw|l[dw]|u?dq)|sadbw))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.arithmetic" }, { "match": "(?i)\\b(vp(andn?|x?or))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.logical" }, { "match": "(?i)\\b(vpblend(vb|w))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.blending" }, { "match": "(?i)\\b(vpmov(mskb|[sz]x(b[dqw]|w[dq]|dq)))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.supplemental.mov" }, { "match": "(?i)\\b(vp(insr[bdqw]|sll(dq|[dqw])|srl(dq)))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.simd-integer" }, { "match": "(?i)\\b(vp(sra[dwq]|srl[dqw]))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.shift-and-rotate" }, { "match": "(?i)\\b(vblendv?p[ds])\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.packed-blending" }, { "match": "(?i)\\b(vp(test|alignr))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.packed-other" }, { "match": "(?i)\\b(vmov(d(dup|qa|qu)?))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.simd-integer.mov" }, { "match": "(?i)\\b(v((extract|insert)ps|lddqu|(ld|st)mxcsr|mpsadbw))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.other" }, { "match": "(?i)\\b(v(maskmovdqu|movntdqa?))\\b", "name": "keyword.operator.word.mnemonic.avx.promoted.cacheability-control" }, { "match": "(?i)\\b(vcvt(ph2ps|ps2ph))\\b", "name": "keyword.operator.word.mnemonic.16-bit-floating-point-conversion" }, { "match": "(?i)\\b(vfn?m((add|sub)(132|213|231)[ps][ds])|vfm((addsub|subadd)(132|213|231)p[ds]))\\b", "name": "keyword.operator.word.mnemonic.fma" } ] }, "mnemonics-avx2": { "patterns": [ { "match": "(?i)\\b(v((broadcast|extract|insert|perm2)i128|pmaskmov[dq]|perm([dsq]|p[sd])))\\b", "name": "keyword.operator.word.mnemonic.avx2.promoted.simd" }, { "match": "(?i)\\b(vpbroadcast[bdqw])\\b", "name": "keyword.operator.word.mnemonic.avx2.promoted.packed" }, { "match": "(?i)\\b(vp(blendd|s[lr]lv[dq]|sravd))\\b", "name": "keyword.operator.word.mnemonic.avx2.blend" }, { "match": "(?i)\\b(vp?gather[dq][dq]|vgather([dq]|dq)p[ds])\\b", "name": "keyword.operator.word.mnemonic.avx2.gather" } ] }, "mnemonics-fpu": { "patterns": [ { "match": "(?i)\\b(fcmov(n?([beu]|be)))\\b", "name": "keyword.operator.word.mnemonic.fpu.data-transfer.mov" }, { "match": "(?i)\\b(f(i?(ld|stp?)|b(ld|stp)|xch))\\b", "name": "keyword.operator.word.mnemonic.fpu.data-transfer.other" }, { "match": "(?i)\\b(f((add|div|mul|sub)p?|i(add|div|mul|sub)|(div|sub)rp?|i(div|sub)r))\\b", "name": "keyword.operator.word.mnemonic.fpu.basic-arithmetic.basic" }, { "match": "(?i)\\b(f(prem1?|abs|chs|rndint|scale|sqrt|xtract))\\b", "name": "keyword.operator.word.mnemonic.fpu.basic-arithmetic.other" }, { "match": "(?i)\\b(f(u?com[ip]?p?|icomp?|tst|xam))\\b", "name": "keyword.operator.word.mnemonic.fpu.comparison" }, { "match": "(?i)\\b(f(sin|cos|sincos|pa?tan|2xm1|yl2x(p1)?))\\b", "name": "keyword.operator.word.mnemonic.fpu.transcendental" }, { "match": "(?i)\\b(fld(1|z|pi|l2[et]|l[ng]2))\\b", "name": "keyword.operator.word.mnemonic.fpu.load-constants" }, { "match": "(?i)\\b(f((inc|dec)stp|free|n?(init|clex|st[cs]w|stenv|save)|ld(cw|env)|rstor|nop)|f?wait)\\b", "name": "keyword.operator.word.mnemonic.fpu.control-management" }, { "match": "(?i)\\b(fx(save|rstor)(64)?)\\b", "name": "keyword.operator.word.mnemonic.fpu.state-management" } ] }, "mnemonics-future-intel": { "patterns": [ { "include": "#mnemonics-future-intel-avx512" }, { "include": "#mnemonics-future-intel-opmask" }, { "include": "#mnemonics-future-intel-cet" }, { "include": "#mnemonics-future-intel-other" } ] }, "mnemonics-future-intel-avx512": { "patterns": [ { "match": "(?i)\\b(vblendm(pd|ps)|vpblendm[bdqw])\\b", "name": "keyword.operator.word.mnemonic.avx512.blend" }, { "match": "(?i)\\b(vbroadcast[fi](32x[248]|64x[24])|v(extract|insert)[fi](32x[48]|64x[24])|vshuf[fi](32x4|64x2)|vpbroadcastm(b2q|w2d))\\b", "name": "keyword.operator.word.mnemonic.avx512.bits-mov" }, { "match": "(?i)\\b(v(compress|expand)p[ds]|vp(compress|expand|conflict)[dq])\\b", "name": "keyword.operator.word.mnemonic.avx512.compress" }, { "match": "(?i)\\b(vcvt(t?p[sd]2(udq|u?qq)|(udq|u?qq)2p[ds]|t?s[ds]2usi|usi2s[ds]))\\b", "name": "keyword.operator.word.mnemonic.avx512.conversion" }, { "match": "(?i)\\b(v(fixupimm|fpclass|get(exp|mant)|range|(rcp|rsqrt)(14|28)|reduce|rndscale|scalef)([ps][ds]))\\b", "name": "keyword.operator.word.mnemonic.avx512.math" }, { "match": "(?i)\\b(v(exp2p[ds]|(scatter|(gather|scatter)pf[01])[dq]p[ds]))\\b", "name": "keyword.operator.word.mnemonic.avx512.math" }, { "match": "(?i)\\b(vmovdq(a(32|64)|u(8|16|32|64)))\\b", "name": "keyword.operator.word.mnemonic.avx512.simd-integer" }, { "match": "(?i)\\b(vp(andn?|x?or)[dq])\\b", "name": "keyword.operator.word.mnemonic.avx512.logical" }, { "match": "(?i)\\b(vpcmpu?[dqw])\\b", "name": "keyword.operator.word.mnemonic.avx512.packed-comparison" }, { "match": "(?i)\\b(vp(absq|(lzcnt|ternlog)[dq]|madd52[lh]uq|(max|min)[su]q|mullq))\\b", "name": "keyword.operator.word.mnemonic.avx512.packed-math" }, { "match": "(?i)\\b(vpmov(m2[bdqw]|[bdqw]2m|(u?s)?([qd][bw]|qd|wb)))\\b", "name": "keyword.operator.word.mnemonic.avx512.packed-mov" }, { "match": "(?i)\\b(vp(ro[rl]v?[dq]|scatter[dq][dq]))\\b", "name": "keyword.operator.word.mnemonic.avx512.packed-shift" }, { "match": "(?i)\\b(vptestn?m[bdqw])\\b", "name": "keyword.operator.word.mnemonic.avx512.packed-test" }, { "match": "(?i)\\b(vperm([bdw]|[it]2([bdwq]|p[ds])))\\b", "name": "keyword.operator.word.mnemonic.avx512.permutations" }, { "match": "(?i)\\b(valign[dq]|vdbpsadbw|vpmultishiftqb|vpsrav[dqw])\\b", "name": "keyword.operator.word.mnemonic.avx512.other" } ] }, "mnemonics-future-intel-cet": { "patterns": [ { "match": "(?i)\\b((inc|save|rstor)ssp|wru?ss|(set|clr)ssbsy|endbranch|endbr(32|64))\\b", "name": "keyword.operator.word.mnemonic.cet" } ] }, "mnemonics-future-intel-opmask": { "patterns": [ { "match": "(?i)\\b(k(add|andn?|(xn?)?or|mov|not|(or)?test|shift[lr])[bdqw]|kunpck(bw|wd|dq))\\b", "name": "keyword.operator.word.mnemonic.opmask" } ] }, "mnemonics-future-intel-other": { "patterns": [ { "match": "(?i)\\b(clflushopt|clwb|pcommit)\\b", "name": "keyword.operator.word.mnemonic.other" } ] }, "mnemonics-general-purpose": { "patterns": [ { "match": "(?i)\\b(?:mov(?:[sz]x)?|cmov(?:n?[abceglopsz]|n?[abgl]e|p[eo]))\\b", "name": "keyword.operator.word.mnemonic.general-purpose.data-transfer.mov" }, { "match": "(?i)\\b(xchg|bswap|xadd|cmpxchg(8b)?)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.data-transfer.xchg" }, { "match": "(?i)\\b((push|pop)(ad?)?|cwde?|cdq|cbw)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.data-transfer.other" }, { "match": "(?i)\\b(adcx?|adox|add|sub|sbb|i?mul|i?div|inc|dec|neg|cmp)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.binary-arithmetic" }, { "match": "(?i)\\b(daa|das|aaa|aas|aam|aad)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.decimal-arithmetic" }, { "match": "(?i)\\b(and|x?or|not)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.logical" }, { "match": "(?i)\\b(s[ah][rl]|sh[rl]d|r[co][rl])\\b", "name": "keyword.operator.word.mnemonic.general-purpose.rotate" }, { "match": "(?i)\\b(set(n?[abceglopsz]|n?[abgl]e|p[eo]))\\b", "name": "keyword.operator.word.mnemonic.general-purpose.bit-and-byte.set" }, { "match": "(?i)\\b(bt[crs]?|bs[fr]|test|crc32|popcnt)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.bit-and-byte.other" }, { "match": "(?i)\\b(jmp|jn?[abceglopsz]|jn?[abgl]e|jp[eo]|j[er]?cxz)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.control-transfer.jmp" }, { "match": "(?i)\\b(loop(n?[ez])?|call|ret|iret[dq]?|into?|bound|enter|leave)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.control-transfer.other" }, { "match": "(?i)\\b((mov|cmp|sca|lod|sto)(s[bdw]?)|rep(n?[ez])?)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.strings" }, { "match": "(?i)\\b((in|out)(s[bdw]?)?)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.io" }, { "match": "(?i)\\b((st|cl)[cdi]|cmc|[ls]ahf|(push|pop)f[dq]?)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.flag-control" }, { "match": "(?i)\\b(l[defgs]s)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.segment-registers" }, { "match": "(?i)\\b(lea|nop|ud2|xlatb?|cpuid|movbe)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.misc" }, { "match": "(?i)\\b(rdrand|rdseed)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.rng" }, { "match": "(?i)\\b(andn|bextr|bls(i|r|msk)|bzhi|pdep|pext|[lt]zcnt|(mul|ror|sar|shl|shr)x)\\b", "name": "keyword.operator.word.mnemonic.general-purpose.bmi" } ] }, "mnemonics-intel-isa-mpx": { "patterns": [ { "match": "(?i)\\b(bnd(mk|c[lnu]|mov|ldx|stx))\\b", "name": "keyword.operator.word.mnemonic.mpx" } ] }, "mnemonics-intel-isa-sgx": { "patterns": [ { "match": "(?i)\\be(add|block|create|dbg(rd|wr)|extend|init|ld[bu]|pa|remove|track|wb)\\b", "name": "keyword.operator.word.mnemonic.sgx1.supervisor" }, { "match": "(?i)\\be(enter|exit|getkey|report|resume)\\b", "name": "keyword.operator.word.mnemonic.sgx1.user" }, { "match": "(?i)\\be(aug|mod(pr|t))\\b", "name": "keyword.operator.word.mnemonic.sgx2.supervisor" }, { "match": "(?i)\\be(accept(copy)?|modpe)\\b", "name": "keyword.operator.word.mnemonic.sgx2.user" } ] }, "mnemonics-intel-isa-sha": { "patterns": [ { "match": "(?i)\\b(sha(1rnds4|256rnds2|1nexte|(1|256)msg[12]))\\b", "name": "keyword.operator.word.mnemonic.sha" } ] }, "mnemonics-invalid": { "patterns": [ { "include": "#mnemonics-invalid-amd-sse5" } ] }, "mnemonics-invalid-amd-sse5": { "patterns": [ { "match": "(?i)\\b(com[ps][ds]|pcomu?[bdqw])\\b", "name": "invalid.keyword.operator.word.mnemonic.sse5.comparison" }, { "match": "(?i)\\b(cvtp(h2ps|s2ph)|frcz[ps][ds])\\b", "name": "invalid.keyword.operator.word.mnemonic.sse5.conversion" }, { "match": "(?i)\\b(fn?m((add|sub)[ps][ds])|ph(addu?(b[dqw]|w[dq]|dq)|sub(bw|dq|wd))|pma(css?(d(d|q[hl])|w[dw])|dcss?wd))\\b", "name": "invalid.keyword.operator.word.mnemonic.sse5.packed-arithmetic" }, { "match": "(?i)\\b(pcmov|permp[ds]|pperm|prot[bdqw]|psh[al][bdqw])\\b", "name": "invalid.keyword.operator.word.mnemonic.sse5.simd-integer" } ] }, "mnemonics-mmx": { "patterns": [ { "match": "(?i)\\b(mov[dq])\\b", "name": "keyword.operator.word.mnemonic.mmx.data-transfer" }, { "match": "(?i)\\b(pack(ssdw|[su]swb)|punpck[hl](bw|dq|wd))\\b", "name": "keyword.operator.word.mnemonic.mmx.conversion" }, { "match": "(?i)\\b(p(((add|sub)(d|(u?s)?[bw]))|maddwd|mul[lh]w))\\b", "name": "keyword.operator.word.mnemonic.mmx.packed-arithmetic" }, { "match": "(?i)\\b(pcmp((eq|gt)[bdw]))\\b", "name": "keyword.operator.word.mnemonic.mmx.comparison" }, { "match": "(?i)\\b(pandn?|px?or)\\b", "name": "keyword.operator.word.mnemonic.mmx.logical" }, { "match": "(?i)\\b(ps([rl]l[dwq]|raw|rad))\\b", "name": "keyword.operator.word.mnemonic.mmx.shift-and-rotate" }, { "match": "(?i)\\b(emms)\\b", "name": "keyword.operator.word.mnemonic.mmx.state-management" } ] }, "mnemonics-pseudo-ops": { "patterns": [ { "match": "(?i)\\b(cmp(n?(eq|lt|le)|(un)?ord)[ps][ds])\\b", "name": "keyword.pseudo-mnemonic.sse2.compare" }, { "match": "(?i)\\b(v?pclmul([hl]q[hl]q|[hl]qh)dq)\\b", "name": "keyword.pseudo-mnemonic.avx.promoted.aes" }, { "match": "(?i)\\b(vcmp(eq(_(os|uq|us))?|neq(_(oq|os|us))?|[gl][et](_oq)?|n[gl][et](_uq)?|(un)?ord(_s)?|false(_os)?|true(_us)?)[ps][ds])\\b", "name": "keyword.pseudo-mnemonic.avx.promoted.comparison" }, { "match": "(?i)\\b(vpcom(n?eq|[gl][et]|false|true)(b|uw))\\b", "name": "keyword.pseudo-mnemonic.supplemental.amd.xop.simd" } ] }, "mnemonics-smx": { "patterns": [ { "match": "(?i)\\b(getsec)\\b", "name": "keyword.operator.word.mnemonic.smx.getsec" }, { "match": "(?i)\\b(capabilities|enteraccs|exitac|senter|sexit|parameters|smctrl|wakeup)\\b", "name": "support.constant" } ] }, "mnemonics-sse": { "patterns": [ { "match": "(?i)\\b(mov(([ahlu]|hl|lh|msk)ps|ss))\\b", "name": "keyword.operator.word.mnemonic.sse.data-transfer" }, { "match": "(?i)\\b((add|div|max|min|mul|rcp|r?sqrt|sub)[ps]s)\\b", "name": "keyword.operator.word.mnemonic.sse.packed-arithmetic" }, { "match": "(?i)\\b(cmp[ps]s|u?comiss)\\b", "name": "keyword.operator.word.mnemonic.sse.comparison" }, { "match": "(?i)\\b((andn?|x?or)ps)\\b", "name": "keyword.operator.word.mnemonic.sse.logical" }, { "match": "(?i)\\b((shuf|unpck[hl])ps)\\b", "name": "keyword.operator.word.mnemonic.sse.shuffle-and-unpack" }, { "match": "(?i)\\b(cvt(pi2ps|si2ss|ps2pi|tps2pi|ss2si|tss2si))\\b", "name": "keyword.operator.word.mnemonic.sse.conversion" }, { "match": "(?i)\\b((ld|st)mxcsr)\\b", "name": "keyword.operator.word.mnemonic.sse.state-management" }, { "match": "(?i)\\b(p(avg[bw]|extrw|insrw|(max|min)(sw|ub)|sadbw|shufw|mulhuw|movmskb))\\b", "name": "keyword.operator.word.mnemonic.sse.simd-integer" }, { "match": "(?i)\\b(maskmovq|movntps|sfence)\\b", "name": "keyword.operator.word.mnemonic.sse.cacheability-control" }, { "match": "(?i)\\b(prefetch(nta|t[0-2]|w(t1)?))\\b", "name": "keyword.operator.word.mnemonic.sse.prefetch" } ] }, "mnemonics-sse2": { "patterns": [ { "match": "(?i)\\b(mov([auhl]|msk)pd)\\b", "name": "keyword.operator.word.mnemonic.sse2.data-transfer" }, { "match": "(?i)\\b((add|div|max|min|mul|sub|sqrt)[ps]d)\\b", "name": "keyword.operator.word.mnemonic.sse2.packed-arithmetic" }, { "match": "(?i)\\b((andn?|x?or)pd)\\b", "name": "keyword.operator.word.mnemonic.sse2.logical" }, { "match": "(?i)\\b((cmpp|u?comis)d)\\b", "name": "keyword.operator.word.mnemonic.sse2.compare" }, { "match": "(?i)\\b((shuf|unpck[hl])pd)\\b", "name": "keyword.operator.word.mnemonic.sse2.shuffle-and-unpack" }, { "match": "(?i)\\b(cvt(dq2pd|pi2pd|ps2pd|pd2ps|si2sd|sd2ss|ss2sd|t?(pd2dq|pd2pi|sd2si)))\\b", "name": "keyword.operator.word.mnemonic.sse2.conversion" }, { "match": "(?i)\\b(cvt(dq2ps|ps2dq|tps2dq))\\b", "name": "keyword.operator.word.mnemonic.sse2.packed-floating-point" }, { "match": "(?i)\\b(mov(dq[au]|q2dq|dq2q))\\b", "name": "keyword.operator.word.mnemonic.sse2.simd-integer.mov" }, { "match": "(?i)\\b(p((add|sub|(s[lr]l|mulu|unpck[hl]q)d)q|shuf(d|[hl]w)))\\b", "name": "keyword.operator.word.mnemonic.sse2.simd-integer.other" }, { "match": "(?i)\\b(clflush|[lm]fence|pause|maskmovdqu|movnt(dq|i|pd))\\b", "name": "keyword.operator.word.mnemonic.sse2.cacheability-control" } ] }, "mnemonics-sse3": { "patterns": [ { "match": "(?i)\\b(fisttp|lddqu|(addsub|h(add|sub))p[sd]|mov(sh|sl|d)dup|monitor|mwait)\\b", "name": "keyword.operator.word.mnemonic.sse3" }, { "match": "(?i)\\b(ph(add|sub)(s?w|d))\\b", "name": "keyword.operator.word.mnemonic.sse3.supplimental.horizontal-packed-arithmetic" }, { "match": "(?i)\\b(p((abs|sign)[bdw]|maddubsw|mulhrsw|shufb|alignr))\\b", "name": "keyword.operator.word.mnemonic.sse3.supplimental.other" } ] }, "mnemonics-sse4": { "patterns": [ { "match": "(?i)\\b(pmul(ld|dq)|dpp[ds])\\b", "name": "keyword.operator.word.mnemonic.sse4.1.arithmetic" }, { "match": "(?i)\\b(movntdqa)\\b", "name": "keyword.operator.word.mnemonic.sse4.1.load-hint" }, { "match": "(?i)\\b(blendv?p[ds]|pblend(vb|w))\\b", "name": "keyword.operator.word.mnemonic.sse4.1.packed-blending" }, { "match": "(?i)\\b(p(min|max)(u[dw]|s[bd]))\\b", "name": "keyword.operator.word.mnemonic.sse4.1.packed-integer" }, { "match": "(?i)\\b(round[ps][sd])\\b", "name": "keyword.operator.word.mnemonic.sse4.1.packed-floating-point" }, { "match": "(?i)\\b((extract|insert)ps|p((ins|ext)(r[bdq])))\\b", "name": "keyword.operator.word.mnemonic.sse4.1.insertion-and-extraction" }, { "match": "(?i)\\b(pmov([sz]x(b[dqw]|dq|wd|wq)))\\b", "name": "keyword.operator.word.mnemonic.sse4.1.conversion" }, { "match": "(?i)\\b(mpsadbw|phminposuw|ptest|pcmpeqq|packusdw)\\b", "name": "keyword.operator.word.mnemonic.sse4.1.other" }, { "match": "(?i)\\b(pcmp([ei]str[im]|gtq))\\b", "name": "keyword.operator.word.mnemonic.sse4.2" } ] }, "mnemonics-supplemental-amd": { "patterns": [ { "match": "(?i)\\b(bl([cs](fill|ic?|msk)|cs)|t1mskc|tzmsk)\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.general-purpose" }, { "match": "(?i)\\b(clgi|int3|invlpga|iretw|skinit|stgi|vm(load|mcall|run|save)|monitorx|mwaitx)\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.system" }, { "match": "(?i)\\b([ls]lwpcb|lwp(ins|val))\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.profiling" }, { "match": "(?i)\\b(movnts[ds])\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.memory-management" }, { "match": "(?i)\\b(prefetch|clzero)\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.cache-management" }, { "match": "(?i)\\b((extr|insert)q)\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.sse4.a" }, { "match": "(?i)\\b(vfn?m((add|sub)[ps][ds])|vfm((addsub|subadd)p[ds]))\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.fma4" }, { "match": "(?i)\\b(vp(cmov|(comu?|rot|sh[al])[bdqw]|mac(s?s(d(d|q[hl])|w[dw]))|madcss?wd|perm))\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.xop.simd" }, { "match": "(?i)\\b(vph(addu?(b[dqw]|w[dq]|dq)|sub(bw|dq|wd)))\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.xop.simd-horizontal" }, { "match": "(?i)\\b(vfrcz[ps][ds]|vpermil2p[ds])\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.xop.other" }, { "match": "(?i)\\b(femms)\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.3dnow" }, { "match": "(?i)\\b(p(avgusb|(f2i|i2f)[dw]|mulhrw|swapd)|pf((p?n)?acc|add|max|min|mul|rcp(it[12])?|rsqit1|rsqrt|subr?))\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.3dnow.simd" }, { "match": "(?i)\\b(pfcmp(eq|ge|gt))\\b", "name": "keyword.operator.word.mnemonic.supplemental.amd.3dnow.comparison" } ] }, "mnemonics-supplemental-cyrix": { "patterns": [ { "match": "(?i)\\b((sv|rs)dc|(wr|rd)shr|paddsiw)\\b", "name": "keyword.operator.word.mnemonic.supplemental.cyrix" } ] }, "mnemonics-supplemental-via": { "patterns": [ { "match": "(?i)\\b(montmul)\\b", "name": "keyword.operator.word.mnemonic.supplemental.via" }, { "match": "(?i)\\b(x(store(rng)?|crypt(ecb|cbc|ctr|cfb|ofb)|sha(1|256)))\\b", "name": "keyword.operator.word.mnemonic.supplemental.via.padlock" } ] }, "mnemonics-system": { "patterns": [ { "match": "(?i)\\b((cl|st)ac|[ls]([gli]dt|tr|msw)|clts|arpl|lar|lsl|ver[rw]|inv(d|lpg|pcid)|wbinvd)\\b", "name": "keyword.operator.word.mnemonic.system" }, { "match": "(?i)\\b(lock|hlt|rsm|(rd|wr)(msr|pkru|[fg]sbase)|rd(pmc|tscp?)|sys(enter|exit))\\b", "name": "keyword.operator.word.mnemonic.system" }, { "match": "(?i)\\b(x((save(c|opt|s)?|rstors?)(64)?|[gs]etbv))\\b", "name": "keyword.operator.word.mnemonic.system" } ] }, "mnemonics-tsx": { "patterns": [ { "match": "(?i)\\b(x(abort|acquire|release|begin|end|test))\\b", "name": "keyword.operator.word.mnemonic.tsx" } ] }, "mnemonics-undocumented": { "patterns": [ { "match": "(?i)\\b(ret[nf]|icebp|int1|int03|smi|ud1)\\b", "name": "keyword.operator.word.mnemonic.undocumented" } ] }, "mnemonics-vmx": { "patterns": [ { "match": "(?i)\\b(vm(ptr(ld|st)|clear|read|write|launch|resume|xo(ff|n)|call|func)|inv(ept|vpid))\\b", "name": "keyword.operator.word.mnemonic.vmx" } ] }, "preprocessor": { "patterns": [ { "begin": "^\\s*[#%]\\s*(error|warning)\\b", "captures": { "1": { "name": "keyword.control.import.error.c" } }, "end": "$", "name": "meta.preprocessor.diagnostic.c", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" } ] }, { "begin": "^\\s*[#%]\\s*(include|import)\\b\\s+", "captures": { "1": { "name": "keyword.control.import.include.c" } }, "end": "(?=(?://|/\\*))|$", "name": "meta.preprocessor.c.include", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "name": "string.quoted.double.include.c" }, { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "name": "string.quoted.other.lt-gt.include.c" } ] }, { "begin": "^\\s*[%#]\\s*((xi?)?define|defined|elif(def)?|else|if(macro|ctx|idni?|num|str)?|ifn?def|line|(end)?macro|pragma|undef|endif)\\b", "captures": { "1": { "name": "keyword.control.import.c" } }, "end": "(?=(?://|/\\*))|$", "name": "meta.preprocessor.c", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" } ] }, { "begin": "^\\s*[#%]\\s*(assign|strlen|substr|(end|exit)?rep|push|pop)\\b", "captures": { "1": { "name": "keyword.control" } }, "end": "$", "name": "meta.preprocessor.nasm", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.c" } ] } ] }, "registers": { "patterns": [ { "match": "(?i)\\b(?:[abcd][hl]|[er]?[abcd]x|[er]?(?:di|si|bp|sp)|dil|sil|bpl|spl|r(?:8|9|1[0-5])[bdlw]?)\\b", "name": "constant.language.register.general-purpose.asm.x86_64" }, { "match": "(?i)\\b(?:[cdefgs]s)\\b", "name": "constant.language.register.segment.asm.x86_64" }, { "match": "(?i)\\b(?:[er]?flags)\\b", "name": "constant.language.register.flags.asm.x86_64" }, { "match": "(?i)\\b(?:[er]?ip)\\b", "name": "constant.language.register.instruction-pointer.asm.x86_64" }, { "match": "(?i)\\b(?:cr[02-4])\\b", "name": "constant.language.register.control.asm.x86_64" }, { "match": "(?i)\\b(?:(?:mm|st|fpr)[0-7])\\b", "name": "constant.language.register.mmx.asm.x86_64" }, { "match": "(?i)\\b(?:[xy]mm(?:[0-9]|1[0-5])|mxcsr)\\b", "name": "constant.language.register.sse_avx.asm.x86_64" }, { "match": "(?i)\\b(?:zmm(?:[12]?[0-9]|30|31))\\b", "name": "constant.language.register.avx512.asm.x86_64" }, { "match": "(?i)\\b(?:bnd(?:[0-3]|cfg[su]|status))\\b", "name": "constant.language.register.memory-protection.asm.x86_64" }, { "match": "(?i)\\b(?:(?:[gil]dt)r?|tr)\\b", "name": "constant.language.register.system-table-pointer.asm.x86_64" }, { "match": "(?i)\\b(?:dr[0-367])\\b", "name": "constant.language.register.debug.asm.x86_64" }, { "match": "(?i)\\b(?:cr8|dr(?:[89]|1[0-5])|efer|tpr|syscfg)\\b", "name": "constant.language.register.amd.asm.x86_64" }, { "match": "(?i)\\b(?:db[0-367]|t[67]|tr[3-7]|st)\\b", "name": "invalid.deprecated.constant.language.register.asm.x86_64" }, { "match": "(?i)\\b[xy]mm(?:1[6-9]|2[0-9]|3[01])\\b", "name": "constant.language.register.general-purpose.alias.asm.x86_64" } ] }, "strings": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.asm" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.asm" } }, "name": "string.quoted.double.asm", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.asm" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.asm" } }, "name": "string.quoted.single.asm", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" } ] }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.asm" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.asm" } }, "name": "string.quoted.backquote.asm", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" } ] } ] }, "support": { "patterns": [ { "match": "(?i)\\b(?:s?byte|(?:[doqtyz]|dq|s[dq]?)?word|(?:d|res)[bdoqtwyz]|ddq)\\b", "name": "storage.type.asm.x86_64" }, { "match": "(?i)\\b(?:incbin|equ|times)\\b", "name": "support.function.asm.x86_64" }, { "match": "(?i)\\b(?:strict|nosplit|near|far|abs|rel)\\b", "name": "storage.modifier.asm.x86_64" }, { "match": "(?i)\\b(?:[ao](?:16|32|64))\\b", "name": "storage.modifier.prefix.asm.x86_64" }, { "match": "(?i)\\b(?:rep(?:n?[ez])?|lock|xacquire|xrelease|(?:no)?bnd)\\b", "name": "storage.modifier.prefix.asm.x86_64" }, { "captures": { "1": { "name": "storage.modifier.prefix.vex.asm.x86_64" } }, "match": "{(vex[23]|evex)}" }, { "captures": { "1": { "name": "storage.modifier.opmask.asm.x86_64" } }, "match": "{(k[1-7])}" }, { "captures": { "1": { "name": "storage.modifier.precision.asm.x86_64" } }, "match": "{(1to(?:8|16))}" }, { "captures": { "1": { "name": "storage.modifier.rounding.asm.x86_64" } }, "match": "{(z|(?:r[nudz]-)?sae)}" }, { "match": "\\.\\.(?:start|imagebase|tlvp|got(?:pc(?:rel)?|(?:tp)?off)?|plt|sym|tlsie)\\b", "name": "support.constant.asm.x86_64" }, { "match": "\\b__(?:utf(?:(?:16|32)(?:[lb]e)?)|float(?:8|16|32|64|80[me]|128[lh])|Infinity|[QS]?NaN)__\\b", "name": "support.function.asm.x86_64" }, { "match": "\\b__NASM_(?:MAJOR|(?:SUB)?MINOR|SNAPSHOT|VER(?:SION_ID)?)__\\b", "name": "support.function.asm.x86_64" }, { "match": "\\b___NASM_PATCHLEVEL__\\b", "name": "support.function.asm.x86_64" }, { "match": "\\b__(?:FILE|LINE|BITS|OUTPUT_FORMAT)__\\b", "name": "support.function.asm.x86_64" }, { "match": "\\b__(?:(?:UTC_)?(?:DATE|TIME)(?:_NUM)?|POSIX_TIME)__\\b", "name": "support.function.asm.x86_64" }, { "match": "\\b__USE_(?:ALTREG|SMARTALIGN|FP|IFUNC)__\\b", "name": "support.function.asm.x86_64" }, { "match": "\\b__PASS__\\b", "name": "invalid.deprecated.support.constant.altreg.asm.x86_64" }, { "match": "\\b__ALIGNMODE__\\b", "name": "support.constant.smartalign.asm.x86_64" }, { "match": "\\b(?:Inf|[QS]?NaN)\\b", "name": "support.constant.fp.asm.x86_64" }, { "match": "\\b(?:float(?:8|16|32|64|80[me]|128[lh]))\\b", "name": "support.function.fp.asm.x86_64" }, { "match": "(?i)\\bilog2(?:[ewfc]|[fc]w)?\\b", "name": "support.function.ifunc.asm.x86_64" } ] } }, "scopeName": "source.asm.x86_64", "uuid": "05d6565d-991a-4e88-8e28-63bb21197f32" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/asp-vb-net.tmlanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/asp.vb.net.tmbundle/blob/master/Syntaxes/ASP%20VB.net.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/asp.vb.net.tmbundle/commit/72d44550b3286d0382d7be0624140cf97857ff69", "name": "ASP vb.NET", "scopeName": "source.asp.vb.net", "comment": "Modified from the original ASP bundle. Originally modified by Thomas Aylott subtleGradient.com", "patterns": [ { "match": "\\n", "name": "meta.ending-space" }, { "include": "#round-brackets" }, { "begin": "^(?=\\t)", "end": "(?=[^\\t])", "name": "meta.leading-space", "patterns": [ { "captures": { "1": { "name": "meta.odd-tab.tabs" }, "2": { "name": "meta.even-tab.tabs" } }, "match": "(\\t)(\\t)?" } ] }, { "begin": "^(?= )", "end": "(?=[^ ])", "name": "meta.leading-space", "patterns": [ { "captures": { "1": { "name": "meta.odd-tab.spaces" }, "2": { "name": "meta.even-tab.spaces" } }, "match": "( )( )?" } ] }, { "captures": { "1": { "name": "storage.type.function.asp" }, "2": { "name": "entity.name.function.asp" }, "3": { "name": "punctuation.definition.parameters.asp" }, "4": { "name": "variable.parameter.function.asp" }, "5": { "name": "punctuation.definition.parameters.asp" } }, "match": "^\\s*((?i:function|sub))\\s*([a-zA-Z_]\\w*)\\s*(\\()([^)]*)(\\)).*\\n?", "name": "meta.function.asp" }, { "begin": "(^[ \\t]+)?(?=')", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.asp" } }, "end": "(?!\\G)", "patterns": [ { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.comment.asp" } }, "end": "\\n", "name": "comment.line.apostrophe.asp" } ] }, { "match": "(?i:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)", "name": "keyword.control.asp" }, { "match": "(?i:\\b(Mod|And|Not|Or|Xor|as)\\b)", "name": "keyword.operator.asp" }, { "captures": { "1": { "name": "storage.type.asp" }, "2": { "name": "variable.other.bfeac.asp" }, "3": { "name": "meta.separator.comma.asp" } }, "match": "(?i:(dim)\\s*(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)\\s*(,?)))", "name": "variable.other.dim.asp" }, { "match": "(?i:\\s*\\b(Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End Sub|End Function|End Class|End Property|Public Property|Private Property|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\\b\\s*)", "name": "storage.type.asp" }, { "match": "(?i:\\b(Private|Public|Default)\\b)", "name": "storage.modifier.asp" }, { "match": "(?i:\\s*\\b(Empty|False|Nothing|Null|True)\\b)", "name": "constant.language.asp" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.asp" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.asp" } }, "name": "string.quoted.double.asp", "patterns": [ { "match": "\"\"", "name": "constant.character.escape.apostrophe.asp" } ] }, { "captures": { "1": { "name": "punctuation.definition.variable.asp" } }, "match": "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*", "name": "variable.other.asp" }, { "match": "(?i:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)", "name": "support.class.asp" }, { "match": "(?i:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)", "name": "support.class.collection.asp" }, { "match": "(?i:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)", "name": "support.constant.asp" }, { "match": "(?i:\\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)", "name": "support.function.asp" }, { "match": "(?i:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)", "name": "support.function.event.asp" }, { "match": "(?i:(?<=as )(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b))", "name": "support.type.vb.asp" }, { "match": "(?i:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)", "name": "support.function.vb.asp" }, { "match": "-?\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b", "name": "constant.numeric.asp" }, { "match": "(?i:\\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)", "name": "support.type.vb.asp" }, { "captures": { "1": { "name": "entity.name.function.asp" } }, "match": "(?i:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))", "name": "support.function.asp" }, { "match": "(?i:((?<=(\\+|=|-|\\&|\\\\|/|<|>|\\(|,))\\s*\\b([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?)\\b(?!(\\(|\\.))|\\b([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?)\\b(?=\\s*(\\+|=|-|\\&|\\\\|/|<|>|\\(|\\)))))", "name": "variable.other.asp" }, { "match": "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)\\b", "name": "keyword.operator.js" } ], "repository": { "round-brackets": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.round-brackets.begin.asp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.round-brackets.end.asp" } }, "name": "meta.round-brackets", "patterns": [ { "include": "source.asp.vb.net" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/asymptote.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "scopeName": "source.asymptote", "name": "Asymptote", "foldingStartMarker": "(\\{|\\[|\\()\\s*$", "foldingStopMarker": "^\\s*(\\}|\\]\\))", "repository": { "const_keywords": { "match": "\\b(deepmagenta|deepblue|Dotted|deepgray|left|arrowangle|identity4|yellow|realEpsilon|mediumyellow|darkred|invert|realDigits|arcarrowangle|defaultpen|default|red|arrowtexfactor|Allow|mantissaBits|Suppress|lightblue|settings|legendmargin|gray|royalblue|darkcyan|defaultfilename|heavygreen|SSW|olive|labelmargin|Yellow|palemagenta|spinner|invisible|sqrtEpsilon|lightmagenta|nan|palegray|infinity|nomarker|CCW|dotfactor|NoAlign|ESE|realMax|stdout|Fill|legendhskip|plain_scaling|mediumblue|beveljoin|lightgray|expansionfactor|SW|blue|legendvskip|heavyred|palecyan|bracedefaultratio|magenta|pt|longdashed|NNE|currentpatterns|NoSide|squarepen|NoFill|darkbrown|E|chartreuse|Move|Black|nullpen|version|arrowhookfactor|lightred|lightyellow|MarkFill|salmon|count|dashed|currentpicture|extendcap|bracemidangle|inXasyMode|defaultseparator|arrowlength|nullpath|zerowinding|lightcyan|VERSION|NW|cm|mediumred|N|lightgrey|plus|braceinnerangle|dot|BeginPoint|viewportmargin|evenodd|cputimeformat|circlescale|currentprojection|pink|Label|paleyellow|deepcyan|mediummagenta|defaultformat|roundcap|randMax|SuppressQuiet|braceouterangle|ocgindex|IgnoreAspect|miterjoin|unitcircle|Draw|dotted|right|palegrey|plain|Mark|inches|inch|LeftSide|Cyan|ignore|basealign|darkmagenta|grey|arcarrowfactor|NE|currentpen|mediumcyan|viewportsize|intMax|arrow2sizelimit|squarecap|CW|diagnostics|heavycyan|mediumgrey|white|W|deepyellow|lightgreen|TeXHead|Aspect|undefined|arrowfactor|stdin|fuchsia|legendmaxrelativewidth|heavygrey|intMin|JOIN_IN|down|Magenta|HookHead|orange|dotframe|colorPen|debugging|heavyblue|SE|longdashdotted|UnFill|darkgrey|mediumgreen|deepgreen|black|MarkPath|deepgrey|ENE|currentlight|darkgray|roundjoin|circleprecision|cyan|Align|arrowbarb|EndPoint|up|Center|paleblue|debuggerlines|pi|MidPoint|legendlinelength|darkblue|file3|palered|S|FillDraw|heavygray|barfactor|lightolive|deepred|xformStack|arrowdir|bp|shipped|brown|arrowsizelimit|WNW|NNW|mm|mediumgray|MoveQuiet|springgreen|plain_bounds|solid|darkolive|heavymagenta|dashdotted|unitsquare|SSE|monoPen|DefaultHead|purple|SimpleHead|inf|I|nobasealign|green|JOIN_OUT|realMin|palegreen|WSW|camerafactor|RightSide|darkgreen)\\b", "name": "support.constant" }, "type_keywords": { "match": "\\b(pen|scaleT|marginT|autoscaleT|slice|coord|int|Legend|bool|pair|indexedTransform|transformation|projection|processtime|bool3|light|pairOrTriple|align|marker|filltype|coords3|arrowhead|frame|framedTransformStack|real|scaling|side|transform|file|hsv|path3|Label|position|string|ScaleT|picture|object|triple|path|cputime|coords2|bounds|guide)\\b", "name": "support.class" }, "operator_keywords": { "match": "(\\*|\\+|\\#|\\-\\-|\\>\\=|\\-|\\,|\\-\\-\\-|\\.\\.|\\<|\\!|\\&|\\=\\=|\\<\\=|\\>|\\=|\\||\\%|\\/|\\^|\\:\\:|\\!\\=)", "name": "keyword.operator" }, "prim_type_keywords": { "match": "\\b(void|code)\\b", "name": "storage.type" } }, "patterns": [ { "match": "//.*$", "name": "comment.line.double-slash" }, { "match": "\\b(const|static|explicit|struct|typedef)\\b", "name": "storage.modifier" }, { "match": "\\b(true|false)\\b", "name": "constant.language" }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block" }, { "match": "\\s+\"(.*)\"", "name": "string.quoted.double" }, { "begin": "(?|<>|[<>=]=|!=", "name": "punctuation.definition.comparison.ahk" }, { "match": ":|\\?|`|,", "name": "punctuation.ahk" }, { "match": "[\\[\\](){}]", "name": "punctuation.bracket.ahk" }, { "match": "%", "name": "punctuation.definition.variable.percent.ahk" }, { "begin": "(\")", "endCaptures": { "1": { "name": "punctuation.definition.string.ahk" } }, "end": "(\")(?!\")|^", "patterns": [ { "match": "\"\"", "name": "constant.character.escape.ahk" } ], "name": "string.quoted.double.ahk", "beginCaptures": { "1": { "name": "punctuation.definition.string.ahk" } } } ], "name": "AutoHotkey", "uuid": "77AC23B6-8A90-11D9-BAA4-000A9584EC8D" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/batchfile.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/mmims/language-batchfile/blob/master/grammars/batchfile.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/mmims/language-batchfile/commit/6154ae25a24e01ac9329e7bcf958e093cd8733a9", "name": "Batch File", "scopeName": "source.batchfile", "injections": { "L:meta.block.repeat.batchfile": { "patterns": [ { "include": "#repeatParameter" } ] } }, "patterns": [ { "include": "#commands" }, { "include": "#comments" }, { "include": "#constants" }, { "include": "#controls" }, { "include": "#escaped_characters" }, { "include": "#labels" }, { "include": "#numbers" }, { "include": "#operators" }, { "include": "#parens" }, { "include": "#strings" }, { "include": "#variables" } ], "repository": { "commands": { "patterns": [ { "match": "(?<=^|[\\s@])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|sc|schtasks|scp|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|sftp|shadow|shift|showmount|shutdown|sort|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|wmic|wscript|wsl|xcopy)(?=$|\\s)", "name": "keyword.command.batchfile" }, { "begin": "(?i)(?<=^|[\\s@])(echo)(?:(?=$|\\.|:)|\\s+(?:(on|off)(?=\\s*$))?)", "beginCaptures": { "1": { "name": "keyword.command.batchfile" }, "2": { "name": "keyword.other.special-method.batchfile" } }, "end": "(?=$\\n|[&|><)])", "patterns": [ { "include": "#escaped_characters" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#strings" } ] }, { "match": "(?i)(?<=^|[\\s@])(setlocal)(?:\\s*$|\\s+(EnableExtensions|DisableExtensions|EnableDelayedExpansion|DisableDelayedExpansion)(?=\\s*$))", "captures": { "1": { "name": "keyword.command.batchfile" }, "2": { "name": "keyword.other.special-method.batchfile" } } }, { "include": "#command_set" } ] }, "command_set": { "patterns": [ { "begin": "(?<=^|[\\s@])(?i:SET)(?=$|\\s)", "beginCaptures": { "0": { "name": "keyword.command.batchfile" } }, "end": "(?=$\\n|[&|><)])", "patterns": [ { "include": "#command_set_inside" } ] } ] }, "command_set_inside": { "patterns": [ { "include": "#escaped_characters" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#parens" }, { "include": "#command_set_strings" }, { "include": "#strings" }, { "begin": "([^ ][^=]*)(=)", "beginCaptures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.batchfile" } }, "end": "(?=$\\n|[&|><)])", "patterns": [ { "include": "#escaped_characters" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#parens" }, { "include": "#strings" } ] }, { "begin": "\\s+/[aA]\\s+", "end": "(?=$\\n|[&|><)])", "name": "meta.expression.set.batchfile", "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.batchfile" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.batchfile" } }, "name": "string.quoted.double.batchfile", "patterns": [ { "include": "#command_set_inside_arithmetic" }, { "include": "#command_set_group" }, { "include": "#variables" } ] }, { "include": "#command_set_inside_arithmetic" }, { "include": "#command_set_group" } ] }, { "begin": "\\s+/[pP]\\s+", "end": "(?=$\\n|[&|><)])", "patterns": [ { "include": "#command_set_strings" }, { "begin": "([^ ][^=]*)(=)", "beginCaptures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.batchfile" } }, "end": "(?=$\\n|[&|><)])", "name": "meta.prompt.set.batchfile", "patterns": [ { "include": "#strings" } ] } ] } ] }, "command_set_group": { "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.batchfile" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.batchfile" } }, "patterns": [ { "include": "#command_set_inside_arithmetic" } ] } ] }, "command_set_inside_arithmetic": { "patterns": [ { "include": "#command_set_operators" }, { "include": "#numbers" }, { "match": ",", "name": "punctuation.separator.batchfile" } ] }, "command_set_operators": { "patterns": [ { "match": "([^ ]*)(\\+\\=|\\-\\=|\\*\\=|\\/\\=|%%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=)", "captures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.augmented.batchfile" } } }, { "match": "\\+|\\-|/|\\*|%%|\\||&|\\^|<<|>>|~", "name": "keyword.operator.arithmetic.batchfile" }, { "match": "!", "name": "keyword.operator.logical.batchfile" }, { "match": "([^ =]*)(=)", "captures": { "1": { "name": "variable.other.readwrite.batchfile" }, "2": { "name": "keyword.operator.assignment.batchfile" } } } ] }, "command_set_strings": { "patterns": [ { "begin": "(\")\\s*([^ ][^=]*)(=)", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.batchfile" }, "2": { "name": "variable.other.readwrite.batchfile" }, "3": { "name": "keyword.operator.assignment.batchfile" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.batchfile" } }, "name": "string.quoted.double.batchfile", "patterns": [ { "include": "#variables" }, { "include": "#numbers" }, { "include": "#escaped_characters" } ] } ] }, "comments": { "patterns": [ { "begin": "(?:^|(&))\\s*(?=((?::[+=,;: ])))", "beginCaptures": { "1": { "name": "keyword.operator.conditional.batchfile" } }, "end": "\\n", "patterns": [ { "begin": "((?::[+=,;: ]))", "beginCaptures": { "1": { "name": "punctuation.definition.comment.batchfile" } }, "end": "(?=\\n)", "name": "comment.line.colon.batchfile" } ] }, { "begin": "(?<=^|[\\s@])(?i)(REM)(\\.)", "beginCaptures": { "1": { "name": "keyword.command.rem.batchfile" }, "2": { "name": "punctuation.separator.batchfile" } }, "end": "(?=$\\n|[&|><)])", "name": "comment.line.rem.batchfile" }, { "begin": "(?<=^|[\\s@])(?i:rem)\\b", "beginCaptures": { "0": { "name": "keyword.command.rem.batchfile" } }, "end": "\\n", "name": "comment.line.rem.batchfile", "patterns": [ { "match": "[><|]", "name": "invalid.illegal.unexpected-character.batchfile" } ] } ] }, "constants": { "patterns": [ { "match": "\\b(?i:NUL)\\b", "name": "constant.language.batchfile" } ] }, "controls": { "patterns": [ { "match": "(?i)(?<=^|\\s)(?:call|exit(?=$|\\s)|goto(?=$|\\s|:))", "name": "keyword.control.statement.batchfile" }, { "match": "(?<=^|\\s)(?i)(if)\\s+(?:(not)\\s+)?(exist|defined|errorlevel|cmdextversion)(?=\\s)", "captures": { "1": { "name": "keyword.control.conditional.batchfile" }, "2": { "name": "keyword.operator.logical.batchfile" }, "3": { "name": "keyword.other.special-method.batchfile" } } }, { "match": "(?<=^|\\s)(?i)(?:if|else)(?=$|\\s)", "name": "keyword.control.conditional.batchfile" }, { "begin": "(?<=^|[\\s(&^])(?i)for(?=\\s)", "beginCaptures": { "0": { "name": "keyword.control.repeat.batchfile" } }, "name": "meta.block.repeat.batchfile", "end": "\\n", "patterns": [ { "begin": "(?<=[\\s^])(?i)in(?=\\s)", "beginCaptures": { "0": { "name": "keyword.control.repeat.in.batchfile" } }, "end": "(?<=[\\s)^])(?i)do(?=\\s)|\\n", "endCaptures": { "0": { "name": "keyword.control.repeat.do.batchfile" } }, "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] } ] }, "escaped_characters": { "patterns": [ { "match": "%%|\\^\\^!|\\^(?=.)|\\^\\n", "name": "constant.character.escape.batchfile" } ] }, "labels": { "patterns": [ { "match": "(?i)(?:^\\s*|(?<=call|goto)\\s*)(:)([^+=,;:\\s]\\S*)", "captures": { "1": { "name": "punctuation.separator.batchfile" }, "2": { "name": "keyword.other.special-method.batchfile" } } } ] }, "numbers": { "patterns": [ { "match": "(?<=^|\\s|=)(0[xX][0-9A-Fa-f]*|[+-]?\\d+)(?=$|\\s|<|>)", "name": "constant.numeric.batchfile" } ] }, "operators": { "patterns": [ { "match": "@(?=\\S)", "name": "keyword.operator.at.batchfile" }, { "match": "(?<=\\s)(?i:EQU|NEQ|LSS|LEQ|GTR|GEQ)(?=\\s)|==", "name": "keyword.operator.comparison.batchfile" }, { "match": "(?<=\\s)(?i)(NOT)(?=\\s)", "name": "keyword.operator.logical.batchfile" }, { "match": "(?[&>]?", "name": "keyword.operator.redirection.batchfile" } ] }, "parens": { "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.batchfile" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.batchfile" } }, "name": "meta.group.batchfile", "patterns": [ { "match": ",|;", "name": "punctuation.separator.batchfile" }, { "include": "$self" } ] } ] }, "repeatParameter": { "patterns": [ { "match": "(%%)(?:(?i:~[fdpnxsatz]*(?:\\$PATH:)?)?[a-zA-Z])", "captures": { "1": { "name": "punctuation.definition.variable.batchfile" } }, "name": "variable.parameter.repeat.batchfile" } ] }, "strings": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.batchfile" } }, "end": "(\")|(\\n)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.batchfile" }, "2": { "name": "invalid.illegal.newline.batchfile" } }, "name": "string.quoted.double.batchfile", "patterns": [ { "match": "%%", "name": "constant.character.escape.batchfile" }, { "include": "#variables" } ] } ] }, "variables": { "patterns": [ { "match": "(%)(?:(?i:~[fdpnxsatz]*(?:\\$PATH:)?)?\\d|\\*)", "captures": { "1": { "name": "punctuation.definition.variable.batchfile" } }, "name": "variable.parameter.batchfile" }, { "include": "#variable" }, { "include": "#variable_delayed_expansion" } ] }, "variable": { "patterns": [ { "begin": "%(?=[^%]+%)", "beginCaptures": { "0": { "name": "punctuation.definition.variable.begin.batchfile" } }, "end": "(%)|\\n", "endCaptures": { "1": { "name": "punctuation.definition.variable.end.batchfile" } }, "name": "variable.other.readwrite.batchfile", "patterns": [ { "begin": ":~", "beginCaptures": { "0": { "name": "punctuation.separator.batchfile" } }, "end": "(?=%|\\n)", "name": "meta.variable.substring.batchfile", "patterns": [ { "include": "#variable_substring" } ] }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.batchfile" } }, "end": "(?=%|\\n)", "name": "meta.variable.substitution.batchfile", "patterns": [ { "include": "#variable_replace" }, { "begin": "=", "beginCaptures": { "0": { "name": "punctuation.separator.batchfile" } }, "end": "(?=%|\\n)", "patterns": [ { "include": "#variable_delayed_expansion" }, { "match": "[^%]+", "name": "string.unquoted.batchfile" } ] } ] } ] } ] }, "variable_delayed_expansion": { "patterns": [ { "begin": "!(?=[^!]+!)", "beginCaptures": { "0": { "name": "punctuation.definition.variable.begin.batchfile" } }, "end": "(!)|\\n", "endCaptures": { "1": { "name": "punctuation.definition.variable.end.batchfile" } }, "name": "variable.other.readwrite.batchfile", "patterns": [ { "begin": ":~", "beginCaptures": { "0": { "name": "punctuation.separator.batchfile" } }, "end": "(?=!|\\n)", "name": "meta.variable.substring.batchfile", "patterns": [ { "include": "#variable_substring" } ] }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.batchfile" } }, "end": "(?=!|\\n)", "name": "meta.variable.substitution.batchfile", "patterns": [ { "include": "#escaped_characters" }, { "include": "#variable_replace" }, { "include": "#variable" }, { "begin": "=", "beginCaptures": { "0": { "name": "punctuation.separator.batchfile" } }, "end": "(?=!|\\n)", "patterns": [ { "include": "#variable" }, { "match": "[^!]+", "name": "string.unquoted.batchfile" } ] } ] } ] } ] }, "variable_replace": { "patterns": [ { "match": "[^=%!\\n]+", "name": "string.unquoted.batchfile" } ] }, "variable_substring": { "patterns": [ { "match": "([+-]?\\d+)(?:(,)([+-]?\\d+))?", "captures": { "1": { "name": "constant.numeric.batchfile" }, "2": { "name": "punctuation.separator.batchfile" }, "3": { "name": "constant.numeric.batchfile" } } } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/bibtex.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/Bibtex.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/jlelong/vscode-latex-basics/commit/b98c2d4911652824fc990f4b26c9c30be59b78a2", "name": "bibtex", "scopeName": "text.bibtex", "comment": "Grammar based on description from http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment\n\t\n\tTODO: Does not support @preamble\n\t", "patterns": [ { "begin": "@Comment", "beginCaptures": { "0": { "name": "punctuation.definition.comment.bibtex" } }, "end": "$\\n?", "name": "comment.line.at-sign.bibtex" }, { "begin": "((@)(?i:string))\\s*(\\{)\\s*([a-zA-Z]*)", "beginCaptures": { "1": { "name": "keyword.other.string-constant.bibtex" }, "2": { "name": "punctuation.definition.keyword.bibtex" }, "3": { "name": "punctuation.section.string-constant.begin.bibtex" }, "4": { "name": "variable.other.bibtex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.string-constant.end.bibtex" } }, "name": "meta.string-constant.braces.bibtex", "patterns": [ { "include": "#string_content" } ] }, { "begin": "((@)i(?i::string))\\s*(\\()\\s*([a-zA-Z]*)", "beginCaptures": { "1": { "name": "keyword.other.string-constant.bibtex" }, "2": { "name": "punctuation.definition.keyword.bibtex" }, "3": { "name": "punctuation.section.string-constant.begin.bibtex" }, "4": { "name": "variable.other.bibtex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.string-constant.end.bibtex" } }, "name": "meta.string-constant.parenthesis.bibtex", "patterns": [ { "include": "#string_content" } ] }, { "begin": "((@)[a-zA-Z]+)\\s*(\\{)\\s*([^\\s,]*)", "beginCaptures": { "1": { "name": "keyword.other.entry-type.bibtex" }, "2": { "name": "punctuation.definition.keyword.bibtex" }, "3": { "name": "punctuation.section.entry.begin.bibtex" }, "4": { "name": "entity.name.type.entry-key.bibtex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.entry.end.bibtex" } }, "name": "meta.entry.braces.bibtex", "patterns": [ { "begin": "([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)\\s*(\\=)", "beginCaptures": { "1": { "name": "support.function.key.bibtex" }, "2": { "name": "punctuation.separator.key-value.bibtex" } }, "end": "(?=[,}])", "name": "meta.key-assignment.bibtex", "patterns": [ { "include": "#string_var" }, { "include": "#string_content" }, { "include": "#integer" } ] } ] }, { "begin": "((@)[a-zA-Z]+)\\s*(\\()\\s*([^\\s,]*)", "beginCaptures": { "1": { "name": "keyword.other.entry-type.bibtex" }, "2": { "name": "punctuation.definition.keyword.bibtex" }, "3": { "name": "punctuation.section.entry.begin.bibtex" }, "4": { "name": "entity.name.type.entry-key.bibtex" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.entry.end.bibtex" } }, "name": "meta.entry.parenthesis.bibtex", "patterns": [ { "begin": "([a-zA-Z0-9\\!\\$\\&\\*\\+\\-\\.\\/\\:\\;\\<\\>\\?\\[\\]\\^\\_\\`\\|]+)\\s*(\\=)", "beginCaptures": { "1": { "name": "support.function.key.bibtex" }, "2": { "name": "punctuation.separator.key-value.bibtex" } }, "end": "(?=[,)])", "name": "meta.key-assignment.bibtex", "patterns": [ { "include": "#string_var" }, { "include": "#string_content" }, { "include": "#integer" } ] } ] }, { "begin": "[^@\\n]", "end": "(?=@)", "name": "comment.block.bibtex" } ], "repository": { "integer": { "match": "\\d+", "name": "constant.numeric.bibtex" }, "nested_braces": { "begin": "(?)", "end": "(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>", "name": "meta.lambda-start.bicep", "beginCaptures": { "1": { "name": "meta.undefined.bicep", "patterns": [{ "include": "#identifier" }, { "include": "#comments" }] } } }, "function-call": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\(", "end": "\\)", "patterns": [{ "include": "#expression" }, { "include": "#comments" }], "name": "meta.function-call.bicep", "beginCaptures": { "1": { "name": "entity.name.function.bicep" } } }, "escape-character": { "name": "constant.character.escape.bicep", "match": "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)" }, "identifier": { "name": "variable.other.readwrite.bicep", "match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\()" }, "string-literal": { "begin": "'(?!'')", "end": "'", "patterns": [ { "include": "#escape-character" }, { "include": "#string-literal-subst" } ], "name": "string.quoted.single.bicep" }, "directive-variable": { "name": "keyword.control.declaration.bicep", "match": "\\b[_a-zA-Z-0-9]+\\b" }, "directive": { "begin": "#\\b[_a-zA-Z-0-9]+\\b", "end": "$", "patterns": [ { "include": "#directive-variable" }, { "include": "#comments" } ], "name": "meta.directive.bicep" }, "decorator": { "begin": "@(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*(?=\\b[_$[:alpha:]][_$[:alnum:]]*\\b)", "end": "", "patterns": [{ "include": "#expression" }, { "include": "#comments" }], "name": "meta.decorator.bicep" }, "block-comment": { "name": "comment.block.bicep", "begin": "/\\*", "end": "\\*/" }, "comments": { "patterns": [ { "include": "#line-comment" }, { "include": "#block-comment" } ] }, "numeric-literal": { "name": "constant.numeric.bicep", "match": "[0-9]+" }, "expression": { "patterns": [ { "include": "#string-literal" }, { "include": "#string-verbatim" }, { "include": "#numeric-literal" }, { "include": "#named-literal" }, { "include": "#object-literal" }, { "include": "#array-literal" }, { "include": "#keyword" }, { "include": "#identifier" }, { "include": "#function-call" }, { "include": "#decorator" }, { "include": "#lambda-start" }, { "include": "#directive" } ] }, "named-literal": { "name": "constant.language.bicep", "match": "\\b(true|false|null)\\b" } }, "name": "Bicep", "fileTypes": [".bicep"] } ================================================ FILE: src/renderer/components/editor/grammars/textmate/c.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/jeff-hykin/better-c-syntax/blob/master/autogenerated/c.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/jeff-hykin/better-c-syntax/commit/34712a6106a4ffb0a04d2fa836fd28ff6c5849a4", "name": "c", "scopeName": "source.c", "patterns": [ { "include": "#preprocessor-rule-enabled" }, { "include": "#preprocessor-rule-disabled" }, { "include": "#preprocessor-rule-conditional" }, { "include": "#predefined_macros" }, { "include": "#comments" }, { "include": "#switch_statement" }, { "include": "#anon_pattern_1" }, { "include": "#storage_types" }, { "include": "#anon_pattern_2" }, { "include": "#anon_pattern_3" }, { "include": "#anon_pattern_4" }, { "include": "#anon_pattern_5" }, { "include": "#anon_pattern_6" }, { "include": "#anon_pattern_7" }, { "include": "#operators" }, { "include": "#numbers" }, { "include": "#strings" }, { "include": "#anon_pattern_range_1" }, { "include": "#anon_pattern_range_2" }, { "include": "#anon_pattern_range_3" }, { "include": "#pragma-mark" }, { "include": "#anon_pattern_range_4" }, { "include": "#anon_pattern_range_5" }, { "include": "#anon_pattern_range_6" }, { "include": "#anon_pattern_8" }, { "include": "#anon_pattern_9" }, { "include": "#anon_pattern_10" }, { "include": "#anon_pattern_11" }, { "include": "#anon_pattern_12" }, { "include": "#anon_pattern_13" }, { "include": "#block" }, { "include": "#parens" }, { "include": "#anon_pattern_range_7" }, { "include": "#line_continuation_character" }, { "include": "#anon_pattern_range_8" }, { "include": "#anon_pattern_range_9" }, { "include": "#anon_pattern_14" }, { "include": "#anon_pattern_15" } ], "repository": { "access-method": { "name": "meta.function-call.member.c", "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()", "beginCaptures": { "1": { "name": "variable.object.c" }, "2": { "name": "punctuation.separator.dot-access.c" }, "3": { "name": "punctuation.separator.pointer-access.c" }, "4": { "patterns": [ { "match": "\\.", "name": "punctuation.separator.dot-access.c" }, { "match": "->", "name": "punctuation.separator.pointer-access.c" }, { "match": "[a-zA-Z_][a-zA-Z_0-9]*", "name": "variable.object.c" }, { "name": "everything.else.c", "match": ".+" } ] }, "5": { "name": "entity.name.function.member.c" }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.member.c" } }, "patterns": [ { "include": "#function-call-innards" } ] }, "anon_pattern_1": { "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b", "name": "keyword.control.c" }, "anon_pattern_10": { "match": "(?x) \\b\n(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t\n|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t\n|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t\n|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t\n|uintmax_t|uintmax_t)\n\\b", "name": "support.type.stdint.c" }, "anon_pattern_11": { "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b", "name": "support.constant.mac-classic.c" }, "anon_pattern_12": { "match": "(?x) \\b\n(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam\n|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr\n|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber\n|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64\n|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32\n|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr\n|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\n\\b", "name": "support.type.mac-classic.c" }, "anon_pattern_13": { "match": "\\b([A-Za-z0-9_]+_t)\\b", "name": "support.type.posix-reserved.c" }, "anon_pattern_14": { "match": ";", "name": "punctuation.terminator.statement.c" }, "anon_pattern_15": { "match": ",", "name": "punctuation.separator.delimiter.c" }, "anon_pattern_2": { "match": "typedef", "name": "keyword.other.typedef.c" }, "anon_pattern_3": { "match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b", "name": "storage.modifier.c" }, "anon_pattern_4": { "match": "\\bk[A-Z]\\w*\\b", "name": "constant.other.variable.mac-classic.c" }, "anon_pattern_5": { "match": "\\bg[A-Z]\\w*\\b", "name": "variable.other.readwrite.global.mac-classic.c" }, "anon_pattern_6": { "match": "\\bs[A-Z]\\w*\\b", "name": "variable.other.readwrite.static.mac-classic.c" }, "anon_pattern_7": { "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", "name": "constant.language.c" }, "anon_pattern_8": { "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b", "name": "support.type.sys-types.c" }, "anon_pattern_9": { "match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b", "name": "support.type.pthread.c" }, "anon_pattern_range_1": { "name": "meta.preprocessor.macro.c", "begin": "((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((#)\\s*define\\b)\\s+((?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "name": "string.quoted.other.lt-gt.include.c" } ] }, "anon_pattern_range_4": { "begin": "^\\s*((#)\\s*line)\\b", "beginCaptures": { "1": { "name": "keyword.control.directive.line.c" }, "2": { "name": "punctuation.definition.directive.c" } }, "end": "(?=(?://|/\\*))|(?=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", "beginCaptures": { "1": { "name": "variable.other.c" }, "2": { "name": "punctuation.section.parens.begin.bracket.round.initialization.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.initialization.c" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.c" } }, "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.c" } }, "patterns": [ { "include": "#block_innards" } ] }, { "include": "#parens-block" }, { "include": "$self" } ] }, "c_conditional_context": { "patterns": [ { "include": "$self" }, { "include": "#block_innards" } ] }, "c_function_call": { "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", "end": "(?<=\\))(?!\\w)", "name": "meta.function-call.c", "patterns": [ { "include": "#function-call-innards" } ] }, "case_statement": { "name": "meta.conditional.case.c", "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?\\s*)(\\/\\/[!\\/]+)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.documentation.c" } }, "end": "(?<=\\n)(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.italic.doxygen.c" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.bold.doxygen.c" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.inline.raw.string.c" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.c" } ] }, "3": { "name": "variable.parameter.c" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc" } ] }, { "match": "(\\/\\*[!*]+(?=\\s))(.+)([!*]*\\*\\/)", "captures": { "1": { "name": "punctuation.definition.comment.begin.documentation.c" }, "2": { "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.italic.doxygen.c" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.bold.doxygen.c" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.inline.raw.string.c" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.c" } ] }, "3": { "name": "variable.parameter.c" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc" } ] }, "3": { "name": "punctuation.definition.comment.end.documentation.c" } }, "name": "comment.block.documentation.c" }, { "name": "comment.block.documentation.c", "begin": "((?>\\s*)\\/\\*[!*]+(?:(?:\\n|$)|(?=\\s)))", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.documentation.c" } }, "end": "([!*]*\\*\\/)", "endCaptures": { "1": { "name": "punctuation.definition.comment.end.documentation.c" } }, "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.italic.doxygen.c" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.bold.doxygen.c" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))\\s+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "name": "markup.inline.raw.string.c" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)\\])?\\s+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.c" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.c" } ] }, "3": { "name": "variable.parameter.c" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.c" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc" } ] }, { "match": "^\\/\\* =(\\s*.*?)\\s*= \\*\\/$\\n?", "captures": { "1": { "name": "meta.toc-list.banner.block.c" } }, "name": "comment.block.banner.c" }, { "name": "comment.block.c", "begin": "(\\/\\*)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.c" } }, "end": "(\\*\\/)", "endCaptures": { "1": { "name": "punctuation.definition.comment.end.c" } } }, { "match": "^\\/\\/ =(\\s*.*?)\\s*=$\\n?", "captures": { "1": { "name": "meta.toc-list.banner.line.c" } }, "name": "comment.line.banner.c" }, { "begin": "((?:^[ \\t]+)?)(?=\\/\\/)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.c" } }, "end": "(?!\\G)", "patterns": [ { "name": "comment.line.double-slash.c", "begin": "(\\/\\/)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.c" } }, "end": "(?=\\n)", "patterns": [ { "include": "#line_continuation_character" } ] } ] } ] }, { "include": "#block_comment" }, { "include": "#line_comment" } ] }, { "include": "#block_comment" }, { "include": "#line_comment" } ] }, "default_statement": { "name": "meta.conditional.case.c", "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.c" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.c" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.c" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "include": "#block_innards" } ] }, "function-innards": { "patterns": [ { "include": "#comments" }, { "include": "#storage_types" }, { "include": "#operators" }, { "include": "#vararg_ellipses" }, { "name": "meta.function.definition.parameters.c", "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.c" }, "2": { "name": "punctuation.section.parameters.begin.bracket.round.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.c" } }, "patterns": [ { "include": "#probably_a_parameter" }, { "include": "#function-innards" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.c" } }, "patterns": [ { "include": "#function-innards" } ] }, { "include": "$self" } ] }, "inline_comment": { "patterns": [ { "patterns": [ { "match": "(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/))", "captures": { "1": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "2": { "name": "comment.block.c" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] } } }, { "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))", "captures": { "1": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "2": { "name": "comment.block.c" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] } } } ] }, { "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))", "captures": { "1": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "2": { "name": "comment.block.c" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] } } } ] }, "line_comment": { "patterns": [ { "begin": "\\s*+(\\/\\/)", "end": "(?<=\\n)(?\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[a-zA-Z_]\\w*\\b(?!\\())", "captures": { "1": { "name": "variable.other.object.access.c" }, "2": { "name": "punctuation.separator.dot-access.c" }, "3": { "name": "punctuation.separator.pointer-access.c" }, "4": { "patterns": [ { "include": "#member_access" }, { "include": "#method_access" }, { "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", "captures": { "1": { "name": "variable.other.object.access.c" }, "2": { "name": "punctuation.separator.dot-access.c" }, "3": { "name": "punctuation.separator.pointer-access.c" } } } ] }, "5": { "name": "variable.other.member.c" } } }, "method_access": { "contentName": "meta.function-call.member.c", "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", "beginCaptures": { "1": { "name": "variable.other.object.access.c" }, "2": { "name": "punctuation.separator.dot-access.c" }, "3": { "name": "punctuation.separator.pointer-access.c" }, "4": { "patterns": [ { "include": "#member_access" }, { "include": "#method_access" }, { "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", "captures": { "1": { "name": "variable.other.object.access.c" }, "2": { "name": "punctuation.separator.dot-access.c" }, "3": { "name": "punctuation.separator.pointer-access.c" } } } ] }, "5": { "name": "entity.name.function.member.c" }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.c" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.function.member.c" } }, "patterns": [ { "include": "#function-call-innards" } ] }, "numbers": { "match": "(?>=|\\|=", "name": "keyword.operator.assignment.compound.bitwise.c" }, { "match": "<<|>>", "name": "keyword.operator.bitwise.shift.c" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.c" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.c" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.c" }, { "match": "=", "name": "keyword.operator.assignment.c" }, { "match": "%|\\*|/|-|\\+", "name": "keyword.operator.c" }, { "begin": "(\\?)", "beginCaptures": { "1": { "name": "keyword.operator.ternary.c" } }, "end": "(:)", "endCaptures": { "1": { "name": "keyword.operator.ternary.c" } }, "patterns": [ { "include": "#function-call-innards" }, { "include": "$self" } ] } ] }, "parens": { "name": "meta.parens.c", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.c" } }, "patterns": [ { "include": "$self" } ] }, "parens-block": { "name": "meta.parens.block.c", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.c" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.c" } }, "patterns": [ { "include": "#block_innards" }, { "match": "(?-mix:(?=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", "end": "(?<=\\))(?!\\w)|(?=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.c" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.c" } }, "end": "(\\))|(?\\]\\)]))\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))", "captures": { "1": { "name": "variable.parameter.probably.c" } } }, "static_assert": { "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "3": { "name": "comment.block.c" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] }, "5": { "name": "keyword.other.static_assert.c" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "8": { "name": "comment.block.c" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] }, "10": { "name": "punctuation.section.arguments.begin.bracket.round.static_assert.c" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.static_assert.c" } }, "patterns": [ { "name": "meta.static_assert.message.c", "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)", "beginCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.c" } }, "end": "(?=\\))", "patterns": [ { "include": "#string_context" } ] }, { "include": "#evaluation_context" } ] }, "storage_types": { "patterns": [ { "match": "(?-mix:(?\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?:\\n|$)", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "3": { "name": "comment.block.c" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] } } }, { "include": "#comments" }, { "begin": "(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\()", "beginCaptures": { "1": { "name": "punctuation.section.parens.begin.bracket.round.assembly.c" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "4": { "name": "comment.block.c" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.assembly.c" } }, "patterns": [ { "name": "string.quoted.double.c", "contentName": "meta.embedded.assembly.c", "begin": "(R?)(\")", "beginCaptures": { "1": { "name": "meta.encoding.c" }, "2": { "name": "punctuation.definition.string.begin.assembly.c" } }, "end": "(\")", "endCaptures": { "1": { "name": "punctuation.definition.string.end.assembly.c" } }, "patterns": [ { "include": "source.asm" }, { "include": "source.x86" }, { "include": "source.x86_64" }, { "include": "source.arm" }, { "include": "#backslash_escapes" }, { "include": "#string_escaped_char" } ] }, { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.assembly.inner.c" } }, "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "\\[((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))([a-zA-Z_]\\w*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\]", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "3": { "name": "comment.block.c" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] }, "5": { "name": "variable.other.asm.label.c" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "8": { "name": "comment.block.c" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] } } }, { "match": ":", "name": "punctuation.separator.delimiter.colon.assembly.c" }, { "include": "#comments" } ] } ] } ] }, "string_escaped_char": { "patterns": [ { "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", "name": "constant.character.escape.c" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.c" } ] }, "string_placeholder": { "patterns": [ { "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", "name": "constant.other.placeholder.c" }, { "match": "(%)(?!\"\\s*(PRI|SCN))", "captures": { "1": { "name": "invalid.illegal.placeholder.c" } } } ] }, "strings": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "name": "string.quoted.double.c", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" }, { "include": "#line_continuation_character" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.c" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.c" } }, "name": "string.quoted.single.c", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#line_continuation_character" } ] } ] }, "switch_conditional_parentheses": { "name": "meta.conditional.switch.c", "begin": "((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.c punctuation.definition.comment.begin.c" }, "3": { "name": "comment.block.c" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.c punctuation.definition.comment.end.c" }, { "match": "\\*", "name": "comment.block.c" } ] }, "5": { "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.c" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.conditional.switch.c" } }, "patterns": [ { "include": "#evaluation_context" }, { "include": "#c_conditional_context" } ] }, "switch_statement": { "name": "meta.block.switch.c", "begin": "(((?>(?:(?:(?>(?(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))((?|\\?\\?>)|(?=[;>\\[\\]=]))", "patterns": [ { "name": "meta.head.switch.c", "begin": "\\G ?", "end": "((?:\\{|<%|\\?\\?<|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.switch.c" } }, "patterns": [ { "include": "#switch_conditional_parentheses" }, { "include": "$self" } ] }, { "name": "meta.body.switch.c", "begin": "(?<=\\{|<%|\\?\\?<)", "end": "(\\}|%>|\\?\\?>)", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.switch.c" } }, "patterns": [ { "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "$self" }, { "include": "#block_innards" } ] }, { "name": "meta.tail.switch.c", "begin": "(?<=\\}|%>|\\?\\?>)[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "$self" } ] } ] }, "vararg_ellipses": { "match": "(?", "name": "comment.line.cfml" }, { "begin": "", "patterns": [{ "include": "#cfcomments" }], "name": "comment.block.cfml", "captures": { "0": { "name": "punctuation.definition.comment.cfml" } } } ] }, "keywords": { "patterns": [ { "match": "\\b(?i:new)\\b", "name": "keyword.other.new.cfscript" }, { "match": "(===?|!|!=|<=|>=|<|>)", "name": "keyword.operator.comparison.cfscript" }, { "match": "\\b(?i:(GREATER|LESS|THAN|EQUAL\\s+TO|DOES|CONTAINS|EQUAL|EQ|NEQ|LT|LTE|LE|GT|GTE|GE|AND|IS))\\b", "name": "keyword.operator.decision.cfscript" }, { "match": "(\\-\\-|\\+\\+)", "name": "keyword.operator.increment-decrement.cfscript" }, { "match": "(?i:(\\^|\\-|\\+|\\*|\\/|\\\\|%|\\-=|\\+=|\\*=|\\/=|%=|\\bMOD\\b))", "name": "keyword.operator.arithmetic.cfscript" }, { "match": "(&|&=)", "name": "keyword.operator.concat.cfscript" }, { "match": "(=)", "name": "keyword.operator.assignment.cfscript" }, { "match": "\\b(?i:(NOT|!|AND|&&|OR|\\|\\||XOR|EQV|IMP))\\b", "name": "keyword.operator.logical.cfscript" }, { "match": "(\\?|:)", "name": "keyword.operator.ternary.cfscript" }, { "match": ";", "name": "punctuation.terminator.cfscript" } ] }, "functions": { "begin": "(?x)^\\s*\n (?:\n (?: # optional access-control modifier and return-type\n (?i:\\b(private|package|public|remote)\\s+)? # access-control.modifier\n (?i:\\b\n (void)\n |\n (any|array|binary|boolean|component|date|guid|numeric|query|string|struct|xml|uuid) # return-type.primitive\n |\n ([A-Za-z0-9_\\.$]+) #return-type component/object (may need additional tokens)\n )?\n )\n )\n \\s*\n (?i:(function)) # storage.function\n \\s+\n (?:\n (init) # entity.name.function.contructor\n |\n ([\\w\\$]+) # entity.name.function\n )\\b\n ", "end": "(?={)", "patterns": [ { "include": "#parameters" }, { "include": "#comments" }, { "include": "#function-properties" }, { "include": "#cfscript-code" } ], "name": "meta.function.cfscript", "beginCaptures": { "7": { "name": "entity.name.function.cfscript" }, "3": { "name": "storage.type.return-type.primitive.cfscript" }, "4": { "name": "storage.type.return-type.object.cfscript" }, "5": { "name": "storage.type.function.cfscript" }, "1": { "name": "storage.modifier.access-control.cfscript" }, "6": { "name": "entity.name.function.constructor.cfscript" }, "2": { "name": "storage.type.return-type.void.cfscript" } } }, "braces": { "patterns": [ { "name": "meta.brace.curly.cfscript", "match": "{|}" }, { "name": "meta.brace.round.cfscript", "match": "\\(|\\)" }, { "begin": "([\\w]+)?\\s*(\\[)", "endCaptures": { "0": { "name": "punctuation.definition.set.end.cfscript" } }, "end": "\\]", "patterns": [ { "include": "#strings" }, { "match": ",", "name": "punctuation.definition.set.seperator.cfscript" }, { "include": "$self" } ], "beginCaptures": { "1": { "name": "variable.other.set.cfscript" }, "2": { "name": "punctuation.definition.set.begin.cfscript" } } } ] }, "component-operators": { "patterns": [ { "begin": "(?x)\n \\b\n (?i:\n (component)\n )\n \\b\n \\s+\n (?![\\.\\/>=,#\\)])\n ", "end": "(?=[;{\\(])", "patterns": [ { "include": "#component-extends-attribute" }, { "match": "(?i:(\\w+)\\s*(?=\\=))", "name": "entity.other.attribute-name.cfscript" }, { "include": "#cfscript-code" } ], "name": "meta.operator.cfscript meta.class.component.cfscript", "beginCaptures": { "1": { "name": "entity.name.tag.operator.component.cfscript" } } } ] }, "comment-block": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.cfscript", "captures": { "0": { "name": "punctuation.definition.comment.cfscript" } } }, "string-quoted-double": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cfscript" } }, "end": "\"(?!\")", "patterns": [ { "match": "(\"\")", "name": "constant.character.escape.quoted.double.cfscript" }, { "include": "#nest_hash" } ], "name": "string.quoted.double.cfscript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cfscript" } } }, "comments": { "patterns": [ { "match": "/\\*\\*/", "name": "comment.block.empty.cfscript", "captures": { "0": { "name": "punctuation.definition.comment.cfscript" } } }, { "include": "text.html.javadoc" }, { "include": "#comment-block" }, { "match": "((//).*?[^\\s])\\s*$\\n?", "captures": { "2": { "name": "punctuation.definition.comment.cfscript" }, "1": { "name": "comment.line.double-slash.cfscript" } } } ] }, "variables": { "patterns": [ { "match": "\\b(?i:var)\\b", "name": "storage.modifier.var.cfscript" }, { "match": "\\b(?i:(this|key))(?!\\.)", "name": "variable.language.cfscript" }, { "match": "(\\.)", "name": "punctuation.definition.seperator.variable.cfscript" }, { "match": "(?x)\n (?i:\n \\b\n (application|arguments|attributes|caller|cgi|client|\n cookie|flash|form|local|request|server|session|\n this|thistag|thread|thread local|url|variables|\n super|self|argumentcollection)\n \\b\n |\n (\\w+)\n )", "captures": { "1": { "name": "variable.language.cfscript" }, "2": { "name": "variable.other.cfscript" } } } ] }, "string-quoted-single": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cfscript" } }, "end": "'(?!')", "patterns": [ { "match": "('')", "name": "constant.character.escape.quoted.single.cfscript" }, { "include": "#nest_hash" } ], "name": "string.quoted.single.cfscript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cfscript" } } }, "nest_hash": { "patterns": [ { "match": "##", "name": "string.escaped.hash.cfscript" }, { "end": "(#)", "begin": "(#)(?=.*#)", "beginCaptures": { "1": { "name": "punctuation.definition.hash.begin.cfscript" } }, "contentName": "source.cfscript.embedded.cfscript", "patterns": [{ "include": "#cfscript-code" }], "endCaptures": { "1": { "name": "punctuation.definition.hash.end.cfscript" } }, "name": "meta.inline.hash.cfscript" } ] }, "closures": { "begin": "(?i:\\b(function))\\b", "end": "(?={)", "patterns": [{ "include": "#parameters" }], "name": "meta.closure.cfscript", "beginCaptures": { "1": { "name": "storage.closure.cfscript" } } } }, "fileTypes": [], "uuid": "D5324EE0-4226-11E1-B86C-0800200C9A66", "patterns": [ { "include": "#comments" }, { "include": "#cfcomments" }, { "include": "#component-operators" }, { "include": "#functions" }, { "include": "#tag-operators" }, { "include": "#cfscript-code" } ], "comment": "This tmLanguage file is used internally by ColdFusion and Component tmLanguage files", "name": "CFScript (do not use)", "scopeName": "source.cfscript" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/cirru.tmLanguage.json ================================================ { "scopeName": "source.cirru", "fileTypes": ["cirru", "cr"], "patterns": [ { "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.cirru" } ], "name": "string.quoted.double.cirru" }, { "match": "-?\\b\\d\\S*\\b", "name": "constant.numeric.cirru" }, { "match": "(?=^)\\s*\\,", "name": "keyword.operator.cirru" }, { "match": "\\s\\$\\s*$", "name": "keyword.operator.cirru" }, { "match": "(?=^)\\s*[^\\(\\)\\s][^\\(\\)\\s]*", "name": "support.function.cirru" }, { "match": "(?<=\\()[^\\(\\)\\s][^\\(\\)\\s]*", "name": "support.function.cirru" }, { "match": "(?=\\$\\s+)[^\\(\\)\\s][^\\(\\)\\s]*", "name": "support.function.cirru" }, { "match": "\\s+((\\$\\s+)+)([^\\(\\)\\s][^\\(\\)\\s]*)", "name": "entity.cirru", "captures": { "1": { "name": "keyword.operator.cirru" }, "3": { "name": "support.function.cirru" } } }, { "match": "[\\)\\(]", "name": "keyword.operator.cirru" }, { "match": "(?!=($\\s+))[^\\(\\)\\s][^\\(\\)\\s]*", "name": "variable.parameter.cirru" } ], "name": "Cirru", "uuid": "43471e40-4ccc-45e8-b003-29a2b4f7c191" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/clojure.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-clojure/commit/45bdb881501d0b8f8b707ca1d3fcc8b4b99fca03", "name": "clojure", "scopeName": "source.clojure", "patterns": [ { "include": "#comment" }, { "include": "#shebang-comment" }, { "include": "#quoted-sexp" }, { "include": "#sexp" }, { "include": "#keyfn" }, { "include": "#string" }, { "include": "#vector" }, { "include": "#set" }, { "include": "#map" }, { "include": "#regexp" }, { "include": "#var" }, { "include": "#constants" }, { "include": "#dynamic-variables" }, { "include": "#metadata" }, { "include": "#namespace-symbol" }, { "include": "#symbol" } ], "repository": { "comment": { "begin": "(?\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))", "name": "constant.keyword.clojure" }, "keyfn": { "patterns": [ { "match": "(?<=(\\s|\\(|\\[|\\{))(if(-[-\\p{Ll}\\?]*)?|when(-[-\\p{Ll}]*)?|for(-[-\\p{Ll}]*)?|cond|do|let(-[-\\p{Ll}\\?]*)?|binding|loop|recur|fn|throw[\\p{Ll}\\-]*|try|catch|finally|([\\p{Ll}]*case))(?=(\\s|\\)|\\]|\\}))", "name": "storage.control.clojure" }, { "match": "(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[\\p{Ll}\\-]*))(?=(\\s|\\)|\\]|\\}))", "name": "keyword.control.clojure" } ] }, "dynamic-variables": { "match": "\\*[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\d]+\\*", "name": "meta.symbol.dynamic.clojure" }, "map": { "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.section.map.begin.clojure" } }, "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", "endCaptures": { "1": { "name": "punctuation.section.map.end.trailing.clojure" }, "2": { "name": "punctuation.section.map.end.clojure" } }, "name": "meta.map.clojure", "patterns": [ { "include": "$self" } ] }, "metadata": { "patterns": [ { "begin": "(\\^\\{)", "beginCaptures": { "1": { "name": "punctuation.section.metadata.map.begin.clojure" } }, "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", "endCaptures": { "1": { "name": "punctuation.section.metadata.map.end.trailing.clojure" }, "2": { "name": "punctuation.section.metadata.map.end.clojure" } }, "name": "meta.metadata.map.clojure", "patterns": [ { "include": "$self" } ] }, { "begin": "(\\^)", "end": "(\\s)", "name": "meta.metadata.simple.clojure", "patterns": [ { "include": "#keyword" }, { "include": "$self" } ] } ] }, "quoted-sexp": { "begin": "(['``]\\()", "beginCaptures": { "1": { "name": "punctuation.section.expression.begin.clojure" } }, "end": "(\\))$|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", "endCaptures": { "1": { "name": "punctuation.section.expression.end.trailing.clojure" }, "2": { "name": "punctuation.section.expression.end.trailing.clojure" }, "3": { "name": "punctuation.section.expression.end.clojure" } }, "name": "meta.quoted-expression.clojure", "patterns": [ { "include": "$self" } ] }, "regexp": { "begin": "#\"", "beginCaptures": { "0": { "name": "punctuation.definition.regexp.begin.clojure" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.regexp.end.clojure" } }, "name": "string.regexp.clojure", "patterns": [ { "include": "#regexp_escaped_char" } ] }, "regexp_escaped_char": { "match": "\\\\.", "name": "constant.character.escape.clojure" }, "set": { "begin": "(\\#\\{)", "beginCaptures": { "1": { "name": "punctuation.section.set.begin.clojure" } }, "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", "endCaptures": { "1": { "name": "punctuation.section.set.end.trailing.clojure" }, "2": { "name": "punctuation.section.set.end.clojure" } }, "name": "meta.set.clojure", "patterns": [ { "include": "$self" } ] }, "sexp": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.expression.begin.clojure" } }, "end": "(\\))$|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", "endCaptures": { "1": { "name": "punctuation.section.expression.end.trailing.clojure" }, "2": { "name": "punctuation.section.expression.end.trailing.clojure" }, "3": { "name": "punctuation.section.expression.end.clojure" } }, "name": "meta.expression.clojure", "patterns": [ { "begin": "(?<=\\()(ns|declare|def[\\w\\d._:+=>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", "name": "entity.global.clojure" }, { "include": "$self" } ] }, { "include": "#keyfn" }, { "include": "#constants" }, { "include": "#vector" }, { "include": "#map" }, { "include": "#set" }, { "include": "#sexp" }, { "match": "(?<=\\()(.+?)(?=\\s|\\))", "captures": { "1": { "name": "entity.name.function.clojure" } }, "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] }, "shebang-comment": { "begin": "^(#!)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.shebang.clojure" } }, "end": "$", "name": "comment.line.shebang.clojure" }, "string": { "begin": "(?\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)/", "captures": { "1": { "name": "meta.symbol.namespace.clojure" } } } ] }, "symbol": { "patterns": [ { "match": "([\\p{L}\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", "name": "meta.symbol.clojure" } ] }, "var": { "match": "(?<=(\\s|\\(|\\[|\\{)\\#)'[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))", "name": "meta.var.clojure" }, "vector": { "begin": "(\\[)", "beginCaptures": { "1": { "name": "punctuation.section.vector.begin.clojure" } }, "end": "(\\](?=[\\}\\]\\)\\s]*(?:;|$)))|(\\])", "endCaptures": { "1": { "name": "punctuation.section.vector.end.trailing.clojure" }, "2": { "name": "punctuation.section.vector.end.clojure" } }, "name": "meta.vector.clojure", "patterns": [ { "include": "$self" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/cobol.tmLanguage.json ================================================ { "_copyright": "The MIT License (MIT)\nCopyright (c) 2015-2022 spgennard\nSource: https://github.com/spgennard/vscode_cobol/blob/main/syntaxes/COBOL.tmLanguage.json", "$schema": "https://raw.githubusercontent.com/spgennard/vscode_cobol/main/schemas/tmlanguage.json", "fileTypes": [ "ccp", "scbl", "cobol", "cbl", "cblle", "cblsrce", "cblcpy", "lks", "pdv", "cpy", "copybook", "cobcopy", "fd", "sel", "scb", "scbl", "sqlcblle", "cob", "dds", "def", "src", "ss", "wks", "bib", "pco" ], "name": "cobol", "patterns": [ { "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])([dD]\\s.*$)", "name": "token.info-token.cobol" }, { "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])(\\/.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.newpage" } } }, { "match": "(^[ \\*][ \\*][ \\*][ \\*][ \\*][ \\*])(\\*.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.fixed" } } }, { "match": "(^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s])(\\/.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.newpage" } } }, { "match": "^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s]$", "name": "constant.numeric.cobol" }, { "match": "(^[0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s][0-9\\s])(\\*.*$)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "comment.line.cobol.fixed" } } }, { "match": "(^[0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ][0-9a-zA-Z\\s\\$#%\\.@\\- ])(\\*.*$)", "captures": { "1": { "name": "constant.cobol" }, "2": { "name": "comment.line.cobol.fixed" } } }, { "match": "^\\s+(78)\\s+([0-9a-zA-Z][a-zA-Z\\-0-9_]+)", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "variable.other.constant" } } }, { "match": "^\\s+([0-9]+)\\s+([0-9a-zA-Z][a-zA-Z\\-0-9_]+)\\s+((?i:constant))", "captures": { "1": { "name": "constant.numeric.cobol" }, "2": { "name": "variable.other.constant" }, "3": { "name": "keyword.identifers.cobol" } } }, { "match": "(^[0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@][0-9a-zA-Z\\s\\$#%\\.@])(\\/.*$)", "captures": { "1": { "name": "constant.cobol" }, "2": { "name": "comment.line.cobol.newpage" } } }, { "match": "^\\*.*$", "name": "comment.line.cobol.fixed" }, { "match": "((?:^|\\s+)(?i:\\$set)\\s+)((?i:constant)\\s+)([0-9a-zA-Z][a-zA-Z\\-0-9]+\\s*)([a-zA-Z\\-0-9]*)", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "entity.name.function.cobol" }, "4": { "name": "keyword.control.directive.conditional.cobol" } } }, { "match": "((?i:\\$\\s*set\\s+)(ilusing)(\\()(.*)(\\)))", "captures": { "1": { "name": "entity.name.function.preprocessor.cobol" }, "2": { "name": "storage.modifier.import.cobol" }, "3": { "name": "punctuation.begin.bracket.round.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.end.bracket.round.cobol" } } }, { "match": "((?i:\\$\\s*set\\s+)(ilusing)(\")(.*)(\"))", "captures": { "1": { "name": "entity.name.function.preprocessor.cobol" }, "2": { "name": "storage.modifier.import.cobol" }, "3": { "name": "punctuation.definition.string.begin.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.definition.string.begin.cobol" } } }, { "match": "((?i:\\$set))\\s+(\\w+)\\s*(\")(\\w*)(\")", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "punctuation.definition.string.begin.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.definition.string.begin.cobol" } } }, { "match": "((?i:\\$set))\\s+(\\w+)\\s*(\\()(.*)(\\))", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "punctuation.begin.bracket.round.cobol" }, "4": { "name": "string.quoted.other.cobol" }, "5": { "name": "punctuation.end.bracket.round.cobol" } } }, { "match": "(?:^|\\s+)(?i:\\$\\s*set\\s)((?i:01SHUFFLE|64KPARA|64KSECT|AUXOPT|CHIP|DATALIT|EANIM|EXPANDDATA|FIXING|FLAG-CHIP|MASM|MODEL|OPTSIZE|OPTSPEED|PARAS|PROTMODE|REGPARM|SEGCROSS|SEGSIZE|SIGNCOMPARE|SMALLDD|TABLESEGCROSS|TRICKLECHECK|\\s)+).*$", "captures": { "0": { "name": "keyword.control.directive.conditional.cobol" }, "1": { "name": "invalid.illegal.directive" }, "2": { "name": "comment.line.set.cobol" } } }, { "match": "(\\$region|\\$end-region)(.*$)", "captures": { "1": { "name": "keyword.control.directive.cobol" }, "2": { "name": "entity.other.attribute-name.preprocessor.cobol" } } }, { "begin": "\\$(?i:doc)(.*$)", "end": "\\$(?i:end-doc)(.*$)", "name": "invalid.illegal.iscobol" }, { "match": ">>\\s*(?i:turn|page|listing|leap-seconds|d)\\s+.*$", "name": "invalid.illegal.meta.preprocessor.cobolit" }, { "match": "((((>>|\\$)[\\s]*)(?i:if|else|elif|end-if|end-evaluate|end|define|evaluate|when|display|call-convention|set))(.*$))", "captures": { "1": { "name": "keyword.control.directive.conditional.cobol" }, "2": { "name": "entity.name.function.preprocessor.cobol" }, "3": { "name": "entity.name.function.preprocessor.cobol" } } }, { "match": "(\\*>)\\s+(@[0-9a-zA-Z][a-zA-Z\\-0-9]+)\\s+(.*$)", "captures": { "1": { "name": "comment.line.scantoken.cobol" }, "2": { "name": "keyword.cobol" }, "3": { "name": "string.cobol" } } }, { "match": "(\\*>.*$)", "name": "comment.line.modern" }, { "match": "(>>.*)$", "name": "strong comment.line.set.acucobol" }, { "match": "([nNuU][xX]|[hHxX])'\\h*'", "name": "constant.numeric.integer.hexadecimal.cobol" }, { "match": "([nNuU][xX]|[hHxX])'.*'", "name": "invalid.illegal.hexadecimal.cobol" }, { "match": "([nNuU][xX]|[hHxX])\"\\h*\"", "name": "constant.numeric.integer.hexadecimal.cobol" }, { "match": "([nNuU][xX]|[hHxX])\".*\"", "name": "invalid.illegal.hexadecimal.cobol" }, { "match": "[bB]\"[0-1]\"", "name": "constant.numeric.integer.boolean.cobol" }, { "match": "[bB]'[0-1]'", "name": "constant.numeric.integer.boolean.cobol" }, { "match": "[oO]\"[0-7]*\"", "name": "constant.numeric.integer.octal.cobol" }, { "match": "[oO]\".*\"", "name": "invalid.illegal.octal.cobol" }, { "match": "(#)([0-9a-zA-Z][a-zA-Z\\-0-9]+)", "name": "meta.symbol.cobol.forced" }, { "begin": "((?|<=|>=|<>|\\+|\\-|\\*|\\/|(?)", "beginCaptures": { "1": { "name": "entity.name.function.coffee" }, "2": { "name": "variable.other.readwrite.instance.coffee" }, "3": { "name": "keyword.operator.assignment.coffee" } }, "end": "[=-]>", "endCaptures": { "0": { "name": "storage.type.function.coffee" } }, "name": "meta.function.coffee", "patterns": [ { "include": "#function_params" } ] }, { "begin": "(?x)\n(?<=\\s|^)(?:((')([^']*?)('))|((\")([^\"]*?)(\")))\n\\s*([:=])\\s*\n(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)", "beginCaptures": { "1": { "name": "string.quoted.single.coffee" }, "2": { "name": "punctuation.definition.string.begin.coffee" }, "3": { "name": "entity.name.function.coffee" }, "4": { "name": "punctuation.definition.string.end.coffee" }, "5": { "name": "string.quoted.double.coffee" }, "6": { "name": "punctuation.definition.string.begin.coffee" }, "7": { "name": "entity.name.function.coffee" }, "8": { "name": "punctuation.definition.string.end.coffee" }, "9": { "name": "keyword.operator.assignment.coffee" } }, "end": "[=-]>", "endCaptures": { "0": { "name": "storage.type.function.coffee" } }, "name": "meta.function.coffee", "patterns": [ { "include": "#function_params" } ] }, { "begin": "(?=(\\([^\\(\\)]*\\)\\s*)?[=-]>)", "end": "[=-]>", "endCaptures": { "0": { "name": "storage.type.function.coffee" } }, "name": "meta.function.inline.coffee", "patterns": [ { "include": "#function_params" } ] }, { "begin": "(?<=\\s|^)({)(?=[^'\"#]+?}[\\s\\]}]*=)", "beginCaptures": { "1": { "name": "punctuation.definition.destructuring.begin.bracket.curly.coffee" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.destructuring.end.bracket.curly.coffee" } }, "name": "meta.variable.assignment.destructured.object.coffee", "patterns": [ { "include": "$self" }, { "match": "[a-zA-Z$_]\\w*", "name": "variable.assignment.coffee" } ] }, { "begin": "(?<=\\s|^)(\\[)(?=[^'\"#]+?\\][\\s\\]}]*=)", "beginCaptures": { "1": { "name": "punctuation.definition.destructuring.begin.bracket.square.coffee" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.destructuring.end.bracket.square.coffee" } }, "name": "meta.variable.assignment.destructured.array.coffee", "patterns": [ { "include": "$self" }, { "match": "[a-zA-Z$_]\\w*", "name": "variable.assignment.coffee" } ] }, { "match": "\\b(?|\\-\\d|\\[|{|\"|'))", "end": "(?=\\s*(?|\\-\\d|\\[|{|\"|')))", "beginCaptures": { "1": { "name": "variable.other.readwrite.instance.coffee" }, "2": { "patterns": [ { "include": "#function_names" } ] } }, "end": "(?=\\s*(?|\\-\\d|\\[|{|\"|')))", "beginCaptures": { "1": { "name": "punctuation.separator.method.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "patterns": [ { "include": "#method_names" } ] } }, "end": "(?=\\s*(?>=|>>>=|\\|=)", "captures": { "1": { "name": "variable.assignment.coffee" }, "2": { "name": "keyword.operator.assignment.compound.bitwise.coffee" } } }, { "match": "<<|>>>|>>", "name": "keyword.operator.bitwise.shift.coffee" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.coffee" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.coffee" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.bitwise.coffee" }, { "match": "([a-zA-Z$_][\\w$]*)?\\s*(=|:(?!:))(?![>=])", "captures": { "1": { "name": "variable.assignment.coffee" }, "2": { "name": "keyword.operator.assignment.coffee" } } }, { "match": "--", "name": "keyword.operator.decrement.coffee" }, { "match": "\\+\\+", "name": "keyword.operator.increment.coffee" }, { "match": "\\.\\.\\.", "name": "keyword.operator.splat.coffee" }, { "match": "\\?", "name": "keyword.operator.existential.coffee" }, { "match": "%|\\*|/|-|\\+", "name": "keyword.operator.coffee" }, { "match": "(?x)\n\\b(?)", "name": "meta.tag.coffee", "patterns": [ { "include": "#jsx-attribute" } ] } ] }, "jsx-end-tag": { "patterns": [ { "begin": "()", "name": "meta.tag.coffee" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/coldfusion.tmLanguage.json ================================================ { "scopeName": "text.cfml.basic", "patterns": [ { "begin": "(?:^\\s+)?(<)((?i:cfscript))(?![^>]*/>)", "end": "()(?:\\s*\\n)?", "patterns": [ { "begin": "(>)", "end": "(?=)", "patterns": [ { "include": "#func-name-attribute" }, { "include": "#tag-stuff" } ], "name": "meta.tag.block.cf.function.cfml", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.cfml" }, "2": { "name": "entity.name.tag.cf.function.cfml" } } }, { "end": "((?:\\s?/)?>)", "begin": "(<)(?i:(cfset|cfreturn))\\b", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.cfml" }, "2": { "name": "entity.name.tag.cf.inline.declaration.cfml" } }, "contentName": "source.cfscript.embedded.cfml", "patterns": [ { "include": "#cfcomments" }, { "include": "source.cfscript" } ], "endCaptures": { "1": { "name": "punctuation.definition.tag.end.cfml" } }, "name": "meta.tag.inline.cf.any.cfml" }, { "begin": "(?x)\n\t\t\t\t(<)\n\t\t\t\t\t(?i:\n\t\t\t\t\t\t(cf(queryparam|location|forward|import|param|break|abort|flush\n\t\t\t\t\t\t\t|setting|test|dump|content|include|catch|continue\n\t\t\t\t\t\t\t|file|log|object|invoke|throw|property|htmlhead\n\t\t\t\t\t\t\t|header|argument|exit|trace)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\b\n\t\t\t\t\t)\n\t\t\t", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.cfml" } }, "end": "((?:\\s?/)?>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.inline.cf.any.cfml", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.cfml" }, "2": { "name": "entity.name.tag.cf.inline.other.cfml" } } }, { "begin": "(?:^\\s+)?(<)((?i:cfquery))\\b(?![^>]*/>)", "end": "()(?:\\s*\\n)?", "patterns": [ { "begin": "(?<=cfquery)\\s", "end": "(?=>)", "patterns": [ { "include": "#qry-name-attribute" }, { "include": "#tag-stuff" } ], "name": "meta.tag.block.cf.output.cfml" }, { "begin": "(>)", "end": "(?=)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.inline.cf.query-param.cfml", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.cfml" }, "2": { "name": "entity.name.tag.cf.inline.param.cfml" } } }, { "include": "#nest-hash" }, { "include": "source.sql" } ], "contentName": "source.sql.embedded.cfml", "beginCaptures": { "0": { "name": "meta.tag.block.cf.query.cfml" }, "1": { "name": "punctuation.definition.tag.end.cfml" } } } ], "captures": { "3": { "name": "punctuation.definition.tag.end.cfml" }, "1": { "name": "punctuation.definition.tag.begin.cfml" }, "2": { "name": "entity.name.tag.cf.query.cfml" }, "0": { "name": "meta.tag.block.cf.query.cfml" } } }, { "include": "#embedded-tags" }, { "begin": "(?x)\n\t\t\t\t()", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.cf.other.cfml", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.cfml" }, "2": { "name": "entity.name.tag.cf.block.other.cfml" } } } ], "repository": { "tag-stuff": { "patterns": [ { "include": "#cfcomments" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, "embedded-tags": { "patterns": [ { "include": "#cfcomments" }, { "include": "#conditionals" }, { "include": "#flow-control" }, { "include": "#exception-handling" }, { "include": "#cfoutput" }, { "include": "#cfmail" } ] }, "string-double-quoted": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cfml" } }, "end": "\"", "patterns": [{ "include": "#nest-hash" }, { "include": "#entities" }], "name": "string.quoted.double.cfml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cfml" } } }, "func-name-attribute": { "begin": "\\b(name)\\b\\s*(=)", "end": "(?<='|\")", "patterns": [ { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cfml" } }, "contentName": "meta.toc-list.function.cfml", "patterns": [{ "include": "#entities" }], "endCaptures": { "0": { "name": "punctuation.definition.string.end.cfml" } }, "name": "string.quoted.double.cfml" }, { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cfml" } }, "contentName": "meta.toc-list.function.cfml", "patterns": [{ "include": "#entities" }], "endCaptures": { "0": { "name": "punctuation.definition.string.end.cfml" } }, "name": "string.quoted.single.cfml" } ], "name": "meta.attribute-with-value.name.cfml", "captures": { "1": { "name": "entity.other.attribute-name.cfml" }, "2": { "name": "punctuation.separator.key-value.cfml" } } }, "nest-hash": { "patterns": [ { "match": "##", "name": "string.escaped.hash.cfml" }, { "match": "(?x)\n\t\t\t\t\t\t\t(\\#)\n\t\t\t\t\t\t\t(?!\t\t# zero width negative lookahead assertion\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t([\\w$]+\t# assertion for plain variables or function names including currency symbol \"$\"\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t(\\[.*\\])\t\t\t\t# asserts a match for anything in square brackets\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\(.*\\))\t\t\t\t# or anything in parens\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\.[\\w$]+)\t\t\t\t# or zero or more \"dot\" notated variables\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*[\\+\\-\\*\\/&]\\s*[\\w$]+)\t# or simple arithmentic operators + concatenation\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*&\\s*[\"|'].+[\"|']) \t# or concatenation with a quoted string\n\t\t\t\t\t\t\t\t\t\t)*\t\t# asserts preceeding square brackets, parens, dot notated vars or arithmetic zero or more times\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t(\\(.*\\))\t # asserts a match for anything in parens\n\t\t\t\t\t\t\t\t)\\#\t\t# asserts closing hash\n\t\t\t\t\t\t\t)", "name": "invalid.illegal.unescaped.hash.cfml" }, { "end": "(#)", "begin": "(?x)\n\t\t\t\t\t\t\t(\\#)\n\t\t\t\t\t\t\t(?=\t\t# zero width negative lookahead assertion\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t([\\w$]+\t# assertion for plain variables or function names including currency symbol \"$\"\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t(\\[.*\\])\t\t\t\t# asserts a match for anything in square brackets\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\(.*\\))\t\t\t\t# or anything in parens\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\.[\\w$]+)\t\t\t\t# or zero or more \"dot\" notated variables\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*[\\+\\-\\*\\/&]\\s*[\\w$]+)\t# or simple arithmentic operators + concatenation\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*&\\s*[\"|'].+[\"|']) \t# or concatenation with a quoted string\n\t\t\t\t\t\t\t\t\t\t)*\t\t# asserts preceeding square brackets, parens, dot notated vars or arithmetic zero or more times\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t(\\(.*\\))\t # asserts a match for anything in parens\n\t\t\t\t\t\t\t\t)\\#\t\t# asserts closing hash\n\t\t\t\t\t\t\t)", "beginCaptures": { "1": { "name": "punctuation.definition.hash.begin.cfml" } }, "contentName": "source.cfscript.embedded.cfml", "patterns": [{ "include": "source.cfscript" }], "endCaptures": { "1": { "name": "punctuation.definition.hash.end.cfml" } }, "name": "meta.name.interpolated.hash.cfml" } ] }, "cfmail": { "begin": "(?:^\\s+)?(<)((?i:cfmail))\\b(?![^>]*/>)", "end": "()(?:\\s*\\n)?", "patterns": [ { "begin": "(?<=cfmail)\\s", "end": "(?=>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.cf.mail.cfml" }, { "begin": "(>)", "end": "(?=", "name": "comment.line.cfml" }, { "begin": "", "patterns": [{ "include": "#cfcomments" }], "name": "comment.block.cfml", "captures": { "0": { "name": "punctuation.definition.comment.cfml" } } } ] }, "flow-control": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t()", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.cf.flow-control.cfml", "beginCaptures": { "3": { "name": "entity.name.tag.cf.flow-control.switch.cfml" }, "1": { "name": "punctuation.definition.tag.begin.cfml" }, "4": { "name": "entity.name.tag.cf.flow-control.case.cfml" }, "2": { "name": "entity.name.tag.cf.flow-control.loop.cfml" } } } ] }, "tag-generic-attribute": { "match": "\\b([a-zA-Z\\-:]+)", "name": "entity.other.attribute-name.cfml" }, "conditionals": { "patterns": [ { "end": "(>)", "begin": "()", "begin": "(]*/>)", "end": "()(?:\\s*\\n)?", "patterns": [ { "begin": "(?<=cfoutput)\\s", "end": "(?=>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.cf.output.cfml" }, { "begin": "(>)", "end": "(?=)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.cf.exceptions.cfml", "beginCaptures": { "3": { "name": "entity.name.tag.cf.exception.catch.cfml" }, "1": { "name": "punctuation.definition.tag.begin.cfml" }, "4": { "name": "entity.name.tag.cf.lock.cfml" }, "2": { "name": "entity.name.tag.cf.exception.try.cfml" }, "5": { "name": "entity.name.tag.cf.exception.other.cfml" } } } ] } }, "name": "CFML (do not use)", "uuid": "C48DE6D0-4226-11E1-B86C-0800200C9A66" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/cpp-embedded-latex.tmLanguage.json ================================================ { "information_for_contributors": [ "This code was auto generated by a much-more-readable ruby file", "This file essentially an updated/improved fork of the atom syntax", "see https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master" ], "version": "", "name": "C++", "scopeName": "source.cpp.embedded.latex", "fileTypes": ["cc", "cpp", "cp", "cxx", "c++", "C", "h", "hh", "hpp", "h++"], "patterns": [ { "include": "#ever_present_context" }, { "include": "#constructor_root" }, { "include": "#destructor_root" }, { "include": "#function_definition" }, { "include": "#operator_overload" }, { "include": "#using_namespace" }, { "include": "#type_alias" }, { "include": "#using_name" }, { "include": "#namespace_alias" }, { "include": "#namespace_block" }, { "include": "#extern_block" }, { "include": "#typedef_class" }, { "include": "#typedef_struct" }, { "include": "#typedef_union" }, { "include": "#misc_keywords" }, { "include": "#standard_declares" }, { "include": "#class_block" }, { "include": "#struct_block" }, { "include": "#union_block" }, { "include": "#enum_block" }, { "include": "#template_isolated_definition" }, { "include": "#template_definition" }, { "include": "#access_control_keywords" }, { "include": "#block" }, { "include": "#static_assert" }, { "include": "#assembly" }, { "include": "#function_pointer" }, { "include": "#evaluation_context" } ], "repository": { "access_control_keywords": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(((?:(?:protected)|(?:private)|(?:public)))(?:(?:\\s)+)?(:))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.type.modifier.access.control.$4.cpp" }, "4": {}, "5": { "name": "punctuation.separator.colon.access.control.cpp" } } }, "alignas_attribute": { "begin": "alignas\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context" } ] }, { "match": "(using)(?:\\s)+((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignas.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignas.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignas.cpp" } }, "contentName": "meta.arguments.operator.alignas", "patterns": [{ "include": "#evaluation_context" }] }, "alignof_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignof.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignof.cpp" } }, "contentName": "meta.arguments.operator.alignof", "patterns": [{ "include": "#evaluation_context" }] }, "assembly": { "begin": "(\\b(?:__asm__|asm)\\b)(?:(?:\\s)+)?((?:volatile)?)", "end": "(?!\\G)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "storage.type.asm.cpp" }, "2": { "name": "storage.modifier.cpp" } }, "endCaptures": {}, "name": "meta.asm.cpp", "patterns": [ { "match": "^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\n)|$)", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#comments" }, { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.cpp" } }, "patterns": [ { "begin": "(R?)(\")", "end": "\"|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "meta.encoding.cpp" }, "2": { "name": "punctuation.definition.string.begin.assembly.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.assembly.cpp" } }, "name": "string.quoted.double.cpp", "contentName": "meta.embedded.assembly", "patterns": [ { "include": "source.asm" }, { "include": "source.x86" }, { "include": "source.x86_64" }, { "include": "source.arm" }, { "include": "#backslash_escapes" }, { "include": "#string_escaped_char" } ] }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.inner.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "match": "\\[((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.other.asm.label.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": ":", "name": "punctuation.separator.delimiter.colon.assembly.cpp" }, { "include": "#comments" } ] } ] }, "assignment_operator": { "match": "\\=", "name": "keyword.operator.assignment.cpp" }, "attributes_context": { "patterns": [ { "include": "#cpp_attributes" }, { "include": "#gcc_attributes" }, { "include": "#ms_attributes" }, { "include": "#alignas_attribute" } ] }, "backslash_escapes": { "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3][0-7]{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", "name": "constant.character.escape" }, "block": { "begin": "{", "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.cpp" } }, "name": "meta.block.cpp", "patterns": [{ "include": "#function_body_context" }] }, "block_comment": { "begin": "\\s*+(\\/\\*)", "end": "\\*\\/|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cpp" } }, "name": "comment.block.cpp" }, "builtin_storage_type_initilizer": { "begin": "(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.class.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "name": "meta.head.class.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "name": "meta.body.class.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.class.cpp", "patterns": [{ "include": "$self" }] } ] }, "class_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.class.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "comma": { "match": ",", "name": "punctuation.separator.delimiter.comma.cpp" }, "comma_in_template_argument": { "match": ",", "name": "punctuation.separator.delimiter.comma.template.argument.cpp" }, "comments": { "patterns": [ { "begin": "^(?:(?:\\s)+)?+(\\/\\/[!\\/]+)", "end": "(?<=\\n)(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, { "match": "(\\/\\*[!*]+(?=\\s))(.+)([!*]*\\*\\/)", "captures": { "1": { "name": "punctuation.definition.comment.begin.documentation.cpp" }, "2": { "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, "3": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "name": "comment.block.documentation.cpp" }, { "begin": "(?:(?:\\s)+)?+\\/\\*[!*]+(?:(?:(?:\\n)|$)|(?=\\s))", "end": "[!*]*\\*\\/|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.documentation.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "name": "comment.block.documentation.cpp", "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, { "include": "#emacs_file_banner" }, { "include": "#block_comment" }, { "include": "#line_comment" }, { "include": "#invalid_comment_end" } ] }, "constructor_inline": { "begin": "^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:constexpr)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [{ "include": "#functional_specifiers_pre_parameters" }] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "storage.type.modifier.calling-convention.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "17": { "name": "comment.block.cpp" }, "18": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "19": { "name": "entity.name.function.constructor.cpp entity.name.function.definition.special.constructor.cpp" } }, "endCaptures": {}, "name": "meta.function.definition.special.constructor.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.head.function.definition.special.constructor.cpp", "patterns": [ { "include": "#ever_present_context" }, { "match": "(\\=)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "include": "#functional_specifiers_pre_parameters" }, { "begin": ":", "end": "(?=\\{)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "endCaptures": {}, "patterns": [ { "begin": "((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "3": {}, "4": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.body.function.definition.special.constructor.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [{ "include": "$self" }] } ] }, "constructor_root": { "begin": "\\s*+((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)(((?>(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))::((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\14((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\())", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.modifier.calling-convention.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.constructor.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "include": "#functional_specifiers_pre_parameters" }, { "begin": ":", "end": "(?=\\{)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "endCaptures": {}, "patterns": [ { "begin": "((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "3": {}, "4": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.body.function.definition.special.constructor.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [{ "include": "$self" }] } ] }, "control_flow_keywords": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.$3.cpp" } } }, "cpp_attributes": { "begin": "\\[\\[", "end": "\\]\\]|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context" } ] }, { "match": "(using)(?:\\s)+((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\{)", "end": "\\}|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((import))(?:(?:\\s)+)?(?:(?:(?:((<)[^>]*(>?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/)))|((\\\")[^\\\"]*((?:\\\")?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/))))|(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\.(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)*((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;)))))|((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;))))(?:(?:\\s)+)?(;?)", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.directive.import.cpp" }, "5": { "name": "string.quoted.other.lt-gt.include.cpp" }, "6": { "name": "punctuation.definition.string.begin.cpp" }, "7": { "name": "punctuation.definition.string.end.cpp" }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "name": "string.quoted.double.include.cpp" }, "11": { "name": "punctuation.definition.string.begin.cpp" }, "12": { "name": "punctuation.definition.string.end.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "15": { "name": "entity.name.other.preprocessor.macro.include.cpp" }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "18": { "patterns": [{ "include": "#inline_comment" }] }, "19": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "20": { "patterns": [{ "include": "#inline_comment" }] }, "21": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "22": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.preprocessor.import.cpp" }, "d9bc4796b0b_preprocessor_number_literal": { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.decltype.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.decltype.cpp" } }, "contentName": "meta.arguments.decltype", "patterns": [{ "include": "#evaluation_context" }] }, "decltype_specifier": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.decltype.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.decltype.cpp" } }, "contentName": "meta.arguments.decltype", "patterns": [{ "include": "#evaluation_context" }] }, "default_statement": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:constexpr)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)(~(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.member.destructor.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "9": { "name": "storage.type.modifier.calling-convention.cpp" }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "patterns": [{ "include": "#functional_specifiers_pre_parameters" }] }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "17": { "name": "comment.block.cpp" }, "18": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "19": { "name": "entity.name.function.destructor.cpp entity.name.function.definition.special.member.destructor.cpp" } }, "endCaptures": {}, "name": "meta.function.definition.special.member.destructor.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.member.destructor.cpp" } }, "name": "meta.head.function.definition.special.member.destructor.cpp", "patterns": [ { "include": "#ever_present_context" }, { "match": "(\\=)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.member.destructor.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.member.destructor.cpp" } }, "contentName": "meta.function.definition.parameters.special.member.destructor", "patterns": [] }, { "match": "((?:(?:final)|(?:override)))+", "captures": { "1": { "name": "keyword.operator.wordlike.cpp keyword.operator.$1.cpp" } } }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.member.destructor.cpp" } }, "name": "meta.body.function.definition.special.member.destructor.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.member.destructor.cpp", "patterns": [{ "include": "$self" }] } ] }, "destructor_root": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)(((?>(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))::((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))~\\14((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\())", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.member.destructor.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.modifier.calling-convention.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.destructor.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.member.destructor.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.member.destructor.cpp" } }, "contentName": "meta.function.definition.parameters.special.member.destructor", "patterns": [] }, { "match": "((?:(?:final)|(?:override)))+", "captures": { "1": { "name": "keyword.operator.wordlike.cpp keyword.operator.$1.cpp" } } }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.member.destructor.cpp" } }, "name": "meta.body.function.definition.special.member.destructor.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.member.destructor.cpp", "patterns": [{ "include": "$self" }] } ] }, "diagnostic": { "begin": "(^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?:error|warning)))\\b(?:(?:\\s)+)?", "end": "(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?(::))?(?:(?:\\s)+)?((?|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.enum.cpp" }, "1": { "name": "storage.type.enum.cpp" }, "2": { "name": "storage.type.enum.enum-key.$2.cpp" }, "3": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "4": { "name": "entity.name.type.enum.cpp" }, "5": { "name": "punctuation.separator.colon.type-specifier.cpp" }, "6": { "patterns": [{ "include": "#scope_resolution_inner_generated" }] }, "7": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "8": { "patterns": [{ "include": "#template_call_range" }] }, "9": {}, "10": { "name": "entity.name.scope-resolution.cpp" }, "11": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "12": {}, "13": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "14": { "name": "storage.type.integral.$14.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.enum.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.enum.cpp" } }, "name": "meta.head.enum.cpp", "patterns": [{ "include": "$self" }] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.enum.cpp" } }, "name": "meta.body.enum.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#enumerator_list" }, { "include": "#comments" }, { "include": "#comma" }, { "include": "#semicolon" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.enum.cpp", "patterns": [{ "include": "$self" }] } ] }, "enum_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.enum.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "enumerator_list": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.exception.$3.cpp" } } }, "extern_block": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(extern)(?=\\s*\\\")", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.extern.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.extern.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.extern.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.extern.cpp" } }, "name": "meta.head.extern.cpp", "patterns": [{ "include": "$self" }] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.extern.cpp" } }, "name": "meta.body.extern.cpp", "patterns": [{ "include": "$self" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.extern.cpp", "patterns": [{ "include": "$self" }] }, { "include": "$self" } ] }, "function_body_context": { "patterns": [ { "include": "#ever_present_context" }, { "include": "#using_namespace" }, { "include": "#type_alias" }, { "include": "#using_name" }, { "include": "#namespace_alias" }, { "include": "#typedef_class" }, { "include": "#typedef_struct" }, { "include": "#typedef_union" }, { "include": "#misc_keywords" }, { "include": "#standard_declares" }, { "include": "#class_block" }, { "include": "#struct_block" }, { "include": "#union_block" }, { "include": "#enum_block" }, { "include": "#access_control_keywords" }, { "include": "#block" }, { "include": "#static_assert" }, { "include": "#assembly" }, { "include": "#function_pointer" }, { "include": "#switch_statement" }, { "include": "#goto_statement" }, { "include": "#evaluation_context" }, { "include": "#label" } ] }, "function_call": { "begin": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.function.call.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "11": {}, "12": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, "function_definition": { "begin": "(?:(?:^|\\G|(?<=;|\\}))|(?<=>))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)(?:\\s)*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\()", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.function.definition.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.template.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.modifier.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "storage.modifier.$12.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "15": { "name": "comment.block.cpp" }, "16": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "17": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "18": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "21": { "name": "comment.block.cpp" }, "22": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "23": { "patterns": [{ "include": "#inline_comment" }] }, "24": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "25": { "name": "comment.block.cpp" }, "26": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "27": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "36": { "patterns": [{ "include": "#inline_comment" }] }, "37": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "38": { "name": "comment.block.cpp" }, "39": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "40": { "patterns": [{ "include": "#inline_comment" }] }, "41": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "42": { "name": "comment.block.cpp" }, "43": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "44": { "patterns": [{ "include": "#inline_comment" }] }, "45": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "46": { "name": "comment.block.cpp" }, "47": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "48": { "patterns": [{ "include": "#inline_comment" }] }, "49": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "50": { "name": "comment.block.cpp" }, "51": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "52": { "name": "storage.type.modifier.calling-convention.cpp" }, "53": { "patterns": [{ "include": "#inline_comment" }] }, "54": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "55": { "name": "comment.block.cpp" }, "56": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "57": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "58": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "59": { "patterns": [{ "include": "#template_call_range" }] }, "60": {}, "61": { "name": "entity.name.function.definition.cpp" }, "62": { "patterns": [{ "include": "#inline_comment" }] }, "63": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "64": { "name": "comment.block.cpp" }, "65": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "name": "meta.function.definition.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.cpp" } }, "name": "meta.head.function.definition.cpp", "patterns": [ { "include": "#ever_present_context" }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.cpp" } }, "contentName": "meta.function.definition.parameters", "patterns": [ { "include": "#ever_present_context" }, { "include": "#parameter_or_maybe_value" }, { "include": "#comma" }, { "include": "#evaluation_context" } ] }, { "match": "(?<=^|\\))(?:(?:\\s)+)?(->)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<23>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<23>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "punctuation.definition.function.return-type.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "7": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "10": { "name": "comment.block.cpp" }, "11": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.cpp" } }, "name": "meta.body.function.definition.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.cpp", "patterns": [{ "include": "$self" }] } ] }, "function_parameter_context": { "patterns": [ { "include": "#ever_present_context" }, { "include": "#string_context" }, { "include": "#parameter" }, { "include": "#comma" } ] }, "function_pointer": { "begin": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [{ "include": "#inline_comment" }] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [{ "include": "#inline_comment" }] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [{ "include": "#inline_comment" }] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "variable.other.definition.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [{ "include": "#evaluation_context" }] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [{ "include": "#function_parameter_context" }] }, "function_pointer_parameter": { "begin": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [{ "include": "#inline_comment" }] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [{ "include": "#inline_comment" }] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [{ "include": "#inline_comment" }] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "variable.parameter.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [{ "include": "#evaluation_context" }] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [{ "include": "#function_parameter_context" }] }, "functional_specifiers_pre_parameters": { "match": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)", "captures": { "1": { "name": "keyword.control.goto.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.label.call.cpp" } } }, "identifier": { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*" }, "include": { "match": "^((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((#)(?:(?:\\s)+)?((?:include|include_next))\\b)(?:(?:\\s)+)?(?:(?:(?:((<)[^>]*(>?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/)))|((\\\")[^\\\"]*((?:\\\")?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/))))|(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\.(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)*((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;)))))|((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;))))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.directive.$5.cpp" }, "4": { "name": "punctuation.definition.directive.cpp" }, "6": { "name": "string.quoted.other.lt-gt.include.cpp" }, "7": { "name": "punctuation.definition.string.begin.cpp" }, "8": { "name": "punctuation.definition.string.end.cpp" }, "9": { "patterns": [{ "include": "#inline_comment" }] }, "10": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "11": { "name": "string.quoted.double.include.cpp" }, "12": { "name": "punctuation.definition.string.begin.cpp" }, "13": { "name": "punctuation.definition.string.end.cpp" }, "14": { "patterns": [{ "include": "#inline_comment" }] }, "15": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "16": { "name": "entity.name.other.preprocessor.macro.include.cpp" }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "21": { "patterns": [{ "include": "#inline_comment" }] }, "22": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } }, "name": "meta.preprocessor.include.cpp" }, "inheritance_context": { "patterns": [ { "include": "#ever_present_context" }, { "match": ",", "name": "punctuation.separator.delimiter.comma.inheritance.cpp" }, { "match": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": {} } } ] }, "inline_builtin_storage_type": { "match": "(?:\\s)*+(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:)", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "entity.name.label.cpp" }, "4": { "patterns": [{ "include": "#inline_comment" }] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "name": "punctuation.separator.label.cpp" } } }, "lambdas": { "begin": "(?:(?<=[^\\s]|^)(?])|(?<=\\Wreturn|^return))(?:(?:\\s)+)?(\\[(?!\\[| *+\"| *+\\d))((?:[^\\[\\]]|((??)++\\]))*+)(\\](?!((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))[\\[\\];]))", "end": "(?<=[;}])|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "punctuation.definition.capture.begin.lambda.cpp" }, "2": { "name": "meta.lambda.capture.cpp", "patterns": [ { "include": "#the_this_keyword" }, { "match": "((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?=\\]|\\z|$)|(,))|(\\=))", "captures": { "1": { "name": "variable.parameter.capture.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.separator.delimiter.comma.cpp" }, "7": { "name": "keyword.operator.assignment.cpp" } } }, { "include": "#evaluation_context" } ] }, "3": {}, "4": { "name": "punctuation.definition.capture.end.lambda.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "patterns": [ { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.lambda.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.lambda.cpp" } }, "name": "meta.function.definition.parameters.lambda.cpp", "patterns": [{ "include": "#function_parameter_context" }] }, { "match": "(?)((?:.+?(?=\\{|$))?)", "captures": { "1": { "name": "punctuation.definition.lambda.return-type.cpp" }, "2": { "name": "storage.type.return-type.lambda.cpp" } } }, { "begin": "\\{", "end": "\\}|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.lambda.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.lambda.cpp" } }, "name": "meta.function.definition.body.lambda.cpp", "patterns": [{ "include": "$self" }] } ] }, "language_constants": { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?line\\b", "end": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?define\\b)(?:(?:\\s)+)?((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:(?:\\s)+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:(?:\\s)+)?)*)(?:(?:\\s)+)?(\\b(?!uint_least32_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_least16_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_least64_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_least32_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_least64_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_fast32_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_fast64_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_least8_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_fast16_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_least16_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_fast16_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_least8_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint_fast8_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_fast64_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_fast32_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int_fast8_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|suseconds_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|useconds_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|in_addr_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uintmax_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uintmax_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uintmax_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|in_port_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uintptr_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|blksize_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint32_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint64_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|u_quad_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|intmax_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|intmax_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|unsigned[^Pattern.new(\n match: \\/\\w\\/,\n)]|blkcnt_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint16_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|intptr_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|swblk_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|wchar_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|u_short[^Pattern.new(\n match: \\/\\w\\/,\n)]|qaddr_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|caddr_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|daddr_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|fixpt_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|nlink_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|segsz_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|clock_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|ssize_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int16_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int32_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int64_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint8_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int8_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|mode_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|quad_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|ushort[^Pattern.new(\n match: \\/\\w\\/,\n)]|u_long[^Pattern.new(\n match: \\/\\w\\/,\n)]|u_char[^Pattern.new(\n match: \\/\\w\\/,\n)]|double[^Pattern.new(\n match: \\/\\w\\/,\n)]|signed[^Pattern.new(\n match: \\/\\w\\/,\n)]|time_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|size_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|key_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|div_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|ino_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uid_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|gid_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|off_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|pid_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|float[^Pattern.new(\n match: \\/\\w\\/,\n)]|dev_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|u_int[^Pattern.new(\n match: \\/\\w\\/,\n)]|short[^Pattern.new(\n match: \\/\\w\\/,\n)]|bool[^Pattern.new(\n match: \\/\\w\\/,\n)]|id_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|uint[^Pattern.new(\n match: \\/\\w\\/,\n)]|long[^Pattern.new(\n match: \\/\\w\\/,\n)]|char[^Pattern.new(\n match: \\/\\w\\/,\n)]|void[^Pattern.new(\n match: \\/\\w\\/,\n)]|auto[^Pattern.new(\n match: \\/\\w\\/,\n)]|id_t[^Pattern.new(\n match: \\/\\w\\/,\n)]|int[^Pattern.new(\n match: \\/\\w\\/,\n)])(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?!\\())", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "variable.language.this.cpp" }, "4": { "name": "variable.other.object.access.cpp" }, "5": { "name": "punctuation.separator.dot-access.cpp" }, "6": { "name": "punctuation.separator.pointer-access.cpp" }, "7": { "patterns": [ { "match": "(?<=(?:\\.\\*|\\.|->|->\\*))(?:(?:\\s)+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.property.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "#member_access" }, { "include": "#method_access" } ] }, "8": { "name": "variable.other.property.cpp" } } }, "memory_operators": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(delete)(?:(?:\\s)+)?(\\[\\])|(delete))|(new))(?!\\w))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.operator.wordlike.cpp" }, "4": { "name": "keyword.operator.delete.array.cpp" }, "5": { "name": "keyword.operator.delete.array.bracket.cpp" }, "6": { "name": "keyword.operator.delete.cpp" }, "7": { "name": "keyword.operator.new.cpp" } } }, "method_access": { "begin": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:(?:\\s)+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:(?:\\s)+)?)*)(?:(?:\\s)+)?(~?(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" }, "9": { "patterns": [ { "match": "(?<=(?:\\.\\*|\\.|->|->\\*))(?:(?:\\s)+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.property.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "#member_access" }, { "include": "#method_access" } ] }, "10": { "name": "entity.name.function.member.cpp" }, "11": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, "misc_keywords": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.other.$3.cpp" } } }, "ms_attributes": { "begin": "__declspec\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context" } ] }, { "match": "(using)(?:\\s)+((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<8>?)+>)(?:\\s)*+)?::)*\\s*+)(?:(?:\\s)+)?((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.namespace.cpp" }, "1": { "name": "keyword.other.namespace.definition.cpp storage.type.namespace.definition.cpp" } }, "endCaptures": {}, "name": "meta.block.namespace.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.namespace.cpp" } }, "name": "meta.head.namespace.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#attributes_context" }, { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<4>?)+>)(?:\\s)*+)?::)*\\s*+)(?:(?:\\s)+)?((?|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.namespace.cpp" } }, "name": "meta.body.namespace.cpp", "patterns": [{ "include": "$self" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.namespace.cpp", "patterns": [{ "include": "$self" }] } ] }, "noexcept_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.noexcept.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.noexcept.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.noexcept.cpp" } }, "contentName": "meta.arguments.operator.noexcept", "patterns": [{ "include": "#evaluation_context" }] }, "number_literal": { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)(operator)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)(?:(?:((?:(?:delete\\[\\])|(?:delete)|(?:new\\[\\])|(?:<=>)|(?:<<=)|(?:new)|(?:>>=)|(?:\\->\\*)|(?:\\/=)|(?:%=)|(?:&=)|(?:>=)|(?:\\|=)|(?:\\+\\+)|(?:\\-\\-)|(?:\\(\\))|(?:\\[\\])|(?:\\->)|(?:\\+\\+)|(?:<<)|(?:>>)|(?:\\-\\-)|(?:<=)|(?:\\^=)|(?:==)|(?:!=)|(?:&&)|(?:\\|\\|)|(?:\\+=)|(?:\\-=)|(?:\\*=)|,|(?:\\+)|(?:\\-)|!|~|(?:\\*)|&|(?:\\*)|(?:\\/)|%|(?:\\+)|(?:\\-)|<|>|&|(?:\\^)|(?:\\|)|=))|((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:\\[\\])?)))|(\"\")((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\<|\\()", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.operator-overload.cpp" }, "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [{ "include": "#inline_comment" }] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [{ "include": "#inline_comment" }] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [{ "include": "#inline_comment" }] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "patterns": [{ "include": "#inline_comment" }] }, "33": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "34": { "name": "comment.block.cpp" }, "35": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "36": { "name": "storage.type.modifier.calling-convention.cpp" }, "37": { "patterns": [{ "include": "#inline_comment" }] }, "38": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "39": { "name": "comment.block.cpp" }, "40": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "41": { "patterns": [{ "include": "#inline_comment" }] }, "42": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "43": { "name": "comment.block.cpp" }, "44": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "45": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.operator.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "entity.name.operator.type.reference.cpp" } ] }, "59": { "patterns": [{ "include": "#inline_comment" }] }, "60": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "61": { "name": "comment.block.cpp" }, "62": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "63": { "patterns": [{ "include": "#inline_comment" }] }, "64": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "65": { "name": "comment.block.cpp" }, "66": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "67": { "patterns": [{ "include": "#inline_comment" }] }, "68": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "69": { "name": "comment.block.cpp" }, "70": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "71": { "name": "entity.name.operator.type.array.cpp" }, "72": { "name": "entity.name.operator.custom-literal.cpp" }, "73": { "patterns": [{ "include": "#inline_comment" }] }, "74": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "75": { "name": "comment.block.cpp" }, "76": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "77": { "name": "entity.name.operator.custom-literal.cpp" }, "78": { "patterns": [{ "include": "#inline_comment" }] }, "79": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "80": { "name": "comment.block.cpp" }, "81": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "name": "meta.function.definition.special.operator-overload.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.operator-overload.cpp" } }, "name": "meta.head.function.definition.special.operator-overload.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#template_call_range" }, { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.operator-overload.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.operator-overload.cpp" } }, "contentName": "meta.function.definition.parameters.special.operator-overload", "patterns": [ { "include": "#function_parameter_context" }, { "include": "#evaluation_context" } ] }, { "include": "#qualifiers_and_specifiers_post_parameters" }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.operator-overload.cpp" } }, "name": "meta.body.function.definition.special.operator-overload.cpp", "patterns": [{ "include": "#function_body_context" }] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.operator-overload.cpp", "patterns": [{ "include": "$self" }] } ] }, "operators": { "patterns": [ { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.cpp" } }, "contentName": "meta.arguments.operator.sizeof", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignof.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignof.cpp" } }, "contentName": "meta.arguments.operator.alignof", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignas.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignas.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignas.cpp" } }, "contentName": "meta.arguments.operator.alignas", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.typeid.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.typeid.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.typeid.cpp" } }, "contentName": "meta.arguments.operator.typeid", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.noexcept.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.noexcept.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.noexcept.cpp" } }, "contentName": "meta.arguments.operator.noexcept", "patterns": [{ "include": "#evaluation_context" }] }, { "begin": "(\\bsizeof\\.\\.\\.)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.variadic.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.variadic.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.variadic.cpp" } }, "contentName": "meta.arguments.operator.sizeof.variadic", "patterns": [{ "include": "#evaluation_context" }] }, { "match": "--", "name": "keyword.operator.decrement.cpp" }, { "match": "\\+\\+", "name": "keyword.operator.increment.cpp" }, { "match": "%=|\\+=|-=|\\*=|(?>=|\\|=", "name": "keyword.operator.assignment.compound.bitwise.cpp" }, { "match": "<<|>>", "name": "keyword.operator.bitwise.shift.cpp" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.cpp" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.cpp" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.cpp" }, { "include": "#assignment_operator" }, { "match": "%|\\*|\\/|-|\\+", "name": "keyword.operator.cpp" }, { "include": "#ternary_operator" } ] }, "over_qualified_types": { "patterns": [ { "match": "(struct)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.struct.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "(enum)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.enum.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "(union)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.union.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "(class)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.class.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } } ] }, "parameter": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\w)", "end": "(?:(?=\\))|(,))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "name": "meta.parameter.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#function_pointer_parameter" }, { "include": "#decltype" }, { "include": "#vararg_ellipses" }, { "match": "((?:((?:(?:volatile)|(?:register)|(?:restrict)|(?:static)|(?:extern)|(?:const)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))+)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=,|\\)|=)", "captures": { "1": { "patterns": [{ "include": "#storage_types" }] }, "2": { "name": "storage.modifier.specifier.parameter.cpp" }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "12": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "13": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "14": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "15": { "name": "entity.name.type.parameter.cpp" }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#storage_types" }, { "include": "#scope_resolution_parameter_inner_generated" }, { "match": "(?:(?:struct)|(?:class)|(?:union)|(?:enum))", "name": "storage.type.$0.cpp" }, { "begin": "(?<==)", "end": "(?:(?=\\))|(,))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "match": "\\=", "name": "keyword.operator.assignment.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\)|,|\\[|=|\\n)", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.parameter.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#attributes_context" }, { "begin": "\\[", "end": "\\]|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.square.array.type.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square.array.type.cpp" } }, "name": "meta.bracket.square.array.cpp", "patterns": [{ "include": "#evaluation_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*))", "captures": { "0": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "parameter_class": { "match": "(class)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.class.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parameter_enum": { "match": "(enum)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.enum.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parameter_or_maybe_value": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\w)", "end": "(?:(?=\\))|(,))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "name": "meta.parameter.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#function_pointer_parameter" }, { "include": "#memory_operators" }, { "include": "#builtin_storage_type_initilizer" }, { "include": "#curly_initializer" }, { "include": "#decltype" }, { "include": "#vararg_ellipses" }, { "match": "((?:((?:(?:volatile)|(?:register)|(?:restrict)|(?:static)|(?:extern)|(?:const)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))+)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=,|\\)|=)", "captures": { "1": { "patterns": [{ "include": "#storage_types" }] }, "2": { "name": "storage.modifier.specifier.parameter.cpp" }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "12": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "13": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "14": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "15": { "name": "entity.name.type.parameter.cpp" }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#storage_types" }, { "include": "#function_call" }, { "include": "#scope_resolution_parameter_inner_generated" }, { "match": "(?:(?:struct)|(?:class)|(?:union)|(?:enum))", "name": "storage.type.$0.cpp" }, { "begin": "(?<==)", "end": "(?:(?=\\))|(,))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "patterns": [{ "include": "#evaluation_context" }] }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=(?:\\)|,|\\[|=|\\/\\/|(?:(?:\\n)|$)))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.parameter.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#attributes_context" }, { "begin": "\\[", "end": "\\]|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.square.array.type.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square.array.type.cpp" } }, "name": "meta.bracket.square.array.cpp", "patterns": [{ "include": "#evaluation_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*))", "captures": { "0": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#evaluation_context" } ] }, "parameter_struct": { "match": "(struct)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.struct.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parameter_union": { "match": "(union)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.union.parameter.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.parameter.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [{ "include": "#inline_comment" }] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [{ "include": "#inline_comment" }] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [{ "include": "#inline_comment" }] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parentheses": { "begin": "\\(", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.cpp" } }, "name": "meta.parens.cpp", "patterns": [ { "include": "#over_qualified_types" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?pragma\\b", "end": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?pragma(?:\\s)+mark)(?:\\s)+(.*)", "captures": { "1": { "name": "keyword.control.directive.pragma.pragma-mark.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "punctuation.definition.directive.cpp" }, "5": { "name": "entity.name.tag.pragma-mark.cpp" } }, "name": "meta.preprocessor.pragma.cpp" }, "predefined_macros": { "patterns": [ { "match": "\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMA|__FP_FAST_FMAF|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\b", "captures": { "1": { "name": "entity.name.other.preprocessor.macro.predefined.$1.cpp" } } }, { "match": "\\b__([A-Z_]+)__\\b", "name": "entity.name.other.preprocessor.macro.predefined.probably.$1.cpp" } ] }, "preprocessor_conditional_context": { "patterns": [ { "include": "#preprocessor_conditional_defined" }, { "include": "#comments" }, { "include": "#language_constants" }, { "include": "#string_context" }, { "include": "#d9bc4796b0b_preprocessor_number_literal" }, { "include": "#operators" }, { "include": "#predefined_macros" }, { "include": "#macro_name" }, { "include": "#line_continuation_character" } ] }, "preprocessor_conditional_defined": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?:(?:ifndef|ifdef)|if))", "end": "^(?!\\s*+#\\s*(?:else|endif))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "keyword.control.directive.conditional.$6.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "punctuation.definition.directive.cpp" }, "6": {} }, "endCaptures": {}, "patterns": [ { "begin": "\\G(?<=ifndef|ifdef|if)", "end": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "punctuation.definition.directive.cpp" } }, "name": "keyword.control.directive.$4.cpp" }, "preprocessor_context": { "patterns": [ { "include": "#pragma_mark" }, { "include": "#pragma" }, { "include": "#include" }, { "include": "#line" }, { "include": "#diagnostic" }, { "include": "#undef" }, { "include": "#preprocessor_conditional_range" }, { "include": "#single_line_macro" }, { "include": "#macro" }, { "include": "#preprocessor_conditional_standalone" }, { "include": "#macro_argument" } ] }, "qualified_type": { "match": "\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)?(?![\\w<:.])", "captures": { "0": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "1": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "patterns": [{ "include": "#inline_comment" }] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } }, "name": "meta.qualified_type.cpp" }, "qualifiers_and_specifiers_post_parameters": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.modifier.specifier.functional.post-parameters.$3.cpp" }, "4": { "patterns": [{ "include": "#inline_comment" }] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "scope_resolution": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [{ "include": "#scope_resolution_inner_generated" }] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_function_call": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_function_call_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.function.call.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" } } }, "scope_resolution_function_definition": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_function_definition_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.function.definition.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" } } }, "scope_resolution_function_definition_operator_overload": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_function_definition_operator_overload_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.function.definition.operator-overload.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" } } }, "scope_resolution_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [{ "include": "#scope_resolution_inner_generated" }] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" } } }, "scope_resolution_namespace_alias": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_alias_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_namespace_alias_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_alias_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.namespace.alias.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" } } }, "scope_resolution_namespace_block": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_block_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_namespace_block_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_block_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.namespace.block.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" } } }, "scope_resolution_namespace_using": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_using_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_namespace_using_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_using_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.namespace.using.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" } } }, "scope_resolution_parameter": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_parameter_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_parameter_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_parameter_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.parameter.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" } } }, "scope_resolution_template_call": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_template_call_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_template_call_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_template_call_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.template.call.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" } } }, "scope_resolution_template_definition": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" }, "2": { "patterns": [{ "include": "#template_call_range" }] } } }, "scope_resolution_template_definition_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" }, "3": { "patterns": [{ "include": "#template_call_range" }] }, "4": {}, "5": { "name": "entity.name.scope-resolution.template.definition.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_range" }] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" } } }, "semicolon": { "match": ";", "name": "punctuation.terminator.statement.cpp" }, "simple_type": { "match": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)?(?![\\w<:.]))(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?", "captures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": {}, "13": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "14": { "patterns": [{ "include": "#inline_comment" }] }, "15": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "single_line_macro": { "match": "^((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))#define.*(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "sizeof_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.cpp" } }, "contentName": "meta.arguments.operator.sizeof", "patterns": [{ "include": "#evaluation_context" }] }, "sizeof_variadic_operator": { "begin": "(\\bsizeof\\.\\.\\.)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.variadic.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.variadic.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.variadic.cpp" } }, "contentName": "meta.arguments.operator.sizeof.variadic", "patterns": [{ "include": "#evaluation_context" }] }, "square_brackets": { "name": "meta.bracket.square.access", "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))?(\\[)(?!\\])", "beginCaptures": { "1": { "name": "variable.other.object" }, "2": { "name": "punctuation.definition.begin.bracket.square" } }, "end": "\\]|(?=\\\\end\\{(?:minted|cppcode)\\})", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square" } }, "patterns": [{ "include": "#evaluation_context" }] }, "standard_declares": { "patterns": [ { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.struct.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.union.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.enum.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.class.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } } ] }, "static_assert": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "keyword.other.static_assert.cpp" }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "name": "punctuation.section.arguments.begin.bracket.round.static_assert.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.static_assert.cpp" } }, "patterns": [ { "begin": "(,)(?:(?:\\s)+)?(?=(?:L|u8|u|U(?:(?:\\s)+)?\\\")?)", "end": "(?=\\))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "endCaptures": {}, "name": "meta.static_assert.message.cpp", "patterns": [{ "include": "#string_context" }] }, { "include": "#evaluation_context" } ] }, "std_space": { "match": "(?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))", "captures": { "0": { "patterns": [{ "include": "#inline_comment" }] }, "1": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "storage_specifiers": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.modifier.specifier.$3.cpp" } } }, "storage_types": { "patterns": [ { "include": "#storage_specifiers" }, { "include": "#inline_builtin_storage_type" }, { "include": "#decltype" }, { "include": "#typename" } ] }, "string_context": { "patterns": [ { "begin": "((?:u|u8|U|L)?)\"", "end": "\"|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cpp" }, "1": { "name": "meta.encoding.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.cpp" } }, "name": "string.quoted.double.cpp", "patterns": [ { "match": "(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8})", "name": "constant.character.escape.cpp" }, { "match": "\\\\['\"?\\\\abfnrtv]", "name": "constant.character.escape.cpp" }, { "match": "\\\\[0-7]{1,3}", "name": "constant.character.escape.cpp" }, { "match": "(?:(\\\\x0*[0-9a-fA-F]{2}(?![0-9a-fA-F]))|((?:\\\\x[0-9a-fA-F]*|\\\\x)))", "captures": { "1": { "name": "constant.character.escape.cpp" }, "2": { "name": "invalid.illegal.unknown-escape.cpp" } } }, { "include": "#string_escapes_context_c" } ] }, { "begin": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.struct.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.struct.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.struct.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.struct.cpp" } }, "name": "meta.head.struct.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.struct.cpp" } }, "name": "meta.body.struct.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.struct.cpp", "patterns": [{ "include": "$self" }] } ] }, "struct_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.struct.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "switch_conditional_parentheses": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.conditional.switch.cpp" } }, "name": "meta.conditional.switch.cpp", "patterns": [ { "include": "#evaluation_context" }, { "include": "#c_conditional_context" } ] }, "switch_statement": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.switch.cpp" }, "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "keyword.control.switch.cpp" } }, "endCaptures": {}, "name": "meta.block.switch.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.switch.cpp" } }, "name": "meta.head.switch.cpp", "patterns": [ { "include": "#switch_conditional_parentheses" }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.switch.cpp" } }, "name": "meta.body.switch.cpp", "patterns": [ { "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "$self" }, { "include": "#block_innards" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.switch.cpp", "patterns": [{ "include": "$self" }] } ] }, "template_argument_defaulted": { "match": "(?<=<|,)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s)+)*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?([=])", "captures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "entity.name.type.template.cpp" }, "3": { "name": "keyword.operator.assignment.cpp" } } }, "template_call_context": { "patterns": [ { "include": "#ever_present_context" }, { "include": "#template_call_range" }, { "include": "#storage_types" }, { "include": "#language_constants" }, { "include": "#scope_resolution_template_call_inner_generated" }, { "include": "#operators" }, { "include": "#number_literal" }, { "include": "#string_context" }, { "include": "#comma_in_template_argument" }, { "include": "#qualified_type" } ] }, "template_call_innards": { "match": "((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<1>?)+>)(?:\\s)*+", "captures": { "0": { "patterns": [{ "include": "#template_call_range" }] } }, "name": "meta.template.call.cpp" }, "template_call_range": { "begin": "<", "end": ">|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, "template_definition": { "begin": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "punctuation.section.angle-brackets.start.template.definition.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.definition.cpp" } }, "name": "meta.template.definition.cpp", "patterns": [ { "begin": "(?<=\\w)(?:(?:\\s)+)?<", "end": ">|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "patterns": [{ "include": "#template_call_context" }] }, { "include": "#template_definition_context" } ] }, "template_definition_argument": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)|((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s)+)+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))|((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?(\\.\\.\\.)(?:(?:\\s)+)?((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))(?:(?:\\s)+)?(?:(,)|(?=>|$))", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.type.template.argument.$3.cpp" }, "4": { "patterns": [ { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "storage.type.template.argument.$0.cpp" } ] }, "5": { "name": "entity.name.type.template.cpp" }, "6": { "name": "storage.type.template.cpp" }, "7": { "name": "punctuation.vararg-ellipses.template.definition.cpp" }, "8": { "name": "entity.name.type.template.cpp" }, "9": { "name": "punctuation.separator.delimiter.comma.template.argument.cpp" } } }, "template_definition_context": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" }, { "include": "#template_definition_argument" }, { "include": "#template_argument_defaulted" }, { "include": "#template_call_innards" }, { "include": "#evaluation_context" } ] }, "template_isolated_definition": { "match": "(?(?:(?:\\s)+)?$)", "captures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "punctuation.section.angle-brackets.start.template.definition.cpp" }, "3": { "name": "meta.template.definition.cpp", "patterns": [{ "include": "#template_definition_context" }] }, "4": { "name": "punctuation.section.angle-brackets.end.template.definition.cpp" } } }, "ternary_operator": { "begin": "\\?", "end": ":|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "keyword.operator.ternary.cpp" } }, "endCaptures": { "0": { "name": "keyword.operator.ternary.cpp" } }, "patterns": [ { "include": "#ever_present_context" }, { "include": "#string_context" }, { "include": "#number_literal" }, { "include": "#method_access" }, { "include": "#member_access" }, { "include": "#predefined_macros" }, { "include": "#operators" }, { "include": "#memory_operators" }, { "include": "#wordlike_operators" }, { "include": "#type_casting_operators" }, { "include": "#control_flow_keywords" }, { "include": "#exception_keywords" }, { "include": "#the_this_keyword" }, { "include": "#language_constants" }, { "include": "#builtin_storage_type_initilizer" }, { "include": "#qualifiers_and_specifiers_post_parameters" }, { "include": "#functional_specifiers_pre_parameters" }, { "include": "#storage_types" }, { "include": "#lambdas" }, { "include": "#attributes_context" }, { "include": "#parentheses" }, { "include": "#function_call" }, { "include": "#scope_resolution_inner_generated" }, { "include": "#square_brackets" }, { "include": "#semicolon" }, { "include": "#comma" } ], "applyEndPatternLast": 1 }, "the_this_keyword": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "variable.language.this.cpp" } } }, "type_alias": { "match": "(using)(?:(?:\\s)+)?(?!namespace)(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)?(?![\\w<:.]))(?:(?:\\s)+)?(\\=)(?:(?:\\s)+)?((?:typename)?)(?:(?:\\s)+)?((?:(?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)?(?![\\w<:.]))|(.*(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)?(?:(?:\\s)+)?(?:(;)|\\n)", "captures": { "1": { "name": "keyword.other.using.directive.cpp" }, "2": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "3": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "4": { "patterns": [{ "include": "#inline_comment" }] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "keyword.operator.assignment.cpp" }, "15": { "name": "keyword.other.typename.cpp" }, "16": { "patterns": [{ "include": "#storage_specifiers" }] }, "17": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "18": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "19": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "20": { "patterns": [{ "include": "#inline_comment" }] }, "21": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "22": { "patterns": [{ "include": "#inline_comment" }] }, "23": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "24": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "30": { "name": "meta.declaration.type.alias.value.unknown.cpp", "patterns": [{ "include": "#evaluation_context" }] }, "31": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "32": { "patterns": [{ "include": "#inline_comment" }] }, "33": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "34": { "patterns": [{ "include": "#inline_comment" }] }, "35": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "36": { "patterns": [{ "include": "#inline_comment" }] }, "37": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "38": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "39": { "patterns": [{ "include": "#evaluation_context" }] }, "40": { "name": "punctuation.definition.end.bracket.square.cpp" }, "41": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.declaration.type.alias.cpp" }, "type_casting_operators": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.operator.wordlike.cpp keyword.operator.cast.$3.cpp" } } }, "typedef_class": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.class.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "name": "meta.head.class.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "name": "meta.body.class.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.class.cpp", "patterns": [ { "match": "(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typedef_function_pointer": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [{ "include": "#inline_comment" }] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [{ "include": "#inline_comment" }] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [{ "include": "#inline_comment" }] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [{ "include": "#inline_comment" }] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "entity.name.type.alias.cpp entity.name.type.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [{ "include": "#evaluation_context" }] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [{ "include": "#function_parameter_context" }] } ] }, "typedef_struct": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.struct.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.struct.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.struct.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.struct.cpp" } }, "name": "meta.head.struct.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.struct.cpp" } }, "name": "meta.body.struct.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.struct.cpp", "patterns": [ { "match": "(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typedef_union": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.union.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.union.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.union.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.union.cpp" } }, "name": "meta.head.union.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.union.cpp" } }, "name": "meta.body.union.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.union.cpp", "patterns": [ { "match": "(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typeid_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.typeid.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.typeid.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.typeid.cpp" } }, "contentName": "meta.arguments.operator.typeid", "patterns": [{ "include": "#evaluation_context" }] }, "typename": { "match": "(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|atomic_commit|atomic_cancel|__has_include|synchronized|dynamic_cast|thread_local|static_cast|const_cast|co_return|constexpr|constexpr|constexpr|co_return|protected|namespace|consteval|noexcept|decltype|template|operator|noexcept|co_yield|co_await|reflexpr|continue|co_await|co_yield|requires|volatile|register|restrict|explicit|volatile|noexcept|typename|default|_Pragma|mutable|include|concept|alignas|virtual|alignof|__asm__|defined|mutable|typedef|warning|private|and_eq|define|pragma|typeid|switch|bitand|return|ifndef|export|struct|sizeof|module|static|public|extern|inline|friend|delete|xor_eq|import|not_eq|class|compl|bitor|throw|or_eq|while|catch|break|union|const|const|endif|ifdef|undef|error|using|else|line|goto|else|elif|this|enum|case|new|asm|not|try|for|and|xor|or|if|do|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<17>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:atomic_commit)|(?:atomic_cancel)|(?:__has_include)|(?:dynamic_cast)|(?:synchronized)|(?:thread_local)|(?:static_cast)|(?:const_cast)|(?:constexpr)|(?:consteval)|(?:co_return)|(?:co_return)|(?:constexpr)|(?:protected)|(?:constexpr)|(?:namespace)|(?:noexcept)|(?:typename)|(?:decltype)|(?:template)|(?:operator)|(?:noexcept)|(?:co_yield)|(?:co_await)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:reflexpr)|(?:noexcept)|(?:requires)|(?:alignas)|(?:typedef)|(?:nullptr)|(?:alignof)|(?:mutable)|(?:concept)|(?:virtual)|(?:defined)|(?:__asm__)|(?:include)|(?:_Pragma)|(?:mutable)|(?:default)|(?:warning)|(?:private)|(?:module)|(?:return)|(?:not_eq)|(?:xor_eq)|(?:and_eq)|(?:ifndef)|(?:pragma)|(?:export)|(?:import)|(?:sizeof)|(?:static)|(?:delete)|(?:public)|(?:define)|(?:extern)|(?:inline)|(?:typeid)|(?:switch)|(?:friend)|(?:bitand)|(?:false)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:line)|(?:else)|(?:elif)|(?:true)|(?:NULL)|(?:case)|(?:goto)|(?:else)|(?:this)|(?:new)|(?:asm)|(?:not)|(?:and)|(?:xor)|(?:try)|(?:for)|(?:if)|(?:do)|(?:or)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<17>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "storage.modifier.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "patterns": [{ "include": "#inline_comment" }] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [{ "include": "#template_call_context" }] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "7": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": {} } }, "undef": { "match": "(^((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?undef\\b)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "punctuation.definition.directive.cpp" }, "5": { "patterns": [{ "include": "#inline_comment" }] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "name": "entity.name.function.preprocessor.cpp" } }, "name": "meta.preprocessor.undef.cpp" }, "union_block": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": { "0": { "name": "meta.head.union.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.union.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [{ "include": "#inline_comment" }] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [{ "include": "#inline_comment" }] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [{ "include": "#inline_comment" }] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.union.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.union.cpp" } }, "name": "meta.head.union.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.union.cpp" } }, "name": "meta.body.union.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=\\\\end\\{(?:minted|cppcode)\\})", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.union.cpp", "patterns": [{ "include": "$self" }] } ] }, "union_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.union.declare.cpp" }, "2": { "patterns": [{ "include": "#inline_comment" }] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [{ "include": "#inline_comment" }] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [{ "include": "#inline_comment" }] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [{ "include": "#inline_comment" }] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [{ "include": "#inline_comment" }] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [{ "include": "#inline_comment" }] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "using_name": { "match": "(using)(?:\\s)+(?!namespace\\b)", "captures": { "1": { "name": "keyword.other.using.directive.cpp" } } }, "using_namespace": { "begin": "(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<6>?)+>)(?:\\s)*+)?::)*\\s*+)?((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\n)|$)", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#comments" }, { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\(", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.other.asm.label.cpp" }, "6": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": ":", "name": "punctuation.separator.delimiter.colon.assembly.cpp" }, { "include": "#comments" } ] } ] }, "attributes_context": { "patterns": [ { "include": "#cpp_attributes" }, { "include": "#gcc_attributes" }, { "include": "#ms_attributes" }, { "include": "#alignas_attribute" } ] }, "block": { "begin": "{", "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, { "match": "(\\/\\*[!*]+(?=\\s))(.+)([!*]*\\*\\/)", "captures": { "1": { "name": "punctuation.definition.comment.begin.documentation.cpp" }, "2": { "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, "3": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "name": "comment.block.documentation.cpp" }, { "begin": "(?:(?:\\s)+)?+\\/\\*[!*]+(?:(?:(?:\\n)|$)|(?=\\s))", "end": "[!*]*\\*\\/|(?=(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, { "include": "source.cpp#emacs_file_banner" }, { "include": "#block_comment" }, { "include": "#line_comment" }, { "include": "source.cpp#invalid_comment_end" } ] }, "constructor_inline": { "begin": "^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:constexpr)|(?:consteval)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "include": "source.cpp#functional_specifiers_pre_parameters" }, { "begin": ":", "end": "(?=\\{)|(?=(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?(\\()", "end": "\\)|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)(((?>(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))::((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\14((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\())", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "include": "source.cpp#functional_specifiers_pre_parameters" }, { "begin": ":", "end": "(?=\\{)|(?=(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?(\\()", "end": "\\)|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\{)", "end": "\\}|(?=(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:constexpr)|(?:consteval)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)(~(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "begin": "\\(", "end": "\\)|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)(((?>(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))::((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))~\\14((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\())", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "begin": "\\(", "end": "\\)|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?:error|warning)))\\b(?:(?:\\s)+)?", "end": "(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?(::))?(?:(?:\\s)+)?((?|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(extern)(?=\\s*\\\")", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?(\\()", "end": "\\)|(?=(?))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)(?:\\s)*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\()", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.modifier.$1.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "storage.modifier.$12.cpp" }, "13": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "14": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "15": { "name": "comment.block.cpp" }, "16": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "17": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "36": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "37": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "38": { "name": "comment.block.cpp" }, "39": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "40": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "41": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "42": { "name": "comment.block.cpp" }, "43": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "44": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "45": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "46": { "name": "comment.block.cpp" }, "47": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "48": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "49": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "50": { "name": "comment.block.cpp" }, "51": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "52": { "name": "storage.type.modifier.calling-convention.cpp" }, "53": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "54": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "55": { "name": "comment.block.cpp" }, "56": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "57": { "patterns": [ { "include": "source.cpp#scope_resolution_function_definition_inner_generated" } ] }, "58": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "59": { "patterns": [ { "include": "#template_call_range" } ] }, "60": {}, "61": { "name": "entity.name.function.definition.cpp" }, "62": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "63": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "64": { "name": "comment.block.cpp" }, "65": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "name": "meta.function.definition.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<23>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<23>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "punctuation.definition.function.return-type.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()|(?=(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "variable.other.definition.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [ { "include": "#evaluation_context" } ] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [ { "include": "#function_parameter_context" } ] }, "function_pointer_parameter": { "begin": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()|(?=(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "variable.parameter.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [ { "include": "#evaluation_context" } ] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [ { "include": "#function_parameter_context" } ] }, "gcc_attributes": { "begin": "__attribute(?:__)?\\s*\\(\\s*\\(", "end": "\\)\\s*\\)|(?=(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "5": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": {} } } ] }, "lambdas": { "begin": "(?:(?<=[^\\s]|^)(?])|(?<=\\Wreturn|^return))(?:(?:\\s)+)?(\\[(?!\\[| *+\"| *+\\d))((?:[^\\[\\]]|((??)++\\]))*+)(\\](?!((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))[\\[\\];]))", "end": "(?<=[;}])|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?=\\]|\\z|$)|(,))|(\\=))", "captures": { "1": { "name": "variable.parameter.capture.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.separator.delimiter.comma.cpp" }, "7": { "name": "keyword.operator.assignment.cpp" } } }, { "include": "#evaluation_context" } ] }, "3": {}, "4": { "name": "punctuation.definition.capture.end.lambda.cpp" }, "5": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "patterns": [ { "begin": "\\(", "end": "\\)|(?=(?)((?:.+?(?=\\{|$))?)", "captures": { "1": { "name": "punctuation.definition.lambda.return-type.cpp" }, "2": { "name": "storage.type.return-type.lambda.cpp" } } }, { "begin": "\\{", "end": "\\}|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?line\\b", "end": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?define\\b)(?:(?:\\s)+)?((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:(?:\\s)+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:(?:\\s)+)?)*)(?:(?:\\s)+)?(~?(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?(\\()", "end": "\\)|(?=(?|->\\*))(?:(?:\\s)+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.property.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "source.cpp#member_access" }, { "include": "#method_access" } ] }, "10": { "name": "entity.name.function.member.cpp" }, "11": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, "ms_attributes": { "begin": "__declspec\\(", "end": "\\)|(?=(?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<4>?)+>)(?:\\s)*+)?::)*\\s*+)(?:(?:\\s)+)?((?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)(operator)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)(?:(?:((?:(?:delete\\[\\])|(?:delete)|(?:new\\[\\])|(?:new)|(?:\\->\\*)|(?:<<=)|(?:>>=)|(?:<=>)|(?:\\+\\+)|(?:\\-\\-)|(?:\\(\\))|(?:\\[\\])|(?:\\->)|(?:\\+\\+)|(?:\\-\\-)|(?:<<)|(?:>>)|(?:<=)|(?:>=)|(?:==)|(?:!=)|(?:&&)|(?:\\|\\|)|(?:\\+=)|(?:\\-=)|(?:\\*=)|(?:\\/=)|(?:%=)|(?:&=)|(?:\\^=)|(?:\\|=)|(?:\\+)|(?:\\-)|!|~|(?:\\*)|&|(?:\\*)|(?:\\/)|%|(?:\\+)|(?:\\-)|<|>|&|(?:\\^)|(?:\\|)|=|,))|((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:\\[\\])?)))|(\"\")((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\<|\\()", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "33": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "34": { "name": "comment.block.cpp" }, "35": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "36": { "name": "storage.type.modifier.calling-convention.cpp" }, "37": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "38": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "39": { "name": "comment.block.cpp" }, "40": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "41": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "42": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "43": { "name": "comment.block.cpp" }, "44": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "45": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.operator.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "entity.name.operator.type.reference.cpp" } ] }, "59": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "60": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "61": { "name": "comment.block.cpp" }, "62": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "63": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "64": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "65": { "name": "comment.block.cpp" }, "66": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "67": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "68": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "69": { "name": "comment.block.cpp" }, "70": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "71": { "name": "entity.name.operator.type.array.cpp" }, "72": { "name": "entity.name.operator.custom-literal.cpp" }, "73": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "74": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "75": { "name": "comment.block.cpp" }, "76": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "77": { "name": "entity.name.operator.custom-literal.cpp" }, "78": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "79": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "80": { "name": "comment.block.cpp" }, "81": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "name": "meta.function.definition.special.operator-overload.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?>=|\\|=", "name": "keyword.operator.assignment.compound.bitwise.cpp" }, { "match": "<<|>>", "name": "keyword.operator.bitwise.shift.cpp" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.cpp" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.cpp" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.bitwise.cpp" }, { "include": "source.cpp#assignment_operator" }, { "match": "%|\\*|\\/|-|\\+", "name": "keyword.operator.arithmetic.cpp" }, { "include": "#ternary_operator" } ] }, "parameter": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\w)", "end": "(?:(?=\\))|(,))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))+)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=,|\\)|=)", "captures": { "1": { "patterns": [ { "include": "#storage_types" } ] }, "2": { "name": "storage.modifier.specifier.parameter.cpp" }, "3": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "12": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "13": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "14": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "15": { "name": "entity.name.type.parameter.cpp" }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#storage_types" }, { "include": "source.cpp#scope_resolution_parameter_inner_generated" }, { "match": "(?:(?:struct)|(?:class)|(?:union)|(?:enum))", "name": "storage.type.$0.cpp" }, { "begin": "(?<==)", "end": "(?:(?=\\))|(,))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\)|,|\\[|=|\\n)", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.parameter.cpp" }, "6": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#attributes_context" }, { "begin": "\\[", "end": "\\]|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*))", "captures": { "0": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "parameter_or_maybe_value": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\w)", "end": "(?:(?=\\))|(,))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))+)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=,|\\)|=)", "captures": { "1": { "patterns": [ { "include": "#storage_types" } ] }, "2": { "name": "storage.modifier.specifier.parameter.cpp" }, "3": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "12": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "13": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "14": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "15": { "name": "entity.name.type.parameter.cpp" }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#storage_types" }, { "include": "#function_call" }, { "include": "source.cpp#scope_resolution_parameter_inner_generated" }, { "match": "(?:(?:struct)|(?:class)|(?:union)|(?:enum))", "name": "storage.type.$0.cpp" }, { "begin": "(?<==)", "end": "(?:(?=\\))|(,))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=(?:\\)|,|\\[|=|\\/\\/|(?:(?:\\n)|$)))", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.parameter.cpp" }, "6": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#attributes_context" }, { "begin": "\\[", "end": "\\]|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*))", "captures": { "0": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#evaluation_context" } ] }, "parentheses": { "begin": "\\(", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?pragma\\b", "end": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?:(?:ifndef|ifdef)|if))", "end": "^(?!\\s*+#\\s*(?:else|endif))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.struct.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.struct.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?|\\?\\?>)|(?=[;>\\[\\]=]))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?|(?=(?|(?=(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typedef_function_pointer": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()|(?=(?|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "entity.name.type.alias.cpp entity.name.type.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [ { "include": "#evaluation_context" } ] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [ { "include": "#function_parameter_context" } ] } ] }, "typedef_struct": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.struct.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.struct.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typedef_union": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.union.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.union.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typeid_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))|(?=(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.union.cpp" }, "2": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "source.cpp#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.union.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))|(?=(?|\\?\\?>|(?=(?|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)|(?=(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<6>?)+>)(?:\\s)*+)?::)*\\s*+)?((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(((?:(?:protected)|(?:private)|(?:public)))(?:(?:\\s)+)?(:))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.type.modifier.access.control.$4.cpp" }, "4": {}, "5": { "name": "punctuation.separator.colon.access.control.cpp" } } }, "alignas_attribute": { "begin": "alignas\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)", "beginCaptures": {}, "endCaptures": {}, "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context" } ] }, { "match": "(using)(?:\\s)+((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignas.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignas.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignas.cpp" } }, "contentName": "meta.arguments.operator.alignas", "patterns": [ { "include": "#evaluation_context" } ] }, "alignof_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignof.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignof.cpp" } }, "contentName": "meta.arguments.operator.alignof", "patterns": [ { "include": "#evaluation_context" } ] }, "assembly": { "begin": "(\\b(?:__asm__|asm)\\b)(?:(?:\\s)+)?((?:volatile)?)", "end": "(?!\\G)", "beginCaptures": { "1": { "name": "storage.type.asm.cpp" }, "2": { "name": "storage.modifier.cpp" } }, "endCaptures": {}, "name": "meta.asm.cpp", "patterns": [ { "match": "^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\n)|$)", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#comments" }, { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.cpp" } }, "patterns": [ { "begin": "(R?)(\")", "end": "\"", "beginCaptures": { "1": { "name": "meta.encoding.cpp" }, "2": { "name": "punctuation.definition.string.begin.assembly.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.assembly.cpp" } }, "name": "string.quoted.double.cpp", "contentName": "meta.embedded.assembly", "patterns": [ { "include": "source.asm" }, { "include": "source.x86" }, { "include": "source.x86_64" }, { "include": "source.arm" }, { "include": "#backslash_escapes" }, { "include": "#string_escaped_char" } ] }, { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.assembly.inner.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "\\[((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.other.asm.label.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": ":", "name": "punctuation.separator.delimiter.colon.assembly.cpp" }, { "include": "#comments" } ] } ] }, "assignment_operator": { "match": "\\=", "name": "keyword.operator.assignment.cpp" }, "attributes_context": { "patterns": [ { "include": "#cpp_attributes" }, { "include": "#gcc_attributes" }, { "include": "#ms_attributes" }, { "include": "#alignas_attribute" } ] }, "backslash_escapes": { "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3][0-7]{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", "name": "constant.character.escape" }, "block": { "begin": "{", "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.cpp" } }, "name": "meta.block.cpp", "patterns": [ { "include": "#function_body_context" } ] }, "block_comment": { "begin": "\\s*+(\\/\\*)", "end": "\\*\\/", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.cpp" } }, "name": "comment.block.cpp" }, "builtin_storage_type_initilizer": { "begin": "(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.class.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "name": "meta.head.class.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "name": "meta.body.class.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.class.cpp", "patterns": [ { "include": "$self" } ] } ] }, "class_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.class.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "comma": { "match": ",", "name": "punctuation.separator.delimiter.comma.cpp" }, "comma_in_template_argument": { "match": ",", "name": "punctuation.separator.delimiter.comma.template.argument.cpp" }, "comments": { "patterns": [ { "begin": "^(?:(?:\\s)+)?+(\\/\\/[!\\/]+)", "end": "(?<=\\n)(?|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, { "match": "(\\/\\*[!*]+(?=\\s))(.+)([!*]*\\*\\/)", "captures": { "1": { "name": "punctuation.definition.comment.begin.documentation.cpp" }, "2": { "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, "3": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "name": "comment.block.documentation.cpp" }, { "begin": "(?:(?:\\s)+)?+\\/\\*[!*]+(?:(?:(?:\\n)|$)|(?=\\s))", "end": "[!*]*\\*\\/", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.documentation.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.documentation.cpp" } }, "name": "comment.block.documentation.cpp", "patterns": [ { "match": "(?<=[\\s*!\\/])[\\\\@](?:callergraph|callgraph|else|endif|f\\$|f\\[|f\\]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|\\$|\\#|<|>|%|\"|\\.|=|::|\\||\\-\\-|\\-\\-\\-)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:a|em|e))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.italic.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@]b)(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.bold.doxygen.cpp" } } }, { "match": "((?<=[\\s*!\\/])[\\\\@](?:c|p))(?:\\s)+(\\S+)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "name": "markup.inline.raw.string.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:a|anchor|b|c|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|e|em|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "((?<=[\\s*!\\/])[\\\\@]param)(?:\\s*\\[((?:,?(?:(?:\\s)+)?(?:in|out)(?:(?:\\s)+)?)+)\\])?(?:\\s)+(\\b\\w+\\b)", "captures": { "1": { "name": "storage.type.class.doxygen.cpp" }, "2": { "patterns": [ { "match": "in|out", "name": "keyword.other.parameter.direction.$0.cpp" } ] }, "3": { "name": "variable.parameter.cpp" } } }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:arg|attention|author|authors|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remark|remarks|result|return|returns|retval|sa|see|short|since|test|throw|throws|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?<=[\\s*!\\/])[\\\\@](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|startuml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*\\})?", "name": "storage.type.class.doxygen.cpp" }, { "match": "(?:\\b[A-Z]+:|@[a-z_]+:)", "name": "storage.type.class.gtkdoc.cpp" } ] }, { "include": "#emacs_file_banner" }, { "include": "#block_comment" }, { "include": "#line_comment" }, { "include": "#invalid_comment_end" } ] }, "constructor_inline": { "begin": "^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:constexpr)|(?:consteval)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [ { "include": "#functional_specifiers_pre_parameters" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "storage.type.modifier.calling-convention.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "17": { "name": "comment.block.cpp" }, "18": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "19": { "name": "entity.name.function.constructor.cpp entity.name.function.definition.special.constructor.cpp" } }, "endCaptures": {}, "name": "meta.function.definition.special.constructor.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.head.function.definition.special.constructor.cpp", "patterns": [ { "include": "#ever_present_context" }, { "match": "(\\=)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "include": "#functional_specifiers_pre_parameters" }, { "begin": ":", "end": "(?=\\{)", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "endCaptures": {}, "patterns": [ { "begin": "((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "3": {}, "4": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.body.function.definition.special.constructor.cpp", "patterns": [ { "include": "#function_body_context" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [ { "include": "$self" } ] } ] }, "constructor_root": { "begin": "\\s*+((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)(((?>(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))::((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\14((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\())", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.constructor.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.modifier.calling-convention.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.constructor.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "include": "#functional_specifiers_pre_parameters" }, { "begin": ":", "end": "(?=\\{)", "beginCaptures": { "0": { "name": "punctuation.separator.initializers.cpp" } }, "endCaptures": {}, "patterns": [ { "begin": "((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "entity.name.function.call.initializer.cpp" }, "2": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "3": {}, "4": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.initializer.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.initializer.cpp" } }, "contentName": "meta.parameter.initialization", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.constructor.cpp" } }, "name": "meta.body.function.definition.special.constructor.cpp", "patterns": [ { "include": "#function_body_context" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.constructor.cpp", "patterns": [ { "include": "$self" } ] } ] }, "control_flow_keywords": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.$3.cpp" } } }, "cpp_attributes": { "begin": "\\[\\[", "end": "\\]\\]", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)", "beginCaptures": {}, "endCaptures": {}, "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context" } ] }, { "match": "(using)(?:\\s)+((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\{)", "end": "\\}", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((import))(?:(?:\\s)+)?(?:(?:(?:((<)[^>]*(>?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/)))|((\\\")[^\\\"]*((?:\\\")?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/))))|(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\.(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)*((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;)))))|((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;))))(?:(?:\\s)+)?(;?)", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.directive.import.cpp" }, "5": { "name": "string.quoted.other.lt-gt.include.cpp" }, "6": { "name": "punctuation.definition.string.begin.cpp" }, "7": { "name": "punctuation.definition.string.end.cpp" }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "name": "string.quoted.double.include.cpp" }, "11": { "name": "punctuation.definition.string.begin.cpp" }, "12": { "name": "punctuation.definition.string.end.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "15": { "name": "entity.name.other.preprocessor.macro.include.cpp" }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "18": { "patterns": [ { "include": "#inline_comment" } ] }, "19": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "20": { "patterns": [ { "include": "#inline_comment" } ] }, "21": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "22": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.preprocessor.import.cpp" }, "d9bc4796b0b_preprocessor_number_literal": { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.decltype.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.decltype.cpp" } }, "contentName": "meta.arguments.decltype", "patterns": [ { "include": "#evaluation_context" } ] }, "decltype_specifier": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.other.decltype.cpp storage.type.decltype.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.decltype.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.decltype.cpp" } }, "contentName": "meta.arguments.decltype", "patterns": [ { "include": "#evaluation_context" } ] }, "default_statement": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:constexpr)|(?:consteval)|(?:explicit)|(?:mutable)|(?:virtual)|(?:inline)|(?:friend))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)(~(?|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.member.destructor.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "9": { "name": "storage.type.modifier.calling-convention.cpp" }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "patterns": [ { "include": "#functional_specifiers_pre_parameters" } ] }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "17": { "name": "comment.block.cpp" }, "18": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "19": { "name": "entity.name.function.destructor.cpp entity.name.function.definition.special.member.destructor.cpp" } }, "endCaptures": {}, "name": "meta.function.definition.special.member.destructor.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.member.destructor.cpp" } }, "name": "meta.head.function.definition.special.member.destructor.cpp", "patterns": [ { "include": "#ever_present_context" }, { "match": "(\\=)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.member.destructor.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.member.destructor.cpp" } }, "contentName": "meta.function.definition.parameters.special.member.destructor", "patterns": [] }, { "match": "((?:(?:final)|(?:override)))+", "captures": { "1": { "name": "keyword.operator.wordlike.cpp keyword.operator.$1.cpp" } } }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.member.destructor.cpp" } }, "name": "meta.body.function.definition.special.member.destructor.cpp", "patterns": [ { "include": "#function_body_context" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.member.destructor.cpp", "patterns": [ { "include": "$self" } ] } ] }, "destructor_root": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)(((?>(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))::((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))~\\14((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\())", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.member.destructor.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.modifier.calling-convention.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.destructor.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(default)|(delete))", "captures": { "1": { "name": "keyword.operator.assignment.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "keyword.other.default.constructor.cpp" }, "7": { "name": "keyword.other.delete.constructor.cpp" } } }, { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.member.destructor.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.member.destructor.cpp" } }, "contentName": "meta.function.definition.parameters.special.member.destructor", "patterns": [] }, { "match": "((?:(?:final)|(?:override)))+", "captures": { "1": { "name": "keyword.operator.wordlike.cpp keyword.operator.$1.cpp" } } }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.member.destructor.cpp" } }, "name": "meta.body.function.definition.special.member.destructor.cpp", "patterns": [ { "include": "#function_body_context" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.member.destructor.cpp", "patterns": [ { "include": "$self" } ] } ] }, "diagnostic": { "begin": "(^((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?:error|warning)))\\b(?:(?:\\s)+)?", "end": "(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?(::))?(?:(?:\\s)+)?((?|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.enum.cpp" }, "1": { "name": "storage.type.enum.cpp" }, "2": { "name": "storage.type.enum.enum-key.$2.cpp" }, "3": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "4": { "name": "entity.name.type.enum.cpp" }, "5": { "name": "punctuation.separator.colon.type-specifier.cpp" }, "6": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, "7": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "8": { "patterns": [ { "include": "#template_call_range" } ] }, "9": {}, "10": { "name": "entity.name.scope-resolution.cpp" }, "11": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "12": {}, "13": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "14": { "name": "storage.type.integral.$14.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.enum.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.enum.cpp" } }, "name": "meta.head.enum.cpp", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.enum.cpp" } }, "name": "meta.body.enum.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#enumerator_list" }, { "include": "#comments" }, { "include": "#comma" }, { "include": "#semicolon" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.enum.cpp", "patterns": [ { "include": "$self" } ] } ] }, "enum_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.enum.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "enumerator_list": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.exception.$3.cpp" } } }, "extern_block": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(extern)(?=\\s*\\\")", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.extern.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.extern.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.extern.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.extern.cpp" } }, "name": "meta.head.extern.cpp", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.extern.cpp" } }, "name": "meta.body.extern.cpp", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.extern.cpp", "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] }, "function_body_context": { "patterns": [ { "include": "#ever_present_context" }, { "include": "#using_namespace" }, { "include": "#type_alias" }, { "include": "#using_name" }, { "include": "#namespace_alias" }, { "include": "#typedef_class" }, { "include": "#typedef_struct" }, { "include": "#typedef_union" }, { "include": "#misc_keywords" }, { "include": "#standard_declares" }, { "include": "#class_block" }, { "include": "#struct_block" }, { "include": "#union_block" }, { "include": "#enum_block" }, { "include": "#access_control_keywords" }, { "include": "#block" }, { "include": "#static_assert" }, { "include": "#assembly" }, { "include": "#function_pointer" }, { "include": "#switch_statement" }, { "include": "#goto_statement" }, { "include": "#evaluation_context" }, { "include": "#label" } ] }, "function_call": { "begin": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?(\\()", "end": "\\)", "beginCaptures": { "1": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.function.call.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "11": {}, "12": { "name": "punctuation.section.arguments.begin.bracket.round.function.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.call.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, "function_definition": { "begin": "(?:(?:^|\\G|(?<=;|\\}))|(?<=>))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*)(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<60>?)+>)(?:\\s)*+)?::)*\\s*+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\()", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.function.definition.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "storage.type.template.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.modifier.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "storage.modifier.$12.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "15": { "name": "comment.block.cpp" }, "16": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "17": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "18": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "21": { "name": "comment.block.cpp" }, "22": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "23": { "patterns": [ { "include": "#inline_comment" } ] }, "24": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "25": { "name": "comment.block.cpp" }, "26": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "27": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "36": { "patterns": [ { "include": "#inline_comment" } ] }, "37": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "38": { "name": "comment.block.cpp" }, "39": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "40": { "patterns": [ { "include": "#inline_comment" } ] }, "41": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "42": { "name": "comment.block.cpp" }, "43": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "44": { "patterns": [ { "include": "#inline_comment" } ] }, "45": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "46": { "name": "comment.block.cpp" }, "47": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "48": { "patterns": [ { "include": "#inline_comment" } ] }, "49": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "50": { "name": "comment.block.cpp" }, "51": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "52": { "name": "storage.type.modifier.calling-convention.cpp" }, "53": { "patterns": [ { "include": "#inline_comment" } ] }, "54": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "55": { "name": "comment.block.cpp" }, "56": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "57": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "58": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "59": { "patterns": [ { "include": "#template_call_range" } ] }, "60": {}, "61": { "name": "entity.name.function.definition.cpp" }, "62": { "patterns": [ { "include": "#inline_comment" } ] }, "63": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "64": { "name": "comment.block.cpp" }, "65": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "name": "meta.function.definition.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.cpp" } }, "name": "meta.head.function.definition.cpp", "patterns": [ { "include": "#ever_present_context" }, { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.cpp" } }, "contentName": "meta.function.definition.parameters", "patterns": [ { "include": "#ever_present_context" }, { "include": "#parameter_or_maybe_value" }, { "include": "#comma" }, { "include": "#evaluation_context" } ] }, { "match": "(?<=^|\\))(?:(?:\\s)+)?(->)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<23>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<23>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "punctuation.definition.function.return-type.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "7": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "10": { "name": "comment.block.cpp" }, "11": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.cpp" } }, "name": "meta.body.function.definition.cpp", "patterns": [ { "include": "#function_body_context" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.cpp", "patterns": [ { "include": "$self" } ] } ] }, "function_parameter_context": { "patterns": [ { "include": "#ever_present_context" }, { "include": "#string_context" }, { "include": "#parameter" }, { "include": "#comma" } ] }, "function_pointer": { "begin": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "variable.other.definition.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [ { "include": "#evaluation_context" } ] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [ { "include": "#function_parameter_context" } ] }, "function_pointer_parameter": { "begin": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "variable.parameter.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [ { "include": "#evaluation_context" } ] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [ { "include": "#function_parameter_context" } ] }, "functional_specifiers_pre_parameters": { "match": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.goto.cpp" }, "4": { "patterns": [ { "include": "#inline_comment" } ] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "name": "entity.name.label.call.cpp" } } }, "identifier": { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*" }, "include": { "match": "^((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((#)(?:(?:\\s)+)?((?:include|include_next))\\b)(?:(?:\\s)+)?(?:(?:(?:((<)[^>]*(>?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/)))|((\\\")[^\\\"]*((?:\\\")?)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=\\/\\/))))|(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\.(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)*((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;)))))|((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:\\n)|$)|(?=(?:\\/\\/|;))))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.control.directive.$5.cpp" }, "4": { "name": "punctuation.definition.directive.cpp" }, "6": { "name": "string.quoted.other.lt-gt.include.cpp" }, "7": { "name": "punctuation.definition.string.begin.cpp" }, "8": { "name": "punctuation.definition.string.end.cpp" }, "9": { "patterns": [ { "include": "#inline_comment" } ] }, "10": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "11": { "name": "string.quoted.double.include.cpp" }, "12": { "name": "punctuation.definition.string.begin.cpp" }, "13": { "name": "punctuation.definition.string.end.cpp" }, "14": { "patterns": [ { "include": "#inline_comment" } ] }, "15": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "16": { "name": "entity.name.other.preprocessor.macro.include.cpp" }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "21": { "patterns": [ { "include": "#inline_comment" } ] }, "22": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } }, "name": "meta.preprocessor.include.cpp" }, "inheritance_context": { "patterns": [ { "include": "#ever_present_context" }, { "match": ",", "name": "punctuation.separator.delimiter.comma.inheritance.cpp" }, { "match": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": {} } } ] }, "inline_builtin_storage_type": { "match": "(?:\\s)*+(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:)", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "entity.name.label.cpp" }, "4": { "patterns": [ { "include": "#inline_comment" } ] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "name": "punctuation.separator.label.cpp" } } }, "lambdas": { "begin": "(?:(?<=[^\\s]|^)(?])|(?<=\\Wreturn|^return))(?:(?:\\s)+)?(\\[(?!\\[| *+\"| *+\\d))((?:[^\\[\\]]|((??)++\\]))*+)(\\](?!((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))[\\[\\];]))", "end": "(?<=[;}])", "beginCaptures": { "1": { "name": "punctuation.definition.capture.begin.lambda.cpp" }, "2": { "name": "meta.lambda.capture.cpp", "patterns": [ { "include": "#the_this_keyword" }, { "match": "((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?=\\]|\\z|$)|(,))|(\\=))", "captures": { "1": { "name": "variable.parameter.capture.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.separator.delimiter.comma.cpp" }, "7": { "name": "keyword.operator.assignment.cpp" } } }, { "include": "#evaluation_context" } ] }, "3": {}, "4": { "name": "punctuation.definition.capture.end.lambda.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "patterns": [ { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.lambda.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.lambda.cpp" } }, "name": "meta.function.definition.parameters.lambda.cpp", "patterns": [ { "include": "#function_parameter_context" } ] }, { "match": "(?)((?:.+?(?=\\{|$))?)", "captures": { "1": { "name": "punctuation.definition.lambda.return-type.cpp" }, "2": { "name": "storage.type.return-type.lambda.cpp" } } }, { "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.lambda.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.lambda.cpp" } }, "name": "meta.function.definition.body.lambda.cpp", "patterns": [ { "include": "$self" } ] } ] }, "language_constants": { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?line\\b", "end": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?define\\b)(?:(?:\\s)+)?((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:(?:\\s)+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:(?:\\s)+)?)*)(?:(?:\\s)+)?(\\b(?!uint_least16_t[^\\w]|uint_least32_t[^\\w]|uint_least64_t[^\\w]|int_least16_t[^\\w]|int_least32_t[^\\w]|int_least64_t[^\\w]|uint_least8_t[^\\w]|uint_fast16_t[^\\w]|uint_fast32_t[^\\w]|uint_fast64_t[^\\w]|int_least8_t[^\\w]|int_fast16_t[^\\w]|int_fast32_t[^\\w]|int_fast64_t[^\\w]|uint_fast8_t[^\\w]|suseconds_t[^\\w]|int_fast8_t[^\\w]|useconds_t[^\\w]|blksize_t[^\\w]|in_addr_t[^\\w]|in_port_t[^\\w]|uintptr_t[^\\w]|uintmax_t[^\\w]|uintmax_t[^\\w]|uintmax_t[^\\w]|unsigned[^\\w]|u_quad_t[^\\w]|blkcnt_t[^\\w]|uint16_t[^\\w]|uint32_t[^\\w]|uint64_t[^\\w]|intptr_t[^\\w]|intmax_t[^\\w]|intmax_t[^\\w]|wchar_t[^\\w]|u_short[^\\w]|qaddr_t[^\\w]|caddr_t[^\\w]|daddr_t[^\\w]|fixpt_t[^\\w]|nlink_t[^\\w]|segsz_t[^\\w]|swblk_t[^\\w]|clock_t[^\\w]|ssize_t[^\\w]|int16_t[^\\w]|int32_t[^\\w]|int64_t[^\\w]|uint8_t[^\\w]|signed[^\\w]|double[^\\w]|u_char[^\\w]|u_long[^\\w]|ushort[^\\w]|quad_t[^\\w]|mode_t[^\\w]|size_t[^\\w]|time_t[^\\w]|int8_t[^\\w]|short[^\\w]|float[^\\w]|u_int[^\\w]|div_t[^\\w]|dev_t[^\\w]|gid_t[^\\w]|ino_t[^\\w]|key_t[^\\w]|pid_t[^\\w]|off_t[^\\w]|uid_t[^\\w]|auto[^\\w]|void[^\\w]|char[^\\w]|long[^\\w]|bool[^\\w]|uint[^\\w]|id_t[^\\w]|id_t[^\\w]|int[^\\w])(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?!\\())", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "variable.language.this.cpp" }, "4": { "name": "variable.other.object.access.cpp" }, "5": { "name": "punctuation.separator.dot-access.cpp" }, "6": { "name": "punctuation.separator.pointer-access.cpp" }, "7": { "patterns": [ { "match": "(?<=(?:\\.\\*|\\.|->|->\\*))(?:(?:\\s)+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.property.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "#member_access" }, { "include": "#method_access" } ] }, "8": { "name": "variable.other.property.cpp" } } }, "memory_operators": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(delete)(?:(?:\\s)+)?(\\[\\])|(delete))|(new))(?!\\w))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.operator.wordlike.cpp" }, "4": { "name": "keyword.operator.delete.array.cpp" }, "5": { "name": "keyword.operator.delete.array.bracket.cpp" }, "6": { "name": "keyword.operator.delete.cpp" }, "7": { "name": "keyword.operator.new.cpp" } } }, "method_access": { "begin": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:(?:\\s)+)?(?:(?:\\.\\*|\\.)|(?:->\\*|->))(?:(?:\\s)+)?)*)(?:(?:\\s)+)?(~?(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?(\\()", "end": "\\)", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" }, "9": { "patterns": [ { "match": "(?<=(?:\\.\\*|\\.|->|->\\*))(?:(?:\\s)+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.property.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "match": "(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?\\*|->)))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.language.this.cpp" }, "6": { "name": "variable.other.object.access.cpp" }, "7": { "name": "punctuation.separator.dot-access.cpp" }, "8": { "name": "punctuation.separator.pointer-access.cpp" } } }, { "include": "#member_access" }, { "include": "#method_access" } ] }, "10": { "name": "entity.name.function.member.cpp" }, "11": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.member.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, "misc_keywords": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.other.$3.cpp" } } }, "ms_attributes": { "begin": "__declspec\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.attribute.begin.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.attribute.end.cpp" } }, "name": "support.other.attribute.cpp", "patterns": [ { "include": "#attributes_context" }, { "begin": "\\(", "end": "\\)", "beginCaptures": {}, "endCaptures": {}, "patterns": [ { "include": "#attributes_context" }, { "include": "#string_context" } ] }, { "match": "(using)(?:\\s)+((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<8>?)+>)(?:\\s)*+)?::)*\\s*+)(?:(?:\\s)+)?((?|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.namespace.cpp" }, "1": { "name": "keyword.other.namespace.definition.cpp storage.type.namespace.definition.cpp" } }, "endCaptures": {}, "name": "meta.block.namespace.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.namespace.cpp" } }, "name": "meta.head.namespace.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#attributes_context" }, { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<4>?)+>)(?:\\s)*+)?::)*\\s*+)(?:(?:\\s)+)?((?|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.namespace.cpp" } }, "name": "meta.body.namespace.cpp", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.namespace.cpp", "patterns": [ { "include": "$self" } ] } ] }, "noexcept_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.noexcept.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.noexcept.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.noexcept.cpp" } }, "contentName": "meta.arguments.operator.noexcept", "patterns": [ { "include": "#evaluation_context" } ] }, "number_literal": { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:__cdecl|__clrcall|__stdcall|__fastcall|__thiscall|__vectorcall)?)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)(operator)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<55>?)+>)(?:\\s)*+)?::)*+)(?:(?:((?:(?:delete\\[\\])|(?:delete)|(?:new\\[\\])|(?:new)|(?:\\->\\*)|(?:<<=)|(?:>>=)|(?:<=>)|(?:\\+\\+)|(?:\\-\\-)|(?:\\(\\))|(?:\\[\\])|(?:\\->)|(?:\\+\\+)|(?:\\-\\-)|(?:<<)|(?:>>)|(?:<=)|(?:>=)|(?:==)|(?:!=)|(?:&&)|(?:\\|\\|)|(?:\\+=)|(?:\\-=)|(?:\\*=)|(?:\\/=)|(?:%=)|(?:&=)|(?:\\^=)|(?:\\|=)|(?:\\+)|(?:\\-)|!|~|(?:\\*)|&|(?:\\*)|(?:\\/)|%|(?:\\+)|(?:\\-)|<|>|&|(?:\\^)|(?:\\|)|=|,))|((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:\\[\\])?)))|(\"\")((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\<|\\()", "end": "(?:(?<=\\}|%>|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.function.definition.special.operator-overload.cpp" }, "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "patterns": [ { "include": "#inline_comment" } ] }, "33": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "34": { "name": "comment.block.cpp" }, "35": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "36": { "name": "storage.type.modifier.calling-convention.cpp" }, "37": { "patterns": [ { "include": "#inline_comment" } ] }, "38": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "39": { "name": "comment.block.cpp" }, "40": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "41": { "patterns": [ { "include": "#inline_comment" } ] }, "42": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "43": { "name": "comment.block.cpp" }, "44": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "45": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.operator.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "entity.name.operator.type.reference.cpp" } ] }, "59": { "patterns": [ { "include": "#inline_comment" } ] }, "60": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "61": { "name": "comment.block.cpp" }, "62": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "63": { "patterns": [ { "include": "#inline_comment" } ] }, "64": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "65": { "name": "comment.block.cpp" }, "66": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "67": { "patterns": [ { "include": "#inline_comment" } ] }, "68": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "69": { "name": "comment.block.cpp" }, "70": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "71": { "name": "entity.name.operator.type.array.cpp" }, "72": { "name": "entity.name.operator.custom-literal.cpp" }, "73": { "patterns": [ { "include": "#inline_comment" } ] }, "74": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "75": { "name": "comment.block.cpp" }, "76": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "77": { "name": "entity.name.operator.custom-literal.cpp" }, "78": { "patterns": [ { "include": "#inline_comment" } ] }, "79": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "80": { "name": "comment.block.cpp" }, "81": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": {}, "name": "meta.function.definition.special.operator-overload.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.function.definition.special.operator-overload.cpp" } }, "name": "meta.head.function.definition.special.operator-overload.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#template_call_range" }, { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parameters.begin.bracket.round.special.operator-overload.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.special.operator-overload.cpp" } }, "contentName": "meta.function.definition.parameters.special.operator-overload", "patterns": [ { "include": "#function_parameter_context" }, { "include": "#evaluation_context" } ] }, { "include": "#qualifiers_and_specifiers_post_parameters" }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.function.definition.special.operator-overload.cpp" } }, "name": "meta.body.function.definition.special.operator-overload.cpp", "patterns": [ { "include": "#function_body_context" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.function.definition.special.operator-overload.cpp", "patterns": [ { "include": "$self" } ] } ] }, "operators": { "patterns": [ { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.cpp" } }, "contentName": "meta.arguments.operator.sizeof", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignof.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignof.cpp" } }, "contentName": "meta.arguments.operator.alignof", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.alignas.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.alignas.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.alignas.cpp" } }, "contentName": "meta.arguments.operator.alignas", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.typeid.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.typeid.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.typeid.cpp" } }, "contentName": "meta.arguments.operator.typeid", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.noexcept.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.noexcept.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.noexcept.cpp" } }, "contentName": "meta.arguments.operator.noexcept", "patterns": [ { "include": "#evaluation_context" } ] }, { "begin": "(\\bsizeof\\.\\.\\.)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.variadic.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.variadic.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.variadic.cpp" } }, "contentName": "meta.arguments.operator.sizeof.variadic", "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "--", "name": "keyword.operator.decrement.cpp" }, { "match": "\\+\\+", "name": "keyword.operator.increment.cpp" }, { "match": "%=|\\+=|-=|\\*=|(?>=|\\|=", "name": "keyword.operator.assignment.compound.bitwise.cpp" }, { "match": "<<|>>", "name": "keyword.operator.bitwise.shift.cpp" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.cpp" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.cpp" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.bitwise.cpp" }, { "include": "#assignment_operator" }, { "match": "%|\\*|\\/|-|\\+", "name": "keyword.operator.arithmetic.cpp" }, { "include": "#ternary_operator" } ] }, "over_qualified_types": { "patterns": [ { "match": "(\\bstruct)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.struct.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "(\\benum)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.enum.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "(\\bunion)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.union.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "(\\bclass)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.class.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } } ] }, "parameter": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\w)", "end": "(?:(?=\\))|(,))", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "name": "meta.parameter.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#function_pointer_parameter" }, { "include": "#decltype" }, { "include": "#vararg_ellipses" }, { "match": "((?:((?:(?:thread_local)|(?:volatile)|(?:register)|(?:restrict)|(?:static)|(?:extern)|(?:const)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))+)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=,|\\)|=)", "captures": { "1": { "patterns": [ { "include": "#storage_types" } ] }, "2": { "name": "storage.modifier.specifier.parameter.cpp" }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "12": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "13": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "14": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "15": { "name": "entity.name.type.parameter.cpp" }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#storage_types" }, { "include": "#scope_resolution_parameter_inner_generated" }, { "match": "(?:(?:struct)|(?:class)|(?:union)|(?:enum))", "name": "storage.type.$0.cpp" }, { "begin": "(?<==)", "end": "(?:(?=\\))|(,))", "beginCaptures": {}, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "\\=", "name": "keyword.operator.assignment.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\)|,|\\[|=|\\n)", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.parameter.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#attributes_context" }, { "begin": "\\[", "end": "\\]", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.square.array.type.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square.array.type.cpp" } }, "name": "meta.bracket.square.array.cpp", "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*))", "captures": { "0": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "parameter_class": { "match": "(\\bclass)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.class.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parameter_enum": { "match": "(\\benum)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.enum.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parameter_or_maybe_value": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\w)", "end": "(?:(?=\\))|(,))", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "name": "meta.parameter.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#function_pointer_parameter" }, { "include": "#memory_operators" }, { "include": "#builtin_storage_type_initilizer" }, { "include": "#curly_initializer" }, { "include": "#decltype" }, { "include": "#vararg_ellipses" }, { "match": "((?:((?:(?:thread_local)|(?:volatile)|(?:register)|(?:restrict)|(?:static)|(?:extern)|(?:const)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))+)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:\\s)*+(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=,|\\)|=)", "captures": { "1": { "patterns": [ { "include": "#storage_types" } ] }, "2": { "name": "storage.modifier.specifier.parameter.cpp" }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "name": "storage.type.primitive.cpp storage.type.built-in.primitive.cpp" }, "12": { "name": "storage.type.cpp storage.type.built-in.cpp" }, "13": { "name": "support.type.posix-reserved.pthread.cpp support.type.built-in.posix-reserved.pthread.cpp" }, "14": { "name": "support.type.posix-reserved.cpp support.type.built-in.posix-reserved.cpp" }, "15": { "name": "entity.name.type.parameter.cpp" }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#storage_types" }, { "include": "#function_call" }, { "include": "#scope_resolution_parameter_inner_generated" }, { "match": "(?:(?:struct)|(?:class)|(?:union)|(?:enum))", "name": "storage.type.$0.cpp" }, { "begin": "(?<==)", "end": "(?:(?=\\))|(,))", "beginCaptures": {}, "endCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=(?:\\)|,|\\[|=|\\/\\/|(?:(?:\\n)|$)))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "variable.parameter.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#attributes_context" }, { "begin": "\\[", "end": "\\]", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.square.array.type.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square.array.type.cpp" } }, "name": "meta.bracket.square.array.cpp", "patterns": [ { "include": "#evaluation_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*))", "captures": { "0": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "7": { "name": "comment.block.cpp" }, "8": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "include": "#evaluation_context" } ] }, "parameter_struct": { "match": "(\\bstruct)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.struct.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parameter_union": { "match": "(\\bunion)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:\\[((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\]((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=,|\\)|\\n)", "captures": { "1": { "name": "storage.type.union.parameter.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.parameter.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "variable.other.object.declare.cpp" }, "15": { "patterns": [ { "include": "#inline_comment" } ] }, "16": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": { "patterns": [ { "include": "#inline_comment" } ] }, "18": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "19": { "patterns": [ { "include": "#inline_comment" } ] }, "20": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "parentheses": { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.cpp" } }, "name": "meta.parens.cpp", "patterns": [ { "include": "#over_qualified_types" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?pragma\\b", "end": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?pragma(?:\\s)+mark)(?:\\s)+(.*)", "captures": { "1": { "name": "keyword.control.directive.pragma.pragma-mark.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "punctuation.definition.directive.cpp" }, "5": { "name": "entity.name.tag.pragma-mark.cpp" } }, "name": "meta.preprocessor.pragma.cpp" }, "predefined_macros": { "patterns": [ { "match": "\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMA|__FP_FAST_FMAF|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\b", "captures": { "1": { "name": "entity.name.other.preprocessor.macro.predefined.$1.cpp" } } }, { "match": "\\b__([A-Z_]+)__\\b", "name": "entity.name.other.preprocessor.macro.predefined.probably.$1.cpp" } ] }, "preprocessor_conditional_context": { "patterns": [ { "include": "#preprocessor_conditional_defined" }, { "include": "#comments" }, { "include": "#language_constants" }, { "include": "#string_context" }, { "include": "#d9bc4796b0b_preprocessor_number_literal" }, { "include": "#operators" }, { "include": "#predefined_macros" }, { "include": "#macro_name" }, { "include": "#line_continuation_character" } ] }, "preprocessor_conditional_defined": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?:(?:ifndef|ifdef)|if))", "end": "^(?!\\s*+#\\s*(?:else|endif))", "beginCaptures": { "0": { "name": "keyword.control.directive.conditional.$6.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "punctuation.definition.directive.cpp" }, "6": {} }, "endCaptures": {}, "patterns": [ { "begin": "\\G(?<=ifndef|ifdef|if)", "end": "(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "punctuation.definition.directive.cpp" } }, "name": "keyword.control.directive.$4.cpp" }, "preprocessor_context": { "patterns": [ { "include": "#pragma_mark" }, { "include": "#pragma" }, { "include": "#include" }, { "include": "#line" }, { "include": "#diagnostic" }, { "include": "#undef" }, { "include": "#preprocessor_conditional_range" }, { "include": "#single_line_macro" }, { "include": "#macro" }, { "include": "#preprocessor_conditional_standalone" }, { "include": "#macro_argument" } ] }, "qualified_type": { "match": "\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<11>?)+>)?(?![\\w<:.])", "captures": { "0": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "1": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "patterns": [ { "include": "#inline_comment" } ] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } }, "name": "meta.qualified_type.cpp" }, "qualifiers_and_specifiers_post_parameters": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?:((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.modifier.specifier.functional.post-parameters.$3.cpp" }, "4": { "patterns": [ { "include": "#inline_comment" } ] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "scope_resolution": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_function_call": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_function_call_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_call_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.function.call.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.call.cpp" } } }, "scope_resolution_function_definition": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_function_definition_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_definition_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.function.definition.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.cpp" } } }, "scope_resolution_function_definition_operator_overload": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_function_definition_operator_overload_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_function_definition_operator_overload_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.function.definition.operator-overload.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.function.definition.operator-overload.cpp" } } }, "scope_resolution_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" } } }, "scope_resolution_namespace_alias": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_alias_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_namespace_alias_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_alias_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.namespace.alias.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.alias.cpp" } } }, "scope_resolution_namespace_block": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_block_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_namespace_block_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_block_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.namespace.block.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.block.cpp" } } }, "scope_resolution_namespace_using": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_namespace_using_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_namespace_using_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_namespace_using_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.namespace.using.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.namespace.using.cpp" } } }, "scope_resolution_parameter": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_parameter_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_parameter_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_parameter_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.parameter.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.parameter.cpp" } } }, "scope_resolution_template_call": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_template_call_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_template_call_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_template_call_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.template.call.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.call.cpp" } } }, "scope_resolution_template_definition": { "match": "(::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<3>?)+>)(?:\\s)*+)?::)*\\s*+", "captures": { "0": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" } ] }, "1": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" }, "2": { "patterns": [ { "include": "#template_call_range" } ] } } }, "scope_resolution_template_definition_inner_generated": { "match": "((::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?::)*\\s*+)((?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<7>?)+>)(?:\\s)*+)?(::)", "captures": { "1": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" } ] }, "2": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" }, "3": { "patterns": [ { "include": "#template_call_range" } ] }, "4": {}, "5": { "name": "entity.name.scope-resolution.template.definition.cpp" }, "6": { "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_range" } ] }, "7": {}, "8": { "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.template.definition.cpp" } } }, "semicolon": { "match": ";", "name": "punctuation.terminator.statement.cpp" }, "simple_type": { "match": "(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<12>?)+>)?(?![\\w<:.]))(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?", "captures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": {}, "13": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "14": { "patterns": [ { "include": "#inline_comment" } ] }, "15": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "single_line_macro": { "match": "^((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))#define.*(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "sizeof_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.cpp" } }, "contentName": "meta.arguments.operator.sizeof", "patterns": [ { "include": "#evaluation_context" } ] }, "sizeof_variadic_operator": { "begin": "(\\bsizeof\\.\\.\\.)((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.sizeof.variadic.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.sizeof.variadic.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.sizeof.variadic.cpp" } }, "contentName": "meta.arguments.operator.sizeof.variadic", "patterns": [ { "include": "#evaluation_context" } ] }, "square_brackets": { "name": "meta.bracket.square.access", "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))?(\\[)(?!\\])", "beginCaptures": { "1": { "name": "variable.other.object" }, "2": { "name": "punctuation.definition.begin.bracket.square" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square" } }, "patterns": [ { "include": "#evaluation_context" } ] }, "standard_declares": { "patterns": [ { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.struct.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.union.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.enum.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.enum.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.class.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.class.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } } ] }, "static_assert": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "keyword.other.static_assert.cpp" }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "name": "punctuation.section.arguments.begin.bracket.round.static_assert.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.static_assert.cpp" } }, "patterns": [ { "begin": "(,)(?:(?:\\s)+)?(?=(?:L|u8|u|U(?:(?:\\s)+)?\\\")?)", "end": "(?=\\))", "beginCaptures": { "1": { "name": "punctuation.separator.delimiter.comma.cpp" } }, "endCaptures": {}, "name": "meta.static_assert.message.cpp", "patterns": [ { "include": "#string_context" } ] }, { "include": "#evaluation_context" } ] }, "std_space": { "match": "(?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))", "captures": { "0": { "patterns": [ { "include": "#inline_comment" } ] }, "1": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "storage_specifiers": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.modifier.specifier.$3.cpp" } } }, "storage_types": { "patterns": [ { "include": "#storage_specifiers" }, { "include": "#inline_builtin_storage_type" }, { "include": "#decltype" }, { "include": "#typename" } ] }, "string_context": { "patterns": [ { "begin": "((?:u|u8|U|L)?)\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cpp" }, "1": { "name": "meta.encoding.cpp" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.cpp" } }, "name": "string.quoted.double.cpp", "patterns": [ { "match": "(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8})", "name": "constant.character.escape.cpp" }, { "match": "\\\\['\"?\\\\abfnrtv]", "name": "constant.character.escape.cpp" }, { "match": "\\\\[0-7]{1,3}", "name": "constant.character.escape.cpp" }, { "match": "(?:(\\\\x0*[0-9a-fA-F]{2}(?![0-9a-fA-F]))|((?:\\\\x[0-9a-fA-F]*|\\\\x)))", "captures": { "1": { "name": "constant.character.escape.cpp" }, "2": { "name": "invalid.illegal.unknown-escape.cpp" } } }, { "include": "#string_escapes_context_c" } ] }, { "begin": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.struct.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.struct.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.struct.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.struct.cpp" } }, "name": "meta.head.struct.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.struct.cpp" } }, "name": "meta.body.struct.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.struct.cpp", "patterns": [ { "include": "$self" } ] } ] }, "struct_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.struct.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.struct.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "switch_conditional_parentheses": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.conditional.switch.cpp" } }, "name": "meta.conditional.switch.cpp", "patterns": [ { "include": "#evaluation_context" } ] }, "switch_statement": { "begin": "((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?|\\?\\?>)|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.switch.cpp" }, "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "5": { "name": "keyword.control.switch.cpp" } }, "endCaptures": {}, "name": "meta.block.switch.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.switch.cpp" } }, "name": "meta.head.switch.cpp", "patterns": [ { "include": "#switch_conditional_parentheses" }, { "include": "$self" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.switch.cpp" } }, "name": "meta.body.switch.cpp", "patterns": [ { "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.switch.cpp", "patterns": [ { "include": "$self" } ] } ] }, "template_argument_defaulted": { "match": "(?<=<|,)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s)+)*)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?([=])", "captures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "entity.name.type.template.cpp" }, "3": { "name": "keyword.operator.assignment.cpp" } } }, "template_call_context": { "patterns": [ { "include": "#ever_present_context" }, { "include": "#template_call_range" }, { "include": "#storage_types" }, { "include": "#language_constants" }, { "include": "#scope_resolution_template_call_inner_generated" }, { "include": "#operators" }, { "include": "#number_literal" }, { "include": "#string_context" }, { "include": "#comma_in_template_argument" }, { "include": "#qualified_type" } ] }, "template_call_innards": { "match": "((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<1>?)+>)(?:\\s)*+", "captures": { "0": { "patterns": [ { "include": "#template_call_range" } ] } }, "name": "meta.template.call.cpp" }, "template_call_range": { "begin": "<", "end": ">", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, "template_definition": { "begin": "(?", "beginCaptures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "punctuation.section.angle-brackets.start.template.definition.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.definition.cpp" } }, "name": "meta.template.definition.cpp", "patterns": [ { "begin": "(?<=\\w)(?:(?:\\s)+)?<", "end": ">", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "patterns": [ { "include": "#template_call_context" } ] }, { "include": "#template_definition_context" } ] }, "template_definition_argument": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)|((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?:\\s)+)+)((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))|((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)(?:(?:\\s)+)?(\\.\\.\\.)(?:(?:\\s)+)?((?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*))(?:(?:\\s)+)?(?:(,)|(?=>|$))", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "storage.type.template.argument.$3.cpp" }, "4": { "patterns": [ { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "storage.type.template.argument.$0.cpp" } ] }, "5": { "name": "entity.name.type.template.cpp" }, "6": { "name": "storage.type.template.cpp" }, "7": { "name": "punctuation.vararg-ellipses.template.definition.cpp" }, "8": { "name": "entity.name.type.template.cpp" }, "9": { "name": "punctuation.separator.delimiter.comma.template.argument.cpp" } } }, "template_definition_context": { "patterns": [ { "include": "#scope_resolution_template_definition_inner_generated" }, { "include": "#template_definition_argument" }, { "include": "#template_argument_defaulted" }, { "include": "#template_call_innards" }, { "include": "#evaluation_context" } ] }, "template_isolated_definition": { "match": "(?(?:(?:\\s)+)?$)", "captures": { "1": { "name": "storage.type.template.cpp" }, "2": { "name": "punctuation.section.angle-brackets.start.template.definition.cpp" }, "3": { "name": "meta.template.definition.cpp", "patterns": [ { "include": "#template_definition_context" } ] }, "4": { "name": "punctuation.section.angle-brackets.end.template.definition.cpp" } } }, "ternary_operator": { "begin": "\\?", "end": ":", "beginCaptures": { "0": { "name": "keyword.operator.ternary.cpp" } }, "endCaptures": { "0": { "name": "keyword.operator.ternary.cpp" } }, "patterns": [ { "include": "#ever_present_context" }, { "include": "#string_context" }, { "include": "#number_literal" }, { "include": "#method_access" }, { "include": "#member_access" }, { "include": "#predefined_macros" }, { "include": "#operators" }, { "include": "#memory_operators" }, { "include": "#wordlike_operators" }, { "include": "#type_casting_operators" }, { "include": "#control_flow_keywords" }, { "include": "#exception_keywords" }, { "include": "#the_this_keyword" }, { "include": "#language_constants" }, { "include": "#builtin_storage_type_initilizer" }, { "include": "#qualifiers_and_specifiers_post_parameters" }, { "include": "#functional_specifiers_pre_parameters" }, { "include": "#storage_types" }, { "include": "#lambdas" }, { "include": "#attributes_context" }, { "include": "#parentheses" }, { "include": "#function_call" }, { "include": "#scope_resolution_inner_generated" }, { "include": "#square_brackets" }, { "include": "#semicolon" }, { "include": "#comma" } ], "applyEndPatternLast": 1 }, "the_this_keyword": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "variable.language.this.cpp" } } }, "type_alias": { "match": "(using)(?:(?:\\s)+)?(?!namespace)(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)?(?![\\w<:.]))(?:(?:\\s)+)?(\\=)(?:(?:\\s)+)?((?:typename)?)(?:(?:\\s)+)?((?:(?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<29>?)+>)?(?![\\w<:.]))|(.*(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)?(?:(?:\\s)+)?(?:(;)|\\n)", "captures": { "1": { "name": "keyword.other.using.directive.cpp" }, "2": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "3": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "4": { "patterns": [ { "include": "#inline_comment" } ] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "14": { "name": "keyword.operator.assignment.cpp" }, "15": { "name": "keyword.other.typename.cpp" }, "16": { "patterns": [ { "include": "#storage_specifiers" } ] }, "17": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "18": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "19": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "20": { "patterns": [ { "include": "#inline_comment" } ] }, "21": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "22": { "patterns": [ { "include": "#inline_comment" } ] }, "23": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "24": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "30": { "name": "meta.declaration.type.alias.value.unknown.cpp", "patterns": [ { "include": "#evaluation_context" } ] }, "31": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "32": { "patterns": [ { "include": "#inline_comment" } ] }, "33": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "34": { "patterns": [ { "include": "#inline_comment" } ] }, "35": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "36": { "patterns": [ { "include": "#inline_comment" } ] }, "37": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "38": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "39": { "patterns": [ { "include": "#evaluation_context" } ] }, "40": { "name": "punctuation.definition.end.bracket.square.cpp" }, "41": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.declaration.type.alias.cpp" }, "type_casting_operators": { "match": "((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "3": { "name": "keyword.operator.wordlike.cpp keyword.operator.cast.$3.cpp" } } }, "typedef_class": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.class.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.class.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.class.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.class.cpp" } }, "name": "meta.head.class.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.class.cpp" } }, "name": "meta.body.class.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.class.cpp", "patterns": [ { "match": "(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typedef_function_pointer": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)(?:\\s)*+)?::)*+)?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<18>?)+>)?(?![\\w<:.]))(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()(\\*)(?:(?:\\s)+)?((?:(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*)?)(?:(?:\\s)+)?(?:(\\[)(\\w*)(\\])(?:(?:\\s)+)?)*(\\))(?:(?:\\s)+)?(\\()", "end": "(\\))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=[{=,);>]|\\n)(?!\\()", "beginCaptures": { "1": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "2": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "3": { "patterns": [ { "include": "#inline_comment" } ] }, "4": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "5": { "name": "comment.block.cpp" }, "6": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "20": { "patterns": [ { "include": "#inline_comment" } ] }, "21": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "22": { "name": "comment.block.cpp" }, "23": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "24": { "patterns": [ { "include": "#inline_comment" } ] }, "25": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "26": { "name": "comment.block.cpp" }, "27": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "28": { "patterns": [ { "include": "#inline_comment" } ] }, "29": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "30": { "name": "comment.block.cpp" }, "31": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "32": { "name": "punctuation.section.parens.begin.bracket.round.function.pointer.cpp" }, "33": { "name": "punctuation.definition.function.pointer.dereference.cpp" }, "34": { "name": "entity.name.type.alias.cpp entity.name.type.pointer.function.cpp" }, "35": { "name": "punctuation.definition.begin.bracket.square.cpp" }, "36": { "patterns": [ { "include": "#evaluation_context" } ] }, "37": { "name": "punctuation.definition.end.bracket.square.cpp" }, "38": { "name": "punctuation.section.parens.end.bracket.round.function.pointer.cpp" }, "39": { "name": "punctuation.section.parameters.begin.bracket.round.function.pointer.cpp" } }, "endCaptures": { "1": { "name": "punctuation.section.parameters.end.bracket.round.function.pointer.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "patterns": [ { "include": "#function_parameter_context" } ] } ] }, "typedef_struct": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.struct.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.struct.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.struct.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.struct.cpp" } }, "name": "meta.head.struct.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.struct.cpp" } }, "name": "meta.body.struct.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.struct.cpp", "patterns": [ { "match": "(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typedef_union": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.union.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.union.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.union.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.union.cpp" } }, "name": "meta.head.union.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.union.cpp" } }, "name": "meta.body.union.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.union.cpp", "patterns": [ { "match": "(((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "8": { "name": "comment.block.cpp" }, "9": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "12": { "name": "comment.block.cpp" }, "13": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "14": { "name": "entity.name.type.alias.cpp" } } }, { "match": "," } ] } ] } ] }, "typeid_operator": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.operator.functionlike.cpp keyword.operator.typeid.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.operator.typeid.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.operator.typeid.cpp" } }, "contentName": "meta.arguments.operator.typeid", "patterns": [ { "include": "#evaluation_context" } ] }, "typename": { "match": "(((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(\\s*+((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?:(?:(?:unsigned)|(?:signed)|(?:short)|(?:long))|(?:(?:struct)|(?:class)|(?:union)|(?:enum)))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*((?:::)?(?:(?!\\b(?:__has_cpp_attribute|reinterpret_cast|atomic_noexcept|__has_include|atomic_cancel|atomic_commit|dynamic_cast|thread_local|synchronized|static_cast|const_cast|co_return|constexpr|consteval|constexpr|constexpr|consteval|protected|namespace|constinit|co_return|noexcept|noexcept|continue|co_await|co_yield|volatile|register|restrict|explicit|volatile|noexcept|template|operator|decltype|typename|requires|co_await|co_yield|reflexpr|alignof|alignas|default|mutable|virtual|mutable|private|include|warning|_Pragma|defined|typedef|__asm__|concept|sizeof|delete|not_eq|bitand|and_eq|xor_eq|typeid|switch|return|struct|static|extern|inline|friend|public|ifndef|define|pragma|export|import|module|compl|bitor|throw|or_eq|while|catch|break|class|union|const|const|endif|ifdef|undef|error|using|else|goto|case|enum|elif|else|line|this|not|new|xor|and|for|try|asm|or|do|if|if)\\b)(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<17>?)+>)(?:\\s)*+)?::)*+)?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?!(?:(?:transaction_safe_dynamic)|(?:__has_cpp_attribute)|(?:reinterpret_cast)|(?:transaction_safe)|(?:atomic_noexcept)|(?:__has_include)|(?:atomic_cancel)|(?:atomic_commit)|(?:dynamic_cast)|(?:thread_local)|(?:synchronized)|(?:static_cast)|(?:const_cast)|(?:co_return)|(?:constexpr)|(?:consteval)|(?:constexpr)|(?:constexpr)|(?:consteval)|(?:protected)|(?:namespace)|(?:constinit)|(?:co_return)|(?:noexcept)|(?:noexcept)|(?:continue)|(?:co_await)|(?:co_yield)|(?:volatile)|(?:register)|(?:restrict)|(?:explicit)|(?:override)|(?:volatile)|(?:noexcept)|(?:template)|(?:operator)|(?:decltype)|(?:typename)|(?:requires)|(?:co_await)|(?:co_yield)|(?:reflexpr)|(?:alignof)|(?:alignas)|(?:default)|(?:nullptr)|(?:mutable)|(?:virtual)|(?:mutable)|(?:private)|(?:include)|(?:warning)|(?:_Pragma)|(?:defined)|(?:typedef)|(?:__asm__)|(?:concept)|(?:sizeof)|(?:delete)|(?:not_eq)|(?:bitand)|(?:and_eq)|(?:xor_eq)|(?:typeid)|(?:switch)|(?:return)|(?:static)|(?:extern)|(?:inline)|(?:friend)|(?:public)|(?:ifndef)|(?:define)|(?:pragma)|(?:export)|(?:import)|(?:module)|(?:compl)|(?:bitor)|(?:throw)|(?:or_eq)|(?:while)|(?:catch)|(?:break)|(?:false)|(?:const)|(?:final)|(?:const)|(?:endif)|(?:ifdef)|(?:undef)|(?:error)|(?:using)|(?:audit)|(?:axiom)|(?:else)|(?:goto)|(?:case)|(?:NULL)|(?:true)|(?:elif)|(?:else)|(?:line)|(?:this)|(?:not)|(?:new)|(?:xor)|(?:and)|(?:for)|(?:try)|(?:asm)|(?:or)|(?:do)|(?:if)|(?:if))\\b)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*\\b((?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<17>?)+>)?(?![\\w<:.]))", "captures": { "1": { "name": "storage.modifier.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "patterns": [ { "include": "#inline_comment" } ] }, "5": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "6": { "name": "meta.qualified_type.cpp", "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.cpp" }, { "match": "(?", "beginCaptures": { "0": { "name": "punctuation.section.angle-brackets.begin.template.call.cpp" } }, "endCaptures": { "0": { "name": "punctuation.section.angle-brackets.end.template.call.cpp" } }, "name": "meta.template.call.cpp", "patterns": [ { "include": "#template_call_context" } ] }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.type.cpp" } ] }, "7": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "patterns": [ { "match": "::", "name": "punctuation.separator.namespace.access.cpp punctuation.separator.scope-resolution.type.cpp" }, { "match": "(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "17": {} } }, "undef": { "match": "(^((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?undef\\b)((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "punctuation.definition.directive.cpp" }, "5": { "patterns": [ { "include": "#inline_comment" } ] }, "6": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "7": { "name": "entity.name.function.preprocessor.cpp" } }, "name": "meta.preprocessor.undef.cpp" }, "union_block": { "begin": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:(?={)|(?:((?:(?:(?:\\[\\[.*?\\]\\]|__attribute(?:__)?\\s*\\(\\s*\\(.*?\\)\\s*\\))|__declspec\\(.*?\\))|alignas\\(.*?\\))(?!\\)))((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?((?:(?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*+)?(?:((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(:(?!:)))?)", "end": "(?:(?:(?<=\\}|%>|\\?\\?>)(?:(?:\\s)+)?(;)|(;))|(?=[;>\\[\\]=]))", "beginCaptures": { "0": { "name": "meta.head.union.cpp" }, "1": { "name": "storage.type.$1.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "patterns": [ { "include": "#attributes_context" }, { "include": "#number_literal" } ] }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "11": { "patterns": [ { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))", "captures": { "1": { "name": "storage.type.modifier.final.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?:((?(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))?(?=:|{|$)", "captures": { "1": { "name": "entity.name.type.union.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "4": { "name": "comment.block.cpp" }, "5": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "6": { "name": "storage.type.modifier.final.cpp" }, "7": { "patterns": [ { "include": "#inline_comment" } ] }, "8": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "9": { "name": "comment.block.cpp" }, "10": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } }, { "match": "DLLEXPORT", "name": "entity.name.other.preprocessor.macro.predefined.DLLEXPORT.cpp" }, { "match": "(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*", "name": "entity.name.other.preprocessor.macro.predefined.probably.$0.cpp" } ] }, "12": { "patterns": [ { "include": "#inline_comment" } ] }, "13": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "14": { "name": "comment.block.cpp" }, "15": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "16": { "patterns": [ { "include": "#inline_comment" } ] }, "17": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "18": { "name": "comment.block.cpp" }, "19": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] }, "20": { "name": "punctuation.separator.colon.inheritance.cpp" } }, "endCaptures": { "1": { "name": "punctuation.terminator.statement.cpp" }, "2": { "name": "punctuation.terminator.statement.cpp" } }, "name": "meta.block.union.cpp", "patterns": [ { "begin": "\\G ?", "end": "(?:\\{|<%|\\?\\?<|(?=;))", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.union.cpp" } }, "name": "meta.head.union.cpp", "patterns": [ { "include": "#ever_present_context" }, { "include": "#inheritance_context" }, { "include": "#template_call_range" } ] }, { "begin": "(?<=\\{|<%|\\?\\?<)", "end": "\\}|%>|\\?\\?>", "beginCaptures": {}, "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.union.cpp" } }, "name": "meta.body.union.cpp", "patterns": [ { "include": "#function_pointer" }, { "include": "#static_assert" }, { "include": "#constructor_inline" }, { "include": "#destructor_inline" }, { "include": "$self" } ] }, { "begin": "(?<=\\}|%>|\\?\\?>)[\\s]*", "end": "[\\s]*(?=;)", "beginCaptures": {}, "endCaptures": {}, "name": "meta.tail.union.cpp", "patterns": [ { "include": "$self" } ] } ] }, "union_declare": { "match": "((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))?(?:(?:&|(?:\\*))((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z))))*(?:&|(?:\\*)))?((?:((?:(?>(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?(?:\\s)+)|\\/\\*(?:[^\\*]|(?:\\*)++[^\\/])*+(?:\\*)++\\/)+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))(?=\\S)(?![:{a-zA-Z])", "captures": { "1": { "name": "storage.type.union.declare.cpp" }, "2": { "patterns": [ { "include": "#inline_comment" } ] }, "3": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "4": { "name": "entity.name.type.union.cpp" }, "5": { "patterns": [ { "match": "\\*", "name": "storage.modifier.pointer.cpp" }, { "match": "(?:\\&((?:(?:(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))+)|(?:\\b)|(?=\\W)|(?<=\\W)|(?:\\A)|(?:\\Z)))){2,}\\&", "captures": { "1": { "patterns": [ { "include": "#inline_comment" } ] }, "2": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "3": { "name": "comment.block.cpp" }, "4": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } }, "name": "invalid.illegal.reference-type.cpp" }, { "match": "\\&", "name": "storage.modifier.reference.cpp" } ] }, "6": { "patterns": [ { "include": "#inline_comment" } ] }, "7": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "8": { "patterns": [ { "include": "#inline_comment" } ] }, "9": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "10": { "patterns": [ { "include": "#inline_comment" } ] }, "11": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] }, "12": { "name": "variable.other.object.declare.cpp" }, "13": { "patterns": [ { "include": "#inline_comment" } ] }, "14": { "patterns": [ { "match": "(?:(?>(?:\\s)+)|(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/)))", "captures": { "1": { "name": "comment.block.cpp punctuation.definition.comment.begin.cpp" }, "2": { "name": "comment.block.cpp" }, "3": { "patterns": [ { "match": "\\*\\/", "name": "comment.block.cpp punctuation.definition.comment.end.cpp" }, { "match": "\\*", "name": "comment.block.cpp" } ] } } } ] } } }, "using_name": { "match": "(using)(?:\\s)+(?!namespace\\b)", "captures": { "1": { "name": "keyword.other.using.directive.cpp" } } }, "using_namespace": { "begin": "(?]*+|\"(?:[^\"]*|\\\\\")\")|'(?:[^']*|\\\\')')\\g<6>?)+>)(?:\\s)*+)?::)*\\s*+)?((?~] \\s*+ (if|unless)\n\t )\n\t )\\b\n\t (?! [^;]*+ ; .*? \\bend\\b )\n\t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\t | '(\\\\.|[^'])*+' # eat a single quoted string\n\t | [^#\"'] # eat all but comments and strings\n\t )*\n\t ( \\{ (?! [^}]*+ \\} )\n\t | \\[ (?! [^\\]]*+ \\] )\n\t )\n\t ).*$\n\t| [#] .*? \\(fold\\) \\s*+ $ # Sune’s special marker\n\t", "firstLineMatch": "^#!/.*\\bcrystal", "foldingStopMarker": "(?x)\n\t\t( (^|;) \\s*+ end \\s*+ ([#].*)? $\n\t\t| (^|;) \\s*+ end \\. .* $\n\t\t| ^ \\s*+ [}\\]] ,? \\s*+ ([#].*)? $\n\t\t| [#] .*? \\(end\\) \\s*+ $ # Sune’s special marker\n\t\t| ^=end\n\t\t)", "keyEquivalent": "^~C", "fileTypes": ["cr"], "repository": { "nest_ltgt_r": { "begin": "\\<", "end": "\\>", "patterns": [{ "include": "#regex_sub" }, { "include": "#nest_ltgt_r" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_curly_and_self": { "patterns": [ { "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#nest_curly_and_self" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, { "include": "$self" } ] }, "nest_ltgt_i": { "begin": "\\<", "end": "\\>", "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_ltgt_i" } ], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_brackets": { "begin": "\\[", "end": "\\]", "patterns": [{ "include": "#nest_brackets" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_brackets_r": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#regex_sub" }, { "include": "#nest_brackets_r" } ], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "heredoc": { "begin": "^<<-?\\w+", "end": "$", "patterns": [{ "include": "$self" }] }, "interpolated_crystal": { "patterns": [ { "end": "(\\})", "begin": "#\\{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.crystal" } }, "contentName": "source.crystal", "patterns": [ { "include": "#nest_curly_and_self" }, { "include": "$self" } ], "endCaptures": { "0": { "name": "punctuation.section.embedded.end.crystal" }, "1": { "name": "source.crystal" } }, "name": "meta.embedded.line.crystal" }, { "match": "(#@)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.instance.crystal", "captures": { "1": { "name": "punctuation.definition.variable.crystal" } } }, { "match": "(#@@)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.class.crystal", "captures": { "1": { "name": "punctuation.definition.variable.crystal" } } }, { "match": "(#\\$)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.global.crystal", "captures": { "1": { "name": "punctuation.definition.variable.crystal" } } } ] }, "escaped_char": { "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", "name": "constant.character.escape.crystal" }, "nest_curly": { "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#nest_curly" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_ltgt": { "begin": "\\<", "end": "\\>", "patterns": [{ "include": "#nest_ltgt" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_brackets_i": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_brackets_i" } ], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_parens_r": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#regex_sub" }, { "include": "#nest_parens_r" } ], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_curly_i": { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_curly_i" } ], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_parens": { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#nest_parens" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "nest_parens_i": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_parens_i" } ], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } }, "regex_sub": { "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "match": "(\\{)\\d+(,\\d+)?(\\})", "name": "string.regexp.arbitrary-repitition.crystal", "captures": { "1": { "name": "punctuation.definition.arbitrary-repitition.crystal" }, "3": { "name": "punctuation.definition.arbitrary-repitition.crystal" } } }, { "begin": "\\[(?:\\^?\\])?", "end": "\\]", "patterns": [{ "include": "#escaped_char" }], "name": "string.regexp.character-class.crystal", "captures": { "0": { "name": "punctuation.definition.character-class.crystal" } } }, { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#regex_sub" }], "name": "string.regexp.group.crystal", "captures": { "0": { "name": "punctuation.definition.group.crystal" } } }, { "match": "(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$", "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", "name": "comment.line.number-sign.crystal", "captures": { "1": { "name": "punctuation.definition.comment.crystal" } } } ] }, "nest_curly_r": { "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#regex_sub" }, { "include": "#nest_curly_r" }], "captures": { "0": { "name": "punctuation.section.scope.crystal" } } } }, "uuid": "A2124E02-D424-4897-86BA-79DD7C3B6133", "patterns": [ { "match": "^\\s*((?:private|abstract|private\\s+abstract)\\s+)?((?:class|struct))\\s+(([.a-zA-Z0-9_:]+(\\s*(<)\\s*[.a-zA-Z0-9_:]+)?)|((<<)\\s*[.a-zA-Z0-9_:]+))", "name": "meta.class.crystal", "captures": { "7": { "name": "variable.other.object.crystal" }, "3": { "name": "entity.name.type.class.crystal" }, "8": { "name": "punctuation.definition.variable.crystal" }, "5": { "name": "entity.other.inherited-class.crystal" }, "1": { "name": "keyword.control.class.crystal" }, "6": { "name": "punctuation.separator.inheritance.crystal" }, "2": { "name": "keyword.control.class.crystal" } } }, { "match": "^\\s*(private\\s+)?(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)", "name": "meta.module.crystal", "captures": { "7": { "name": "punctuation.separator.inheritance.crystal" }, "3": { "name": "entity.name.type.module.crystal" }, "8": { "name": "entity.other.inherited-class.module.third.crystal" }, "4": { "name": "entity.other.inherited-class.module.first.crystal" }, "9": { "name": "punctuation.separator.inheritance.crystal" }, "5": { "name": "punctuation.separator.inheritance.crystal" }, "1": { "name": "keyword.control.module.crystal" }, "6": { "name": "entity.other.inherited-class.module.second.crystal" }, "2": { "name": "keyword.control.module.crystal" } } }, { "comment": "else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.", "match": "(?|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])", "name": "variable.other.readwrite.global.pre-defined.crystal", "captures": { "1": { "name": "punctuation.definition.variable.crystal" } } }, { "begin": "\\b(ENV)\\[", "end": "\\]", "patterns": [{ "include": "$self" }], "name": "meta.environment-variable.crystal", "beginCaptures": { "1": { "name": "variable.other.constant.crystal" } } }, { "match": "\\b[A-Z]\\w*", "name": "support.class.crystal" }, { "match": "\\b[A-Z]\\w*\\b", "name": "variable.other.constant.crystal" }, { "end": "\\)", "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ", "beginCaptures": { "1": { "name": "keyword.control.def.crystal" }, "2": { "name": "entity.name.function.crystal" }, "3": { "name": "punctuation.definition.parameters.crystal" } }, "patterns": [ { "include": "$self" }, { "match": "\\b[a-z\\_]\\w*\\b", "name": "variable.parameter.function.crystal" } ], "comment": "the method pattern comes from the symbol pattern, see there for a explanation", "endCaptures": { "0": { "name": "punctuation.definition.parameters.crystal" } }, "name": "meta.function.method.with-arguments.crystal" }, { "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", "end": "$", "comment": "same as the previous rule, but without parentheses around the arguments", "name": "meta.function.method.with-arguments.crystal", "beginCaptures": { "1": { "name": "keyword.control.def.crystal" }, "2": { "name": "entity.name.function.crystal" } }, "patterns": [ { "include": "$self" }, { "match": "\\b[a-z\\_]\\w*\\b", "name": "variable.parameter.function.crystal" } ] }, { "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ", "comment": " the optional name is just to catch the def also without a method-name", "name": "meta.function.method.without-arguments.crystal", "captures": { "1": { "name": "keyword.control.def.crystal" }, "3": { "name": "entity.name.function.crystal" } } }, { "match": "\\b(0[xXoObB]\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0[bB][01]+)(_?(u8|u16|u32|u64|u128|i8|i16|i32|i64|i128|f32|f64))?\\b", "name": "constant.numeric.crystal" }, { "begin": ":'", "end": "'", "patterns": [ { "match": "\\\\['\\\\]", "name": "constant.character.escape.crystal" } ], "name": "constant.other.symbol.single-quoted.crystal", "captures": { "0": { "name": "punctuation.definition.constant.crystal" } } }, { "begin": ":\"", "end": "\"", "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "name": "constant.other.symbol.double-quoted.crystal", "captures": { "0": { "name": "punctuation.definition.constant.crystal" } } }, { "comment": "Needs higher precidence than regular expressions.", "match": "(?", "begin": "%x\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_ltgt_i" } ], "comment": "execute string (allow for interpolation)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.interpolated.crystal" }, { "end": "\\)", "begin": "%x\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_parens_i" } ], "comment": "execute string (allow for interpolation)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.interpolated.crystal" }, { "end": "\\1", "begin": "%x([^\\w])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "execute string (allow for interpolation)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.interpolated.crystal" }, { "begin": "(?x)\n\t\t\t (?:\n\t\t\t ^ # beginning of line\n\t\t\t | (?<= # or look-behind on:\n\t\t\t [=>~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t", "end": "((/[eimnosux]*))", "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t", "contentName": "string.regexp.classic.crystal", "captures": { "1": { "name": "string.regexp.classic.crystal" }, "2": { "name": "punctuation.definition.string.crystal" } }, "patterns": [{ "include": "#regex_sub" }] }, { "end": "\\}[eimnosux]*", "begin": "%r\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [{ "include": "#regex_sub" }, { "include": "#nest_curly_r" }], "comment": "regular expressions (literal)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.regexp.mod-r.crystal" }, { "end": "\\][eimnosux]*", "begin": "%r\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#regex_sub" }, { "include": "#nest_brackets_r" } ], "comment": "regular expressions (literal)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.regexp.mod-r.crystal" }, { "end": "\\)[eimnosux]*", "begin": "%r\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#regex_sub" }, { "include": "#nest_parens_r" } ], "comment": "regular expressions (literal)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.regexp.mod-r.crystal" }, { "end": "\\>[eimnosux]*", "begin": "%r\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [{ "include": "#regex_sub" }, { "include": "#nest_ltgt_r" }], "comment": "regular expressions (literal)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.regexp.mod-r.crystal" }, { "end": "\\1[eimnosux]*", "begin": "%r([^\\w])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [{ "include": "#regex_sub" }], "comment": "regular expressions (literal)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.regexp.mod-r.crystal" }, { "end": "\\)", "begin": "%[QWSR]?\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_parens_i" } ], "comment": "literal capable of interpolation ()", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.upper.crystal" }, { "end": "\\]", "begin": "%[QWSR]?\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_brackets_i" } ], "comment": "literal capable of interpolation []", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.upper.crystal" }, { "end": "\\>", "begin": "%[QWSR]?\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_ltgt_i" } ], "comment": "literal capable of interpolation <>", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.upper.crystal" }, { "end": "\\}", "begin": "%[QWSR]?\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" }, { "include": "#nest_curly_i" } ], "comment": "literal capable of interpolation -- {}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.double.crystal.mod" }, { "end": "\\1", "begin": "%[QWSR]([^\\w])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "literal capable of interpolation -- wildcard", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.upper.crystal" }, { "end": "\\)", "begin": "%[qws]\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "match": "\\\\\\)|\\\\\\\\", "name": "constant.character.escape.crystal" }, { "include": "#nest_parens" } ], "comment": "literal incapable of interpolation -- ()", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.lower.crystal" }, { "end": "\\>", "begin": "%[qws]\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "match": "\\\\\\>|\\\\\\\\", "name": "constant.character.escape.crystal" }, { "include": "#nest_ltgt" } ], "comment": "literal incapable of interpolation -- <>", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.lower.crystal" }, { "end": "\\]", "begin": "%[qws]\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "match": "\\\\\\]|\\\\\\\\", "name": "constant.character.escape.crystal" }, { "include": "#nest_brackets" } ], "comment": "literal incapable of interpolation -- []", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.lower.crystal" }, { "end": "\\}", "begin": "%[qws]\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "match": "\\\\\\}|\\\\\\\\", "name": "constant.character.escape.crystal" }, { "include": "#nest_curly" } ], "comment": "literal incapable of interpolation -- {}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.lower.crystal" }, { "end": "\\1", "begin": "%[qws]([^\\w])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "comment": "Cant be named because its not necessarily an escape.", "match": "\\\\." } ], "comment": "literal incapable of interpolation -- wildcard", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.quoted.other.literal.lower.crystal" }, { "match": "(?[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)", "comment": "symbols", "name": "constant.other.symbol.crystal", "captures": { "1": { "name": "punctuation.definition.constant.crystal" } } }, { "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", "comment": "symbols", "name": "constant.other.symbol.crystal.19syntax", "captures": { "1": { "name": "punctuation.definition.constant.crystal" } } }, { "begin": "#", "end": "\\n", "patterns": [ { "match": "\\b(BUG|DEPRECATED|FIXME|NOTE|OPTIMIZE|TODO)\\b", "name": "storage.type.class.todo.crystal" } ], "name": "comment.line.number-sign.crystal", "captures": { "0": { "name": "punctuation.definition.comment.crystal" } } }, { "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0\n\t\t\t?* ?\" ?(\n\t\t\t?. ?#\n\n\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t", "match": "(?<<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.html.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "text.html.basic" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded HTML and indented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.html.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.sql.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.sql" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded SQL and indented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.sql.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.css.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.css" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded css and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.css.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.c++.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.c++" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded c++ and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.cplusplus.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.c.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.c" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded c++ and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.c.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.js.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.js" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded javascript and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.js.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.js.jquery.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.js.jquery" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded javascript and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.js.jquery.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.shell.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.shell" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded shell and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.shell.crystal" }, { "end": "\\s*\\2$", "begin": "(?><<-(\"?)((?:[_\\w]+_|)RUBY)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "contentName": "text.crystal.embedded.crystal", "patterns": [ { "include": "#heredoc" }, { "include": "source.crystal" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with embedded crystal and intented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.embedded.crystal.crystal" }, { "begin": "(?>\\=\\s*<<(\\w+))", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "end": "^\\1$", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "name": "string.unquoted.heredoc.crystal", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } } }, { "end": "\\s*\\1$", "begin": "(?><<-(\\w+))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.crystal" } }, "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_crystal" }, { "include": "#escaped_char" } ], "comment": "heredoc with indented terminator", "endCaptures": { "0": { "name": "punctuation.definition.string.end.crystal" } }, "name": "string.unquoted.heredoc.crystal" }, { "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)", "end": "(\\|)", "patterns": [ { "match": "[_a-zA-Z][_a-zA-Z0-9]*", "name": "variable.other.block.crystal" }, { "match": ",", "name": "punctuation.separator.variable.crystal" } ], "captures": { "1": { "name": "punctuation.separator.variable.crystal" } } }, { "match": "=>", "name": "punctuation.separator.key-value" }, { "match": "<<=|%=|&=|\\*=|\\*\\*=|\\+=|\\-=|\\^=|\\|{1,2}=|<<", "name": "keyword.operator.assignment.augmented.crystal" }, { "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?", "name": "keyword.operator.comparison.crystal" }, { "match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\^", "name": "keyword.operator.logical.crystal" }, { "match": "(\\{\\%|\\%\\}|\\{\\{|\\}\\})", "name": "keyword.operator.macro.crystal" }, { "match": "(%|&|\\*\\*|\\*|\\+|\\-|/)", "name": "keyword.operator.arithmetic.crystal" }, { "match": "=", "name": "keyword.operator.assignment.crystal" }, { "match": "\\||~|>>", "name": "keyword.operator.other.crystal" }, { "match": ":", "name": "punctuation.separator.other.crystal" }, { "match": "\\;", "name": "punctuation.separator.statement.crystal" }, { "match": ",", "name": "punctuation.separator.object.crystal" }, { "match": "\\.|::", "name": "punctuation.separator.method.crystal" }, { "match": "\\{|\\}", "name": "punctuation.section.scope.crystal" }, { "match": "\\[|\\]", "name": "punctuation.section.array.crystal" }, { "match": "\\(|\\)", "name": "punctuation.section.function.crystal" } ], "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p << end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t• Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t• Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE'\n\tThis is single quoted.\n\tThe above used #{Time.now}\n\tTHERE\n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\n\ttext:\n\t\"a\\332a\"\n\tsymptoms:\n\t'\\332' is not recognized as slash3.. which should be octal 332.\n\tsolution:\n\tplain regexp.. should be easy.\n\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n", "name": "Crystal", "scopeName": "source.crystal" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/csharp.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/dotnet/csharp-tmLanguage/commit/16612717ccd557383c0c821d7b6ae6662492ffde", "name": "C#", "scopeName": "source.cs", "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#directives" }, { "include": "#declarations" }, { "include": "#script-top-level" } ], "repository": { "directives": { "patterns": [ { "include": "#extern-alias-directive" }, { "include": "#using-directive" }, { "include": "#attribute-section" }, { "include": "#punctuation-semicolon" } ] }, "declarations": { "patterns": [ { "include": "#namespace-declaration" }, { "include": "#type-declarations" }, { "include": "#punctuation-semicolon" } ] }, "script-top-level": { "patterns": [ { "include": "#method-declaration" }, { "include": "#statement" }, { "include": "#punctuation-semicolon" } ] }, "type-declarations": { "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#storage-modifier" }, { "include": "#class-declaration" }, { "include": "#delegate-declaration" }, { "include": "#enum-declaration" }, { "include": "#interface-declaration" }, { "include": "#record-declaration" }, { "include": "#struct-declaration" }, { "include": "#attribute-section" }, { "include": "#punctuation-semicolon" } ] }, "class-or-struct-members": { "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#storage-modifier" }, { "include": "#type-declarations" }, { "include": "#property-declaration" }, { "include": "#field-declaration" }, { "include": "#event-declaration" }, { "include": "#indexer-declaration" }, { "include": "#variable-initializer" }, { "include": "#constructor-declaration" }, { "include": "#destructor-declaration" }, { "include": "#operator-declaration" }, { "include": "#conversion-operator-declaration" }, { "include": "#method-declaration" }, { "include": "#attribute-section" }, { "include": "#punctuation-semicolon" } ] }, "interface-members": { "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#property-declaration" }, { "include": "#event-declaration" }, { "include": "#indexer-declaration" }, { "include": "#method-declaration" }, { "include": "#attribute-section" }, { "include": "#punctuation-semicolon" } ] }, "statement": { "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#while-statement" }, { "include": "#do-statement" }, { "include": "#for-statement" }, { "include": "#foreach-statement" }, { "include": "#if-statement" }, { "include": "#else-part" }, { "include": "#switch-statement" }, { "include": "#goto-statement" }, { "include": "#return-statement" }, { "include": "#break-or-continue-statement" }, { "include": "#throw-statement" }, { "include": "#yield-statement" }, { "include": "#await-statement" }, { "include": "#try-statement" }, { "include": "#checked-unchecked-statement" }, { "include": "#lock-statement" }, { "include": "#using-statement" }, { "include": "#labeled-statement" }, { "include": "#object-creation-expression" }, { "include": "#array-creation-expression" }, { "include": "#anonymous-object-creation-expression" }, { "include": "#local-declaration" }, { "include": "#block" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" } ] }, "expression": { "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#checked-unchecked-expression" }, { "include": "#typeof-or-default-expression" }, { "include": "#nameof-expression" }, { "include": "#throw-expression" }, { "include": "#interpolated-string" }, { "include": "#verbatim-interpolated-string" }, { "include": "#this-or-base-expression" }, { "include": "#switch-expression" }, { "include": "#conditional-operator" }, { "include": "#expression-operators" }, { "include": "#await-expression" }, { "include": "#query-expression" }, { "include": "#as-expression" }, { "include": "#is-expression" }, { "include": "#anonymous-method-expression" }, { "include": "#object-creation-expression" }, { "include": "#array-creation-expression" }, { "include": "#anonymous-object-creation-expression" }, { "include": "#invocation-expression" }, { "include": "#member-access-expression" }, { "include": "#element-access-expression" }, { "include": "#cast-expression" }, { "include": "#literal" }, { "include": "#parenthesized-expression" }, { "include": "#tuple-deconstruction-assignment" }, { "include": "#initializer-expression" }, { "include": "#identifier" } ] }, "extern-alias-directive": { "begin": "\\s*(extern)\\b\\s*(alias)\\b\\s*(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { "name": "keyword.other.extern.cs" }, "2": { "name": "keyword.other.alias.cs" }, "3": { "name": "variable.other.alias.cs" } }, "end": "(?=;)" }, "using-directive": { "patterns": [ { "begin": "\\b(using)\\b\\s+(static)\\s+", "beginCaptures": { "1": { "name": "keyword.other.using.cs" }, "2": { "name": "keyword.other.static.cs" } }, "end": "(?=;)", "patterns": [ { "include": "#type" } ] }, { "begin": "\\b(using)\\s+(?=(@?[_[:alpha:]][_[:alnum:]]*)\\s*=)", "beginCaptures": { "1": { "name": "keyword.other.using.cs" }, "2": { "name": "entity.name.type.alias.cs" } }, "end": "(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#type" }, { "include": "#operator-assignment" } ] }, { "begin": "\\b(using)\\s*", "beginCaptures": { "1": { "name": "keyword.other.using.cs" } }, "end": "(?=;)", "patterns": [ { "include": "#comment" }, { "name": "entity.name.type.namespace.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#operator-assignment" } ] } ] }, "attribute-section": { "begin": "(\\[)(assembly|module|field|event|method|param|property|return|type)?(\\:)?", "beginCaptures": { "1": { "name": "punctuation.squarebracket.open.cs" }, "2": { "name": "keyword.other.attribute-specifier.cs" }, "3": { "name": "punctuation.separator.colon.cs" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.squarebracket.close.cs" } }, "patterns": [ { "include": "#comment" }, { "include": "#attribute" }, { "include": "#punctuation-comma" } ] }, "attribute": { "patterns": [ { "include": "#type-name" }, { "include": "#attribute-arguments" } ] }, "attribute-arguments": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.parenthesis.open.cs" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#attribute-named-argument" }, { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "attribute-named-argument": { "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?==)", "beginCaptures": { "1": { "name": "entity.name.variable.property.cs" } }, "end": "(?=(,|\\)))", "patterns": [ { "include": "#operator-assignment" }, { "include": "#expression" } ] }, "namespace-declaration": { "begin": "\\b(namespace)\\s+", "beginCaptures": { "1": { "name": "keyword.other.namespace.cs" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "name": "entity.name.type.namespace.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-accessor" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#declarations" }, { "include": "#using-directive" }, { "include": "#punctuation-semicolon" } ] } ] }, "storage-modifier": { "name": "storage.modifier.cs", "match": "(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\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)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.delegate.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.type.delegate.cs" }, "8": { "patterns": [ { "include": "#type-parameter-list" } ] } }, "end": "(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#parenthesized-parameter-list" }, { "include": "#generic-constraints" } ] }, "enum-declaration": { "begin": "(?=\\benum\\b)", "end": "(?<=\\})", "patterns": [ { "begin": "(?=enum)", "end": "(?=\\{)", "patterns": [ { "include": "#comment" }, { "match": "(enum)\\s+(@?[_[:alpha:]][_[:alnum:]]*)", "captures": { "1": { "name": "keyword.other.enum.cs" }, "2": { "name": "entity.name.type.enum.cs" } } }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.colon.cs" } }, "end": "(?=\\{)", "patterns": [ { "include": "#type" } ] } ] }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#attribute-section" }, { "include": "#punctuation-comma" }, { "begin": "@?[_[:alpha:]][_[:alnum:]]*", "beginCaptures": { "0": { "name": "entity.name.variable.enum-member.cs" } }, "end": "(?=(,|\\}))", "patterns": [ { "include": "#comment" }, { "include": "#variable-initializer" } ] } ] }, { "include": "#preprocessor" }, { "include": "#comment" } ] }, "interface-declaration": { "begin": "(?=\\binterface\\b)", "end": "(?<=\\})", "patterns": [ { "begin": "(?x)\n(interface)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { "name": "keyword.other.interface.cs" }, "2": { "name": "entity.name.type.interface.cs" } }, "end": "(?=\\{)", "patterns": [ { "include": "#comment" }, { "include": "#type-parameter-list" }, { "include": "#base-types" }, { "include": "#generic-constraints" } ] }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#interface-members" } ] }, { "include": "#preprocessor" }, { "include": "#comment" } ] }, "record-declaration": { "begin": "(?=\\brecord\\b)", "end": "(?<=\\})", "patterns": [ { "begin": "(?x)\n(record)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { "name": "keyword.other.record.cs" }, "2": { "name": "entity.name.type.record.cs" } }, "end": "(?=\\{)", "patterns": [ { "include": "#comment" }, { "include": "#type-parameter-list" }, { "include": "#base-types" }, { "include": "#generic-constraints" } ] }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#class-or-struct-members" } ] }, { "include": "#preprocessor" }, { "include": "#comment" } ] }, "struct-declaration": { "begin": "(?=\\bstruct\\b)", "end": "(?<=\\})", "patterns": [ { "begin": "(?x)\n(struct)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { "name": "keyword.other.struct.cs" }, "2": { "name": "entity.name.type.struct.cs" } }, "end": "(?=\\{)", "patterns": [ { "include": "#comment" }, { "include": "#type-parameter-list" }, { "include": "#base-types" }, { "include": "#generic-constraints" } ] }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#class-or-struct-members" } ] }, { "include": "#preprocessor" }, { "include": "#comment" } ] }, "type-parameter-list": { "begin": "\\<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.cs" } }, "end": "\\>", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.cs" } }, "patterns": [ { "match": "\\b(in|out)\\b", "captures": { "1": { "name": "storage.modifier.cs" } } }, { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", "captures": { "1": { "name": "entity.name.type.type-parameter.cs" } } }, { "include": "#comment" }, { "include": "#punctuation-comma" }, { "include": "#attribute-section" } ] }, "base-types": { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.colon.cs" } }, "end": "(?=\\{|where)", "patterns": [ { "include": "#type" }, { "include": "#punctuation-comma" }, { "include": "#preprocessor" } ] }, "generic-constraints": { "begin": "(where)\\s+(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", "beginCaptures": { "1": { "name": "keyword.other.where.cs" }, "2": { "name": "entity.name.type.type-parameter.cs" }, "3": { "name": "punctuation.separator.colon.cs" } }, "end": "(?=\\{|where|;|=>)", "patterns": [ { "name": "keyword.other.class.cs", "match": "\\bclass\\b" }, { "name": "keyword.other.struct.cs", "match": "\\bstruct\\b" }, { "match": "(new)\\s*(\\()\\s*(\\))", "captures": { "1": { "name": "keyword.other.new.cs" }, "2": { "name": "punctuation.parenthesis.open.cs" }, "3": { "name": "punctuation.parenthesis.close.cs" } } }, { "include": "#type" }, { "include": "#punctuation-comma" }, { "include": "#generic-constraints" } ] }, "field-declaration": { "begin": "(?x)\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)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "name": "entity.name.variable.field.cs" } }, "end": "(?=;)", "patterns": [ { "name": "entity.name.variable.field.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" }, { "include": "#comment" }, { "include": "#variable-initializer" }, { "include": "#class-or-struct-members" } ] }, "property-declaration": { "begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\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 )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "7": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "8": { "name": "entity.name.variable.property.cs" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#property-accessors" }, { "include": "#expression-body" }, { "include": "#variable-initializer" }, { "include": "#class-or-struct-members" } ] }, "indexer-declaration": { "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\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 )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "7": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "8": { "name": "keyword.other.this.cs" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#bracketed-parameter-list" }, { "include": "#property-accessors" }, { "include": "#expression-body" }, { "include": "#variable-initializer" } ] }, "event-declaration": { "begin": "(?x)\n\\b(event)\\b\\s*\n(?\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 )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", "beginCaptures": { "1": { "name": "keyword.other.event.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "8": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "9": { "patterns": [ { "name": "entity.name.variable.event.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" } ] } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#event-accessors" }, { "include": "#punctuation-comma" } ] }, "property-accessors": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "name": "storage.modifier.cs", "match": "\\b(private|protected|internal)\\b" }, { "name": "keyword.other.get.cs", "match": "\\b(get)\\b" }, { "name": "keyword.other.set.cs", "match": "\\b(set)\\b" }, { "name": "keyword.other.init.cs", "match": "\\b(init)\\b" }, { "include": "#comment" }, { "include": "#attribute-section" }, { "include": "#expression-body" }, { "include": "#block" }, { "include": "#punctuation-semicolon" } ] }, "event-accessors": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "name": "keyword.other.add.cs", "match": "\\b(add)\\b" }, { "name": "keyword.other.remove.cs", "match": "\\b(remove)\\b" }, { "include": "#comment" }, { "include": "#attribute-section" }, { "include": "#expression-body" }, { "include": "#block" }, { "include": "#punctuation-semicolon" } ] }, "method-declaration": { "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\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 )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "7": { "patterns": [ { "include": "#type" }, { "include": "#punctuation-accessor" } ] }, "8": { "name": "entity.name.function.cs" }, "9": { "patterns": [ { "include": "#type-parameter-list" } ] } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#parenthesized-parameter-list" }, { "include": "#generic-constraints" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "constructor-declaration": { "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*\\s*\\()", "end": "(?<=\\})|(?=;)", "patterns": [ { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b", "captures": { "1": { "name": "entity.name.function.cs" } } }, { "begin": "(:)", "beginCaptures": { "1": { "name": "punctuation.separator.colon.cs" } }, "end": "(?=\\{|=>)", "patterns": [ { "include": "#constructor-initializer" } ] }, { "include": "#parenthesized-parameter-list" }, { "include": "#preprocessor" }, { "include": "#comment" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "constructor-initializer": { "begin": "\\b(?:(base)|(this))\\b\\s*(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.base.cs" }, "2": { "name": "keyword.other.this.cs" } }, "end": "(?<=\\))", "patterns": [ { "include": "#argument-list" } ] }, "destructor-declaration": { "begin": "(~)(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.tilde.cs" }, "2": { "name": "entity.name.function.cs" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#parenthesized-parameter-list" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "operator-declaration": { "begin": "(?x)\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\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)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "name": "keyword.other.operator-decl.cs" }, "7": { "name": "entity.name.function.cs" } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#parenthesized-parameter-list" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "conversion-operator-declaration": { "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\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)\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ { "match": "\\b(explicit)\\b", "captures": { "1": { "name": "keyword.other.explicit.cs" } } }, { "match": "\\b(implicit)\\b", "captures": { "1": { "name": "keyword.other.implicit.cs" } } } ] }, "2": { "name": "keyword.other.operator-decl.cs" }, "3": { "patterns": [ { "include": "#type" } ] } }, "end": "(?<=\\})|(?=;)", "patterns": [ { "include": "#comment" }, { "include": "#parenthesized-parameter-list" }, { "include": "#expression-body" }, { "include": "#block" } ] }, "block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#statement" } ] }, "variable-initializer": { "begin": "(?)", "beginCaptures": { "1": { "name": "keyword.operator.assignment.cs" } }, "end": "(?=[,\\)\\];}])", "patterns": [ { "include": "#ref-modifier" }, { "include": "#expression" } ] }, "expression-body": { "begin": "=>", "beginCaptures": { "0": { "name": "keyword.operator.arrow.cs" } }, "end": "(?=[,\\);}])", "patterns": [ { "include": "#ref-modifier" }, { "include": "#expression" } ] }, "goto-statement": { "begin": "(?\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)\\s+\n(\\g)\\b\\s*", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "2": { "name": "entity.name.variable.local.cs" } }, "end": "(?==>)", "patterns": [ { "include": "#comment" }, { "include": "#switch-when-clause" } ] }, "switch-property-expression": { "begin": "(?x) # e.g. int x OR var x\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)?\\s*\n(\\{)", "beginCaptures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "name": "punctuation.curlybrace.open.cs" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.cs" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "switch-var-pattern": { "begin": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s*", "beginCaptures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "#tuple-declaration-deconstruction-element-list" } ] } }, "end": "(?==>)", "patterns": [ { "include": "#comment" }, { "include": "#switch-when-clause" } ] }, "switch-when-clause": { "begin": "(?)", "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#punctuation-comma" }, { "match": "\\(", "captures": { "0": { "name": "punctuation.parenthesis.open.cs" } } }, { "match": "\\)", "captures": { "0": { "name": "punctuation.parenthesis.close.cs" } } } ] }, "switch-label": { "patterns": [ { "begin": "(?\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", "captures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.local.cs" }, "8": { "name": "keyword.control.loop.in.cs" } } }, { "match": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)?\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s+\n\\b(in)\\b", "captures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "#tuple-declaration-deconstruction-element-list" } ] }, "3": { "name": "keyword.control.loop.in.cs" } } }, { "include": "#expression" } ] }, { "include": "#statement" } ] }, "try-statement": { "patterns": [ { "include": "#try-block" }, { "include": "#catch-clause" }, { "include": "#finally-clause" } ] }, "try-block": { "begin": "(?\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)\\s*\n(?:(\\g)\\b)?", "captures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "name": "entity.name.variable.local.cs" } } } ] }, { "include": "#when-clause" }, { "include": "#comment" }, { "include": "#block" } ] }, "when-clause": { "begin": "(?\n (?:\n (?:ref\\s+(?:readonly\\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(?!=>)\n(?=,|;|=|\\))", "beginCaptures": { "1": { "name": "keyword.other.using.cs" }, "2": { "name": "storage.modifier.cs" }, "3": { "name": "storage.modifier.cs" }, "4": { "name": "keyword.other.var.cs" }, "5": { "patterns": [ { "include": "#type" } ] }, "10": { "name": "entity.name.variable.local.cs" } }, "end": "(?=;|\\))", "patterns": [ { "name": "entity.name.variable.local.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" }, { "include": "#comment" }, { "include": "#variable-initializer" } ] }, "local-constant-declaration": { "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\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)\\s+\n(\\g)\\s*\n(?=,|;|=)", "beginCaptures": { "1": { "name": "storage.modifier.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.local.cs" } }, "end": "(?=;)", "patterns": [ { "name": "entity.name.variable.local.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" }, { "include": "#punctuation-comma" }, { "include": "#comment" }, { "include": "#variable-initializer" } ] }, "local-function-declaration": { "patterns": [ { "include": "#method-declaration" } ] }, "local-tuple-var-deconstruction": { "begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?\\((?:[^\\(\\)]|\\g)+\\))\\s*\n(?=;|=|\\))", "beginCaptures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "#tuple-declaration-deconstruction-element-list" } ] } }, "end": "(?=;|\\))", "patterns": [ { "include": "#comment" }, { "include": "#variable-initializer" } ] }, "tuple-deconstruction-assignment": { "match": "(?x)\n(?\\s*\\((?:[^\\(\\)]|\\g)+\\))\\s*\n(?!=>|==)(?==)", "captures": { "1": { "patterns": [ { "include": "#tuple-deconstruction-element-list" } ] } } }, "tuple-declaration-deconstruction-element-list": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#comment" }, { "include": "#tuple-declaration-deconstruction-element-list" }, { "include": "#declaration-expression-tuple" }, { "include": "#punctuation-comma" }, { "match": "(?x) # e.g. x\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "entity.name.variable.tuple-element.cs" } } } ] }, "tuple-deconstruction-element-list": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#comment" }, { "include": "#tuple-deconstruction-element-list" }, { "include": "#declaration-expression-tuple" }, { "include": "#punctuation-comma" }, { "match": "(?x) # e.g. x\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "variable.other.readwrite.cs" } } } ] }, "declaration-expression-local": { "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\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)\\b\\s*\n(?=[,)\\]])", "captures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.local.cs" } } }, "declaration-expression-tuple": { "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\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)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.tuple-element.cs" } } }, "checked-unchecked-expression": { "begin": "(?>=|\\|=" }, { "name": "keyword.operator.bitwise.shift.cs", "match": "<<|>>" }, { "name": "keyword.operator.comparison.cs", "match": "==|!=" }, { "name": "keyword.operator.relational.cs", "match": "<=|>=|<|>" }, { "name": "keyword.operator.logical.cs", "match": "\\!|&&|\\|\\|" }, { "name": "keyword.operator.bitwise.cs", "match": "\\&|~|\\^|\\|" }, { "name": "keyword.operator.assignment.cs", "match": "\\=" }, { "name": "keyword.operator.decrement.cs", "match": "--" }, { "name": "keyword.operator.increment.cs", "match": "\\+\\+" }, { "name": "keyword.operator.arithmetic.cs", "match": "%|\\*|/|-|\\+" }, { "name": "keyword.operator.null-coalescing.cs", "match": "\\?\\?" } ] }, "switch-literal": { "name": "constant.language.null.cs", "match": "(?\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)\\s*\n(\\))(?=\\s*-*!*@?[_[:alnum:]\\(])", "captures": { "1": { "name": "punctuation.parenthesis.open.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "punctuation.parenthesis.close.cs" } } }, "as-expression": { "match": "(?x)\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)?", "captures": { "1": { "name": "keyword.other.as.cs" }, "2": { "patterns": [ { "include": "#type" } ] } } }, "is-expression": { "match": "(?x)\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)?", "captures": { "1": { "name": "keyword.other.is.cs" }, "2": { "patterns": [ { "include": "#type" } ] } } }, "this-or-base-expression": { "match": "\\b(?:(base)|(this))\\b", "captures": { "1": { "name": "keyword.other.base.cs" }, "2": { "name": "keyword.other.this.cs" } } }, "invocation-expression": { "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?\\s*<([^<>]|\\g)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list", "beginCaptures": { "1": { "name": "keyword.operator.null-conditional.cs" }, "2": { "name": "punctuation.accessor.cs" }, "3": { "name": "entity.name.function.cs" }, "4": { "patterns": [ { "include": "#type-arguments" } ] } }, "end": "(?<=\\))", "patterns": [ { "include": "#argument-list" } ] }, "element-access-expression": { "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(?:(@?[_[:alpha:]][_[:alnum:]]*)\\s*)? # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list", "beginCaptures": { "1": { "name": "keyword.operator.null-conditional.cs" }, "2": { "name": "punctuation.accessor.cs" }, "3": { "name": "variable.other.object.property.cs" }, "4": { "name": "keyword.operator.null-conditional.cs" } }, "end": "(?<=\\])(?!\\s*\\[)", "patterns": [ { "include": "#bracketed-argument-list" } ] }, "member-access-expression": { "patterns": [ { "match": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(\\.)\\s* # preceding dot\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # property name\n(?![_[:alnum:]]|\\(|(\\?)?\\[|<) # next character is not alpha-numeric, nor a (, [, or <. Also, test for ?[", "captures": { "1": { "name": "keyword.operator.null-conditional.cs" }, "2": { "name": "punctuation.accessor.cs" }, "3": { "name": "variable.other.object.property.cs" } } }, { "match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?\\s*<([^<>]|\\g)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", "captures": { "1": { "name": "punctuation.accessor.cs" }, "2": { "name": "variable.other.object.cs" }, "3": { "patterns": [ { "include": "#type-arguments" } ] } } }, { "match": "(?x)\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", "captures": { "1": { "name": "variable.other.object.cs" } } } ] }, "object-creation-expression": { "patterns": [ { "include": "#object-creation-expression-with-parameters" }, { "include": "#object-creation-expression-with-no-parameters" } ] }, "object-creation-expression-with-parameters": { "begin": "(?x)\n(new)\\s+\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)\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.new.cs" }, "2": { "patterns": [ { "include": "#type" } ] } }, "end": "(?<=\\))", "patterns": [ { "include": "#argument-list" } ] }, "object-creation-expression-with-no-parameters": { "match": "(?x)\n(new)\\s+\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)\\s*\n(?=\\{|$)", "captures": { "1": { "name": "keyword.other.new.cs" }, "2": { "patterns": [ { "include": "#type" } ] } } }, "array-creation-expression": { "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\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)?\\s*\n(?=\\[)", "beginCaptures": { "1": { "name": "keyword.other.new.cs" }, "2": { "patterns": [ { "include": "#type" } ] } }, "end": "(?<=\\])", "patterns": [ { "include": "#bracketed-argument-list" } ] }, "anonymous-object-creation-expression": { "begin": "\\b(new)\\b\\s*(?=\\{|$)", "beginCaptures": { "1": { "name": "keyword.other.new.cs" } }, "end": "(?<=\\})", "patterns": [ { "include": "#initializer-expression" } ] }, "bracketed-parameter-list": { "begin": "(?=(\\[))", "beginCaptures": { "1": { "name": "punctuation.squarebracket.open.cs" } }, "end": "(?=(\\]))", "endCaptures": { "1": { "name": "punctuation.squarebracket.close.cs" } }, "patterns": [ { "begin": "(?<=\\[)", "end": "(?=\\])", "patterns": [ { "include": "#comment" }, { "include": "#attribute-section" }, { "include": "#parameter" }, { "include": "#punctuation-comma" }, { "include": "#variable-initializer" } ] } ] }, "parenthesized-parameter-list": { "begin": "(\\()", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "(\\))", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#comment" }, { "include": "#attribute-section" }, { "include": "#parameter" }, { "include": "#punctuation-comma" }, { "include": "#variable-initializer" } ] }, "parameter": { "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?\n (?:\n (?:ref\\s+)? # ref return\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)\\s+\n(\\g)", "captures": { "1": { "name": "storage.modifier.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.parameter.cs" } } }, "argument-list": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#named-argument" }, { "include": "#argument" }, { "include": "#punctuation-comma" } ] }, "bracketed-argument-list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.cs" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.cs" } }, "patterns": [ { "include": "#named-argument" }, { "include": "#argument" }, { "include": "#punctuation-comma" } ] }, "named-argument": { "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)", "beginCaptures": { "1": { "name": "entity.name.variable.parameter.cs" }, "2": { "name": "punctuation.separator.colon.cs" } }, "end": "(?=(,|\\)|\\]))", "patterns": [ { "include": "#argument" } ] }, "argument": { "patterns": [ { "name": "storage.modifier.cs", "match": "\\b(ref|out|in)\\b" }, { "include": "#declaration-expression-local" }, { "include": "#expression" } ] }, "query-expression": { "begin": "(?x)\n\\b(from)\\b\\s*\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+(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.from.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.range-variable.cs" }, "8": { "name": "keyword.query.in.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#query-body" }, { "include": "#expression" } ] }, "query-body": { "patterns": [ { "include": "#let-clause" }, { "include": "#where-clause" }, { "include": "#join-clause" }, { "include": "#orderby-clause" }, { "include": "#select-clause" }, { "include": "#group-clause" } ] }, "let-clause": { "begin": "(?x)\n\\b(let)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=)\\s*", "beginCaptures": { "1": { "name": "keyword.query.let.cs" }, "2": { "name": "entity.name.variable.range-variable.cs" }, "3": { "name": "keyword.operator.assignment.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#query-body" }, { "include": "#expression" } ] }, "where-clause": { "begin": "(?x)\n\\b(where)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.where.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#query-body" }, { "include": "#expression" } ] }, "join-clause": { "begin": "(?x)\n\\b(join)\\b\\s*\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+(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.join.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.range-variable.cs" }, "8": { "name": "keyword.query.in.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#join-on" }, { "include": "#join-equals" }, { "include": "#join-into" }, { "include": "#query-body" }, { "include": "#expression" } ] }, "join-on": { "match": "\\b(on)\\b\\s*", "captures": { "1": { "name": "keyword.query.on.cs" } } }, "join-equals": { "match": "\\b(equals)\\b\\s*", "captures": { "1": { "name": "keyword.query.equals.cs" } } }, "join-into": { "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*", "captures": { "1": { "name": "keyword.query.into.cs" }, "2": { "name": "entity.name.variable.range-variable.cs" } } }, "orderby-clause": { "begin": "\\b(orderby)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.orderby.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#ordering-direction" }, { "include": "#query-body" }, { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "ordering-direction": { "match": "\\b(?:(ascending)|(descending))\\b", "captures": { "1": { "name": "keyword.query.ascending.cs" }, "2": { "name": "keyword.query.descending.cs" } } }, "select-clause": { "begin": "\\b(select)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.select.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#query-body" }, { "include": "#expression" } ] }, "group-clause": { "begin": "\\b(group)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.group.cs" } }, "end": "(?=;|\\))", "patterns": [ { "include": "#group-by" }, { "include": "#group-into" }, { "include": "#query-body" }, { "include": "#expression" } ] }, "group-by": { "match": "\\b(by)\\b\\s*", "captures": { "1": { "name": "keyword.query.by.cs" } } }, "group-into": { "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*", "captures": { "1": { "name": "keyword.query.into.cs" }, "2": { "name": "entity.name.variable.range-variable.cs" } } }, "anonymous-method-expression": { "patterns": [ { "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=>)", "beginCaptures": { "1": { "name": "storage.modifier.cs" }, "2": { "name": "entity.name.variable.parameter.cs" }, "3": { "name": "keyword.operator.arrow.cs" } }, "end": "(?=\\)|;|}|,)", "patterns": [ { "include": "#block" }, { "include": "#ref-modifier" }, { "include": "#expression" } ] }, { "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(\\(.*?\\))\\s*\n(=>)", "beginCaptures": { "1": { "name": "storage.modifier.cs" }, "2": { "patterns": [ { "include": "#lambda-parameter-list" } ] }, "3": { "name": "keyword.operator.arrow.cs" } }, "end": "(?=\\)|;|}|,)", "patterns": [ { "include": "#block" }, { "include": "#ref-modifier" }, { "include": "#expression" } ] }, { "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(?:\\b(delegate)\\b\\s*)", "beginCaptures": { "1": { "name": "storage.modifier.cs" }, "2": { "name": "keyword.other.delegate.cs" } }, "end": "(?=\\)|;|}|,)", "patterns": [ { "include": "#parenthesized-parameter-list" }, { "include": "#block" }, { "include": "#expression" } ] } ] }, "lambda-parameter-list": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#comment" }, { "include": "#attribute-section" }, { "include": "#lambda-parameter" }, { "include": "#punctuation-comma" } ] }, "lambda-parameter": { "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\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)\\s+)?\n(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "storage.modifier.cs" }, "2": { "patterns": [ { "include": "#type" } ] }, "7": { "name": "entity.name.variable.parameter.cs" } } }, "type": { "name": "meta.type.cs", "patterns": [ { "include": "#comment" }, { "include": "#ref-modifier" }, { "include": "#readonly-modifier" }, { "include": "#tuple-type" }, { "include": "#type-builtin" }, { "include": "#type-name" }, { "include": "#type-arguments" }, { "include": "#type-array-suffix" }, { "include": "#type-nullable-suffix" } ] }, "ref-modifier": { "name": "storage.modifier.cs", "match": "\\b(ref)\\b" }, "readonly-modifier": { "name": "storage.modifier.cs", "match": "\\b(readonly)\\b" }, "tuple-type": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "include": "#tuple-element" }, { "include": "#punctuation-comma" } ] }, "tuple-element": { "match": "(?x)\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(?:(?\\g)\\b)?", "captures": { "1": { "patterns": [ { "include": "#type" } ] }, "6": { "name": "entity.name.variable.tuple-element.cs" } } }, "type-builtin": { "match": "\\b(bool|byte|char|decimal|double|float|int|long|object|sbyte|short|string|uint|ulong|ushort|void|dynamic)\\b", "captures": { "1": { "name": "keyword.type.cs" } } }, "type-name": { "patterns": [ { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\:\\:)", "captures": { "1": { "name": "entity.name.type.alias.cs" }, "2": { "name": "punctuation.separator.coloncolon.cs" } } }, { "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.)", "captures": { "1": { "name": "entity.name.type.cs" }, "2": { "name": "punctuation.accessor.cs" } } }, { "match": "(\\.)\\s*(@?[_[:alpha:]][_[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.cs" }, "2": { "name": "entity.name.type.cs" } } }, { "name": "entity.name.type.cs", "match": "@?[_[:alpha:]][_[:alnum:]]*" } ] }, "type-arguments": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.cs" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.cs" } }, "patterns": [ { "include": "#comment" }, { "include": "#type" }, { "include": "#punctuation-comma" } ] }, "type-array-suffix": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.cs" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.cs" } }, "patterns": [ { "include": "#punctuation-comma" } ] }, "type-nullable-suffix": { "match": "\\?", "captures": { "0": { "name": "punctuation.separator.question-mark.cs" } } }, "operator-assignment": { "name": "keyword.operator.assignment.cs", "match": "(?)", "endCaptures": { "1": { "name": "punctuation.definition.tag.cs" } }, "patterns": [ { "include": "#xml-attribute" } ] }, "xml-attribute": { "patterns": [ { "match": "(?x)\n(?:^|\\s+)\n(\n (?:\n ([-_[:alnum:]]+)\n (:)\n )?\n ([-_[:alnum:]]+)\n)\n(=)", "captures": { "1": { "name": "entity.other.attribute-name.cs" }, "2": { "name": "entity.other.attribute-name.namespace.cs" }, "3": { "name": "punctuation.separator.colon.cs" }, "4": { "name": "entity.other.attribute-name.localname.cs" }, "5": { "name": "punctuation.separator.equals.cs" } } }, { "include": "#xml-string" } ] }, "xml-cdata": { "name": "string.unquoted.cdata.cs", "begin": "", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cs" } } }, "xml-string": { "patterns": [ { "name": "string.quoted.single.cs", "begin": "\\'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cs" } }, "end": "\\'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cs" } }, "patterns": [ { "include": "#xml-character-entity" } ] }, { "name": "string.quoted.double.cs", "begin": "\\\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.cs" } }, "end": "\\\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.cs" } }, "patterns": [ { "include": "#xml-character-entity" } ] } ] }, "xml-character-entity": { "patterns": [ { "name": "constant.character.entity.cs", "match": "(?x)\n(&)\n(\n (?:[[:alpha:]:_][[:alnum:]:_.-]*)|\n (?:\\#[[:digit:]]+)|\n (?:\\#x[[:xdigit:]]+)\n)\n(;)", "captures": { "1": { "name": "punctuation.definition.constant.cs" }, "3": { "name": "punctuation.definition.constant.cs" } } }, { "name": "invalid.illegal.bad-ampersand.cs", "match": "&" } ] }, "xml-comment": { "name": "comment.block.cs", "begin": "", "endCaptures": { "0": { "name": "punctuation.definition.comment.cs" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/csound-document.tmLanguage.json ================================================ { "name": "Csound Document", "scopeName": "source.csound-document", "fileTypes": ["csd"], "firstLineMatch": "", "patterns": [ { "begin": "(<)(CsoundSynthesi[sz]er)(>)", "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "patterns": [ { "begin": "(<)(CsOptions)(>)", "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "patterns": [ { "include": "source.csound#comments" } ] }, { "name": "meta.orchestra.csound-document", "begin": "(<)(CsInstruments)(>)", "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "contentName": "source.csound.embedded.csound-document", "patterns": [ { "include": "source.csound" } ] }, { "name": "meta.score.csound-document", "begin": "(<)(CsScore)(>)", "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" }, "3": { "name": "punctuation.definition.tag.end.csound-document" } }, "contentName": "source.csound-score.embedded.csound-document", "patterns": [ { "include": "source.csound-score" } ] }, { "name": "meta.html.csound-document", "begin": "(?i)(?=)", "patterns": [ { "include": "text.html.basic" } ] }, { "include": "#tags" } ] }, { "include": "#tags" } ], "repository": { "tags": { "patterns": [ { "begin": "(", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.csound-document" }, "2": { "name": "entity.name.tag.csound-document" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.csound-document" } }, "patterns": [ { "include": "text.xml#tagStuff" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/csound-score.tmLanguage.json ================================================ { "name": "Csound Score", "scopeName": "source.csound-score", "fileTypes": ["sco"], "patterns": [ { "include": "source.csound#preprocessorDirectives" }, { "include": "source.csound#commentsAndMacroUses" }, { "name": "keyword.control.csound-score", "match": "[aBbCdefiqstvxy]" }, { "name": "invalid.illegal.csound-score", "match": "w" }, { "name": "constant.numeric.language.csound-score", "match": "z" }, { "name": "meta.p-symbol.csound-score", "match": "([nNpP][pP])(\\d+)", "captures": { "1": { "name": "keyword.control.csound-score" }, "2": { "name": "constant.numeric.integer.decimal.csound-score" } } }, { "begin": "(m)|(n)", "end": "$", "beginCaptures": { "1": { "name": "keyword.mark.preprocessor.csound-score" }, "2": { "name": "keyword.repeat-mark.preprocessor.csound-score" } }, "patterns": [ { "include": "source.csound#comments" }, { "name": "entity.name.label.csound-score", "match": "[A-Z_a-z]\\w*" } ] }, { "begin": "r\\b", "end": "$", "beginCaptures": { "0": { "name": "keyword.repeat-section.preprocessor.csound-score" } }, "patterns": [ { "include": "source.csound#comments" }, { "begin": "\\d+", "end": "$", "beginCaptures": { "0": { "name": "constant.numeric.integer.decimal.csound-score" } }, "patterns": [ { "include": "source.csound#comments" }, { "include": "source.csound#macroNames" } ] } ] }, { "include": "source.csound#numbers" }, { "name": "keyword.operator.csound-score", "match": "[!+\\-*/^%&|<>#~.]" }, { "name": "string.quoted.csound-score", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.csound-score" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.csound-score" } }, "patterns": [ { "include": "source.csound#macroUses" } ] }, { "name": "meta.braced-loop.csound-score", "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "punctuation.braced-loop.begin.csound-score" } }, "endCaptures": { "0": { "name": "punctuation.braced-loop.end.csound-score" } }, "patterns": [ { "name": "meta.braced-loop-details.csound-score", "begin": "\\G", "end": "$", "patterns": [ { "begin": "\\d+", "end": "$", "beginCaptures": { "0": { "name": "constant.numeric.integer.decimal.csound-score" } }, "patterns": [ { "begin": "[A-Z_a-z]\\w*\\b", "end": "$", "beginCaptures": { "0": { "name": "entity.name.function.preprocessor.csound-score" } }, "patterns": [ { "include": "#comments" }, { "name": "invalid.illegal.csound-score", "match": "\\S+" } ] }, { "include": "#comments" }, { "name": "invalid.illegal.csound-score", "match": "\\S+" } ] }, { "include": "#comments" }, { "name": "invalid.illegal.csound-score", "match": "\\S+" } ] }, { "begin": "^", "end": "(?=\\})", "patterns": [ { "include": "$self" } ] } ] } ] } ================================================ FILE: src/renderer/components/editor/grammars/textmate/csound.tmLanguage.json ================================================ { "name": "Csound", "scopeName": "source.csound", "fileTypes": ["orc", "udo"], "patterns": [ { "include": "#commentsAndMacroUses" }, { "name": "meta.instrument-block.csound", "begin": "\\b(?=instr\\b)", "end": "\\bendin\\b", "endCaptures": { "0": { "name": "keyword.other.csound" } }, "patterns": [ { "name": "meta.instrument-declaration.csound", "begin": "instr", "end": "$", "beginCaptures": { "0": { "name": "keyword.function.csound" } }, "patterns": [ { "name": "entity.name.function.csound", "match": "\\d+|[A-Z_a-z]\\w*" }, { "include": "#commentsAndMacroUses" } ] }, { "include": "#commentsAndMacroUses" }, { "include": "#labels" }, { "include": "#partialExpressions" } ] }, { "name": "meta.opcode-definition.csound", "begin": "\\b(?=opcode\\b)", "end": "\\bendop\\b", "endCaptures": { "0": { "name": "keyword.other.csound" } }, "patterns": [ { "name": "meta.opcode-declaration.csound", "begin": "opcode", "end": "$", "beginCaptures": { "0": { "name": "keyword.function.csound" } }, "patterns": [ { "name": "meta.opcode-details.csound", "begin": "[A-Z_a-z]\\w*\\b", "end": "$", "beginCaptures": { "0": { "name": "entity.name.function.opcode.csound" } }, "patterns": [ { "name": "meta.opcode-type-signature.csound", "begin": "\\b(?:0|[aijkOPVKopS\\[\\]]+)", "end": ",|$", "beginCaptures": { "0": { "name": "storage.type.csound" } }, "patterns": [ { "include": "#commentsAndMacroUses" } ] }, { "include": "#commentsAndMacroUses" } ] }, { "include": "#commentsAndMacroUses" } ] }, { "include": "#commentsAndMacroUses" }, { "include": "#labels" }, { "include": "#partialExpressions" } ] }, { "include": "#labels" }, { "include": "#partialExpressions" } ], "repository": { "bracedStringContents": { "patterns": [ { "include": "#escapeSequences" }, { "include": "#formatSpecifiers" } ] }, "comments": { "patterns": [ { "name": "comment.block.csound", "begin": "/\\*", "end": "\\*/", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.csound" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.csound" } } }, { "name": "comment.line.double-slash.csound", "begin": "//", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.csound" } } }, { "include": "#semicolonComments" }, { "include": "#lineContinuations" } ] }, "semicolonComments": { "patterns": [ { "name": "comment.line.semicolon.csound", "begin": ";", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.csound" } } } ] }, "commentsAndMacroUses": { "patterns": [ { "include": "#comments" }, { "include": "#macroUses" } ] }, "decimalNumbers": { "patterns": [ { "name": "constant.numeric.integer.decimal.csound", "match": "\\d+" } ] }, "escapeSequences": { "patterns": [ { "name": "constant.character.escape.csound", "match": "\\\\(?:[abfnrtv\"\\\\]|[0-7]{1,3})" } ] }, "floatingPointNumbers": { "patterns": [ { "name": "constant.numeric.float.csound", "match": "(?:\\d+[Ee][+-]?\\d+)|(?:\\d+\\.\\d*|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?" } ] }, "formatSpecifiers": { "patterns": [ { "name": "constant.character.placeholder.csound", "match": "%[#0\\- +]*\\d*(?:\\.\\d+)?[diuoxXfFeEgGaAcs]" }, { "name": "constant.character.escape.csound", "match": "%%" } ] }, "labels": { "patterns": [ { "match": "^[ \\t]*(\\w+)(:)(?:[ \\t]+|$)", "captures": { "1": { "name": "entity.name.label.csound" }, "2": { "name": "entity.punctuation.label.csound" } } } ] }, "lineContinuations": { "patterns": [ { "match": "(\\\\)[ \\t]*((;).*)?$", "captures": { "1": { "name": "constant.character.escape.line-continuation.csound" }, "2": { "name": "comment.line.semicolon.csound" }, "3": { "name": "punctuation.definition.comment.csound" } } } ] }, "macroNames": { "patterns": [ { "match": "([A-Z_a-z]\\w*)|(\\d+\\w*)", "captures": { "1": { "name": "entity.name.function.preprocessor.csound" }, "2": { "name": "invalid.illegal.csound" } } } ] }, "macroParameterValueParenthetical": { "patterns": [ { "name": "meta.macro-parameter-value-parenthetical.csound", "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#macroParameterValueParenthetical" }, { "name": "constant.character.escape.csound", "match": "\\\\\\)" }, { "include": "$self" } ] } ] }, "macroUses": { "patterns": [ { "name": "meta.function-like-macro-use.csound", "begin": "(\\$[A-Z_a-z]\\w*\\.?)\\(", "end": "\\)", "beginCaptures": { "1": { "name": "entity.name.function.preprocessor.csound" } }, "patterns": [ { "name": "string.quoted.csound", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.csound" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.csound" } }, "patterns": [ { "match": "([#'()])|(\\\\[#'()])", "captures": { "1": { "name": "invalid.illegal.csound" }, "2": { "name": "constant.character.escape.csound" } } }, { "include": "#quotedStringContents" } ] }, { "name": "string.braced.csound", "begin": "\\{\\{", "end": "\\}\\}", "patterns": [ { "match": "([#'()])|(\\\\[#'()])", "captures": { "1": { "name": "invalid.illegal.csound" }, "2": { "name": "constant.character.escape.csound" } } }, { "include": "#bracedStringContents" } ] }, { "include": "#macroParameterValueParenthetical" }, { "name": "punctuation.macro-parameter-separator.csound", "match": "[#']" }, { "include": "$self" } ] }, { "name": "entity.name.function.preprocessor.csound", "match": "\\$[A-Z_a-z]\\w*(?:\\.|\\b)" } ] }, "numbers": { "patterns": [ { "include": "#floatingPointNumbers" }, { "match": "(0[Xx])([0-9A-Fa-f]+)", "captures": { "1": { "name": "storage.type.number.csound" }, "2": { "name": "constant.numeric.integer.hexadecimal.csound" } } }, { "include": "#decimalNumbers" } ] }, "partialExpressions": { "patterns": [ { "include": "#preprocessorDirectives" }, { "name": "variable.language.csound", "match": "\\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\\b" }, { "include": "#numbers" }, { "name": "keyword.operator.csound", "match": "\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~¬]|[=!+\\-*/^%&|<>#?:]" }, { "include": "#quotedStrings" }, { "name": "string.braced.csound", "begin": "\\{\\{", "end": "\\}\\}", "patterns": [ { "include": "#bracedStringContents" } ] }, { "name": "keyword.control.csound", "match": "\\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\\b" }, { "begin": "\\b((?:c(?:g|in?|k|nk?)goto)|goto|igoto|kgoto|loop_[gl][et]|r(?:einit|igoto)|ti(?:goto|mout))\\b", "end": "(\\w+)\\s*(?:((//).*)|((;).*))?$", "beginCaptures": { "1": { "name": "keyword.control.csound" } }, "endCaptures": { "1": { "name": "entity.name.label.csound" }, "2": { "name": "comment.line.double-slash.csound" }, "3": { "name": "punctuation.definition.comment.csound" }, "4": { "name": "comment.line.semicolon.csound" }, "5": { "name": "punctuation.definition.comment.csound" } }, "patterns": [ { "include": "#commentsAndMacroUses" }, { "include": "#partialExpressions" } ] }, { "begin": "\\b(printk?s)[ \\t]*(?=\")", "end": "(?<=\")", "beginCaptures": { "1": { "name": "support.function.csound" } }, "patterns": [ { "name": "string.quoted.csound", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.csound" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.csound" } }, "patterns": [ { "include": "#macroUses" }, { "name": "constant.character.escape.csound", "match": "\\\\\\\\[aAbBnNrRtT]" }, { "include": "#bracedStringContents" }, { "include": "#lineContinuations" }, { "name": "constant.character.escape.csound", "match": "%[!nNrRtT]|[~^]{1,2}" }, { "name": "invalid.illegal.csound", "match": "[^\"\\\\]*[^\\n\"\\\\]$" } ] } ] }, { "begin": "\\b(readscore|scoreline(?:_i)?)[ \\t]*(\\{\\{)", "end": "\\}\\}", "beginCaptures": { "1": { "name": "support.function.csound" }, "2": { "name": "string.braced.csound" } }, "endCaptures": { "0": { "name": "string.braced.csound" } }, "patterns": [ { "include": "source.csound-score" } ] }, { "begin": "\\b(pyl?run[it]?)[ \\t]*(\\{\\{)", "end": "\\}\\}", "beginCaptures": { "1": { "name": "support.function.csound" }, "2": { "name": "string.braced.csound" } }, "endCaptures": { "0": { "name": "string.braced.csound" } }, "patterns": [ { "include": "source.python" } ] }, { "begin": "\\b(lua_exec)[ \\t]*(\\{\\{)", "end": "\\}\\}", "beginCaptures": { "1": { "name": "support.function.csound" }, "2": { "name": "string.braced.csound" } }, "endCaptures": { "0": { "name": "string.braced.csound" } }, "patterns": [ { "include": "source.lua" } ] }, { "begin": "\\blua_opdef\\b", "end": "\\}\\}", "beginCaptures": { "0": { "name": "support.function.csound" } }, "endCaptures": { "0": { "name": "string.braced.csound" } }, "patterns": [ { "include": "#quotedStrings" }, { "begin": "\\{\\{", "end": "(?=\\}\\})", "beginCaptures": { "0": { "name": "string.braced.csound" } }, "patterns": [ { "include": "source.lua" } ] } ] }, { "name": "support.variable.csound", "match": "\\bp\\d+\\b" }, { "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]))?", "captures": { "1": { "name": "support.function.csound" }, "2": { "name": "invalid.deprecated.csound" }, "3": { "name": "punctuation.type-annotation.csound" }, "4": { "name": "type-annotation.storage.type.csound" } } }, { "name": "meta.other.csound", "match": "\\b[A-Z_a-z]\\w*\\b" } ] }, "preprocessorDirectives": { "patterns": [ { "name": "keyword.preprocessor.csound", "match": "\\#(?:e(?:lse|nd(?:if)?)\\b|\\#\\#)|@+[ \\t]*\\d*" }, { "begin": "\\#includestr", "end": "$", "beginCaptures": { "0": { "name": "keyword.includestr.preprocessor.csound" } }, "patterns": [ { "include": "#commentsAndMacroUses" }, { "name": "string.includestr.csound", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.csound" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.csound" } }, "patterns": [ { "include": "#macroUses" }, { "include": "#lineContinuations" } ] } ] }, { "begin": "\\#include", "end": "$", "beginCaptures": { "0": { "name": "keyword.include.preprocessor.csound" } }, "patterns": [ { "include": "#commentsAndMacroUses" }, { "name": "string.include.csound", "begin": "([^ \\t])", "end": "\\1", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.csound" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.csound" } } } ] }, { "begin": "\\#[ \\t]*define", "end": "(?<=^\\#)|(?<=[^\\\\]\\#)", "beginCaptures": { "0": { "name": "keyword.define.preprocessor.csound" } }, "patterns": [ { "include": "#commentsAndMacroUses" }, { "include": "#macroNames" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "name": "variable.parameter.preprocessor.csound", "match": "[A-Z_a-z]\\w*\\b" } ] }, { "begin": "\\#", "end": "(?>>", "name": "invalid.deprecated.combinator.css" }, { "match": ">>|>|\\+|~", "name": "keyword.operator.combinator.css" } ] }, "commas": { "match": ",", "name": "punctuation.separator.list.comma.css" }, "comment-block": { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.css" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.css" } }, "name": "comment.block.css" }, "escapes": { "patterns": [ { "match": "\\\\[0-9a-fA-F]{1,6}", "name": "constant.character.escape.codepoint.css" }, { "begin": "\\\\$\\s*", "end": "^(?<:=]|\\)|/\\*) # Terminates cleanly" }, "media-feature-keywords": { "match": "(?xi)\n(?<=^|\\s|:|\\*/)\n(?: portrait # Orientation\n | landscape\n | progressive # Scan types\n | interlace\n | fullscreen # Display modes\n | standalone\n | minimal-ui\n | browser\n)\n(?=\\s|\\)|$)", "name": "support.constant.property-value.css" }, "media-query": { "begin": "\\G", "end": "(?=\\s*[{;])", "patterns": [ { "include": "#comment-block" }, { "include": "#escapes" }, { "include": "#media-types" }, { "match": "(?i)(?<=\\s|^|,|\\*/)(only|not)(?=\\s|{|/\\*|$)", "name": "keyword.operator.logical.$1.media.css" }, { "match": "(?i)(?<=\\s|^|\\*/|\\))and(?=\\s|/\\*|$)", "name": "keyword.operator.logical.and.media.css" }, { "match": ",(?:(?:\\s*,)+|(?=\\s*[;){]))", "name": "invalid.illegal.comma.css" }, { "include": "#commas" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.bracket.round.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.css" } }, "patterns": [ { "include": "#media-features" }, { "include": "#media-feature-keywords" }, { "match": ":", "name": "punctuation.separator.key-value.css" }, { "match": ">=|<=|=|<|>", "name": "keyword.operator.comparison.css" }, { "captures": { "1": { "name": "constant.numeric.css" }, "2": { "name": "keyword.operator.arithmetic.css" }, "3": { "name": "constant.numeric.css" } }, "match": "(\\d+)\\s*(/)\\s*(\\d+)", "name": "meta.ratio.css" }, { "include": "#numeric-values" }, { "include": "#comment-block" } ] } ] }, "media-query-list": { "begin": "(?=\\s*[^{;])", "end": "(?=\\s*[{;])", "patterns": [ { "include": "#media-query" } ] }, "media-types": { "captures": { "1": { "name": "support.constant.media.css" }, "2": { "name": "invalid.deprecated.constant.media.css" } }, "match": "(?xi)\n(?<=^|\\s|,|\\*/)\n(?:\n # Valid media types\n (all|print|screen|speech)\n |\n # Deprecated in Media Queries 4: http://dev.w3.org/csswg/mediaqueries/#media-types\n (aural|braille|embossed|handheld|projection|tty|tv)\n)\n(?=$|[{,\\s;]|/\\*)" }, "numeric-values": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.constant.css" } }, "match": "(#)(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b", "name": "constant.other.color.rgb-value.hex.css" }, { "captures": { "1": { "name": "keyword.other.unit.percentage.css" }, "2": { "name": "keyword.other.unit.${2:/downcase}.css" } }, "match": "(?xi) (?+~|] # - Followed by another selector\n | /\\* # - Followed by a block comment\n )\n |\n # Name contains unescaped ASCII symbol\n (?: # Check for acceptable preceding characters\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # - Valid selector character\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # - Escape sequence\n )*\n (?: # Invalid punctuation\n [!\"'%&(*;+~|] # - Another selector\n | /\\* # - A block comment\n)", "name": "entity.other.attribute-name.class.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" }, "2": { "patterns": [ { "include": "#escapes" } ] } }, "match": "(?x)\n(\\#)\n(\n -?\n (?![0-9])\n (?:[-a-zA-Z0-9_]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n)\n(?=$|[\\s,.\\#)\\[:{>+~|]|/\\*)", "name": "entity.other.attribute-name.id.css" }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.entity.begin.bracket.square.css" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.entity.end.bracket.square.css" } }, "name": "meta.attribute-selector.css", "patterns": [ { "include": "#comment-block" }, { "include": "#string" }, { "captures": { "1": { "name": "storage.modifier.ignore-case.css" } }, "match": "(?<=[\"'\\s]|^|\\*/)\\s*([iI])\\s*(?=[\\s\\]]|/\\*|$)" }, { "captures": { "1": { "name": "string.unquoted.attribute-value.css", "patterns": [ { "include": "#escapes" } ] } }, "match": "(?x)(?<==)\\s*((?!/\\*)(?:[^\\\\\"'\\s\\]]|\\\\.)+)" }, { "include": "#escapes" }, { "match": "[~|^$*]?=", "name": "keyword.operator.pattern.css" }, { "match": "\\|", "name": "punctuation.separator.css" }, { "captures": { "1": { "name": "entity.other.namespace-prefix.css", "patterns": [ { "include": "#escapes" } ] } }, "match": "(?x)\n# Qualified namespace prefix\n( -?(?!\\d)(?:[\\w-]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n| \\*\n)\n# Lookahead to ensure there's a valid identifier ahead\n(?=\n \\| (?!\\s|=|$|\\])\n (?: -?(?!\\d)\n | [\\\\\\w-]\n | [^\\x00-\\x7F]\n )\n)" }, { "captures": { "1": { "name": "entity.other.attribute-name.css", "patterns": [ { "include": "#escapes" } ] } }, "match": "(?x)\n(-?(?!\\d)(?>[\\w-]|[^\\x00-\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+)\n\\s*\n(?=[~|^\\]$*=]|/\\*)" } ] }, { "include": "#pseudo-classes" }, { "include": "#pseudo-elements" }, { "include": "#functional-pseudo-classes" }, { "match": "(?x) (?\\s,.\\#|){:\\[]|/\\*|$)", "name": "entity.name.tag.css" }, "unicode-range": { "captures": { "0": { "name": "constant.other.unicode-range.css" }, "1": { "name": "punctuation.separator.dash.unicode-range.css" } }, "match": "(?>>=|\\^\\^=|>>=|<<=|~=|\\^=|\\|=|&=|%=|/=|\\*=|-=|\\+=|=(?!>)", "name": "keyword.operator.assign.d" } ] }, "conditional-expression": { "patterns": [ { "match": "\\s(\\?|:)\\s", "name": "keyword.operator.ternary.d" } ] }, "logical-expression": { "patterns": [ { "match": "\\|\\||&&|==|!=|!", "name": "keyword.operator.logical.d" } ] }, "bitwise-expression": { "patterns": [ { "match": "\\||\\^|&", "name": "keyword.operator.bitwise.d" } ] }, "identity-expression": { "patterns": [ { "match": "\\b(is|!is)\\b", "name": "keyword.operator.identity.d" } ] }, "rel-expression": { "patterns": [ { "match": "!<>=|!<>|<>=|!>=|!<=|<=|>=|<>|!>|!<|<|>", "name": "keyword.operator.rel.d" } ] }, "in-expression": { "patterns": [ { "match": "\\b(in|!in)\\b", "name": "keyword.operator.in.d" } ] }, "shift-expression": { "patterns": [ { "match": "<<|>>|>>>", "name": "keyword.operator.shift.d" }, { "include": "#add-expression" } ] }, "arithmetic-expression": { "patterns": [ { "match": "\\^\\^|\\+\\+|--|(?", "name": "keyword.operator.lambda.d" }, { "match": "\\b(function|delegate)\\b", "name": "keyword.other.function-literal.d" }, { "begin": "\\b([_\\w][_\\d\\w]*)\\s*(=>)", "end": "(?=[\\);,\\]}])", "beginCaptures": { "1": { "name": "variable.parameter.d" }, "2": { "name": "meta.lexical.token.symbolic.d" } }, "patterns": [ { "include": "source.d" } ] }, { "begin": "(?<=\\)|\\()(\\s*)({)", "beginCaptures": { "1": { "name": "source.d" }, "2": { "name": "source.d" } }, "end": "}", "patterns": [ { "include": "source.d" } ] } ] }, "assert-expression": { "patterns": [ { "begin": "\\bassert\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.assert.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.assert.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "mixin-expression": { "patterns": [ { "begin": "\\bmixin\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.mixin.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.mixin.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "import-expression": { "patterns": [ { "begin": "\\b(import)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.import.d" }, "2": { "name": "keyword.other.import.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.import.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "typeid-expression": { "patterns": [ { "match": "\\btypeid\\s*(?=\\()", "name": "keyword.other.typeid.d" } ] }, "type-specialization": { "patterns": [ { "match": "\\b(struct|union|class|interface|enum|function|delegate|super|const|immutable|inout|shared|return|__parameters)\\b", "name": "keyword.other.storage.type-specialization.d" } ] }, "traits-expression": { "patterns": [ { "begin": "\\b__traits\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.traits.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.traits.end.d" } }, "patterns": [ { "include": "#traits-keyword" }, { "include": "#comma" }, { "include": "#traits-argument" } ] } ] }, "traits-keyword": { "patterns": [ { "match": "isAbstractClass|isArithmetic|isAssociativeArray|isFinalClass|isPOD|isNested|isFloating|isIntegral|isScalar|isStaticArray|isUnsigned|isVirtualFunction|isVirtualMethod|isAbstractFunction|isFinalFunction|isStaticFunction|isOverrideFunction|isRef|isOut|isLazy|hasMember|identifier|getAliasThis|getAttributes|getMember|getOverloads|getProtection|getVirtualFunctions|getVirtualMethods|getUnitTests|parent|classInstanceSize|getVirtualIndex|allMembers|derivedMembers|isSame|compiles", "name": "support.constant.traits-keyword.d" } ] }, "traits-arguments": { "patterns": [ { "include": "#traits-argument" }, { "include": "#comma" } ] }, "traits-argument": { "patterns": [ { "include": "#expression" }, { "include": "#type" } ] }, "special-keyword": { "patterns": [ { "match": "\\b(__FILE__|__FILE_FULL_PATH__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__)\\b", "name": "constant.language.special-keyword.d" } ] }, "statement": { "patterns": [ { "include": "#non-block-statement" }, { "include": "#semi-colon" } ] }, "non-block-statement": { "patterns": [ { "include": "#module-declaration" }, { "include": "#labeled-statement" }, { "include": "#if-statement" }, { "include": "#while-statement" }, { "include": "#do-statement" }, { "include": "#for-statement" }, { "include": "#static-foreach" }, { "include": "#foreach-statement" }, { "include": "#foreach-reverse-statement" }, { "include": "#switch-statement" }, { "include": "#final-switch-statement" }, { "include": "#case-statement" }, { "include": "#default-statement" }, { "include": "#continue-statement" }, { "include": "#break-statement" }, { "include": "#return-statement" }, { "include": "#goto-statement" }, { "include": "#with-statement" }, { "include": "#synchronized-statement" }, { "include": "#try-statement" }, { "include": "#catches" }, { "include": "#scope-guard-statement" }, { "include": "#throw-statement" }, { "include": "#finally-statement" }, { "include": "#asm-statement" }, { "include": "#pragma-statement" }, { "include": "#mixin-statement" }, { "include": "#conditional-statement" }, { "include": "#static-assert" }, { "include": "#deprecated-statement" }, { "include": "#unit-test" }, { "include": "#declaration-statement" } ] }, "labeled-statement": { "patterns": [ { "match": "\\b(?!abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|in|inout|int|interface|invariant|ireal|is|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)[a-zA-Z_][a-zA-Z_0-9]*\\s*:", "name": "entity.name.d" } ] }, "declaration-statement": { "patterns": [ { "include": "#declaration" } ] }, "if-statement": { "patterns": [ { "begin": "\\b(if)\\b\\s*", "captures": { "1": { "name": "keyword.control.if.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] }, { "match": "\\belse\\b\\s*", "name": "keyword.control.else.d" } ] }, "while-statement": { "patterns": [ { "begin": "\\b(while)\\b\\s*", "captures": { "1": { "name": "keyword.control.while.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "do-statement": { "patterns": [ { "match": "\\bdo\\b", "name": "keyword.control.do.d" } ] }, "for-statement": { "patterns": [ { "begin": "\\b(for)\\b\\s*", "captures": { "1": { "name": "keyword.control.for.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "foreach-statement": { "patterns": [ { "begin": "\\b(foreach)\\b\\s*", "captures": { "1": { "name": "keyword.control.foreach.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "foreach-reverse-statement": { "patterns": [ { "begin": "\\b(foreach_reverse)\\b\\s*", "captures": { "1": { "name": "keyword.control.foreach_reverse.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "switch-statement": { "patterns": [ { "begin": "\\b(switch)\\b\\s*", "captures": { "1": { "name": "keyword.control.switch.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "case-statement": { "patterns": [ { "begin": "\\b(case)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.control.case.range.d" } }, "end": ":", "endCaptures": { "0": { "name": "meta.case.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "default-statement": { "patterns": [ { "match": "\\b(default)\\s*(:)", "captures": { "1": { "name": "keyword.control.case.default.d" }, "2": { "name": "meta.default.colon.d" } } } ] }, "final-switch-statement": { "patterns": [ { "begin": "\\b(final\\s+switch)\\b\\s*", "captures": { "1": { "name": "keyword.control.final.switch.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "continue-statement": { "patterns": [ { "match": "\\bcontinue\\b", "name": "keyword.control.continue.d" } ] }, "break-statement": { "patterns": [ { "match": "\\bbreak\\b", "name": "keyword.control.break.d" } ] }, "return-statement": { "patterns": [ { "match": "\\breturn\\b", "name": "keyword.control.return.d" } ] }, "goto-statement": { "patterns": [ { "match": "\\bgoto\\s+default\\b", "name": "keyword.control.goto.d" }, { "match": "\\bgoto\\s+case\\b", "name": "keyword.control.goto.d" }, { "match": "\\bgoto\\b", "name": "keyword.control.goto.d" } ] }, "with-statement": { "patterns": [ { "begin": "\\b(with)\\b\\s*(?=\\()", "captures": { "1": { "name": "keyword.control.with.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "synchronized-statement": { "patterns": [ { "begin": "\\b(synchronized)\\b\\s*(?=\\()", "captures": { "1": { "name": "keyword.control.synchronized.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "try-statement": { "patterns": [ { "match": "\\btry\\b", "name": "keyword.control.try.d" } ] }, "catches": { "patterns": [ { "include": "#catch" } ] }, "catch": { "patterns": [ { "begin": "\\b(catch)\\b\\s*(?=\\()", "captures": { "1": { "name": "keyword.control.catch.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "finally-statement": { "patterns": [ { "match": "\\bfinally\\b", "name": "keyword.control.throw.d" } ] }, "throw-statement": { "patterns": [ { "match": "\\bthrow\\b", "name": "keyword.control.throw.d" } ] }, "scope-guard-statement": { "patterns": [ { "match": "\\bscope\\s*\\((exit|success|failure)\\)", "name": "keyword.control.scope.d" } ] }, "asm-statement": { "patterns": [ { "begin": "\\b(asm)\\b\\s*(?=\\{)", "captures": { "1": { "name": "keyword.control.switch.d" } }, "end": "(?<=\\})", "patterns": [ { "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "keyword.control.asm.begin.d" } }, "endCaptures": { "0": { "name": "keyword.control.asm.end.d" } }, "contentName": "gfm.markup.raw.assembly.d", "patterns": [ { "include": "#asm-instruction" } ] } ] } ] }, "pragma-statement": { "patterns": [ { "include": "#pragma" } ] }, "mixin-statement": { "patterns": [ { "begin": "\\bmixin\\s*\\(", "beginCaptures": { "0": { "name": "keyword.control.mixin.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.control.mixin.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "is-expression": { "patterns": [ { "begin": "\\bis\\s*\\(", "beginCaptures": { "0": { "name": "keyword.token.is.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.token.is.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "parentheses-expression": { "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#expression" } ] } ] }, "deprecated-statement": { "patterns": [ { "begin": "\\bdeprecated\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.deprecated.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.deprecated.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] }, { "match": "\\bdeprecated\\b\\s*(?!\\()", "name": "keyword.other.deprecated.plain.d" } ] }, "asm-instruction": { "patterns": [ { "include": "#comment" }, { "match": "\\b(align|even|naked|db|ds|di|dl|df|dd|de)\\b|:", "name": "keyword.asm-instruction.d" }, { "match": "\\b__LOCAL_SIZE\\b", "name": "constant.language.assembly.d" }, { "match": "\\b(offsetof|seg)\\b", "name": "support.type.assembly.d" }, { "include": "#asm-type-prefix" }, { "include": "#asm-primary-expression" }, { "include": "#operands" }, { "include": "#register" }, { "include": "#register-64" }, { "include": "#float-literal" }, { "include": "#integer-literal" }, { "include": "#identifier" } ] }, "operands": { "patterns": [ { "match": "\\?|:", "name": "keyword.operator.ternary.assembly.d" }, { "match": "\\]|\\[", "name": "keyword.operator.bracket.assembly.d" }, { "match": ">>>|\\|\\||&&|==|!=|<=|>=|<<|>>|\\||\\^|&|<|>|\\+|-|\\*|/|%|~|!", "name": "keyword.operator.assembly.d" } ] }, "asm-type-prefix": { "patterns": [ { "match": "\\b((near\\s+ptr)|(far\\s+ptr)|(byte\\s+ptr)|(short\\s+ptr)|(int\\s+ptr)|(word\\s+ptr)|(dword\\s+ptr)|(qword\\s+ptr)|(float\\s+ptr)|(double\\s+ptr)|(real\\s+ptr))\\b", "name": "support.type.asm-type-prefix.d" } ] }, "register": { "patterns": [ { "match": "\\b(XMM0|XMM1|XMM2|XMM3|XMM4|XMM5|XMM6|XMM7|MM0|MM1|MM2|MM3|MM4|MM5|MM6|MM7|ST\\(0\\)|ST\\(1\\)|ST\\(2\\)|ST\\(3\\)|ST\\(4\\)|ST\\(5\\)|ST\\(6\\)|ST\\(7\\)|ST|TR1|TR2|TR3|TR4|TR5|TR6|TR7|DR0|DR1|DR2|DR3|DR4|DR5|DR6|DR7|CR0|CR2|CR3|CR4|EAX|EBX|ECX|EDX|EBP|ESP|EDI|ESI|AL|AH|AX|BL|BH|BX|CL|CH|CX|DL|DH|DX|BP|SP|DI|SI|ES|CS|SS|DS|GS|FS)\\b", "name": "storage.type.assembly.register.d" } ] }, "register-64": { "patterns": [ { "match": "\\b(RAX|RBX|RCX|RDX|BPL|RBP|SPL|RSP|DIL|RDI|SIL|RSI|R8B|R8W|R8D|R8|R9B|R9W|R9D|R9|R10B|R10W|R10D|R10|R11B|R11W|R11D|R11|R12B|R12W|R12D|R12|R13B|R13W|R13D|R13|R14B|R14W|R14D|R14|R15B|R15W|R15D|R15|XMM8|XMM9|XMM10|XMM11|XMM12|XMM13|XMM14|XMM15|YMM0|YMM1|YMM2|YMM3|YMM4|YMM5|YMM6|YMM7|YMM8|YMM9|YMM10|YMM11|YMM12|YMM13|YMM14|YMM15)\\b", "name": "storage.type.assembly.register-64.d" } ] }, "declaration": { "patterns": [ { "include": "#alias-declaration" }, { "include": "#aggregate-declaration" }, { "include": "#enum-declaration" }, { "include": "#import-declaration" }, { "include": "#storage-class" }, { "include": "#void-initializer" }, { "include": "#mixin-declaration" } ] }, "alias-declaration": { "patterns": [ { "begin": "\\b(alias)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.other.alias.d" } }, "end": ";", "endCaptures": { "0": { "name": "meta.alias.end.d" } }, "patterns": [ { "include": "#type" }, { "match": "=(?![=>])", "name": "keyword.operator.equal.alias.d" }, { "include": "#expression" } ] } ] }, "storage-class": { "patterns": [ { "match": "\\b(deprecated|enum|static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b", "name": "storage.class.d" }, { "include": "#linkage-attribute" }, { "include": "#align-attribute" }, { "include": "#property" } ] }, "void-initializer": { "patterns": [ { "match": "\\bvoid\\b", "name": "support.type.void.d" } ] }, "functions": { "patterns": [ { "include": "#function-attribute" }, { "include": "#function-prelude" } ] }, "function-prelude": { "patterns": [ { "match": "(?!typeof|typeid)((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\s*(?=\\()", "name": "entity.name.function.d" } ] }, "class-members": { "patterns": [ { "include": "#shared-static-constructor" }, { "include": "#shared-static-destructor" }, { "include": "#constructor" }, { "include": "#destructor" }, { "include": "#postblit" }, { "include": "#invariant" }, { "include": "#member-function-attribute" } ] }, "function-attribute": { "patterns": [ { "match": "\\b(nothrow|pure)\\b", "name": "storage.type.modifier.function-attribute.d" }, { "include": "#property" } ] }, "member-function-attribute": { "patterns": [ { "match": "\\b(const|immutable|inout|shared)\\b", "name": "storage.type.modifier.member-function-attribute" } ] }, "function-body": { "patterns": [ { "include": "#in-statement" }, { "include": "#out-statement" }, { "include": "#body-statement" }, { "include": "#block-statement" } ] }, "in-statement": { "patterns": [ { "match": "\\bin\\b", "name": "keyword.control.in.d" } ] }, "out-statement": { "patterns": [ { "begin": "\\bout\\s*\\(", "beginCaptures": { "0": { "name": "keyword.control.out.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.control.out.end.d" } }, "patterns": [ { "include": "#identifier" } ] }, { "match": "\\bout\\b", "name": "keyword.control.out.d" } ] }, "body-statement": { "patterns": [ { "match": "\\bbody\\b", "name": "keyword.control.body.d" } ] }, "constructor": { "patterns": [ { "match": "\\bthis\\b", "name": "entity.name.function.constructor.d" } ] }, "destructor": { "patterns": [ { "match": "\\b~this\\s*\\(\\s*\\)", "name": "entity.name.class.destructor.d" } ] }, "postblit": { "patterns": [ { "match": "\\bthis\\s*\\(\\s*this\\s*\\)\\s", "name": "entity.name.class.postblit.d" } ] }, "invariant": { "patterns": [ { "match": "\\binvariant\\s*\\(\\s*\\)", "name": "entity.name.class.invariant.d" } ] }, "shared-static-constructor": { "patterns": [ { "match": "\\b(shared\\s+)?static\\s+this\\s*\\(\\s*\\)", "name": "entity.name.class.constructor.shared-static.d" }, { "include": "#function-body" } ] }, "shared-static-destructor": { "patterns": [ { "match": "\\b(shared\\s+)?static\\s+~this\\s*\\(\\s*\\)", "name": "entity.name.class.destructor.static.d" } ] }, "aggregate-declaration": { "patterns": [ { "include": "#class-declaration" }, { "include": "#interface-declaration" }, { "include": "#struct-declaration" }, { "include": "#union-declaration" }, { "include": "#mixin-template-declaration" }, { "include": "#template-declaration" } ] }, "class-declaration": { "patterns": [ { "match": "\\b(class)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", "captures": { "1": { "name": "storage.type.class.d" }, "2": { "name": "entity.name.class.d" } } }, { "include": "#protection-attribute" }, { "include": "#class-members" } ] }, "interface-declaration": { "patterns": [ { "match": "\\b(interface)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", "captures": { "1": { "name": "storage.type.interface.d" }, "2": { "name": "entity.name.type.interface.d" } } } ] }, "struct-declaration": { "patterns": [ { "match": "\\b(struct)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", "captures": { "1": { "name": "storage.type.struct.d" }, "2": { "name": "entity.name.type.struct.d" } } } ] }, "union-declaration": { "patterns": [ { "match": "\\b(union)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", "captures": { "1": { "name": "storage.type.union.d" }, "2": { "name": "entity.name.type.union.d" } } } ] }, "enum-declaration": { "patterns": [ { "begin": "\\b(enum)\\b\\s+(?=.*[=;])", "end": "([A-Za-z_][\\w_\\d]*)\\s*(?=;|=|\\()(;)?", "beginCaptures": { "1": { "name": "storage.type.enum.d" } }, "endCaptures": { "1": { "name": "entity.name.type.enum.d" }, "2": { "name": "meta.enum.end.d" } }, "patterns": [ { "include": "#type" }, { "include": "#extended-type" }, { "match": "=(?![=>])", "name": "keyword.operator.equal.alias.d" } ] } ] }, "template-declaration": { "patterns": [ { "match": "\\b(template)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", "captures": { "1": { "name": "storage.type.template.d" }, "2": { "name": "entity.name.type.template.d" } } } ] }, "mixin-template-declaration": { "patterns": [ { "match": "\\b(mixin\\s*template)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b", "captures": { "1": { "name": "storage.type.mixintemplate.d" }, "2": { "name": "entity.name.type.mixintemplate.d" } } } ] }, "attribute": { "patterns": [ { "include": "#linkage-attribute" }, { "include": "#align-attribute" }, { "include": "#deprecated-attribute" }, { "include": "#protection-attribute" }, { "include": "#pragma" }, { "match": "\\b(static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b", "name": "entity.other.attribute-name.d" }, { "include": "#property" } ] }, "linkage-attribute": { "patterns": [ { "begin": "\\bextern\\s*\\(\\s*C\\+\\+\\s*,", "beginCaptures": { "0": { "name": "keyword.other.extern.cplusplus.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.extern.cplusplus.end.d" } }, "patterns": [ { "include": "#identifier" }, { "include": "#comma" } ] }, { "begin": "\\bextern\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.extern.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.extern.end.d" } }, "patterns": [ { "include": "#linkage-type" } ] } ] }, "linkage-type": { "patterns": [ { "match": "C|C\\+\\+|D|Windows|Pascal|System", "name": "storage.modifier.linkage-type.d" } ] }, "align-attribute": { "patterns": [ { "begin": "\\balign\\s*\\(", "end": "\\)", "name": "storage.modifier.align-attribute.d", "patterns": [ { "include": "#integer-literal" } ] }, { "match": "\\balign\\b\\s*(?!\\()", "name": "storage.modifier.align-attribute.d" } ] }, "protection-attribute": { "patterns": [ { "match": "\\b(private|package|protected|public|export)\\b", "name": "keyword.other.protections.d" } ] }, "property": { "patterns": [ { "match": "@(property|safe|trusted|system|disable|nogc)\\b", "name": "entity.name.tag.property.d" }, { "include": "#user-defined-attribute" } ] }, "user-defined-attribute": { "patterns": [ { "match": "@([_\\w][_\\d\\w]*)\\b", "name": "entity.name.tag.user-defined-property.d" }, { "begin": "@([_\\w][_\\d\\w]*)?\\(", "end": "\\)", "name": "entity.name.tag.user-defined-property.d", "patterns": [ { "include": "#expression" } ] } ] }, "pragma": { "patterns": [ { "match": "\\bpragma\\s*\\(\\s*[_\\w][_\\d\\w]*\\s*\\)", "name": "keyword.other.pragma.d" }, { "begin": "\\bpragma\\s*\\(\\s*[_\\w][_\\d\\w]*\\s*,", "end": "\\)", "name": "keyword.other.pragma.d", "patterns": [ { "include": "#expression" } ] }, { "match": "^#!.+", "name": "gfm.markup.header.preprocessor.script-tag.d" } ] }, "conditional-declaration": { "patterns": [ { "include": "#condition" }, { "match": "\\belse\\b", "name": "keyword.control.else.d" }, { "include": "#colon" }, { "include": "#decl-defs" } ] }, "conditional-statement": { "patterns": [ { "include": "#condition" }, { "include": "#no-scope-non-empty-statement" }, { "match": "\\belse\\b", "name": "keyword.control.else.d" } ] }, "condition": { "patterns": [ { "include": "#version-condition" }, { "include": "#debug-condition" }, { "include": "#static-if-condition" } ] }, "version-condition": { "patterns": [ { "match": "\\bversion\\s*\\(\\s*unittest\\s*\\)", "name": "keyword.other.version.unittest.d" }, { "match": "\\bversion\\s*\\(\\s*assert\\s*\\)", "name": "keyword.other.version.assert.d" }, { "begin": "\\bversion\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.version.identifier.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.version.identifer.end.d" } }, "patterns": [ { "include": "#integer-literal" }, { "include": "#identifier" } ] }, { "include": "#version-specification" } ] }, "debug-condition": { "patterns": [ { "begin": "\\bdebug\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.debug.identifier.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.debug.identifier.end.d" } }, "patterns": [ { "include": "#integer-literal" }, { "include": "#identifier" } ] }, { "match": "\\bdebug\\b\\s*(?!\\()", "name": "keyword.other.debug.plain.d" } ] }, "version-specification": { "patterns": [ { "match": "\\bversion\\b\\s*(?==)", "name": "keyword.other.version-specification.d" } ] }, "debug-specification": { "patterns": [ { "match": "\\bdebug\\b\\s*(?==)", "name": "keyword.other.debug-specification.d" } ] }, "static-if-condition": { "patterns": [ { "begin": "\\bstatic\\s+if\\b\\s*\\(", "beginCaptures": { "0": { "name": "keyword.control.static-if.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.control.static-if.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" } ] } ] }, "static-assert": { "patterns": [ { "begin": "\\bstatic\\s+assert\\b\\s*\\(", "beginCaptures": { "0": { "name": "keyword.other.static-assert.begin.d" } }, "end": "\\)", "endCaptures": { "0": { "name": "keyword.other.static-assert.end.d" } }, "patterns": [ { "include": "#expression" } ] } ] }, "static-foreach": { "patterns": [ { "begin": "\\b(static\\s+foreach)\\b\\s*", "captures": { "1": { "name": "keyword.control.static-foreach.d" } }, "end": "(?<=\\))", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "source.d" } ] } ] } ] }, "module": { "packages": [ { "import": "#module-declaration" } ] }, "module-declaration": { "patterns": [ { "begin": "\\b(module)\\s+", "end": ";", "beginCaptures": { "1": { "name": "keyword.package.module.d" } }, "endCaptures": { "0": { "name": "meta.module.end.d" } }, "patterns": [ { "include": "#module-identifier" }, { "include": "#comment" } ] } ] }, "import-declaration": { "patterns": [ { "begin": "\\b(static\\s+)?(import)\\s+(?!\\()", "end": ";", "beginCaptures": { "1": { "name": "keyword.package.import.d" }, "2": { "name": "keyword.package.import.d" } }, "endCaptures": { "0": { "name": "meta.import.end.d" } }, "patterns": [ { "include": "#import-identifier" }, { "include": "#comma" }, { "include": "#comment" } ] } ] }, "mixin-declaration": { "patterns": [ { "begin": "\\bmixin\\s*\\(", "end": "\\)", "beginCaptures": { "0": { "name": "keyword.mixin.begin.d" } }, "endCaptures": { "0": { "name": "keyword.mixin.end.d" } }, "patterns": [ { "include": "#comment" }, { "include": "#expression" }, { "include": "#comma" } ] } ] }, "comma": { "patterns": [ { "match": ",", "name": "keyword.operator.comma.d" } ] }, "colon": { "patterns": [ { "match": ":", "name": "support.type.colon.d" } ] }, "equal": { "patterns": [ { "match": "=(?![=>])", "name": "keyword.operator.equal.d" } ] }, "semi-colon": { "patterns": [ { "match": ";\\s*$", "name": "meta.statement.end.d" }, { "match": ";", "name": "keyword.operator.semi-colon.d" } ] }, "lexical": { "patterns": [ { "include": "#comment" }, { "include": "#string-literal" }, { "include": "#character-literal" }, { "include": "#float-literal" }, { "include": "#integer-literal" }, { "include": "#eof" }, { "include": "#special-tokens" }, { "include": "#special-token-sequence" }, { "include": "#keyword" }, { "include": "#identifier" } ] }, "integer-literal": { "patterns": [ { "include": "#decimal-integer" }, { "include": "#binary-integer" }, { "include": "#hexadecimal-integer" } ] }, "decimal-integer": { "patterns": [ { "match": "\\b(0(?=[^\\dxXbB]))|([1-9][0-9_]*)(Lu|LU|uL|UL|L|u|U)?\\b", "name": "constant.numeric.integer.decimal.d" } ] }, "binary-integer": { "patterns": [ { "match": "\\b(0b|0B)[0-1_]+(Lu|LU|uL|UL|L|u|U)?\\b", "name": "constant.numeric.integer.binary.d" } ] }, "hexadecimal-integer": { "patterns": [ { "match": "\\b(0x|0X)([0-9a-fA-F][0-9a-fA-F_]*)(Lu|LU|uL|UL|L|u|U)?\\b", "name": "constant.numeric.integer.hexadecimal.d" } ] }, "float-literal": { "patterns": [ { "include": "#decimal-float" }, { "include": "#hexadecimal-float" } ] }, "decimal-float": { "patterns": [ { "match": "\\b((\\.[0-9])|(0\\.)|(([1-9]|(0[1-9_]))[0-9_]*\\.))[0-9_]*((e-|E-|e\\+|E\\+|e|E)[0-9][0-9_]*)?[LfF]?i?\\b", "name": "constant.numeric.float.decimal.d" } ] }, "hexadecimal-float": { "patterns": [ { "match": "\\b0[xX][0-9a-fA-F_]*(\\.[0-9a-fA-F_]*)?(p-|P-|p\\+|P\\+|p|P)[0-9][0-9_]*[LfF]?i?\\b", "name": "constant.numeric.float.hexadecimal.d" } ] }, "string-literal": { "patterns": [ { "include": "#wysiwyg-string" }, { "include": "#alternate-wysiwyg-string" }, { "include": "#hex-string" }, { "include": "#arbitrary-delimited-string" }, { "include": "#delimited-string" }, { "include": "#double-quoted-string" }, { "include": "#token-string" } ] }, "wysiwyg-string": { "patterns": [ { "begin": "r\\\"", "end": "\\\"[cwd]?", "name": "string.wysiwyg-string.d", "patterns": [ { "include": "#wysiwyg-characters" } ] } ] }, "alternate-wysiwyg-string": { "patterns": [ { "begin": "`", "end": "`[cwd]?", "name": "string.alternate-wysiwyg-string.d", "patterns": [ { "include": "#wysiwyg-characters" } ] } ] }, "double-quoted-string": { "patterns": [ { "begin": "\"", "end": "\"[cwd]?", "name": "string.double-quoted-string.d", "patterns": [ { "include": "#double-quoted-characters" } ] } ] }, "hex-string": { "patterns": [ { "begin": "x\"", "end": "\"[cwd]?", "name": "string.hex-string.d", "patterns": [ { "match": "[a-fA-F0-9_s]+", "name": "constant.character.hex-string.d" } ] } ] }, "arbitrary-delimited-string": { "begin": "q\"(\\w+)", "end": "\\1\"", "name": "string.delimited.d", "patterns": [ { "match": ".", "name": "string.delimited.d" } ] }, "delimited-string": { "begin": "q\"", "end": "\"", "name": "string.delimited.d", "patterns": [ { "include": "#delimited-string-bracket" }, { "include": "#delimited-string-parens" }, { "include": "#delimited-string-angle-brackets" }, { "include": "#delimited-string-braces" } ] }, "token-string": { "begin": "q\\{", "end": "\\}[cdw]?", "beginCaptures": { "0": { "name": "string.quoted.token.d" } }, "endCaptures": { "0": { "name": "string.quoted.token.d" } }, "patterns": [ { "include": "#token-string-content" } ] }, "delimited-string-bracket": { "patterns": [ { "begin": "\\[", "end": "\\]", "name": "constant.characters.delimited.brackets.d", "patterns": [ { "include": "#wysiwyg-characters" } ] } ] }, "delimited-string-parens": { "patterns": [ { "begin": "\\(", "end": "\\)", "name": "constant.character.delimited.parens.d", "patterns": [ { "include": "#wysiwyg-characters" } ] } ] }, "delimited-string-angle-brackets": { "patterns": [ { "begin": "<", "end": ">", "name": "constant.character.angle-brackets.d", "patterns": [ { "include": "#wysiwyg-characters" } ] } ] }, "delimited-string-braces": { "patterns": [ { "begin": "\\{", "end": "\\}", "name": "constant.character.delimited.braces.d", "patterns": [ { "include": "#wysiwyg-characters" } ] } ] }, "wysiwyg-characters": { "patterns": [ { "include": "#character" }, { "include": "#end-of-line" } ] }, "double-quoted-characters": { "patterns": [ { "include": "#character" }, { "include": "#end-of-line" }, { "include": "#escape-sequence" } ] }, "escape-sequence": { "patterns": [ { "match": "(\\\\(?:quot|amp|lt|gt|OElig|oelig|Scaron|scaron|Yuml|circ|tilde|ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|permil|lsaquo|rsaquo|euro|nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|Aelig|Ccedil|egrave|eacute|ecirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|fnof|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|thetasym|upsih|piv|bull|hellip|prime|Prime|oline|frasl|weierp|image|real|trade|alefsym|larr|uarr|rarr|darr|harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|nabla|isin|notin|ni|prod|sum|minux|lowast|radic|prop|infin|ang|and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|loz|spades|clubs|hearts|diams|lang|rang))", "name": "constant.character.escape-sequence.entity.d" }, { "match": "(\\\\x[0-9a-fA-F_]{2}|\\\\u[0-9a-fA-F_]{4}|\\\\U[0-9a-fA-F_]{8}|\\\\[0-7]{1,3})", "name": "constant.character.escape-sequence.number.d" }, { "match": "(\\\\t|\\\\'|\\\\\"|\\\\\\?|\\\\0|\\\\a|\\\\b|\\\\f|\\\\n|\\\\r|\\\\v|\\\\\\\\)", "name": "constant.character.escape-sequence.d" } ] }, "character-literal": { "patterns": [ { "begin": "'", "end": "'", "name": "string.character-literal.d", "patterns": [ { "include": "#character" }, { "include": "#escape-sequence" } ] } ] }, "character": { "patterns": [ { "match": "[\\w\\s]+", "name": "string.character.d" } ] }, "end-of-line": { "patterns": [ { "match": "\\n+", "name": "string.character.end-of-line.d" } ] }, "identifier-list": { "patterns": [ { "match": ",", "name": "keyword.other.comma.d" }, { "include": "#identifier" } ] }, "identifier": { "patterns": [ { "match": "\\b((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\b", "name": "variable.d" } ] }, "module-identifier": { "patterns": [ { "match": "([_a-zA-Z][_\\d\\w]*)(\\s*\\.\\s*[_a-zA-Z][_\\d\\w]*)*", "name": "variable.parameter.module.d" } ] }, "import-identifier": { "patterns": [ { "match": "([_a-zA-Z][_\\d\\w]*)(\\s*\\.\\s*[_a-zA-Z][_\\d\\w]*)*", "name": "variable.parameter.import.d" } ] }, "eof": { "patterns": [ { "begin": "__EOF__", "beginCaptures": { "0": { "name": "comment.block.documentation.eof.start.d" } }, "end": "(?!__NEVER_MATCH__)__NEVER_MATCH__", "name": "text.eof.d" } ] }, "comment": { "patterns": [ { "include": "#block-comment" }, { "include": "#line-comment" }, { "include": "#nesting-block-comment" } ] }, "block-comment": { "patterns": [ { "begin": "/((?!\\*/)\\*)+", "beginCaptures": { "0": { "name": "comment.block.begin.d" } }, "end": "\\*+/", "endCaptures": { "0": { "name": "comment.block.end.d" } }, "name": "comment.block.content.d" } ] }, "line-comment": { "patterns": [ { "match": "//+.*$", "name": "comment.line.d" } ] }, "nesting-block-comment": { "patterns": [ { "begin": "/((?!\\+/)\\+)+", "beginCaptures": { "0": { "name": "comment.block.documentation.begin.d" } }, "end": "\\++/", "endCaptures": { "0": { "name": "comment.block.documentation.end.d" } }, "name": "comment.block.documentation.content.d", "patterns": [ { "include": "#nesting-block-comment" } ] } ] }, "token-string-content": { "patterns": [ { "begin": "{", "end": "}", "patterns": [ { "include": "#token-string-content" } ] }, { "include": "#tokens" } ] }, "tokens": { "patterns": [ { "include": "#string-literal" }, { "include": "#character-literal" }, { "include": "#integer-literal" }, { "include": "#float-literal" }, { "include": "#keyword" }, { "match": "~=|~|>>>|>>=|>>|>=|>|=>|==|=|<>|<=|<<|<|%=|%|#|&=|&&|&|\\$|\\|=|\\|\\||\\||\\+=|\\+\\+|\\+|\\^=|\\^\\^=|\\^\\^|\\^|\\*=|\\*|\\}|\\{|\\]|\\[|\\)|\\(|\\.\\.\\.|\\.\\.|\\.|\\?|\\!>=|\\!>|\\!=|\\!<>=|\\!<>|\\!<=|\\!<|\\!|/=|/|@|:|;|,|-=|--|-", "name": "meta.lexical.token.symbolic.d" }, { "include": "#identifier" } ] }, "keyword": { "patterns": [ { "match": "\\babstract\\b", "name": "keyword.token.abstract.d" }, { "match": "\\balias\\b", "name": "keyword.token.alias.d" }, { "match": "\\balign\\b", "name": "keyword.token.align.d" }, { "match": "\\basm\\b", "name": "keyword.token.asm.d" }, { "match": "\\bassert\\b", "name": "keyword.token.assert.d" }, { "match": "\\bauto\\b", "name": "keyword.token.auto.d" }, { "match": "\\bbody\\b", "name": "keyword.token.body.d" }, { "match": "\\bbool\\b", "name": "keyword.token.bool.d" }, { "match": "\\bbreak\\b", "name": "keyword.token.break.d" }, { "match": "\\bbyte\\b", "name": "keyword.token.byte.d" }, { "match": "\\bcase\\b", "name": "keyword.token.case.d" }, { "match": "\\bcast\\b", "name": "keyword.token.cast.d" }, { "match": "\\bcatch\\b", "name": "keyword.token.catch.d" }, { "match": "\\bcdouble\\b", "name": "keyword.token.cdouble.d" }, { "match": "\\bcent\\b", "name": "keyword.token.cent.d" }, { "match": "\\bcfloat\\b", "name": "keyword.token.cfloat.d" }, { "match": "\\bchar\\b", "name": "keyword.token.char.d" }, { "match": "\\bclass\\b", "name": "keyword.token.class.d" }, { "match": "\\bconst\\b", "name": "keyword.token.const.d" }, { "match": "\\bcontinue\\b", "name": "keyword.token.continue.d" }, { "match": "\\bcreal\\b", "name": "keyword.token.creal.d" }, { "match": "\\bdchar\\b", "name": "keyword.token.dchar.d" }, { "match": "\\bdebug\\b", "name": "keyword.token.debug.d" }, { "match": "\\bdefault\\b", "name": "keyword.token.default.d" }, { "match": "\\bdelegate\\b", "name": "keyword.token.delegate.d" }, { "match": "\\bdelete\\b", "name": "keyword.token.delete.d" }, { "match": "\\bdeprecated\\b", "name": "keyword.token.deprecated.d" }, { "match": "\\bdo\\b", "name": "keyword.token.do.d" }, { "match": "\\bdouble\\b", "name": "keyword.token.double.d" }, { "match": "\\belse\\b", "name": "keyword.token.else.d" }, { "match": "\\benum\\b", "name": "keyword.token.enum.d" }, { "match": "\\bexport\\b", "name": "keyword.token.export.d" }, { "match": "\\bextern\\b", "name": "keyword.token.extern.d" }, { "match": "\\bfalse\\b", "name": "constant.language.boolean.false.d" }, { "match": "\\bfinal\\b", "name": "keyword.token.final.d" }, { "match": "\\bfinally\\b", "name": "keyword.token.finally.d" }, { "match": "\\bfloat\\b", "name": "keyword.token.float.d" }, { "match": "\\bfor\\b", "name": "keyword.token.for.d" }, { "match": "\\bforeach\\b", "name": "keyword.token.foreach.d" }, { "match": "\\bforeach_reverse\\b", "name": "keyword.token.foreach_reverse.d" }, { "match": "\\bfunction\\b", "name": "keyword.token.function.d" }, { "match": "\\bgoto\\b", "name": "keyword.token.goto.d" }, { "match": "\\bidouble\\b", "name": "keyword.token.idouble.d" }, { "match": "\\bif\\b", "name": "keyword.token.if.d" }, { "match": "\\bifloat\\b", "name": "keyword.token.ifloat.d" }, { "match": "\\bimmutable\\b", "name": "keyword.token.immutable.d" }, { "match": "\\bimport\\b", "name": "keyword.token.import.d" }, { "match": "\\bin\\b", "name": "keyword.token.in.d" }, { "match": "\\binout\\b", "name": "keyword.token.inout.d" }, { "match": "\\bint\\b", "name": "keyword.token.int.d" }, { "match": "\\binterface\\b", "name": "keyword.token.interface.d" }, { "match": "\\binvariant\\b", "name": "keyword.token.invariant.d" }, { "match": "\\bireal\\b", "name": "keyword.token.ireal.d" }, { "match": "\\bis\\b", "name": "keyword.token.is.d" }, { "match": "\\blazy\\b", "name": "keyword.token.lazy.d" }, { "match": "\\blong\\b", "name": "keyword.token.long.d" }, { "match": "\\bmacro\\b", "name": "keyword.token.macro.d" }, { "match": "\\bmixin\\b", "name": "keyword.token.mixin.d" }, { "match": "\\bmodule\\b", "name": "keyword.token.module.d" }, { "match": "\\bnew\\b", "name": "keyword.token.new.d" }, { "match": "\\bnothrow\\b", "name": "keyword.token.nothrow.d" }, { "match": "\\bnull\\b", "name": "constant.language.null.d" }, { "match": "\\bout\\b", "name": "keyword.token.out.d" }, { "match": "\\boverride\\b", "name": "keyword.token.override.d" }, { "match": "\\bpackage\\b", "name": "keyword.token.package.d" }, { "match": "\\bpragma\\b", "name": "keyword.token.pragma.d" }, { "match": "\\bprivate\\b", "name": "keyword.token.private.d" }, { "match": "\\bprotected\\b", "name": "keyword.token.protected.d" }, { "match": "\\bpublic\\b", "name": "keyword.token.public.d" }, { "match": "\\bpure\\b", "name": "keyword.token.pure.d" }, { "match": "\\breal\\b", "name": "keyword.token.real.d" }, { "match": "\\bref\\b", "name": "keyword.token.ref.d" }, { "match": "\\breturn\\b", "name": "keyword.token.return.d" }, { "match": "\\bscope\\b", "name": "keyword.token.scope.d" }, { "match": "\\bshared\\b", "name": "keyword.token.shared.d" }, { "match": "\\bshort\\b", "name": "keyword.token.short.d" }, { "match": "\\bstatic\\b", "name": "keyword.token.static.d" }, { "match": "\\bstruct\\b", "name": "keyword.token.struct.d" }, { "match": "\\bsuper\\b", "name": "keyword.token.super.d" }, { "match": "\\bswitch\\b", "name": "keyword.token.switch.d" }, { "match": "\\bsynchronized\\b", "name": "keyword.token.synchronized.d" }, { "match": "\\btemplate\\b", "name": "keyword.token.template.d" }, { "match": "\\bthis\\b", "name": "keyword.token.this.d" }, { "match": "\\bthrow\\b", "name": "keyword.token.throw.d" }, { "match": "\\btrue\\b", "name": "constant.language.boolean.true.d" }, { "match": "\\btry\\b", "name": "keyword.token.try.d" }, { "match": "\\btypedef\\b", "name": "keyword.token.typedef.d" }, { "match": "\\btypeid\\b", "name": "keyword.token.typeid.d" }, { "match": "\\btypeof\\b", "name": "keyword.token.typeof.d" }, { "match": "\\bubyte\\b", "name": "keyword.token.ubyte.d" }, { "match": "\\bucent\\b", "name": "keyword.token.ucent.d" }, { "match": "\\buint\\b", "name": "keyword.token.uint.d" }, { "match": "\\bulong\\b", "name": "keyword.token.ulong.d" }, { "match": "\\bunion\\b", "name": "keyword.token.union.d" }, { "match": "\\bunittest\\b", "name": "keyword.token.unittest.d" }, { "match": "\\bushort\\b", "name": "keyword.token.ushort.d" }, { "match": "\\bversion\\b", "name": "keyword.token.version.d" }, { "match": "\\bvoid\\b", "name": "keyword.token.void.d" }, { "match": "\\bvolatile\\b", "name": "keyword.token.volatile.d" }, { "match": "\\bwchar\\b", "name": "keyword.token.wchar.d" }, { "match": "\\bwhile\\b", "name": "keyword.token.while.d" }, { "match": "\\bwith\\b", "name": "keyword.token.with.d" }, { "match": "\\b__FILE__\\b", "name": "keyword.token.__FILE__.d" }, { "match": "\\b__MODULE__\\b", "name": "keyword.token.__MODULE__.d" }, { "match": "\\b__LINE__\\b", "name": "keyword.token.__LINE__.d" }, { "match": "\\b__FUNCTION__\\b", "name": "keyword.token.__FUNCTION__.d" }, { "match": "\\b__PRETTY_FUNCTION__\\b", "name": "keyword.token.__PRETTY_FUNCTION__.d" }, { "match": "\\b__gshared\\b", "name": "keyword.token.__gshared.d" }, { "match": "\\b__traits\\b", "name": "keyword.token.__traits.d" }, { "match": "\\b__vector\\b", "name": "keyword.token.__vector.d" }, { "match": "\\b__parameters\\b", "name": "keyword.token.__parameters.d" } ] }, "special-token-sequence": { "patterns": [ { "match": "#\\s*line.*", "name": "gfm.markup.italic.special-token-sequence.d" } ] }, "special-tokens": { "patterns": [ { "match": "\\b(__DATE__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b", "name": "gfm.markup.raw.special-tokens.d" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/dart.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/dart-lang/dart-syntax-highlight/blob/master/grammars/dart.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/dart-lang/dart-syntax-highlight/commit/9d4857e114b7000d94232d83187ad142961c678a", "name": "dart", "scopeName": "source.dart", "patterns": [ { "name": "meta.preprocessor.script.dart", "match": "^(#!.*)$" }, { "name": "meta.declaration.dart", "begin": "^\\w*\\b(library|import|part of|part|export)\\b", "beginCaptures": { "0": { "name": "keyword.other.import.dart" } }, "end": ";", "endCaptures": { "0": { "name": "punctuation.terminator.dart" } }, "patterns": [ { "include": "#strings" }, { "include": "#comments" }, { "name": "keyword.other.import.dart", "match": "\\b(as|show|hide)\\b" }, { "name": "keyword.control.dart", "match": "\\b(if)\\b" } ] }, { "include": "#comments" }, { "include": "#punctuation" }, { "include": "#annotations" }, { "include": "#keywords" }, { "include": "#constants-and-special-vars" }, { "include": "#strings" } ], "repository": { "dartdoc": { "patterns": [ { "match": "(\\[.*?\\])", "captures": { "0": { "name": "variable.name.source.dart" } } }, { "match": "^ {4,}(?![ \\*]).*", "captures": { "0": { "name": "variable.name.source.dart" } } }, { "contentName": "variable.other.source.dart", "begin": "```.*?$", "end": "```" }, { "match": "(`.*?`)", "captures": { "0": { "name": "variable.other.source.dart" } } }, { "match": "(`.*?`)", "captures": { "0": { "name": "variable.other.source.dart" } } }, { "match": "(\\* (( ).*))$", "captures": { "2": { "name": "variable.other.source.dart" } } } ] }, "comments": { "patterns": [ { "name": "comment.block.empty.dart", "match": "/\\*\\*/", "captures": { "0": { "name": "punctuation.definition.comment.dart" } } }, { "include": "#comments-doc-oldschool" }, { "include": "#comments-doc" }, { "include": "#comments-inline" } ] }, "comments-doc-oldschool": { "patterns": [ { "name": "comment.block.documentation.dart", "begin": "/\\*\\*", "end": "\\*/", "patterns": [ { "include": "#comments-doc-oldschool" }, { "include": "#comments-block" }, { "include": "#dartdoc" } ] } ] }, "comments-doc": { "patterns": [ { "name": "comment.block.documentation.dart", "begin": "///", "while": "^\\s*///", "patterns": [ { "include": "#dartdoc" } ] } ] }, "comments-inline": { "patterns": [ { "include": "#comments-block" }, { "match": "((//).*)$", "captures": { "1": { "name": "comment.line.double-slash.dart" } } } ] }, "comments-block": { "patterns": [ { "name": "comment.block.dart", "begin": "/\\*", "end": "\\*/", "patterns": [ { "include": "#comments-block" } ] } ] }, "annotations": { "patterns": [ { "name": "storage.type.annotation.dart", "match": "@[a-zA-Z]+" } ] }, "constants-and-special-vars": { "patterns": [ { "name": "constant.language.dart", "match": "(??]|,\\s*|\\s+extends\\s+)+>)?|bool\\b|num\\b|int\\b|double\\b|dynamic\\b|(void)\\b)", "captures": { "1": { "name": "support.class.dart" }, "2": { "patterns": [ { "include": "#type-args" } ] }, "3": { "name": "storage.type.primitive.dart" } } } ] }, "function-identifier": { "patterns": [ { "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(<(?:[a-zA-Z0-9_$<>?]|,\\s*|\\s+extends\\s+)+>)?[!?]?(\\(|\\s+=>)", "captures": { "1": { "name": "entity.name.function.dart" }, "2": { "patterns": [ { "include": "#type-args" } ] } } } ] }, "type-args": { "begin": "(<)", "end": "(>)", "beginCaptures": { "1": { "name": "other.source.dart" } }, "endCaptures": { "1": { "name": "other.source.dart" } }, "patterns": [ { "include": "#class-identifier" }, { "match": "[\\s,]+" }, { "name": "keyword.declaration.dart", "match": "extends" } ] }, "keywords": { "patterns": [ { "name": "keyword.cast.dart", "match": "(?>>?|~|\\^|\\||&)" }, { "name": "keyword.operator.assignment.bitwise.dart", "match": "((&|\\^|\\||<<|>>>?)=)" }, { "name": "keyword.operator.closure.dart", "match": "(=>)" }, { "name": "keyword.operator.comparison.dart", "match": "(==|!=|<=?|>=?)" }, { "name": "keyword.operator.assignment.arithmetic.dart", "match": "(([+*/%-]|\\~)=)" }, { "name": "keyword.operator.assignment.dart", "match": "(=)" }, { "name": "keyword.operator.increment-decrement.dart", "match": "(\\-\\-|\\+\\+)" }, { "name": "keyword.operator.arithmetic.dart", "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)" }, { "name": "keyword.operator.logical.dart", "match": "(!|&&|\\|\\|)" }, { "name": "storage.modifier.dart", "match": "(?)( .*)?)|((\\+).*))$\\n?", "name": "markup.inserted.diff" }, { "captures": { "1": { "name": "punctuation.definition.changed.diff" } }, "match": "^(!).*$\\n?", "name": "markup.changed.diff" }, { "captures": { "3": { "name": "punctuation.definition.deleted.diff" }, "6": { "name": "punctuation.definition.deleted.diff" } }, "match": "^(((<)( .*)?)|((-).*))$\\n?", "name": "markup.deleted.diff" }, { "begin": "^(#)", "captures": { "1": { "name": "punctuation.definition.comment.diff" } }, "comment": "Git produces unified diffs with embedded comments\"", "end": "\\n", "name": "comment.line.number-sign.diff" }, { "match": "^index [0-9a-f]{7,40}\\.\\.[0-9a-f]{7,40}.*$\\n?", "name": "meta.diff.index.git" }, { "captures": { "1": { "name": "punctuation.separator.key-value.diff" }, "2": { "name": "meta.toc-list.file-name.diff" } }, "match": "^Index(:) (.+)$\\n?", "name": "meta.diff.index" }, { "match": "^Only in .*: .*$\\n?", "name": "meta.diff.only-in" } ] } ================================================ FILE: src/renderer/components/editor/grammars/textmate/django.tmLanguage.json ================================================ { "scopeName": "source.python.django", "fileTypes": [], "patterns": [ { "match": "(meta|models)\\.(Admin|AutoField|BooleanField|CharField|CommaSeparatedIntegerField|DateField|DateTimeField|DecimalField|EmailField|FileField|FilePathField|FloatField|ForeignKey|ImageField|IntegerField|IPAddressField|ManyToManyField|NullBooleanField|OneToOneField|PhoneNumberField|PositiveIntegerField|PositiveSmallIntegerField|SlugField|SmallIntegerField|TextField|TimeField|URLField|USStateField|XMLField)", "name": "support.type.django.model" }, { "match": "django(\\.[a-z]+){1,} ", "name": "support.other.django.module" }, { "match": "(ABSOLUTE_URL_OVERRIDES|ADMIN_FOR|ADMIN_MEDIA_PREFIX|ADMINS|ALLOWED_INCLUDE_ROOTS|APPEND_SLASH|AUTHENTICATION_BACKENDS|AUTH_PROFILE_MODULE|CACHE_BACKEND|CACHE_MIDDLEWARE_KEY_PREFIX|CACHE_MIDDLEWARE_SECONDS|DATABASE_ENGINE|DATABASE_HOST|DATABASE_NAME|DATABASE_OPTIONS|DATABASE_PASSWORD|DATABASE_PORT|DATABASE_USER|DATE_FORMAT|DATETIME_FORMAT|DEBUG|DEFAULT_CHARSET|DEFAULT_CONTENT_TYPE|DEFAULT_FROM_EMAIL|DEFAULT_TABLESPACE|DEFAULT_INDEX_TABLESPACE|DISALLOWED_USER_AGENTS|EMAIL_HOST_PASSWORD|EMAIL_HOST_USER|EMAIL_HOST|EMAIL_PORT|EMAIL_SUBJECT_PREFIX|EMAIL_USE_TLS|FILE_CHARSET|FIXTURE_DIRS|IGNORABLE_404_ENDS|IGNORABLE_404_STARTS|INSTALLED_APPS|INTERNAL_IPS|JING_PATH|LANGUAGE_CODE|LANGUAGE_COOKIE_NAME|LANGUAGES|LOCALE_PATHS|LOGIN_REDIRECT_URL|LOGIN_URL|LOGOUT_URL|MANAGERS|MEDIA_ROOT|MEDIA_URL|MIDDLEWARE_CLASSES|MONTH_DAY_FORMAT|PREPEND_WWW|PROFANITIES_LIST|ROOT_URLCONF|SECRET_KEY|SEND_BROKEN_LINK_EMAILS|SERIALIZATION_MODULES|SERVER_EMAIL|SESSION_ENGINE|SESSION_COOKIE_AGE|SESSION_COOKIE_DOMAIN|SESSION_COOKIE_NAME|SESSION_COOKIE_PATH|SESSION_COOKIE_SECURE|SESSION_EXPIRE_AT_BROWSER_CLOSE|SESSION_FILE_PATH|SESSION_SAVE_EVERY_REQUEST|SITE_ID|TEMPLATE_CONTEXT_PROCESSORS|TEMPLATE_DEBUG|TEMPLATE_DIRS|TEMPLATE_LOADERS|TEMPLATE_STRING_IF_INVALID|TEST_DATABASE_CHARSET|TEST_DATABASE_COLLATION|TEST_DATABASE_NAME|TEST_RUNNER|TIME_FORMAT|TIME_ZONE|URL_VALIDATOR_USER_AGENT|USE_ETAGS|USE_I18N|YEAR_MONTH_FORMAT)", "name": "variable.other.django.settings" }, { "match": "(get_list_or_404|get_object_or_404|load_and_render|loader|render_to_response)", "name": "support.function.django.view" }, { "match": "[a-z_]+\\.get_(object|list|iterator|count|values|values_iterator|in_bulk)", "name": "support.function.django.model" }, { "include": "source.python" } ], "name": "Python Django", "keyEquivalent": "^~P", "uuid": "5326D56C-6F76-4758-8DB7-D818527919AC" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/docker.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/moby/moby/commit/abd39744c6f3ed854500e423f5fabf952165161f", "name": "docker", "scopeName": "source.dockerfile", "patterns": [ { "captures": { "1": { "name": "keyword.other.special-method.dockerfile" }, "2": { "name": "keyword.other.special-method.dockerfile" } }, "match": "^\\s*\\b(?i:(FROM))\\b.*?\\b(?i:(AS))\\b" }, { "captures": { "1": { "name": "keyword.control.dockerfile" }, "2": { "name": "keyword.other.special-method.dockerfile" } }, "match": "^\\s*(?i:(ONBUILD)\\s+)?(?i:(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR))\\s" }, { "captures": { "1": { "name": "keyword.operator.dockerfile" }, "2": { "name": "keyword.other.special-method.dockerfile" } }, "match": "^\\s*(?i:(ONBUILD)\\s+)?(?i:(CMD|ENTRYPOINT))\\s" }, { "begin": "\"", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.dockerfile" } }, "end": "\"", "endCaptures": { "1": { "name": "punctuation.definition.string.end.dockerfile" } }, "name": "string.quoted.double.dockerfile", "patterns": [ { "match": "\\\\.", "name": "constant.character.escaped.dockerfile" } ] }, { "begin": "'", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.dockerfile" } }, "end": "'", "endCaptures": { "1": { "name": "punctuation.definition.string.end.dockerfile" } }, "name": "string.quoted.single.dockerfile", "patterns": [ { "match": "\\\\.", "name": "constant.character.escaped.dockerfile" } ] }, { "captures": { "1": { "name": "punctuation.whitespace.comment.leading.dockerfile" }, "2": { "name": "comment.line.number-sign.dockerfile" }, "3": { "name": "punctuation.definition.comment.dockerfile" } }, "comment": "comment.line", "match": "^(\\s*)((#).*$\\n?)" } ] } ================================================ FILE: src/renderer/components/editor/grammars/textmate/dot.tmLanguage.json ================================================ { "fileTypes": ["dot", "DOT"], "firstLineMatch": "digraph.*", "keyEquivalent": "^~G", "uuid": "1A53D54E-6B1D-11D9-A006-000D93589AF6", "patterns": [ { "comment": "named digraph declaration: \"digraph NAME {\"", "match": " ?(digraph)[ \\t]+([A-Za-z0-9]+) ?(\\{)", "captures": { "1": { "name": "storage.type.dot" }, "2": { "name": "variable.other.dot" }, "4": { "name": "punctuation.section.dot" } } }, { "comment": "edge definition: <- -> --", "match": "(<|-)(>|-)", "name": "keyword.operator.dot" }, { "match": "\\b(node|edge|graph|digraph|subgraph|strict)\\b", "name": "storage.type.dot" }, { "match": "\\b(bottomlabel|color|comment|distortion|fillcolor|fixedsize|fontcolor|fontname|fontsize|group|height|label|layer|orientation|peripheries|regular|shape|shapefile|sides|skew|style|toplabel|URL|width|z)\\b", "name": "support.constant.attribute.node.dot" }, { "match": "\\b(arrowhead|arrowsize|arrowtail|color|comment|constraint|decorate|dir|fontcolor|fontname|fontsize|headlabel|headport|headURL|label|labelangle|labeldistance|labelfloat|labelcolor|labelfontname|labelfontsize|layer|lhead|ltail|minlen|samehead|sametail|splines|style|taillabel|tailport|tailURL|weight)\\b", "name": "support.constant.attribute.edge.dot" }, { "match": "\\b(bgcolor|center|clusterrank|color|comment|compound|concentrate|fillcolor|fontname|fontpath|fontsize|label|labeljust|labelloc|layers|margin|mclimit|nodesep|nslimit|nslimit1|ordering|orientation|page|pagedir|quantum|rank|rankdir|ranksep|ratio|remincross|rotate|samplepoints|searchsize|size|style|URL)\\b", "name": "support.constant.attribute.graph.dot" }, { "match": "\\b(box|polygon|ellipse|circle|point|egg|triangle|plaintext|diamond|trapezium|parallelogram|house|pentagon|hexagon|septagon|octagon|doublecircle|doubleoctagon|tripleoctagon|invtriangle|invtrapezium|invhouse|Mdiamond|Msquare|Mcircle|rect|rectangle|none|note|tab|folder|box3d|component|max|min|same)\\b", "name": "variable.other.dot" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.dot" } }, "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.dot" } ], "name": "string.quoted.double.dot", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.dot" } } }, { "begin": "(^[ \\t]+)?(?=//)", "end": "(?!\\G)", "patterns": [ { "begin": "//", "end": "\\n", "name": "comment.line.double-slash.dot", "beginCaptures": { "0": { "name": "punctuation.definition.comment.dot" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.dot" } } }, { "begin": "(^[ \\t]+)?(?=#)", "end": "(?!\\G)", "patterns": [ { "begin": "#", "end": "\\n", "name": "comment.line.number-sign.dot", "beginCaptures": { "0": { "name": "punctuation.definition.comment.dot" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.dot" } } }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.dot", "captures": { "0": { "name": "punctuation.definition.comment.dot" } } } ], "name": "Graphviz (DOT)", "scopeName": "source.dot" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/drools.tmLanguage.json ================================================ { "scopeName": "source.drools", "fileTypes": [".drl"], "patterns": [ { "comment": "Mathmatical operators", "match": "[<|>|==|<=|>=|.|!=]", "name": "keyword.operator.source.drools" }, { "comment": "Drools RHS functions", "match": "\\b(insert|insertLogical|delete|modify)\\b", "name": "entity.name.function.source.drools" }, { "comment": "Drools hard keywords", "match": "\\b(true|false|null)\\b", "name": "constant.language.source.drools" }, { "comment": "Drools soft keywords", "match": "\\b(lock-on-active|date-effective|date-expires|no-loop|auto-focus|activation-group|agenda-group|ruleflow-group|entry-point|duration|package|import|dialect|salience|enabled|attributes|rule|extends|when|then|template|query|declare|function|global|eval|not|in|or|and|exists|forall|accumulate|collect|from|end|over|calendars|init|action|reverse|result|new)\\b", "name": "keyword.control.source.drools" }, { "comment": "Bound variables like $person, $myList", "match": "\\$([A-Za-z][A-Za-z0-9_]+)", "name": "variable.parameter.source.drools" }, { "comment": "Java classes", "match": "\\b([A-Z][A-Za-z_]+)\\b", "name": "support.type.source.drools" }, { "comment": "Single line comment", "match": "(\\/)(\\/).*", "name": "comment.line.double-slash.source.drools" }, { "begin": "/\\*", "end": "\\*/", "comment": "Multi line comment", "name": "comment.line.double-slash.source.drools" }, { "comment": "Double quote strings", "match": "(\").*(\")", "name": "string.quoted.double.source.drools" }, { "comment": "Numbers", "match": "([0-9]+(\\.)?[0-9]*)", "name": "constant.numeric.source.drools" } ], "name": "Drools", "uuid": "a98fc7cc-15d1-401e-bb85-e72714276cdb" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/edifact.tmLanguage.json ================================================ { "scopeName": "text.plain.edifact", "patterns": [ { "match": "^(UNB|BGM|RFF\\+[^:+]*|NAD\\+[^:+]*|LIN.+')", "name": "keyword.control.other" }, { "match": "(^\\s*|')[A-Z]+(:|\\+)", "name": "variable.other", "captures": { "1": { "name": "constant.language" }, "2": { "name": "constant.character" } } }, { "match": "\\+", "name": "constant.character" }, { "match": "'", "name": "constant.language" }, { "match": ":", "name": "constant.numeric" }, { "match": "(APERAK|AUTHOR|AUTACK|CONTRL|KEYMAN|BALANC|BANSTA|BAPLIE|BERMAN|BMISRM|BOPBNK|BOPCUS|BOPDIR|BOPINF|BUSCRD|CALINF|CASINT|CASRES|CHACCO|CLASET|CNTCND|COACSU|COARRI|CODECO|CODENO|COEDOR|COHAOR|COLREQ|COMDIS|CONAPW|CONDPV|CONDRA|CONDRO|CONEST|CONITT|CONPVA|CONQVA|CONRPW|CONTEN|CONWQD|COPARN|COPAYM|COPINO|COPRAR|COREOR|COSTCO|COSTOR|CREADV|CREEXT|CREMUL|CUSCAR|CUSDEC|CUSEXP|CUSPED|CUSREP|CUSRES|DAPLOS|DEBADV|DEBMUL|DEBREC|DELFOR|DELJIT|DESADV|DESTIM|DGRECA|DIRDEB|DIRDEF|DMRDEF|DMSTAT|DOCADV|DOCAMA|DOCAMI|DOCAMR|DOCAPP|DOCARE|DOCINF|ENTREC|FINCAN|FINPAY|FINSTA|GENRAL|GESMES|GOVCBR|HANMOV|ICASRP|ICSOLI|IFCSUM|IFTCCA|IFTDGN|IFTFCC|IFTICL|IFTMAN|IFTMBC|IFTMBF|IFTMBP|IFTMCA|IFTMCS|IFTMIN|IFTRIN|IFTSAI|IFTSTA|IFTSTQ|IMPDEF|INFCON|INFENT|INSDES|INSPRE|INSREQ|INSRPT|INVOIC|INVRPT|IPPOAD|IPPOMO|ISENDS|ITRRPT|JAPRES|JINFDE|JOBAPP|JOBCON|JOBMOD|JOBOFF|JUPREQ|LEDGER|LREACT|LRECLM|MEDPID|MEDPRE|MEDREQ|MEDRPT|MEDRUC|MEQPOS|MOVINS|MSCONS|ORDCHG|ORDERS|ORDRSP|OSTENQ|OSTRPT|PARTIN|PAXLST|PAYDUC|PAYEXT|PAYMUL|PAYORD|PRICAT|PRIHIS|PROCST|PRODAT|PRODEX|PROINQ|PROSRV|PROTAP|PRPAID|QALITY|QUOTES|RDRMES|REBORD|RECADV|RECALC|RECECO|RECLAM|RECORD|REGENT|RELIST|REMADV|REPREM|REQDOC|REQOTE|RESETT|RESMSG|RETACC|RETANN|RETINS|RPCALL|SAFHAZ|SANCRT|SLSFCT|SLSRPT|SOCADE|SSIMOD|SSRECH|SSREGW|STATAC|STLRPT|SUPCOT|SUPMAN|SUPRES|TANSTA|TAXCON|TPFREP|UTILMD|UTILTS|VATDEC|VESDEP|WASDIS|WKGRDC|WKGRRE)", "name": "constant.language" } ], "name": "EDIFACT", "uuid": "51fb7f8a-eef3-4fe7-bc96-ce5e9f203171" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/eex.tmLanguage.json ================================================ { "scopeName": "text.elixir", "fileTypes": ["eex"], "patterns": [ { "begin": "<%+#", "end": "%>", "name": "comment.block.elixir", "captures": { "0": { "name": "punctuation.definition.comment.eex" } } }, { "end": "(-)%>|(%)>", "begin": "<%+(?!>)[-=]*", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.elixir" } }, "contentName": "source.elixir", "patterns": [ { "match": "(#).*?(?=-?%>)", "name": "comment.line.number-sign.elixir", "captures": { "1": { "name": "punctuation.definition.comment.elixir" } } }, { "include": "source.elixir" } ], "endCaptures": { "0": { "name": "punctuation.section.embedded.end.elixir" }, "1": { "name": "source.elixir" }, "2": { "name": "source.elixir" } }, "name": "meta.embedded.line.elixir" } ], "name": "EEx", "keyEquivalent": "^~X", "uuid": "B1393067-A26A-4BAD-9D0F-42DF21FEB1C2" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/eiffel.tmLanguage.json ================================================ { "fileTypes": ["e"], "repository": { "number": { "match": "[0-9]+" }, "variable": { "match": "[a-zA-Z0-9_]+" } }, "keyEquivalent": "^~E", "uuid": "34672373-DED9-45B8-AF7E-2E4B6C3D6B76", "patterns": [ { "begin": "(^[ \\t]+)?(?=--)", "end": "(?!\\G)", "patterns": [ { "begin": "--", "end": "\\n", "name": "comment.line.double-dash.eiffel", "beginCaptures": { "0": { "name": "punctuation.definition.comment.eiffel" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.eiffel" } } }, { "match": "\\b(Indexing|indexing|deferred|expanded|class|inherit|rename|as|export|undefine|redefine|select|all|create|creation|feature|prefix|infix|separate|frozen|obsolete|local|is|unique|do|once|external|alias|require|ensure|invariant|variant|rescue|retry|like|check|if|else|elseif|then|inspect|when|from|loop|until|debug|not|or|and|xor|implies|old|end)\\b", "name": "keyword.control.eiffel" }, { "match": "[a-zA-Z_]+", "name": "variable.other.eiffel" }, { "match": "\\b(True|true|False|false|Void|void|Result|result)\\b", "name": "constant.language.eiffel" }, { "begin": "feature", "end": "end", "name": "meta.features.eiffel" }, { "begin": "(do|once)", "end": "(ensure|end)", "name": "meta.effective_routine_body.eiffel" }, { "begin": "rescue", "end": "end", "name": "meta.rescue.eiffel" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.eiffel" } }, "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.eiffel" } ], "name": "string.quoted.double.eiffel", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.eiffel" } } }, { "match": "[0-9]+", "name": "constant.numeric.eiffel" }, { "match": "\\b(deferred|expanded)\\b", "name": "storage.modifier.eiffel" }, { "begin": "^\\s*\n\t\t\t\t\t((?:\\b(deferred|expanded)\\b\\s*)*) # modifier\n\t\t\t\t\t(class)\\s+\n\t\t\t\t\t(\\w+)\\s* # identifier", "end": "(?=end)", "patterns": [ { "begin": "\\b(extends)\\b\\s+", "end": "(?={|implements)", "patterns": [{ "include": "#all-types" }], "name": "meta.definition.class.extends.java", "captures": { "1": { "name": "storage.modifier.java" } } }, { "begin": "\\b(implements)\\b\\s+", "end": "(?={|extends)", "patterns": [{ "include": "#all-types" }], "name": "meta.definition.class.implements.java", "captures": { "1": { "name": "storage.modifier.java" } } } ], "name": "meta.definition.class.eiffel", "captures": { "1": { "name": "storage.modifier.eiffel" } } } ], "name": "Eiffel", "scopeName": "source.eiffel" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/ejs.tmLanguage.json ================================================ { "foldingStartMarker": "(?x)\n\t\t(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\\b.*?>\n\t\t|)$\n\t\t|<\\?(?:php)?.*\\b(if|for(each)?|while)\\b.+:\n\t\t|\\{\\{?(if|foreach|capture|literal|foreach|php|section|strip)\n\t\t|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))\n\t\t)", "firstLineMatch": "\n\t\t|^(?!.*?$\n\t\t|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n\t\t|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n\t\t|^[^{]*\\}\n\t\t)", "keyEquivalent": "^~H", "fileTypes": ["ejs"], "repository": { "string-single-quoted": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "'", "patterns": [{ "include": "#embedded-code" }, { "include": "#entities" }], "name": "string.quoted.single.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "embedded-code": { "patterns": [{ "include": "#js" }] }, "tag-stuff": { "patterns": [ { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#embedded-code" } ] }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "end": "(?<='|\")", "patterns": [ { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html" }, { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html" } ], "name": "meta.attribute-with-value.id.html", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "tag-generic-attribute": { "match": "\\b([a-zA-Z\\-:]+)", "name": "entity.other.attribute-name.html" }, "entities": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "string-double-quoted": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "\"", "patterns": [{ "include": "#embedded-code" }, { "include": "#entities" }], "name": "string.quoted.double.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "js": { "begin": "<\\%=?-?", "end": "\\%>", "patterns": [{ "include": "source.js" }], "name": "source.js.embedded.html", "captures": { "0": { "name": "punctuation.section.embedded.js" } } } }, "uuid": "050E5380-B076-11E1-AFA6-0800200C9A66", "patterns": [ { "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*>)", "endCaptures": { "3": { "name": "punctuation.definition.tag.begin.html" }, "1": { "name": "punctuation.definition.tag.end.html" }, "4": { "name": "entity.name.tag.html" }, "2": { "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" }, "5": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)(<)(/)(\\2)(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } } }, { "begin": "(<\\?)(xml)", "end": "(\\?>)", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ], "name": "meta.tag.preprocessor.xml.html", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } } }, { "begin": ")$\n\t\t|<\\?(?:php)?.*\\b(if|for(each)?|while)\\b.+:\n\t\t|\\{\\{?(if|foreach|capture|literal|foreach|php|section|strip)\n\t\t|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))\n\t\t)", "firstLineMatch": "\n\t\t|^(?!.*?$\n\t\t|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n\t\t|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n\t\t|^[^{]*\\}\n\t\t)", "keyEquivalent": "^~H", "fileTypes": ["cfm", "cfml"], "repository": { "tag-stuff": { "patterns": [ { "include": "#nest-hash" }, { "include": "#cfcomments" }, { "include": "text.cfml.basic" }, { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#embedded-code" } ] }, "string-double-quoted": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "\"", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" }, { "include": "#nest-hash" } ], "name": "string.quoted.double.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "nest-hash": { "patterns": [ { "match": "##", "name": "string.escaped.hash.html" }, { "match": "(?x)\n\t\t\t\t\t\t\t(\\#)\n\t\t\t\t\t\t\t(?!\t\t# zero width negative lookahead assertion\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t([\\w$]+\t# assertion for plain variables or function names including currency symbol \"$\"\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t(\\[.*\\])\t\t\t\t# asserts a match for anything in square brackets\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\(.*\\))\t\t\t\t# or anything in parens\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\.[\\w$]+)\t\t\t\t# or zero or more \"dot\" notated variables\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*[\\+\\-\\*\\/&]\\s*[\\w$]+)\t# or simple arithmentic operators + concatenation\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*&\\s*[\"|'].+[\"|']) \t# or concatenation with a quoted string\n\t\t\t\t\t\t\t\t\t\t)*\t\t# asserts preceeding square brackets, parens, dot notated vars or arithmetic zero or more times\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t(\\(.*\\))\t # asserts a match for anything in parens\n\t\t\t\t\t\t\t\t)\\#\t\t# asserts closing hash\n\t\t\t\t\t\t\t)", "name": "invalid.illegal.unescaped.hash.html" }, { "end": "(#)", "begin": "(?x)\n\t\t\t\t\t\t\t(\\#)\n\t\t\t\t\t\t\t(?=\t\t# zero width negative lookahead assertion\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t([\\w$]+\t# assertion for plain variables or function names including currency symbol \"$\"\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t(\\[.*\\])\t\t\t\t# asserts a match for anything in square brackets\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\(.*\\))\t\t\t\t# or anything in parens\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\.[\\w$]+)\t\t\t\t# or zero or more \"dot\" notated variables\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*[\\+\\-\\*\\/&]\\s*[\\w$]+)\t# or simple arithmentic operators + concatenation\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\s*&\\s*[\"|'].+[\"|']) \t# or concatenation with a quoted string\n\t\t\t\t\t\t\t\t\t\t)*\t\t# asserts preceeding square brackets, parens, dot notated vars or arithmetic zero or more times\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t(\\(.*\\))\t # asserts a match for anything in parens\n\t\t\t\t\t\t\t\t)\\#\t\t# asserts closing hash\n\t\t\t\t\t\t\t)", "beginCaptures": { "1": { "name": "punctuation.definition.hash.begin.html" } }, "contentName": "source.cfscript.embedded.html", "patterns": [{ "include": "source.cfscript" }], "endCaptures": { "1": { "name": "punctuation.definition.hash.end.html" } }, "name": "meta.name.interpolated.hash.html" } ] }, "cfcomments": { "patterns": [ { "match": "", "name": "comment.line.cfml" }, { "begin": "", "patterns": [{ "include": "#cfcomments" }], "name": "comment.block.cfml", "captures": { "0": { "name": "punctuation.definition.comment.cfml" } } } ] }, "python": { "begin": "(?:^\\s*)<\\?python(?!.*\\?>)", "end": "\\?>(?:\\s*$\\n)?", "patterns": [{ "include": "source.python" }], "name": "source.python.embedded.html" }, "embedded-code": { "patterns": [ { "include": "#ruby" }, { "include": "#php" }, { "include": "#python" } ] }, "string-single-quoted": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "'", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" }, { "include": "#nest-hash" } ], "name": "string.quoted.single.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "tag-generic-attribute": { "match": "\\b([a-zA-Z\\-:]+)", "name": "entity.other.attribute-name.html" }, "entities": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "end": "(?<='|\")", "patterns": [ { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" }, { "include": "#nest-hash" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html" }, { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" }, { "include": "#nest-hash" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html" } ], "name": "meta.attribute-with-value.id.html", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "ruby": { "patterns": [ { "begin": "<%+#", "end": "%>", "name": "comment.block.erb", "captures": { "0": { "name": "punctuation.definition.comment.erb" } } }, { "begin": "<%+(?!>)=?", "end": "-?%>", "patterns": [ { "match": "(#).*?(?=-?%>)", "name": "comment.line.number-sign.ruby", "captures": { "1": { "name": "punctuation.definition.comment.ruby" } } }, { "include": "source.ruby" } ], "name": "source.ruby.embedded.html", "captures": { "0": { "name": "punctuation.section.embedded.ruby" } } }, { "begin": "<\\?r(?!>)=?", "end": "-?\\?>", "patterns": [ { "match": "(#).*?(?=-?\\?>)", "name": "comment.line.number-sign.ruby.nitro", "captures": { "1": { "name": "punctuation.definition.comment.ruby.nitro" } } }, { "include": "source.ruby" } ], "name": "source.ruby.nitro.embedded.html", "captures": { "0": { "name": "punctuation.section.embedded.ruby.nitro" } } } ] }, "php": { "begin": "(?=(^\\s*)?<\\?)", "end": "(?!(^\\s*)?<\\?)", "patterns": [{ "include": "source.php" }] } }, "uuid": "b2e03230-b205-4546-884e-ba107e964e46", "patterns": [ { "include": "text.cfml.basic" }, { "begin": "(<\\?)(xml)", "end": "(\\?>)", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ], "name": "meta.tag.preprocessor.xml.html", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } } }, { "begin": "\n\t\t|(^|\\s)\\}\n\t\t)", "foldingStartMarker": "(?x)\n\t\t(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\\b.*?>\n\t\t|)\n\t\t|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))\n\t\t)", "fileTypes": ["html.eex", "html.leex", "html.heex"], "uuid": "206E7013-2252-41AA-99A3-E8B3F4C2CC98", "injections": { "R:text.html.elixir meta.tag meta.attribute string.quoted": { "comment": "Uses R: to ensure this matches after any other injections.", "patterns": [{ "include": "text.elixir" }] } }, "patterns": [{ "include": "text.elixir" }, { "include": "text.html.basic" }], "name": "HTML (EEx)", "scopeName": "text.html.elixir" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/html-ruby.tmLanguage.json ================================================ { "name": "HTML (Ruby - ERB)", "scopeName": "text.html.erb", "fileTypes": ["rhtml", "html.erb"], "injections": { "text.html.erb - (meta.embedded.block.erb | meta.embedded.line.erb | meta.tag | comment), meta.tag string.quoted, L:source.js.embedded.html": { "patterns": [ { "begin": "(^\\s*)(?=<%+#(?![^%]*%>))", "beginCaptures": { "0": { "name": "punctuation.whitespace.comment.leading.erb" } }, "end": "(?!\\G)(\\s*$\\n)?", "endCaptures": { "0": { "name": "punctuation.whitespace.comment.trailing.erb" } }, "patterns": [ { "include": "#comment" } ] }, { "begin": "(^\\s*)(?=<%(?![^%]*%>))", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.erb" } }, "end": "(?!\\G)(\\s*$\\n)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.erb" } }, "patterns": [ { "include": "#tags" } ] }, { "include": "#comment" }, { "include": "#tags" } ] } }, "patterns": [ { "include": "text.html.basic" } ], "repository": { "comment": { "patterns": [ { "begin": "<%+#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.erb" } }, "end": "%>", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.erb" } }, "name": "comment.block.erb" } ] }, "tags": { "patterns": [ { "begin": "<%+(?!>)[-=]?(?![^%]*%>)", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.erb" } }, "contentName": "source.ruby.embedded.erb", "end": "-?%>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.erb" }, "1": { "name": "source.ruby" } }, "name": "meta.embedded.block.erb", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.erb" } }, "match": "(#).*?(?=-?%>)", "name": "comment.line.number-sign.erb" }, { "include": "source.ruby" } ] }, { "begin": "<%+(?!>)[-=]?", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.erb" } }, "contentName": "source.ruby.embedded.erb", "end": "-?%>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.erb" }, "1": { "name": "source.ruby" } }, "name": "meta.embedded.line.erb", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.erb" } }, "match": "(#).*?(?=-?%>)", "name": "comment.line.number-sign.erb" }, { "include": "source.ruby" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/html.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/html.tmbundle/commit/a723f08ebd49c67c22aca08dd8f17d0bf836ec93", "name": "HTML", "scopeName": "text.html.basic", "injections": { "R:text.html - (comment.block, text.html source)": { "comment": "Use R: to ensure this matches after any other injections.", "patterns": [ { "match": "<", "name": "invalid.illegal.bad-angle-bracket.html" } ] } }, "patterns": [ { "begin": "(<)([a-zA-Z][a-zA-Z0-9:-]*)(?=[^>]*>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(>(<)/)(\\2)(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "meta.scope.between-tag-pair.html" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.html" } }, "name": "meta.tag.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(<\\?)(xml)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } }, "end": "(\\?>)", "name": "meta.tag.preprocessor.xml.html", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, { "begin": ")\\s*$|(.*\\}\\s*;?\\s*|.*;)", "patterns": [ { "include": "#main" } ], "repository": { "main": { "patterns": [ { "include": "#EmbeddedXQuery" }, { "include": "#Pragma" }, { "include": "#XMLComment" }, { "include": "#CDATA" }, { "include": "#PredefinedEntityRef" }, { "include": "#CharRef" }, { "include": "#Comments" }, { "include": "#String" }, { "include": "#Annotation" }, { "include": "#AbbrevForwardStep" }, { "include": "#Variable" }, { "include": "#Numbers" }, { "include": "#Keywords" }, { "include": "#EQName" }, { "include": "#Symbols" }, { "include": "#OpenTag" }, { "include": "#CloseTag" } ] }, "AbbrevForwardStep": { "name": "support.type.jsoniq", "match": "(@)(?:\\*\\s|(?:[-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?[-_a-zA-Z0-9][-._a-zA-Z0-9]*)", "captures": { "1": { "name": "punctuation.definition.type.jsoniq" } } }, "Annotation": { "name": "meta.declaration.annotation.jsoniq", "match": "(%+)((?:[-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?[-_a-zA-Z0-9][-._a-zA-Z0-9]*)", "captures": { "1": { "name": "punctuation.definition.annotation.jsoniq" }, "2": { "name": "entity.name.annotation.jsoniq" } } }, "CDATA": { "name": "string.unquoted.cdata.jsoniq", "begin": "", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.jsoniq" } } }, "CharRef": { "name": "constant.character.entity.jsoniq", "match": "(&#)([0-9]+|x[0-9A-Fa-f]+)(;)", "captures": { "1": { "name": "punctuation.definition.entity.begin.jsoniq" }, "2": { "name": "entity.name.entity.other.jsoniq" }, "3": { "name": "punctuation.definition.entity.end.jsoniq" } } }, "CloseTag": { "name": "meta.tag.closetag.jsoniq", "match": "(<\\/)((?:[-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?[-_a-zA-Z0-9][-_a-zA-Z0-9]*)\\s*(>)", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsoniq" }, "2": { "name": "entity.name.tag.localname.jsoniq" }, "3": { "name": "punctuation.definition.tag.end.jsoniq" } } }, "Comments": { "patterns": [ { "name": "comment.block.doc.jsoniq", "begin": "\\(:~", "end": ":\\)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.jsoniq" } }, "patterns": [ { "name": "constant.language.jsoniq", "match": "(@)[a-zA-Z0-9_\\.\\-]+", "captures": { "1": { "name": "punctuation.definition.jsoniq" } } } ] }, { "name": "comment.block.jsoniq", "begin": "<\\?", "end": "\\?>", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.jsoniq" } } }, { "name": "comment.block.jsoniq", "begin": "\\(:", "end": ":\\)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.jsoniq" } } } ] }, "EmbeddedXQuery": { "begin": "^(?=xquery\\s+version\\s+)", "end": "\\z", "contentName": "source.embedded.xq", "patterns": [ { "include": "source.xq" } ] }, "EQName": { "name": "support.function.eqname.jsoniq", "match": "(?:[-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?[-_a-zA-Z0-9][-_a-zA-Z0-9]*(?=\\s*\\()" }, "Keywords": { "patterns": [ { "name": "constant.language.${1:/downcase}.jsoniq", "match": "\\b(NaN|null)\\b" }, { "name": "constant.language.boolean.logical.$1.jsoniq", "match": "\\b(true|false)\\b" }, { "name": "storage.type.$1.jsoniq", "match": "\\b(function|let)\\b" }, { "name": "keyword.control.flow.$1.jsoniq", "match": "(?x) \\b\n( break\n| case\n| catch\n| continue\n| end\n| exit\n| for\n| from\n| if\n| import\n| in\n| loop\n| return\n| switch\n| then\n| try\n| when\n| where\n| while\n| with\n) \\b" }, { "name": "keyword.operator.$1.jsoniq", "match": "(?x) \\b\n( after\n| allowing\n| ancestor-or-self\n| ancestor\n| and\n| append\n| array\n| ascending\n| as\n| attribute\n| at\n| base-uri\n| before\n| boundary-space\n| by\n| castable\n| cast\n| child\n| collation\n| comment\n| constraint\n| construction\n| contains\n| context\n| copy-namespaces\n| copy\n| count\n| decimal-format\n| decimal-separator\n| declare\n| default\n| delete\n| descendant-or-self\n| descendant\n| descending\n| digit\n| div\n| document-node\n| document\n| element\n| else\n| empty-sequence\n| empty\n| encoding\n| eq\n| every\n| except\n| external\n| first\n| following-sibling\n| following\n| ft-option\n| ge\n| greatest\n| grouping-separator\n| group\n| gt\n| idiv\n| index\n| infinity\n| insert\n| instance\n| integrity\n| intersect\n| into\n| is\n| item\n| json-item\n| jsoniq\n| json\n| last\n| lax\n| least\n| le\n| lt\n| minus-sign\n| modify\n| module\n| mod\n| namespace-node\n| namespace\n| next\n| ne\n| nodes\n| node\n| not\n| object\n| of\n| only\n| option\n| ordered\n| ordering\n| order\n| or\n| paragraphs\n| parent\n| pattern-separator\n| per-mille\n| percent\n| preceding-sibling\n| preceding\n| previous\n| processing-instruction\n| rename\n| replace\n| returning\n| revalidation\n| satisfies\n| schema-attribute\n| schema-element\n| schema\n| score\n| select\n| self\n| sentences\n| sliding\n| some\n| stable\n| start\n| strict\n| text\n| times\n| to\n| treat\n| tumbling\n| typeswitch\n| type\n| union\n| unordered\n| updating\n| validate\n| value\n| variable\n| version\n| window\n| words\n| xquery\n| zero-digit\n) (?!:|-)\\b" } ] }, "EnclosedExpr": { "name": "meta.enclosed.expression.jsoniq", "begin": "{", "end": "}", "beginCaptures": { "0": { "name": "punctuation.section.scope.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.section.scope.end.jsoniq" } }, "patterns": [ { "include": "#main" } ] }, "Numbers": { "patterns": [ { "name": "constant.numeric.exponential.jsoniq", "match": "(?:\\.[0-9]+|\\b[0-9]+(?:\\.[0-9]*)?)[Ee][+#x002D]?[0-9]+\\b" }, { "name": "constant.numeric.float.jsoniq", "match": "(?:\\.[0-9]+|\\b[0-9]+\\.[0-9]*)\\b" }, { "name": "constant.numeric.integer.jsoniq", "match": "\\b[0-9]+\\b" } ] }, "OpenTag": { "name": "meta.tag.opentag.jsoniq", "begin": "(<)((?:[-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?[-_a-zA-Z0-9][-_a-zA-Z0-9]*)", "end": "/?>", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsoniq" }, "2": { "name": "entity.name.tag.localname.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsoniq" } }, "patterns": [ { "name": "entity.other.attribute-name.jsoniq", "match": "([-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?([-_a-zA-Z0-9][-_a-zA-Z0-9]*)" }, { "name": "keyword.operator.assignment.jsoniq", "match": "=" }, { "name": "string.quoted.single.jsoniq", "begin": "'", "end": "'(?!')", "patterns": [ { "match": "''", "name": "constant.character.escape.quote.jsoniq" }, { "include": "#PredefinedEntityRef" }, { "include": "#CharRef" }, { "match": "({{|}})", "name": "constant.jsoniq" }, { "include": "#EnclosedExpr" } ] }, { "name": "string.quoted.double.jsoniq", "begin": "\"", "end": "\"(?!\")", "patterns": [ { "match": "\"\"", "name": "constant.character.escape.quote.jsoniq" }, { "include": "#PredefinedEntityRef" }, { "include": "#CharRef" }, { "match": "({{|}})", "name": "string.jsoniq" }, { "include": "#EnclosedExpr" } ] } ] }, "Pragma": { "name": "meta.pragma.jsoniq", "begin": "\\(#", "end": "#\\)", "beginCaptures": { "0": { "name": "punctuation.definition.pragma.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.pragma.end.jsoniq" } }, "contentName": "constant.other.pragma.jsoniq" }, "PredefinedEntityRef": { "name": "constant.language.entity.predefined.jsoniq", "match": "(&)(lt|gt|amp|quot|apos)(;)", "captures": { "1": { "name": "punctuation.definition.entity.begin.jsoniq" }, "2": { "name": "entity.name.entity.other.jsoniq" }, "3": { "name": "punctuation.definition.entity.end.jsoniq" } } }, "String": { "name": "string.quoted.double.jsoniq", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.jsoniq", "match": "\\\\(?:[\"\\\\/bfnrt]|u[0-9a-fA-F]{4})" }, { "name": "invalid.illegal.unrecognized-string-escape.jsoniq", "match": "\\\\." } ] }, "Symbols": { "patterns": [ { "match": ":=?", "name": "keyword.operator.assignment.definition.jsoniq" }, { "match": ",", "name": "punctuation.separator.delimiter.comma.jsoniq" }, { "match": "\\.", "name": "punctuation.separator.delimiter.dot.jsoniq" }, { "match": "\\[", "name": "punctuation.definition.bracket.square.begin.jsoniq" }, { "match": "\\]", "name": "punctuation.definition.bracket.square.end.jsoniq" }, { "match": "\\{", "name": "punctuation.definition.bracket.curly.begin.jsoniq" }, { "match": "\\}", "name": "punctuation.definition.bracket.curly.end.jsoniq" }, { "match": "\\(", "name": "punctuation.definition.bracket.round.begin.jsoniq" }, { "match": "\\)", "name": "punctuation.definition.bracket.round.end.jsoniq" } ] }, "Variable": { "name": "meta.definition.variable.name.jsoniq", "match": "(\\$)(?:[-_a-zA-Z0-9][-._a-zA-Z0-9]*:)?[-_a-zA-Z0-9][-_a-zA-Z0-9]*", "captures": { "0": { "name": "variable.other.jsoniq" }, "1": { "name": "punctuation.definition.variable.jsoniq" } } }, "XMLComment": { "name": "comment.block.jsoniq", "begin": "", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.jsoniq" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.jsoniq" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/jsp.tmLanguage.json ================================================ { "fileTypes": ["jsp", "jspf", "tag"], "repository": { "expression": { "end": "(%)>", "begin": "<%=", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "contentName": "source.java", "patterns": [{ "include": "source.java" }], "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } }, "name": "meta.embedded.line.expression.jsp" }, "el_expression": { "end": "(\\})", "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "contentName": "source.java", "patterns": [{ "include": "source.java" }], "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } }, "name": "meta.embedded.line.el_expression.jsp" }, "xml_tags": { "patterns": [ { "begin": "(^\\s*)(?=)", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.erb" } }, "end": "(?!\\G)(\\s*$\\n)?", "patterns": [{ "include": "#embedded" }], "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.erb" } } }, { "include": "#embedded" }, { "include": "#directive" }, { "include": "#actions" } ], "repository": { "actions": { "patterns": [ { "begin": "(", "patterns": [ { "match": "(name|trim)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.attribute.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "match": "()", "name": "meta.tag.template.body.jsp", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "3": { "name": "punctuation.definition.tag.end.jsp" } } }, { "begin": "(", "patterns": [ { "match": "(name)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.element.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(<)(jsp:doBody)\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "match": "(var|varReader|scope)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.dobody.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(", "patterns": [ { "match": "(page)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.forward.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(<)(jsp:param)\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "match": "(name|value)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.param.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(<)(jsp:getProperty)\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "match": "(name|property)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.getproperty.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(", "patterns": [ { "match": "(page|flush)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.include.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(<)(jsp:invoke)\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "match": "(fragment|var|varReader|scope)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.invoke.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(<)(jsp:output)\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "match": "(omit-xml-declaration|doctype-root-element|doctype-system|doctype-public)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.output.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(", "patterns": [ { "match": "(type|code|codebase|name|archive|align|height|hspace|jreversion|nspluginurl|iepluginurl)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.plugin.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "match": "()", "end": ">", "name": "meta.tag.template.fallback.jsp", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "3": { "name": "punctuation.definition.tag.end.jsp" } } }, { "begin": "(", "patterns": [ { "match": "(xmlns|version|xmlns:taglibPrefix)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.root.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "begin": "(<)(jsp:setProperty)\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "match": "(name|property|value)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.setproperty.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, { "match": "()", "end": ">", "name": "meta.tag.template.text.jsp", "captures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "3": { "name": "punctuation.definition.tag.end.jsp" } } }, { "begin": "(", "patterns": [ { "match": "(id|scope|class|type|beanName)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "name": "meta.tag.template.usebean.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } } ] }, "directive": { "begin": "(<)(jsp:directive\\.(?=(attribute|include|page|tag|variable)\\s))", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "/>", "patterns": [ { "begin": "\\G(attribute)(?=\\s)", "end": "(?=/>)", "patterns": [ { "match": "(name|required|fragment|rtexprvalue|type|description)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(include)(?=\\s)", "end": "(?=/>)", "patterns": [ { "match": "(file)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(page)(?=\\s)", "end": "(?=/>)", "patterns": [ { "match": "(language|extends|import|session|buffer|autoFlush|isThreadSafe|info|errorPage|isErrorPage|contentType|pageEncoding|isElIgnored)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(tag)(?=\\s)", "end": "(?=/>)", "patterns": [ { "match": "(display-name|body-content|dynamic-attributes|small-icon|large-icon|description|example|language|import|pageEncoding|isELIgnored)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } }, { "begin": "\\G(variable)(?=\\s)", "end": "(?=/>)", "patterns": [ { "match": "(name-given|alias|variable-class|declare|scope|description)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "entity.name.tag.jsp" } } } ], "name": "meta.tag.template.$3.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "2": { "name": "entity.name.tag.jsp" } } }, "embedded": { "end": "((<)/)(jsp:\\3)(>)", "begin": "(<)(jsp:(declaration|expression|scriptlet))(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" }, "4": { "name": "punctuation.definition.tag.end.jsp" }, "2": { "name": "entity.name.tag.jsp" }, "0": { "name": "meta.tag.template.$3.jsp" } }, "contentName": "source.java", "patterns": [{ "include": "source.java" }], "endCaptures": { "3": { "name": "entity.name.tag.jsp" }, "1": { "name": "punctuation.definition.tag.begin.jsp" }, "4": { "name": "punctuation.definition.tag.end.jsp" }, "2": { "name": "source.java" }, "0": { "name": "meta.tag.template.$4.jsp" } }, "name": "meta.embedded.block.jsp" } } }, "scriptlet": { "end": "(%)>", "begin": "<%", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "contentName": "source.java", "patterns": [ { "match": "\\{", "name": "punctuation.section.scope.begin.java" }, { "match": "\\}", "name": "punctuation.section.scope.end.java" }, { "include": "source.java" } ], "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } }, "name": "meta.embedded.block.scriptlet.jsp" }, "comment": { "begin": "<%--", "end": "--%>", "name": "comment.block.jsp", "captures": { "0": { "name": "punctuation.definition.comment.jsp" } } }, "declaration": { "end": "(%)>", "begin": "<%!", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.jsp" } }, "contentName": "source.java", "patterns": [{ "include": "source.java" }], "endCaptures": { "0": { "name": "punctuation.section.embedded.end.jsp" }, "1": { "name": "source.java" } }, "name": "meta.embedded.line.declaration.jsp" }, "tags": { "begin": "(<%@)\\s*(?=(attribute|include|page|tag|taglib|variable)\\s)", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.jsp" } }, "end": "%>", "patterns": [ { "begin": "\\G(attribute)(?=\\s)", "end": "(?=%>)", "patterns": [ { "match": "(name|required|fragment|rtexprvalue|type|description)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.attribute.jsp" } } }, { "begin": "\\G(include)(?=\\s)", "end": "(?=%>)", "patterns": [ { "match": "(file)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.include.jsp" } } }, { "begin": "\\G(page)(?=\\s)", "end": "(?=%>)", "patterns": [ { "match": "(language|extends|import|session|buffer|autoFlush|isThreadSafe|info|errorPage|isErrorPage|contentType|pageEncoding|isElIgnored)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.page.jsp" } } }, { "begin": "\\G(tag)(?=\\s)", "end": "(?=%>)", "patterns": [ { "match": "(display-name|body-content|dynamic-attributes|small-icon|large-icon|description|example|language|import|pageEncoding|isELIgnored)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.tag.jsp" } } }, { "begin": "\\G(taglib)(?=\\s)", "end": "(?=%>)", "patterns": [ { "match": "(uri|tagdir|prefix)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.taglib.jsp" } } }, { "begin": "\\G(variable)(?=\\s)", "end": "(?=%>)", "patterns": [ { "match": "(name-given|alias|variable-class|declare|scope|description)(=)((\")[^\"]*(\"))", "captures": { "3": { "name": "string.quoted.double.jsp" }, "1": { "name": "entity.other.attribute-name.jsp" }, "4": { "name": "punctuation.definition.string.begin.jsp" }, "2": { "name": "punctuation.separator.key-value.jsp" }, "5": { "name": "punctuation.definition.string.end.jsp" } } } ], "captures": { "1": { "name": "keyword.control.variable.jsp" } } } ], "name": "meta.tag.template.include.jsp", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.jsp" } } } }, "keyEquivalent": "^~J", "uuid": "ACB58B55-9437-4AE6-AF42-854995CF51DF", "injections": { "text.html.jsp - (meta.embedded.block.jsp | meta.embedded.line.jsp | meta.tag | comment), meta.tag string.quoted": { "patterns": [ { "include": "#comment" }, { "include": "#declaration" }, { "include": "#expression" }, { "include": "#el_expression" }, { "include": "#tags" }, { "begin": "(^\\s*)(?=<%(?=\\s))", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.erb" } }, "end": "(?!\\G)(\\s*$\\n)?", "patterns": [{ "include": "#scriptlet" }], "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.erb" } } }, { "include": "#scriptlet" } ] } }, "patterns": [{ "include": "#xml_tags" }, { "include": "text.html.basic" }], "name": "JavaServer Pages", "scopeName": "text.html.jsp" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/jsx-styled.tmLanguage.json ================================================ { "fileTypes": ["js", "jsx", "ts", "tsx"], "injectionSelector": "L:source -comment -string", "patterns": [ { "begin": "\\s*(<)(style) (jsx|global jsx|jsx global)(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.ts.tsx" }, "2": { "name": "entity.name.tag.ts.tsx" }, "3": { "name": "entity.other.attribute-name.ts.tsx" }, "4": { "name": "punctuation.definition.tag.end.ts.tsx" }, "5": { "name": "punctuation.definition.tag.begin.ts.tsx" }, "6": { "name": "entity.name.tag.ts.tsx" }, "7": { "name": "entity.other.attribute-name.ts.tsx" }, "8": { "name": "punctuation.definition.tag.end.ts.tsx" }, "9": { "name": "punctuation.definition.tag.begin.ts.tsx" }, "10": { "name": "entity.name.tag.ts.tsx" }, "12": { "name": "entity.other.attribute-name.ts.tsx" }, "13": { "name": "punctuation.definition.tag.end.ts.tsx" } }, "end": "()", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.ts.tsx" }, "2": { "name": "entity.name.tag.ts.tsx" }, "3": { "name": "punctuation.definition.tag.end.ts.tsx" } }, "patterns": [ { "begin": "({)(`)", "beginCaptures": { "1": { "name": "punctuation.definition.block.js" }, "2": { "name": "punctuation.definition.string.template.begin.js string.template.js" } }, "end": "(`)(})", "endCaptures": { "1": { "name": "punctuation.definition.string.template.begin.js string.template.js" }, "2": { "name": "punctuation.definition.block.js" } }, "patterns": [{ "include": "source.css.jsx.styled" }] } ] }, { "contentName": "source.css.scss", "begin": "(?:(?:(\\bcss\\.)(resolve|global))|(\\bcss))(`)", "beginCaptures": { "1": { "name": "punctuation.accessor.js" }, "2": { "name": "entity.name.function.tagged-template.js" }, "3": { "name": "entity.name.function.tagged-template.js" }, "4": { "name": "punctuation.definition.string.template.begin.js string.template.js" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.template.end.js string.template.js" } }, "patterns": [ { "include": "source.css.jsx.styled" } ] } ], "scopeName": "styled-jsx" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/jsx.tmLanguage.json ================================================ { "scopeName": "source.jsx", "fileTypes": ["js", "htc", "jsx"], "patterns": [{ "include": "#shebang" }, { "include": "#expression" }], "repository": { "meta-class-member": { "begin": "\\b(?:(get|set)\\s+)?([a-zA-Z_$]\\w*)\\b", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "end": "\\}", "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "name": "meta.class.member.js", "beginCaptures": { "1": { "name": "storage.type.property.js" }, "2": { "name": "entity.name.function.js" } } }, "misc-higlighting": { "comment": "This patterns are not affecting scope rules and are usefull for higlighting purposes only", "name": "misc.js", "patterns": [ { "match": "(new)\\s+(\\w+(?:\\.\\w*)*)", "name": "meta.class.instance.constructor", "captures": { "1": { "name": "keyword.operator.new.js" }, "2": { "name": "entity.name.type.instance.js" } } }, { "match": "\\b(console)\\.(warn|info|log|error|time|timeEnd|assert)\\b", "name": "meta.object.js.firebug", "captures": { "1": { "name": "entity.name.type.object.js.firebug" }, "2": { "name": "support.function.js.firebug" } } }, { "match": "\\b(console)\\b", "name": "entity.name.type.object.js.firebug" }, { "match": "\\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\b", "name": "constant.numeric.js" }, { "match": "\\b(boolean|byte|char|class|double|enum|float|function|int|interface|long|short|var|void)\\b", "name": "storage.type.js" }, { "match": "\\b(const|export|extends|final|implements|native|private|protected|public|static|synchronized|throws|transient|volatile)\\b", "name": "storage.modifier.js" }, { "match": "\\b(break|case|catch|continue|default|do|else|finally|for|goto|if|import|package|return|switch|throw|try|while)\\b", "name": "keyword.control.js" }, { "match": "\\b(delete|in|instanceof|new|typeof|with)\\b", "name": "keyword.operator.js" }, { "match": "\\btrue\\b", "name": "constant.language.boolean.true.js" }, { "match": "\\bfalse\\b", "name": "constant.language.boolean.false.js" }, { "match": "\\bnull\\b", "name": "constant.language.null.js" }, { "match": "\\b(super|this)\\b", "name": "variable.language.js" }, { "match": "(\\.)(prototype|__proto__)\\b", "name": "meta.prototype.js", "captures": { "1": { "name": "meta.delimiter.method.period.js" }, "2": { "name": "support.constant.js" } } }, { "match": "\\b(debugger)\\b", "name": "keyword.other.js" }, { "match": "\\b(Anchor|Applet|Area|Array|Boolean|Button|Checkbox|Date|document|event|FileUpload|Form|Frame|Function|Hidden|History|Image|JavaArray|JavaClass|JavaObject|JavaPackage|java|Layer|Link|Location|Math|MimeType|Number|navigator|netscape|Object|Option|Packages|Password|Plugin|Radio|RegExp|Reset|Select|String|Style|Submit|screen|sun|Text|Textarea|window|XMLHttpRequest)\\b", "name": "support.class.js" }, { "match": "\\b(require|module\\.exports|module\\.id|exports)\\b", "name": "support.function.js" }, { "match": "\\b(s(h(ift|ow(Mod(elessDialog|alDialog)|Help))|croll(X|By(Pages|Lines)?|Y|To)?|t(op|rike)|i(n|zeToContent|debar|gnText)|ort|u(p|b(str(ing)?)?)|pli(ce|t)|e(nd|t(Re(sizable|questHeader)|M(i(nutes|lliseconds)|onth)|Seconds|Ho(tKeys|urs)|Year|Cursor|Time(out)?|Interval|ZOptions|Date|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(ome|andleEvent)|navigate|c(har(CodeAt|At)|o(s|n(cat|textual|firm)|mpile)|eil|lear(Timeout|Interval)?|a(ptureEvents|ll)|reate(StyleSheet|Popup|EventObject))|t(o(GMTString|S(tring|ource)|U(TCString|pperCase)|Lo(caleString|werCase))|est|a(n|int(Enabled)?))|i(s(NaN|Finite)|ndexOf|talics)|d(isableExternalCapture|ump|etachEvent)|u(n(shift|taint|escape|watch)|pdateCommands)|j(oin|avaEnabled)|p(o(p|w)|ush|lugins.refresh|a(ddings|rse(Int|Float)?)|r(int|ompt|eference))|e(scape|nableExternalCapture|val|lementFromPoint|x(p|ec(Script|Command)?))|valueOf|UTC|queryCommand(State|Indeterm|Enabled|Value)|f(i(nd|le(ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(nt(size|color)|rward)|loor|romCharCode)|watch|l(ink|o(ad|g)|astIndexOf)|a(sin|nchor|cos|t(tachEvent|ob|an(2)?)|pply|lert|b(s|ort))|r(ou(nd|teEvents)|e(size(By|To)|calc|turnValue|place|verse|l(oad|ease(Capture|Events)))|andom)|g(o|et(ResponseHeader|M(i(nutes|lliseconds)|onth)|Se(conds|lection)|Hours|Year|Time(zoneOffset)?|Da(y|te)|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear)|FullYear|A(ttention|llResponseHeaders)))|m(in|ove(B(y|elow)|To(Absolute)?|Above)|ergeAttributes|a(tch|rgins|x))|b(toa|ig|o(ld|rderWidths)|link|ack))\\b(?=\\()", "name": "support.function.js" }, { "match": "\\b(s(ub(stringData|mit)|plitText|e(t(NamedItem|Attribute(Node)?)|lect))|has(ChildNodes|Feature)|namedItem|c(l(ick|o(se|neNode))|reate(C(omment|DATASection|aption)|T(Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(ntityReference|lement)|Attribute))|tabIndex|i(nsert(Row|Before|Cell|Data)|tem)|open|delete(Row|C(ell|aption)|T(Head|Foot)|Data)|focus|write(ln)?|a(dd|ppend(Child|Data))|re(set|place(Child|Data)|move(NamedItem|Child|Attribute(Node)?)?)|get(NamedItem|Element(sBy(Name|TagName)|ById)|Attribute(Node)?)|blur)\\b(?=\\()", "name": "support.function.dom.js" }, { "match": "(?<=\\.)(s(ystemLanguage|cr(ipts|ollbars|een(X|Y|Top|Left))|t(yle(Sheets)?|atus(Text|bar)?)|ibling(Below|Above)|ource|uffixes|e(curity(Policy)?|l(ection|f)))|h(istory|ost(name)?|as(h|Focus))|y|X(MLDocument|SLDocument)|n(ext|ame(space(s|URI)|Prop))|M(IN_VALUE|AX_VALUE)|c(haracterSet|o(n(structor|trollers)|okieEnabled|lorDepth|mp(onents|lete))|urrent|puClass|l(i(p(boardData)?|entInformation)|osed|asses)|alle(e|r)|rypto)|t(o(olbar|p)|ext(Transform|Indent|Decoration|Align)|ags)|SQRT(1_2|2)|i(n(ner(Height|Width)|put)|ds|gnoreCase)|zIndex|o(scpu|n(readystatechange|Line)|uter(Height|Width)|p(sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(i(splay|alog(Height|Top|Width|Left|Arguments)|rectories)|e(scription|fault(Status|Ch(ecked|arset)|View)))|u(ser(Profile|Language|Agent)|n(iqueID|defined)|pdateInterval)|_content|p(ixelDepth|ort|ersonalbar|kcs11|l(ugins|atform)|a(thname|dding(Right|Bottom|Top|Left)|rent(Window|Layer)?|ge(X(Offset)?|Y(Offset)?))|r(o(to(col|type)|duct(Sub)?|mpter)|e(vious|fix)))|e(n(coding|abledPlugin)|x(ternal|pando)|mbeds)|v(isibility|endor(Sub)?|Linkcolor)|URLUnencoded|P(I|OSITIVE_INFINITY)|f(ilename|o(nt(Size|Family|Weight)|rmName)|rame(s|Element)|gColor)|E|whiteSpace|l(i(stStyleType|n(eHeight|kColor))|o(ca(tion(bar)?|lName)|wsrc)|e(ngth|ft(Context)?)|a(st(M(odified|atch)|Index|Paren)|yer(s|X)|nguage))|a(pp(MinorVersion|Name|Co(deName|re)|Version)|vail(Height|Top|Width|Left)|ll|r(ity|guments)|Linkcolor|bove)|r(ight(Context)?|e(sponse(XML|Text)|adyState))|global|x|m(imeTypes|ultiline|enubar|argin(Right|Bottom|Top|Left))|L(N(10|2)|OG(10E|2E))|b(o(ttom|rder(Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(Color|Image)))\\b", "name": "support.constant.js" }, { "match": "(?<=\\.)(s(hape|ystemId|c(heme|ope|rolling)|ta(ndby|rt)|ize|ummary|pecified|e(ctionRowIndex|lected(Index)?)|rc)|h(space|t(tpEquiv|mlFor)|e(ight|aders)|ref(lang)?)|n(o(Resize|tation(s|Name)|Shade|Href|de(Name|Type|Value)|Wrap)|extSibling|ame)|c(h(ildNodes|Off|ecked|arset)?|ite|o(ntent|o(kie|rds)|de(Base|Type)?|l(s|Span|or)|mpact)|ell(s|Spacing|Padding)|l(ear|assName)|aption)|t(ype|Bodies|itle|Head|ext|a(rget|gName)|Foot)|i(sMap|ndex|d|m(plementation|ages))|o(ptions|wnerDocument|bject)|d(i(sabled|r)|o(c(type|umentElement)|main)|e(clare|f(er|ault(Selected|Checked|Value)))|at(eTime|a))|useMap|p(ublicId|arentNode|r(o(file|mpt)|eviousSibling))|e(n(ctype|tities)|vent|lements)|v(space|ersion|alue(Type)?|Link|Align)|URL|f(irstChild|orm(s)?|ace|rame(Border)?)|width|l(ink(s)?|o(ngDesc|wSrc)|a(stChild|ng|bel))|a(nchors|c(ce(ssKey|pt(Charset)?)|tion)|ttributes|pplets|l(t|ign)|r(chive|eas)|xis|Link|bbr)|r(ow(s|Span|Index)|ules|e(v|ferrer|l|adOnly))|m(ultiple|e(thod|dia)|a(rgin(Height|Width)|xLength))|b(o(dy|rder)|ackground|gColor))\\b", "name": "support.constant.dom.js" }, { "match": "\\b(ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR|WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR)\\b", "name": "support.constant.dom.js" }, { "match": "\\bon(R(ow(s(inserted|delete)|e(nter|xit))|e(s(ize(start|end)?|et)|adystatechange))|Mouse(o(ut|ver)|down|up|move)|B(efore(cut|deactivate|u(nload|pdate)|p(aste|rint)|editfocus|activate)|lur)|S(croll|top|ubmit|elect(start|ionchange)?)|H(over|elp)|C(hange|ont(extmenu|rolselect)|ut|ellchange|l(ick|ose))|D(eactivate|ata(setc(hanged|omplete)|available)|r(op|ag(start|over|drop|en(ter|d)|leave)?)|blclick)|Unload|P(aste|ropertychange)|Error(update)?|Key(down|up|press)|Focus|Load|A(ctivate|fter(update|print)|bort))\\b", "name": "support.function.event-handler.js" }, { "match": "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|(?]+)(>)", "name": "tag.close.js", "captures": { "1": { "name": "punctuation.definition.tag.begin.js" }, "2": { "name": "entity.name.tag.js" }, "3": { "name": "punctuation.definition.tag.end.js" } } }, "class-expression": { "begin": "\\b(class)\\b(?:\\s+([a-zA-Z_$]\\w*))?", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "end": "(?=\\})", "patterns": [ { "include": "#comment" }, { "include": "#meta-class-body" }, { "include": "#expression" } ], "name": "meta.class.js", "beginCaptures": { "1": { "name": "storage.type.class.js" }, "2": { "name": "entity.name.type.class.js" } } }, "function": { "comment": "Function aggregate", "name": "string.js", "patterns": [ { "include": "#function-on-prototype" }, { "include": "#function-on-prototype-named" }, { "include": "#function-on-object" }, { "include": "#function-as-var" }, { "include": "#function-json" }, { "include": "#function-json-quoted" }, { "include": "#function-property" }, { "include": "#function-named-expression" }, { "include": "#function-expression" } ] }, "comment": { "name": "comment.js", "patterns": [ { "include": "#comment-block-doc" }, { "include": "#comment-block" }, { "include": "#comment-block-html" }, { "include": "#comment-line" } ] }, "string": { "name": "string.js", "patterns": [ { "include": "#string-quoted-single" }, { "include": "#string-quoted-double" } ] }, "expression": { "comment": "The main building block", "name": "meta.expression.js", "patterns": [ { "include": "#comment" }, { "include": "#class-expression" }, { "include": "#function" }, { "include": "#block" }, { "include": "#string" }, { "include": "#regexp" }, { "include": "#jsx" }, { "include": "#misc-higlighting" } ] }, "meta-class-body": { "begin": "\\{", "endCaptures": {}, "end": "(?=\\})", "patterns": [ { "include": "#comment" }, { "include": "#meta-class-member" } ], "name": "meta.expression.body.class", "beginCaptures": { "0": { "name": "meta.brace.curly.js" } } }, "comment-line": { "match": "(//).*$\n?", "name": "comment.line.double-slash.js", "captures": { "1": { "name": "punctuation.definition.comment.js" } } }, "comment-block-doc": { "begin": "/\\*\\*(?!/)", "end": "\\*/", "name": "comment.block.documentation.js", "captures": { "0": { "name": "punctuation.definition.comment.js" } } }, "function-on-prototype-named": { "match": "([a-zA-Z_?.$][\\w?.$]*)\\.(prototype)\\.([a-zA-Z_?.$][\\w?.$]*)\\s*(=)\\s*", "comment": "match stuff like: Sound.prototype.play = myfunc", "name": "meta.scope.function.js", "captures": { "3": { "name": "entity.name.function.js" }, "1": { "name": "support.class.js" }, "4": { "name": "keyword.operator.js" }, "2": { "name": "support.constant.js" }, "0": { "name": "meta.function.js" } } }, "jsx-tag-attribute-name": { "match": "\\b([a-zA-Z\\-:]+)", "name": "meta.tag.attribute-name.js", "captures": { "1": { "name": "entity.other.attribute-name.js" } } }, "function-on-object": { "end": "\\}", "begin": "([a-zA-Z_?.$][\\w?.$]*)\\.([a-zA-Z_?.$][\\w?.$]*)\\s*(=)\\s*(function)\\b", "beginCaptures": { "3": { "name": "keyword.operator.js" }, "1": { "name": "support.class.js" }, "4": { "name": "storage.type.function.js" }, "2": { "name": "entity.name.function.js" }, "0": { "name": "meta.function.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "match stuff like: Sound.play = function() { … }", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.scope.function.js" }, "function-as-var": { "end": "\\}", "begin": "([a-zA-Z_?$][\\w?$]*)\\s*(=)\\s*(function)\\s*", "beginCaptures": { "3": { "name": "storage.type.function.js" }, "1": { "name": "entity.name.function.js" }, "2": { "name": "keyword.operator.js" }, "0": { "name": "meta.function.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "match stuff like: play = function() { … }", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.scope.function.js" }, "comment-block": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.js", "captures": { "0": { "name": "punctuation.definition.comment.js" } } }, "function-named-expression": { "end": "\\}", "begin": "\\b(function)\\b(?:\\s+([a-zA-Z_$]\\w*))\\s*", "beginCaptures": { "0": { "name": "meta.function.js" }, "1": { "name": "storage.type.function.js" }, "2": { "name": "entity.name.function.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "match regular function like: function myFunc(arg) { … }", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.scope.function.js" }, "function-on-prototype": { "end": "\\}", "begin": "([a-zA-Z_?.$][\\w?.$]*)\\.(prototype)\\.([a-zA-Z_?.$][\\w?.$]*)\\s*(=)\\s*(function)\\b", "beginCaptures": { "3": { "name": "entity.name.function.js" }, "1": { "name": "support.class.js" }, "4": { "name": "keyword.operator.js" }, "2": { "name": "support.constant.js" }, "0": { "name": "meta.function.js" }, "5": { "name": "storage.type.function.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "match stuff like: Sound.prototype.play = function() { … }", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.function.prototype.js" }, "shebang": { "comment": "node.js shebang", "match": "^#![\\S]+ node", "name": "comment.line.js" }, "jsx-tag-attributes": { "patterns": [ { "include": "#jsx-tag-attribute-name" }, { "include": "#jsx-string-double-quoted" }, { "include": "#jsx-string-single-quoted" }, { "include": "#jsx-evaluated-code" } ] }, "jsx-entities": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.js", "captures": { "1": { "name": "punctuation.definition.entity.js" }, "3": { "name": "punctuation.definition.entity.js" } } }, { "match": "&", "name": "invalid.illegal.bad-ampersand.js" } ] }, "function-property": { "begin": "\\b(get|set)\\s+([a-zA-Z_$]\\w*)\\b", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "end": "\\}", "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "name": "meta.property.json.js", "beginCaptures": { "0": { "name": "meta.function.js" }, "1": { "name": "storage.type.property.js" }, "2": { "name": "entity.name.function.js" } } }, "jsx-tag-open": { "begin": "(<)([a-zA-Z0-9:]+)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.js" } }, "end": "(/?>)", "patterns": [{ "include": "#jsx-tag-attributes" }], "name": "tag.open.js", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.js" }, "2": { "name": "entity.name.tag.js" } } }, "meta-function-parameters": { "begin": "\\(", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.js" } }, "end": "\\)", "patterns": [ { "include": "#comment" }, { "match": "[a-zA-Z_$]\\w*", "name": "variable.parameter.function.js" } ], "name": "meta.expression.body.class", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.js" } } }, "comment-block-html": { "match": "()", "name": "comment.block.html.js", "captures": { "0": { "name": "punctuation.definition.comment.html.js" }, "2": { "name": "punctuation.definition.comment.html.js" } } }, "function-json": { "end": "\\}", "begin": "\\b([a-zA-Z_?.$][\\w?.$]*)\\s*:\\s*\\b(function)\\s*", "beginCaptures": { "0": { "name": "meta.function.js" }, "1": { "name": "entity.name.function.js" }, "2": { "name": "storage.type.function.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "match stuff like: foobar: function() { … }", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.scope.function.js" }, "string-quoted-single": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.js" } }, "end": "'", "patterns": [ { "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.js" } ], "name": "string.quoted.single.js", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.js" } } }, "regexp": { "begin": "(?<=[=(:]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])", "endCaptures": { "1": { "name": "punctuation.definition.string.end.js" } }, "end": "(/)[igm]*", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.js" } ], "name": "string.regexp.js", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.js" } } }, "jsx": { "name": "meta.jsx.js", "patterns": [ { "include": "#jsx-tag-open" }, { "include": "#jsx-tag-close" }, { "include": "#jsx-tag-invalid" } ] }, "jsx-string-double-quoted": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.js" } }, "end": "\"", "patterns": [{ "include": "#jsx-entities" }], "name": "string.quoted.double.js", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.js" } } }, "block-braces-round": { "begin": "\\(", "endCaptures": { "0": { "name": "meta.brace.round.js" } }, "end": "\\)", "patterns": [{ "include": "#expression" }], "name": "meta.expression.braces.round", "beginCaptures": { "0": { "name": "meta.brace.round.js" } } }, "jsx-tag-invalid": { "match": "<\\s*>", "name": "invalid.illegal.tag.incomplete.js" }, "function-json-quoted": { "end": "\\}", "begin": "(?:((')([^']*)('))|((\")([^\"]+)(\")))\\s*:\\s*\\b(function)\\b", "beginCaptures": { "7": { "name": "entity.name.function.js" }, "3": { "name": "entity.name.function.js" }, "8": { "name": "punctuation.definition.string.end.js" }, "4": { "name": "punctuation.definition.string.end.js" }, "0": { "name": "meta.function.js" }, "9": { "name": "storage.type.function.js" }, "5": { "name": "string.quoted.double.js" }, "1": { "name": "string.quoted.single.js" }, "6": { "name": "punctuation.definition.string.begin.js" }, "2": { "name": "punctuation.definition.string.begin.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "Attempt to match 'foo': function", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.scope.function.js" }, "function-expression": { "end": "\\}", "begin": "\\b(function)\\b\\s*", "beginCaptures": { "1": { "name": "storage.type.function.js" } }, "patterns": [ { "include": "#comment" }, { "include": "#meta-function-parameters" }, { "include": "#meta-function-body" } ], "comment": "match regular function like: function myFunc(arg) { … }", "endCaptures": { "0": { "name": "meta.brace.curly.js" } }, "name": "meta.scope.function.js" }, "string-quoted-double": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.js" } }, "end": "\"", "patterns": [ { "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.js" } ], "name": "string.quoted.double.js", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.js" } } }, "block": { "name": "block.js", "patterns": [ { "include": "#block-braces-curly" }, { "include": "#block-braces-round" } ] } }, "name": "JavaScript (FB)", "uuid": "4b3f11ef-3e1f-4311-a911-b7fd497b3ff4" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/julia.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/JuliaEditorSupport/atom-language-julia/blob/master/grammars/julia_vscode.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/7b7801f41ce4ac1303bd17e057dbe677e24f597f", "name": "julia", "scopeName": "source.julia", "comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/", "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" } ], "repository": { "array": { "patterns": [ { "begin": "\\[", "beginCaptures": { "0": { "name": "meta.bracket.julia" } }, "end": "(\\])((?:\\.)?'*)", "endCaptures": { "1": { "name": "meta.bracket.julia" }, "2": { "name": "keyword.operator.transpose.julia" } }, "name": "meta.array.julia", "patterns": [ { "match": "\\bbegin\\b", "name": "constant.numeric.julia" }, { "match": "\\bend\\b", "name": "constant.numeric.julia" }, { "match": "\\bfor\\b", "name": "keyword.control.julia" }, { "include": "$self" } ] } ] }, "parentheses": { "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.bracket.julia" } }, "end": "(\\))((?:\\.)?'*)", "endCaptures": { "1": { "name": "meta.bracket.julia" }, "2": { "name": "keyword.operator.transpose.julia" } }, "patterns": [ { "include": "$self" } ] } ] }, "bracket": { "patterns": [ { "match": "(?:\\(|\\)|\\[|\\]|\\{|\\}|,|;)(?!('|(?:\\.'))*\\.?')", "name": "meta.bracket.julia" } ] }, "comment": { "patterns": [ { "include": "#comment_block" }, { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.julia" } }, "end": "\\n", "name": "comment.line.number-sign.julia" } ] }, "comment_block": { "patterns": [ { "begin": "#=", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.julia" } }, "end": "=#", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.julia" } }, "name": "comment.block.number-sign-equals.julia", "patterns": [ { "include": "#comment_block" } ] } ] }, "function_call": { "patterns": [ { "begin": "((?:[[: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}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(\\()", "beginCaptures": { "1": { "name": "support.function.julia" }, "2": { "name": "support.type.julia" }, "3": { "name": "meta.bracket.julia" } }, "end": "\\)(('|(\\.'))*\\.?')?", "endCaptures": { "0": { "name": "meta.bracket.julia" }, "1": { "name": "keyword.operator.transposed-func.julia" } }, "patterns": [ { "match": "\\bfor\\b", "name": "keyword.control.julia" }, { "include": "$self" } ] } ] }, "function_decl": { "patterns": [ { "captures": { "1": { "name": "entity.name.function.julia" }, "2": { "name": "support.type.julia" } }, "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}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?(?=\\([^#]*\\)(::[^\\s]+)?(\\s*\\bwhere\\b\\s+.+?)?\\s*?=(?![=>]))", "comment": "first group is function name\nSecond group is type parameters (e.g. {T<:Number, S})\nThen open parens\nThen a lookahead ensures that we are followed by:\n - anything (function argumnets)\n - 0 or more spaces\n - Finally an equal sign\nNegative lookahead ensures we don't have another equal sign (not `==`)" }, { "captures": { "1": { "name": "keyword.other.julia" }, "2": { "name": "keyword.operator.dots.julia" }, "3": { "name": "entity.name.function.julia" }, "4": { "name": "support.type.julia" } }, "match": "\\b(function|macro)(?:\\s+(?:(?:[[: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{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}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?|\\s*)(?=\\()", "comment": "similar regex to previous, but with keyword not 1-line syntax" } ] }, "keyword": { "patterns": [ { "match": "\\b(?|<-|-->|=>)", "name": "keyword.operator.arrow.julia" }, { "match": "(?::=|\\+=|-=|\\*=|//=|/=|\\.//=|\\./=|\\.\\*=|\\\\=|\\.\\\\=|\\^=|\\.\\^=|%=|\\.%=|÷=|\\.÷=|\\|=|&=|\\.&=|⊻=|\\.⊻=|\\$=|<<=|>>=|>>>=|=(?!=))", "name": "keyword.operator.update.julia" }, { "match": "(?:<<|>>>|>>|\\.>>>|\\.>>|\\.<<)", "name": "keyword.operator.shift.julia" }, { "match": "(?:\\s*(::|>:|<:)\\s*((?:(?:Union)?\\([^)]*\\)|[[:alpha:]_$∇][[:word:]⁺-ₜ!′\\.]*(?:(?:{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})|(?:\".+?(?=|\\.>|\\.<=|\\.<|\\.≤|\\.≥|==|\\.!=|\\.=|\\.!|<:|>:|:>|(?)>=|(?|<|≥|≤)", "name": "keyword.operator.relation.julia" }, { "match": "(?<=\\s)(?:\\?)(?=\\s)", "name": "keyword.operator.ternary.julia" }, { "match": "(?<=\\s)(?:\\:)(?=\\s)", "name": "keyword.operator.ternary.julia" }, { "match": "(?:\\|\\||&&|(?)", "name": "keyword.operator.applies.julia" }, { "match": "(?:\\||\\.\\||\\&|\\.\\&|~|\\.~|⊻|\\.⊻)", "name": "keyword.operator.bitwise.julia" }, { "match": "(?:\\+\\+|--|\\+|\\.\\+|-|\\.\\-|\\*|\\.\\*|//(?!=)|\\.//(?!=)|/|\\./|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^|÷|\\.÷|⋅|\\.⋅|∩|\\.∩|∪|\\.∪|×|√|∛)", "name": "keyword.operator.arithmetic.julia" }, { "match": "(?:∘)", "name": "keyword.operator.compose.julia" }, { "match": "(?:::|(?<=\\s)isa(?=\\s))", "name": "keyword.operator.isa.julia" }, { "match": "(?:(?<=\\s)in(?=\\s))", "name": "keyword.operator.relation.in.julia" }, { "match": "(?:\\.(?=(?:@|_|\\p{L}))|\\.\\.+)", "name": "keyword.operator.dots.julia" }, { "match": "(?:\\$)(?=.+)", "name": "keyword.operator.interpolation.julia" }, { "captures": { "2": { "name": "keyword.operator.transposed-variable.julia" } }, "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}←-⇿])*)(('|(\\.'))*\\.?')" }, { "captures": { "1": { "name": "bracket.end.julia" }, "2": { "name": "keyword.operator.transposed-matrix.julia" } }, "match": "(\\])((?:'|(?:\\.'))*\\.?')" }, { "captures": { "1": { "name": "bracket.end.julia" }, "2": { "name": "keyword.operator.transposed-parens.julia" } }, "match": "(\\))((?:'|(?:\\.'))*\\.?')" } ] }, "string": { "patterns": [ { "begin": "(?:(@doc)\\s((?:doc)?\"\"\")|(doc\"\"\"))", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "(\"\"\") ?(->)?", "endCaptures": { "1": { "name": "punctuation.definition.string.end.julia" }, "2": { "name": "keyword.operator.arrow.julia" } }, "name": "string.docstring.julia", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "(i?cxx)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } }, "name": "embed.cxx.julia", "contentName": "meta.embedded.inline.cpp", "patterns": [ { "include": "source.cpp#root_context" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "(py)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "([\\s\\w]*)(\"\"\")", "endCaptures": { "2": { "name": "punctuation.definition.string.end.julia" } }, "name": "embed.python.julia", "contentName": "meta.embedded.inline.python", "patterns": [ { "include": "source.python" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "(js)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } }, "name": "embed.js.julia", "contentName": "meta.embedded.inline.javascript", "patterns": [ { "include": "source.js" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "(R)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } }, "name": "embed.R.julia", "contentName": "meta.embedded.inline.r", "patterns": [ { "include": "source.r" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "(raw)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"\"\"", "name": "string.quoted.other.julia", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } } }, { "begin": "(raw)(\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"", "name": "string.quoted.other.julia", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } } }, { "begin": "(sql)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } }, "name": "embed.sql.julia", "contentName": "meta.embedded.inline.sql", "patterns": [ { "include": "source.sql" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "var\"\"\"", "end": "\"\"\"", "name": "constant.other.symbol.julia" }, { "begin": "var\"", "end": "\"", "name": "constant.other.symbol.julia" }, { "begin": "^\\s?(doc)?(\"\"\")\\s?$", "beginCaptures": { "1": { "name": "support.function.macro.julia" }, "2": { "name": "punctuation.definition.string.begin.julia" } }, "end": "(\"\"\")", "endCaptures": { "1": { "name": "punctuation.definition.string.end.julia" } }, "name": "string.docstring.julia", "comment": "This only matches docstrings that start and end with triple quotes on\ntheir own line in the void", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.julia" } }, "end": "'(?!')", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } }, "name": "string.quoted.single.julia", "patterns": [ { "include": "#string_escaped_char" } ] }, { "begin": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.multiline.begin.julia" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.multiline.end.julia" } }, "name": "string.quoted.triple.double.julia", "comment": "multi-line string with triple double quotes", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "name": "string.quoted.double.julia", "begin": "\"(?!\"\")", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.julia" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.julia" } }, "comment": "String with single pair of double quotes. Regex matches isolated double quote", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_dollar_sign_interpolate" } ] }, { "begin": "r\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.regexp.begin.julia" } }, "end": "(\"\"\")([imsx]{0,4})?", "endCaptures": { "1": { "name": "punctuation.definition.string.regexp.end.julia" }, "2": { "comment": "I took this scope name from python regex grammar", "name": "keyword.other.option-toggle.regexp.julia" } }, "name": "string.regexp.julia", "patterns": [ { "include": "#string_escaped_char" } ] }, { "begin": "r\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.regexp.begin.julia" } }, "end": "(\")([imsx]{0,4})?", "endCaptures": { "1": { "name": "punctuation.definition.string.regexp.end.julia" }, "2": { "comment": "I took this scope name from python regex grammar", "name": "keyword.other.option-toggle.regexp.julia" } }, "name": "string.regexp.julia", "patterns": [ { "include": "#string_escaped_char" } ] }, { "begin": "(?!:_)(?:struct|mutable\\s+struct|abstract\\s+type|primitive\\s+type)\\s+((?:[[: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}←-⇿])*)(\\s*(<:)\\s*(?:[[: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}←-⇿])*(?:{.*})?)?", "name": "meta.type.julia" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/kotlin.tmLanguage.json ================================================ { "fileTypes": ["kt", "kts"], "foldingStartMarker": "(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)", "foldingStopMarker": "^\\s*(\\}|// \\}\\}\\}$)", "name": "kotlin", "patterns": [ { "include": "#comments" }, { "captures": { "1": { "name": "keyword.other.kotlin" }, "2": { "name": "entity.name.package.kotlin" } }, "match": "^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*)?" }, { "captures": { "1": { "name": "keyword.other.import.kotlin" }, "2": { "name": "storage.modifier.import.java" }, "3": { "name": "keyword.other.kotlin" }, "4": { "name": "entity.name.type" } }, "match": "^\\s*(import)\\s+([^ $.]+(?:\\.(?:[`][^$`]+[`]|[^` $.]+))+)(?:\\s+(as)\\s+([`][^$`]+[`]|[^` $.]+))?", "name": "meta.import.kotlin" }, { "include": "#code" } ], "repository": { "annotations": { "patterns": [ { "begin": "(@[^ (]+)(\\()?", "beginCaptures": { "1": { "name": "storage.type.annotation.kotlin" }, "2": { "name": "punctuation.definition.annotation-arguments.begin.kotlin" } }, "end": "(\\)|\\s|$)", "endCaptures": { "1": { "name": "punctuation.definition.annotation-arguments.end.kotlin" } }, "name": "meta.declaration.annotation.kotlin", "patterns": [ { "captures": { "1": { "name": "constant.other.key.kotlin" }, "2": { "name": "keyword.operator.assignment.kotlin" } }, "match": "(\\w*)\\s*(=)" }, { "include": "#code" }, { "match": ",", "name": "punctuation.seperator.property.kotlin" } ] }, { "match": "@\\w*", "name": "storage.type.annotation.kotlin" } ] }, "builtin-functions": { "patterns": [ { "match": "\\b(apply|also|let|takeIf|run|takeUnless|with|print|println)\\b\\s*(?={|\\()", "captures": { "1": { "name": "support.function.kotlin" } } }, { "match": "\\b(mutableListOf|listOf|mutableMapOf|mapOf|mutableSetOf|setOf)\\b\\s*(?={|\\()", "captures": { "1": { "name": "support.function.kotlin" } } } ] }, "comments": { "patterns": [ { "captures": { "0": { "name": "punctuation.definition.comment.kotlin" } }, "match": "/\\*\\*/", "name": "comment.block.empty.kotlin" }, { "include": "#comments-inline" } ] }, "comments-inline": { "patterns": [ { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.kotlin" } }, "end": "\\*/", "name": "comment.block.kotlin" }, { "captures": { "1": { "name": "comment.line.double-slash.kotlin" }, "2": { "name": "punctuation.definition.comment.kotlin" } }, "match": "\\s*((//).*$\\n?)" } ] }, "class-literal": { "begin": "(?=\\b(?:class|interface|object)\\s+\\w+)\\b", "end": "(?=\\}|$)", "name": "meta.class.kotlin", "patterns": [ { "include": "#keyword-literal" }, { "begin": "\\b(class|object|interface)\\b\\s+(\\w+)", "beginCaptures": { "1": { "name": "storage.modifier.kotlin" }, "2": { "name": "entity.name.class.kotlin" } }, "end": "(?=\\{|\\(|:|$)", "patterns": [ { "include": "#keyword-literal" }, { "include": "#annotations" }, { "include": "#types" } ] }, { "begin": "(:)\\s*(\\w+)", "beginCaptures": { "1": { "name": "keyword.operator.declaration.kotlin" }, "2": { "name": "entity.other.inherited-class.kotlin" } }, "end": "(?={|=|$)", "patterns": [ { "include": "#types" } ] }, { "include": "#braces" }, { "include": "#parens" } ] }, "literal-functions": { "begin": "(?=\\b(?:fun)\\b)", "end": "(?=$|=|\\})", "patterns": [ { "begin": "\\b(fun)\\b", "beginCaptures": { "1": { "name": "keyword.other.kotlin" } }, "end": "(?=\\()", "patterns": [ { "captures": { "2": { "name": "entity.name.function.kotlin" } }, "match": "([\\.<\\?>\\w]+\\.)?(\\w+|(`[^`]*`))" }, { "include": "#types" } ] }, { "begin": "(:)", "beginCaptures": { "1": { "name": "keyword.operator.declaration.kotlin" } }, "end": "(?={|=|$)", "patterns": [ { "include": "#types" } ] }, { "include": "#parens" }, { "include": "#braces" } ] }, "parameters": { "patterns": [ { "begin": "(:)", "beginCaptures": { "1": { "name": "keyword.operator.declaration.kotlin" } }, "end": "(?=,|=|\\))", "patterns": [ { "include": "#types" } ] }, { "match": "\\w+(?=:)", "name": "variable.parameter.function.kotlin" }, { "include": "#keyword-literal" } ] }, "keyword-literal": { "patterns": [ { "match": "(\\!in|\\!is|as\\?)", "name": "keyword.operator.kotlin" }, { "match": "\\b(in|is|as|assert)\\b", "name": "keyword.operator.kotlin" }, { "match": "\\b(const)\\b", "name": "storage.modifier.kotlin" }, { "match": "\\b(val|var)\\b", "name": "storage.type.kotlin" }, { "match": "\\b(\\_)\\b", "name": "punctuation.definition.variable.kotlin" }, { "match": "\\b(data|inline|tailrec|operator|infix|typealias|reified)\\b", "name": "storage.type.kotlin" }, { "match": "\\b(external|public|private|protected|internal|abstract|final|sealed|enum|open|annotation|override|vararg|typealias|expect|actual|suspend|yield|out|in)\\b", "name": "storage.modifier.kotlin" }, { "match": "\\b(try|catch|finally|throw)\\b", "name": "keyword.control.catch-exception.kotlin" }, { "match": "\\b(if|else|when)\\b", "name": "keyword.control.conditional.kotlin" }, { "match": "\\b(while|for|do|return|break|continue)\\b", "name": "keyword.control.kotlin" }, { "match": "\\b(constructor|init)\\b", "name": "entity.name.function.constructor" }, { "match": "\\b(companion|object)\\b", "name": "storage.type.kotlin" } ] }, "keyword-operator": { "patterns": [ { "match": "\\b(and|or|not|inv)\\b", "name": "keyword.operator.bitwise.kotlin" }, { "match": "(==|!=|===|!==|<=|>=|<|>)", "name": "keyword.operator.comparison.kotlin" }, { "match": "(=)", "name": "keyword.operator.assignment.kotlin" }, { "match": "(:(?!:))", "name": "keyword.operator.declaration.kotlin" }, { "match": "(\\?:)", "name": "keyword.operator.elvis.kotlin" }, { "match": "(\\-\\-|\\+\\+)", "name": "keyword.operator.increment-decrement.kotlin" }, { "match": "(\\-|\\+|\\*|\\/|%)", "name": "keyword.operator.arithmetic.kotlin" }, { "match": "(\\+\\=|\\-\\=|\\*\\=|\\/\\=)", "name": "keyword.operator.arithmetic.assign.kotlin" }, { "match": "(\\!|\\&\\&|\\|\\|)", "name": "keyword.operator.logical.kotlin" }, { "match": "(\\.\\.)", "name": "keyword.operator.range.kotlin" } ] }, "keyword-punctuation": { "patterns": [ { "match": "(::)", "name": "punctuation.accessor.reference.kotlin" }, { "match": "(\\?\\.)", "name": "punctuation.accessor.dot.safe.kotlin" }, { "match": "(\\.)", "name": "punctuation.accessor.dot.kotlin" }, { "match": "(\\,)", "name": "punctuation.seperator.kotlin" }, { "match": "(\\;)", "name": "punctuation.terminator.kotlin" } ] }, "keyword-constant": { "patterns": [ { "match": "\\b(true|false|null|class)\\b", "name": "constant.language.kotlin" }, { "match": "\\b(this|super)\\b", "name": "variable.language.kotlin" }, { "match": "\\b(0(x|X)[0-9A-Fa-f_]*)[L]?\\b", "name": "constant.numeric.hex.kotlin" }, { "match": "\\b(0(b|B)[0-1_]*)[L]?\\b", "name": "constant.numeric.binary.kotlin" }, { "match": "\\b([0-9][0-9_]*\\.[0-9][0-9_]*[fFL]?)\\b", "name": "constant.numeric.float.kotlin" }, { "match": "\\b([0-9][0-9_]*[fFL]?)\\b", "name": "constant.numeric.integer.kotlin" } ] }, "literal-string": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.kotlin" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.kotlin" } }, "name": "string.quoted.double.kotlin", "patterns": [ { "include": "#string-content" } ] } ] }, "literal-raw-string": { "patterns": [ { "begin": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.kotlin" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.kotlin" } }, "name": "string.quoted.triple.kotlin", "patterns": [ { "include": "#string-content" } ] } ] }, "string-content": { "patterns": [ { "name": "constant.character.escape.newline.kotlin", "match": "\\\\\\s*\\n" }, { "name": "constant.character.escape.kotlin", "match": "\\\\(x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|.)" }, { "begin": "(\\$)(\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.keyword.kotlin" }, "2": { "name": "punctuation.section.block.begin.kotlin" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.block.end.kotlin" } }, "name": "entity.string.template.element.kotlin", "patterns": [ { "include": "#code" } ] } ] }, "types": { "patterns": [ { "match": "\\b(Nothing|Any|Unit|String|CharSequence|Int|Boolean|Char|Long|Double|Float|Short|Byte|Array|List|Map|Set|dynamic)\\b(\\?)?", "name": "support.class.kotlin" }, { "match": "\\b(IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\\b(\\?)?", "name": "support.class.kotlin" }, { "match": "((?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)(\\?)", "name": "entity.name.type.class.kotlin", "patterns": [ { "include": "#keyword-punctuation" }, { "include": "#types" } ] }, { "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*\\b", "captures": { "1": { "name": "keyword.operator.dereference.kotlin" } }, "name": "entity.name.type.class.kotlin" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.kotlin" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.kotlin" } }, "patterns": [ { "include": "#types" } ] }, { "include": "#keyword-punctuation" }, { "include": "#keyword-operator" } ] }, "parens": { "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.kotlin" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.kotlin" } }, "name": "meta.group.kotlin", "patterns": [ { "include": "#keyword-punctuation" }, { "include": "#parameters" }, { "include": "#code" } ] } ] }, "braces": { "patterns": [ { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.kotlin" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.group.end.kotlin" } }, "name": "meta.block.kotlin", "patterns": [ { "include": "#code" } ] } ] }, "brackets": { "patterns": [ { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.brackets.begin.kotlin" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.kotlin" } }, "name": "meta.brackets.kotlin", "patterns": [ { "include": "#code" } ] } ] }, "code": { "patterns": [ { "include": "#comments" }, { "include": "#comments-inline" }, { "include": "#annotations" }, { "include": "#class-literal" }, { "include": "#parens" }, { "include": "#braces" }, { "include": "#brackets" }, { "include": "#keyword-literal" }, { "include": "#types" }, { "include": "#keyword-operator" }, { "include": "#keyword-constant" }, { "include": "#keyword-punctuation" }, { "include": "#builtin-functions" }, { "include": "#literal-functions" }, { "include": "#builtin-classes" }, { "include": "#literal-raw-string" }, { "include": "#literal-string" } ] } }, "scopeName": "source.kotlin", "uuid": "d9380650-5edc-447d-8dbd-98838c7d0adf" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/kusto.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "scopeName": "source.kusto", "fileTypes": ["csl", "kusto", "kql"], "name": "Kusto", "patterns": [ { "match": "\\b(by|from|of|to|step|with)\\b", "name": "keyword.other.operator.kusto", "comment": "Tabular operators: common helper operators" }, { "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b", "name": "keyword.control.kusto", "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements" }, { "match": "\\b(and|or|has_all|has_any|matches|regex)\\b", "name": "keyword.other.operator.kusto", "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators" }, { "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)", "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [ { "include": "#Strings" } ] } }, "name": "meta.special.database.kusto", "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction" }, { "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b", "name": "support.function.kusto", "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction" }, { "match": "(?]*([>\\]]))?(?:(\\[)[^\\]]*(\\]))?(\\{)", "captures": { "1": { "name": "keyword.control.cite.latex" }, "2": { "name": "punctuation.definition.keyword.latex" }, "3": { "patterns": [ { "include": "#autocites-arg" } ] }, "4": { "name": "punctuation.definition.arguments.optional.begin.latex" }, "5": { "name": "punctuation.definition.arguments.optional.end.latex" }, "6": { "name": "punctuation.definition.arguments.optional.begin.latex" }, "7": { "name": "punctuation.definition.arguments.optional.end.latex" }, "8": { "name": "punctuation.definition.arguments.begin.latex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.citation.latex", "patterns": [ { "captures": { "1": { "name": "comment.line.percentage.tex" }, "2": { "name": "punctuation.definition.comment.tex" } }, "match": "((%).*)$" }, { "match": "[\\w:.-]+", "name": "constant.other.reference.citation.latex" } ] }, { "begin": "((\\\\)bibentry)(\\{)", "captures": { "1": { "name": "keyword.control.cite.latex" }, "2": { "name": "punctuation.definition.keyword.latex" }, "3": { "name": "punctuation.definition.arguments.begin.latex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.citation.latex", "patterns": [ { "match": "[\\w:.]+", "name": "constant.other.reference.citation.latex" } ] }, { "begin": "((\\\\)(?:\\w*[r|R]ef\\*?))(\\{)", "beginCaptures": { "1": { "name": "keyword.control.ref.latex" }, "2": { "name": "punctuation.definition.keyword.latex" }, "3": { "name": "punctuation.definition.arguments.begin.latex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.reference.label.latex", "patterns": [ { "match": "[a-zA-Z0-9\\.,:/*!^_-]", "name": "constant.other.reference.label.latex" } ] }, { "include": "#definition-label" }, { "begin": "((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((\\\\)scantokens)(\\{)", "beginCaptures": { "1": { "name": "support.function.verb.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "name": "support.function.verb.latex" }, "4": { "name": "punctuation.definition.verb.latex" }, "5": { "name": "punctuation.definition.begin.latex" } }, "contentName": "markup.raw.verb.latex", "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.definition.end.latex" } }, "name": "meta.function.verb.latex", "patterns": [ { "include": "$self" } ] }, { "captures": { "1": { "name": "support.function.verb.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "name": "punctuation.definition.verb.latex" }, "4": { "name": "markup.raw.verb.latex" }, "5": { "name": "punctuation.definition.verb.latex" } }, "match": "((\\\\)(?:verb|Verb|spverb)\\*?)\\s*((?<=\\s)\\S|[^a-zA-Z])(.*?)(\\3|$)", "name": "meta.function.verb.latex" }, { "captures": { "1": { "name": "support.function.verb.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "patterns": [ { "include": "#optional-arg" } ] }, "4": { "name": "punctuation.definition.arguments.begin.latex" }, "5": { "name": "punctuation.definition.arguments.end.latex" }, "6": { "name": "punctuation.definition.verb.latex" }, "7": { "name": "markup.raw.verb.latex" }, "8": { "name": "punctuation.definition.verb.latex" }, "9": { "name": "punctuation.definition.verb.latex" }, "10": { "name": "markup.raw.verb.latex" }, "11": { "name": "punctuation.definition.verb.latex" } }, "match": "((\\\\)(?:mint|mintinline))((?:\\[[^\\[]*?\\])?)(\\{)[a-zA-Z]*(\\})(?:(?:([^a-zA-Z\\{])(.*?)(\\6))|(?:(\\{)(.*?)(\\})))", "name": "meta.function.verb.latex" }, { "captures": { "1": { "name": "support.function.verb.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "patterns": [ { "include": "#optional-arg" } ] }, "4": { "name": "punctuation.definition.verb.latex" }, "5": { "name": "markup.raw.verb.latex" }, "6": { "name": "punctuation.definition.verb.latex" }, "7": { "name": "punctuation.definition.verb.latex" }, "8": { "name": "markup.raw.verb.latex" }, "9": { "name": "punctuation.definition.verb.latex" } }, "match": "((\\\\)[a-z]+inline)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))", "name": "meta.function.verb.latex" }, { "captures": { "1": { "name": "support.function.verb.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "patterns": [ { "include": "#optional-arg" } ] }, "4": { "name": "punctuation.definition.verb.latex" }, "5": { "name": "source.python", "patterns": [ { "include": "source.python" } ] }, "6": { "name": "punctuation.definition.verb.latex" }, "7": { "name": "punctuation.definition.verb.latex" }, "8": { "name": "source.python", "patterns": [ { "include": "source.python" } ] }, "9": { "name": "punctuation.definition.verb.latex" } }, "match": "((\\\\)(?:py|pycon|pylab|pylabcon|sympy|sympycon)[cv]?)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))", "name": "meta.function.verb.latex" }, { "captures": { "1": { "name": "support.function.verb.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "patterns": [ { "include": "#optional-arg" } ] }, "4": { "name": "punctuation.definition.verb.latex" }, "5": { "name": "source.julia", "patterns": [ { "include": "source.julia" } ] }, "6": { "name": "punctuation.definition.verb.latex" }, "7": { "name": "punctuation.definition.verb.latex" }, "8": { "name": "source.julia", "patterns": [ { "include": "source.julia" } ] }, "9": { "name": "punctuation.definition.verb.latex" } }, "match": "((\\\\)(?:jl|julia)[cv]?)((?:\\[[^\\[]*?\\])?)(?:(?:([^a-zA-Z\\{])(.*?)(\\4))|(?:(\\{)(.*?)(\\})))", "name": "meta.function.verb.latex" }, { "match": "\\\\(?:newline|pagebreak|clearpage|linebreak|pause)(?:\\b)", "name": "keyword.control.layout.latex" }, { "begin": "\\\\\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.latex" } }, "end": "\\\\\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.latex" } }, "name": "meta.math.block.latex support.class.math.block.environment.latex", "patterns": [ { "include": "text.tex#math" }, { "include": "$base" } ] }, { "begin": "\\$\\$", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.latex" } }, "end": "\\$\\$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.latex" } }, "name": "meta.math.block.latex support.class.math.block.environment.latex", "patterns": [ { "match": "\\\\\\$", "name": "constant.character.escape.latex" }, { "include": "text.tex#math" }, { "include": "$base" } ] }, { "begin": "\\$", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tex" } }, "end": "\\$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.tex" } }, "name": "meta.math.block.tex support.class.math.block.tex", "patterns": [ { "match": "\\\\\\$", "name": "constant.character.escape.latex" }, { "include": "text.tex#math" }, { "include": "$base" } ] }, { "begin": "\\\\\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.latex" } }, "end": "\\\\\\]", "endCaptures": { "0": { "name": "punctuation.definition.string.end.latex" } }, "name": "meta.math.block.latex support.class.math.block.environment.latex", "patterns": [ { "include": "text.tex#math" }, { "include": "$base" } ] }, { "captures": { "1": { "name": "punctuation.definition.constant.latex" } }, "match": "(\\\\)(text(s(terling|ixoldstyle|urd|e(ction|venoldstyle|rvicemark))|yen|n(ineoldstyle|umero|aira)|c(ircledP|o(py(left|right)|lonmonetary)|urrency|e(nt(oldstyle)?|lsius))|t(hree(superior|oldstyle|quarters(emdash)?)|i(ldelow|mes)|w(o(superior|oldstyle)|elveudash)|rademark)|interrobang(down)?|zerooldstyle|o(hm|ne(superior|half|oldstyle|quarter)|penbullet|rd(feminine|masculine))|d(i(scount|ed|v(orced)?)|o(ng|wnarrow|llar(oldstyle)?)|egree|agger(dbl)?|blhyphen(char)?)|uparrow|p(ilcrow|e(so|r(t(housand|enthousand)|iodcentered))|aragraph|m)|e(stimated|ightoldstyle|uro)|quotes(traight(dblbase|base)|ingle)|f(iveoldstyle|ouroldstyle|lorin|ractionsolidus)|won|l(not|ira|e(ftarrow|af)|quill|angle|brackdbl)|a(s(cii(caron|dieresis|acute|grave|macron|breve)|teriskcentered)|cutedbl)|r(ightarrow|e(cipe|ferencemark|gistered)|quill|angle|brackdbl)|g(uarani|ravedbl)|m(ho|inus|u(sicalnote)?|arried)|b(igcircle|orn|ullet|lank|a(ht|rdbl)|rokenbar)))\\b", "name": "constant.character.latex" }, { "captures": { "1": { "name": "punctuation.definition.column-specials.begin.latex" }, "2": { "name": "punctuation.definition.column-specials.end.latex" } }, "match": "(?:<|>)(\\{)\\$(\\})", "name": "meta.column-specials.latex" }, { "include": "text.tex" } ], "repository": { "optional-arg": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.optional.arguments.begin.latex" }, "2": { "name": "variable.parameter.function.latex" }, "3": { "name": "punctuation.definition.optional.arguments.end.latex" } }, "match": "(\\[)([^\\[]*?)(\\])", "name": "meta.parameter.optional.latex" } ] }, "autocites-arg": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.arguments.optional.begin.latex" }, "2": { "name": "punctuation.definition.arguments.optional.end.latex" }, "3": { "name": "punctuation.definition.arguments.optional.begin.latex" }, "4": { "name": "punctuation.definition.arguments.optional.end.latex" }, "5": { "name": "punctuation.definition.arguments.begin.latex" }, "6": { "name": "constant.other.reference.citation.latex" }, "7": { "name": "punctuation.definition.arguments.end.latex" }, "8": { "patterns": [ { "include": "#autocites-arg" } ] } }, "match": "(?:(\\()[^\\)]*(\\))){0,2}(?:(\\[)[^\\]]*(\\])){0,2}(\\{)([\\w:.]+)(\\})(.*)" } ] }, "env-mandatory-arg": { "captures": { "1": { "name": "support.function.be.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "name": "punctuation.definition.arguments.begin.latex" }, "4": { "name": "variable.parameter.function.latex" }, "5": { "name": "punctuation.definition.arguments.end.latex" }, "6": { "name": "punctuation.definition.arguments.optional.begin.latex" }, "7": { "patterns": [ { "include": "$base" } ] }, "8": { "name": "punctuation.definition.arguments.optional.end.latex" }, "9": { "name": "punctuation.definition.arguments.begin.latex" }, "10": { "name": "variable.parameter.function.latex" }, "11": { "name": "punctuation.definition.arguments.end.latex" } }, "match": "((\\\\)(?:begin|end))(\\{)([a-z]*)(\\})(?:(\\[)(.*)(\\]))?(?:(\\{)([^{}]*)(\\}))?" }, "code-env": { "captures": { "1": { "name": "support.function.be.latex" }, "2": { "name": "punctuation.definition.function.latex" }, "3": { "name": "punctuation.definition.arguments.begin.latex" }, "4": { "name": "variable.parameter.function.latex" }, "5": { "name": "punctuation.definition.arguments.end.latex" }, "6": { "name": "punctuation.definition.arguments.optional.begin.latex" }, "7": { "name": "punctuation.definition.arguments.optional.end.latex" } }, "match": "(?:\\s*)((\\\\)(?:begin|end))(\\{)([a-z]+(?:\\*)?)(\\})(?:(\\[).*(\\]))?" }, "definition-label": { "begin": "((\\\\)label)((?:\\[[^\\[]*?\\])*)(\\{)", "beginCaptures": { "1": { "name": "keyword.control.label.latex" }, "2": { "name": "punctuation.definition.keyword.latex" }, "3": { "patterns": [ { "include": "#optional-arg" } ] }, "4": { "name": "punctuation.definition.arguments.begin.latex" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.latex" } }, "name": "meta.definition.label.latex", "patterns": [ { "match": "[a-zA-Z0-9\\.,:/*!^_-]", "name": "variable.parameter.definition.label.latex" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/latte.tmLanguage.json ================================================ { "name": "Latte", "scopeName": "source.latte", "fileTypes": ["latte"], "patterns": [ { "name": "comment.block.latte", "begin": "\\{\\*", "end": "\\*\\}" }, { "name": "source.latte", "begin": "\\{\\{?(?!\\s)", "beginCaptures": { "0": { "name": "tag.begin.latte" } }, "end": "\\}?\\}", "endCaptures": { "0": { "name": "tag.end.latte" } }, "patterns": [ { "name": "keyword.latte", "match": "(?<=\\{)(\\![^}]*)" }, { "name": "constant.numeric.latte", "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b" }, { "name": "variable.other.latte", "match": "\\$\\$?[a-zA-Z_0-9]+\\s*" }, { "name": "constant.language.latte", "match": "true|TRUE|True|false|FALSE|False|null|NULL|Null" }, { "name": "keyword.control.single.latte", "match": "(?<=\\{)(_|breakIf|continueIf|contentType|control|debugbreak|default|dump|elseifset|elseif|else|extends|includeblock|include|inputError|input|layout|link|php|plink|r|status|use|var)\\s*" }, { "name": "keyword.control.pair.latte", "match": "(?<=\\{)/?(block|cache|capture|define|first|foreach|form|for|ifset|ifCurrent|if|label|last|l|sep|snippet|syntax|while)\\s*" }, { "name": "keyword.operator.latte", "match": "(?<=\\s)(\\!|/|===|as|and|AND|And|&&|or|OR|Or|\\|\\||\\+\\+|\\-\\-|==|<=>|>=|<=)\\s?" }, { "name": "keyword.operator.latte", "match": "->" }, { "match": ".*?(\\|)(\\w+)(?:\\:([^\\|\\}]+))*", "captures": { "1": { "name": "keyword.other.latte" }, "2": { "name": "keyword.other.latte" } } }, { "include": "#strings" } ] }, { "include": "text.html.basic" } ], "repository": { "strings": { "patterns": [ { "name": "string.quoted.single.latte", "match": "(')(.*)(')" }, { "name": "string.quoted.double.latte", "match": "(\")(.*)(\")" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/less.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-less/blob/master/grammars/less.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-less/commit/87d4d59e8de6796b506b81a16e1dc1fafc99d30f", "name": "less", "scopeName": "source.css.less", "patterns": [ { "include": "#strings" }, { "captures": { "1": { "name": "entity.other.attribute-name.class.mixin.css" } }, "match": "(\\.[_a-zA-Z][a-zA-Z0-9_-]*(?=\\())" }, { "captures": { "1": { "name": "entity.other.attribute-name.class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "4": { "name": "variable.other.interpolation.less" } }, "match": "((\\.)([_a-zA-Z]|(@{[a-zA-Z0-9_-]+}))[a-zA-Z0-9_-]*)" }, { "captures": { "0": { "name": "entity.other.attribute-name.parent-selector.css" }, "1": { "name": "punctuation.definition.entity.css" } }, "match": "(&)[a-zA-Z0-9_-]*" }, { "begin": "(format|local|url|attr|counter|counters)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.misc.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.css" } }, "patterns": [ { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.single.css", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.css" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.double.css", "patterns": [ { "match": "\\\\(\\d{1,6}|.)", "name": "constant.character.escape.css" } ] }, { "match": "[^'\") \\t]+", "name": "variable.parameter.misc.css" } ] }, { "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b(?!.*?(?(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", "name": "meta.attribute-selector.css" }, { "begin": "((@)import\\b)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.import.less" }, "2": { "name": "punctuation.definition.keyword.less" } }, "end": ";", "endCaptures": { "0": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.at-rule.import.css", "patterns": [ { "match": "(?<=\\(|,|\\s)\\b(reference|optional|once|multiple|less|inline)\\b(?=\\)|,)", "name": "keyword.control.import.option.less" }, { "include": "#brace_round" }, { "include": "source.css#commas" }, { "include": "#strings" } ] }, { "captures": { "1": { "name": "keyword.control.at-rule.fontface.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "match": "^\\s*((@)font-face\\b)", "name": "meta.at-rule.fontface.css" }, { "captures": { "1": { "name": "keyword.control.at-rule.media.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "match": "^\\s*((@)media\\b)", "name": "meta.at-rule.media.css" }, { "include": "source.css#media-features" }, { "match": "\\b(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)\\b", "name": "support.constant.media-type.media.css" }, { "match": "\\b(portrait|landscape)\\b", "name": "support.constant.property-value.media-property.media.css" }, { "captures": { "1": { "name": "support.function.less" } }, "match": "(\\.[a-zA-Z0-9_-]+)\\s*(;|\\()" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.less" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.less" } }, "end": "\\n", "name": "comment.line.double-slash.less" } ] }, { "match": "(@|\\-\\-)[\\w-]+(?=\\s*)", "name": "variable.other.less", "captures": { "1": { "name": "punctuation.definition.variable.less" } } }, { "include": "#variable_interpolation" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.property-list.begin.bracket.curly.css" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.property-list.end.bracket.curly.css" } }, "name": "meta.property-list.css", "patterns": [ { "include": "source.css#pseudo-elements" }, { "include": "source.css#pseudo-classes" }, { "include": "source.css#tag-names" }, { "include": "source.css#commas" }, { "include": "#variable_interpolation" }, { "include": "source.css#property-names" }, { "include": "#property_values" }, { "include": "$self" } ] }, { "match": "\\!\\s*important", "name": "keyword.other.important.css" }, { "match": "\\*|\\/|\\-|\\+|~|=|<=|>=|<|>", "name": "keyword.operator.less" }, { "match": "\\b(not|and|when)\\b", "name": "keyword.control.logical.operator.less" }, { "include": "source.css#tag-names" }, { "match": "(?)\\=))\\s+" }, "keyword-operator-assignment": { "match": "/=", "name": "keyword.operator.assignment.augmented.liquid" }, "object-properties": { "match": "(?<=\\w.)(?<=\\w.)\\b\\w+?\\b\\s+?", "name": "variable.parameter.liquid" }, "string-quoted-single": { "name": "string.quoted.single.liquid", "begin": "'", "end": "'" }, "string-quoted-double": { "name": "string.quoted.double.liquid", "begin": "\"", "end": "\"" }, "support-class": { "name": "support.class.liquid", "match": "\\b(all_products|article|assets|block|blog|blogs|body_raw|canonical_url|cart|checkout|collection|collections|comment|current|customer|customer_address|date|discount|excerpt_raw|forloop|form|fulfillment|image|item|items|javascript|jekyll|line_item|link|linklist|linklists|meta|next|order|order|page|page_title|pages|paginate|parent|posts|previous|product|products|request|scripts|search|settings|shipping_method|schema|shop|site|style|stylesheet|tablerow|tags|tax_line|taxonomy|template|theme|themes|transaction|url|variant)\\b" }, "support-function": { "name": "support.function.liquid", "match": "\\b(break|content_for_header|content_for_index|content_for_layout|continue|cycle|assign|increment|decrement|include|form|layout|highlight|highlight_active|json|join|sort|ceil|divided_by|floor|minus|plus|round|times|modulo|money|money_with_currency|money_without_trailing_zeros|money_without_currency|append|camelcase|capitalize|downcase|escape|handleize|md5|newline_to_br|pluralize|prepend|remove|remove_first|replace|replace_first|slice|split|strip|lstrip|rstrip|strip_html|strip_newlines|truncate|truncatewords|uniq|upcase|url_escape|url_param_escape)\\b" }, "support-variable": { "name": "support.variable.liquid", "match": "\\b(date|weight_with_unit|index|size|asset_img_url|asset_url|file_img_url|file_url|img_url|product_img_url|url_for_type|url_for_vendor|link_to|link_to_vendor|link_to_type|link_to_tag|link_to_add_tag|link_to_remove_tag)\\b" }, "support-constant": { "name": "support.constant.liquid", "match": "\\b(default|default_errors|default_pagination|first|last|script_tag|stylesheet_tag|img_tag|customer_login_link|global_asset_url|payment_type_img_url|shopify_asset_url)\\b" }, "support-function-with-args": { "name": "support.function.with-args.liquid", "match": "\\|\\s+(?![\\.0-9])[a-zA-Z0-9_-]+\\:\\s+" }, "support-function-without-args": { "name": "support.function.without-args.liquid", "match": "\\|\\s+(?![\\.0-9])[a-zA-Z0-9_-]+\\s+" }, "var-support-variable": { "name": "support.variable.liquid", "match": "(?<=\\.)\\w+\\b" }, "variable-parameter": { "name": "variable.parameter.liquid", "match": "((?<=\\w\\:\\s)\\w+)" }, "variable-other": { "name": "variable.other.liquid", "match": "\\w+" }, "schema": { "name": "meta.embedded.block.liquid", "contentName": "meta.embedded.block.schema.liquid", "begin": "({%)\\s+(schema)\\s+(%})", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "end": "({%)\\s+(endschema)\\s+(%})", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "patterns": [ { "include": "source.json" } ] }, "style": { "name": "meta.embedded.block.liquid", "contentName": "meta.embedded.block.style.liquid", "begin": "({%)\\s+(style)\\s+(%})", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "end": "({%)\\s+(endstyle)\\s+(%})", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "patterns": [ { "include": "source.css" } ] }, "stylesheet": { "name": "meta.embedded.block.liquid", "contentName": "meta.embedded.block.stylesheet.liquid", "begin": "({%)\\s+(stylesheet)\\s+(%})", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "end": "({%)\\s+(endstylesheet)\\s+(%})", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "patterns": [ { "include": "source.css" } ] }, "stylesheet-scss": { "name": "meta.embedded.block.liquid", "contentName": "meta.embedded.block.stylesheet.scss.liquid", "begin": "({%)\\s+(stylesheet)\\s+('(scss)')\\s+(%})", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "string.quoted.single.liquid" }, "4": { "name": "meta.attribute.type.liquid" }, "5": { "name": "punctuation.definition.tag.end.liquid" } }, "end": "({%)\\s+(endstylesheet)\\s+(%})", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "patterns": [ { "include": "source.css.scss" } ] }, "javascript": { "name": "meta.embedded.block.liquid", "contentName": "meta.embedded.block.javascript.liquid", "begin": "({%)\\s+(javascript)\\s+(%})", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "end": "({%)\\s+(endjavascript)\\s+(%})", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "patterns": [ { "include": "source.js" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/lisp.tmLanguage.json ================================================ { "comment": "", "fileTypes": ["lisp", "cl", "l", "mud", "el"], "foldingStartMarker": "\\(", "foldingStopMarker": "\\)", "keyEquivalent": "^~L", "name": "Lisp", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.lisp" } }, "match": "(;).*$\\n?", "name": "comment.line.semicolon.lisp" }, { "captures": { "2": { "name": "storage.type.function-type.lisp" }, "4": { "name": "entity.name.function.lisp" } }, "match": "(\\b(?i:(defun|defmethod|defmacro))\\b)(\\s+)((\\w|\\-|\\!|\\?)*)", "name": "meta.function.lisp" }, { "captures": { "1": { "name": "punctuation.definition.constant.lisp" } }, "match": "(#)(\\w|[\\\\+-=<>'\"&#])+", "name": "constant.character.lisp" }, { "captures": { "1": { "name": "punctuation.definition.variable.lisp" }, "3": { "name": "punctuation.definition.variable.lisp" } }, "match": "(\\*)(\\S*)(\\*)", "name": "variable.other.global.lisp" }, { "match": "\\b(?i:case|do|let|loop|if|else|when)\\b", "name": "keyword.control.lisp" }, { "match": "\\b(?i:eq|neq|and|or)\\b", "name": "keyword.operator.lisp" }, { "match": "\\b(?i:null|nil)\\b", "name": "constant.language.lisp" }, { "match": "\\b(?i:cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn)\\b", "name": "support.function.lisp" }, { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b", "name": "constant.numeric.lisp" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.lisp" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.lisp" } }, "name": "string.quoted.double.lisp", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.lisp" } ] } ], "scopeName": "source.lisp", "uuid": "00D451C9-6B1D-11D9-8DFA-000D93589AF6" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/livescript.tmLanguage.json ================================================ { "foldingStartMarker": "^\\s*class\\s+\\S.*$|.*(->|=>)\\s*$|.*[\\[{]\\s*$", "firstLineMatch": "^#!.*\\bls", "foldingStopMarker": "^\\s*$|^\\s*[}\\]]\\s*$", "keyEquivalent": "^~C", "fileTypes": ["ls", "Slakefile", "ls.erb"], "repository": { "embedded_spaced_comment": { "patterns": [ { "match": "(?\\*?\n\t\t\t\t|<[~-]{1,2}!?\n\t\t\t\t|\\(\\s* (?= instanceof[\\s)]|and[\\s)]|or[\\s)]|is[\\s)]|isnt[\\s)]|in[\\s)]|import[\\s)]|import\\ all[\\s)] |\\.|[-+/*%^&<>=|][\\b\\s)\\w$]|\\*\\*|\\%\\%)\n\t\t\t\t| (?<=[\\s(]instanceof|[\\s(]and|[\\s(]or|[\\s(]is|[\\s(]isnt|[\\s(]in|[\\s(]import|[\\s(]import\\ all|[\\s(]do|\\.|\\*\\*|\\%\\%|[\\b\\s(\\w$][-+/*%^&<>=|]) \\s*\\)\n\t\t\t", "name": "storage.type.function.livescript" }, { "begin": "\\/\\*", "end": "\\*\\/", "patterns": [ { "match": "@\\w*", "name": "storage.type.annotation.livescriptscript" } ], "name": "comment.block.livescript", "captures": { "0": { "name": "punctuation.definition.comment.livescript" } } }, { "match": "(#)(?!\\{).*$\\n?", "name": "comment.line.number-sign.livescript", "captures": { "1": { "name": "punctuation.definition.comment.livescript" } } }, { "match": "((?:!|~|!~|~!)?function\\*?)\\s+([$\\w\\-]*[$\\w]+)", "captures": { "1": { "name": "storage.type.function.livescript" }, "2": { "name": "entity.name.function.livescript" } } }, { "match": "(new)\\s+(\\w+(?:\\.\\w*)*)", "captures": { "1": { "name": "keyword.operator.new.livescript" }, "2": { "name": "entity.name.type.instance.livescript" } } }, { "match": "\\b(package|private|protected|public|interface|enum|static)(?!-)\\b", "name": "keyword.illegal.livescript" }, { "begin": "'''", "endCaptures": { "0": { "name": "punctuation.definition.string.end.livescript" } }, "end": "'''", "name": "string.quoted.heredoc.livescript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.livescript" } } }, { "begin": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.livescript" } }, "end": "\"\"\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.livescript" }, { "include": "#interpolated_livescript" } ], "name": "string.quoted.double.heredoc.livescript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.livescript" } } }, { "begin": "``", "endCaptures": { "0": { "name": "punctuation.definition.string.end.livescript" } }, "end": "``", "patterns": [ { "match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.livescript" } ], "name": "string.quoted.script.livescript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.livescript" } } }, { "begin": "<\\[", "end": "\\]>", "name": "string.array-literal.livescript" }, { "match": "/{2}(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}", "name": "string.regexp.livescript" }, { "begin": "/{2}\\n", "end": "/{2}[imgy]{0,4}", "patterns": [ { "include": "#embedded_spaced_comment" }, { "include": "#interpolated_livescript" } ], "name": "string.regexp.livescript" }, { "begin": "/{2}", "end": "/{2}[imgy]{0,4}", "patterns": [ { "match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.livescript" }, { "include": "#interpolated_livescript" } ], "name": "string.regexp.livescript" }, { "match": "/(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])", "name": "string.regexp.livescript" }, { "match": "(?x)\n\t\t\t\t\\b(?", "name": "keyword.operator.livescript" }, { "match": "=>", "name": "keyword.control.livescript" }, { "match": "(?x)\n\t\t\t\t\\b(?)|\\+\\+|\\+|\n\t\t\t\t~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|\n\t\t\t\t>>>=|<>|<(?!\\[)|(?|(?)|&&|\\.\\.(\\.)?|\\s\\.\\s|\\?|\\|\\||\\:|\\*=|(?)))\\s*(?!(\\s*!?\\s*\\(.*\\))?\\s*(!?[~-]{1,2}>\\*?))", "captures": { "1": { "name": "variable.assignment.livescript" }, "3": { "name": "punctuation.separator.key-value, keyword.operator.livescript" }, "4": { "name": "keyword.operator.livescript" } } }, { "begin": "(?<=\\s|^)([\\[\\{])(?=.*?[\\]\\}]\\s+[:=])", "endCaptures": { "0": { "name": "keyword.operator.livescript" } }, "end": "([\\]\\}]\\s*[:=])", "patterns": [ { "include": "#variable_name" }, { "include": "#instance_variable" }, { "include": "#single_quoted_string" }, { "include": "#double_quoted_string" }, { "include": "#numeric" } ], "name": "meta.variable.assignment.destructured.livescript", "beginCaptures": { "0": { "name": "keyword.operator.livescript" } } }, { "match": "(?x)\n\t\t\t\t(\\s*)\n\t\t\t\t(?=[a-zA-Z\\$_])\n\t\t\t\t([a-zA-Z\\$_]([\\w$.:-])*)\\s*\n\t\t\t\t(?=[:=](\\s*!?\\s*\\(.*\\))?\\s*(!?[~-]{1,2}>\\*?))\n\t\t\t", "name": "meta.function.livescript", "captures": { "3": { "name": "entity.name.function.livescript" }, "4": { "name": "variable.parameter.function.livescript" }, "2": { "name": "entity.name.function.livescript" }, "5": { "name": "storage.type.function.livescript" } } }, { "match": "\\b(?][ =)]|[`}%*)]|/(?!.*?/)|&&|[.][^.]|=>|\\/ +|\\||\\|\\||\\-\\-|\\+\\+|\\|>|<|\\||$|\\n|\\#|/\\*))", "captures": { "1": { "name": "meta.function-call.livescript" }, "2": { "name": "keyword.operator.livescript" } } }, { "match": "\\| _", "name": "keyword.control.livescript" }, { "match": "\\|(?![.])", "name": "keyword.control.livescript" }, { "match": "\\|", "name": "keyword.operator.livescript" }, { "match": "((?<=console\\.)(debug|warn|info|log|error|time(End|-end)|assert))\\b", "name": "support.function.console.livescript" }, { "match": "(?x)\\b(\n\t\t\t\tdecodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require\n\t\t\t)\\b", "name": "support.function.livescript" }, { "comment": "Generated by DOM query from http://gkz.github.com/prelude-ls/:\n\t\t\t[].slice\n\t\t\t.call(document.querySelectorAll(\".nav-pills li a\"))\n\t\t\t.map(function(_) {return _.innerText})\n\t\t\t.filter(function(_) {return _.trim() !== '})\n\t\t\t.slice(2)\n\t\t\t.join(\"|\")\n\t\t\t", "match": "(?x)(?>|<=|>=|<|>|\\*|/|%", "name": "keyword.operator.arithmetic.lsl" }, { "include": "#numeric" }, { "match": "\\b(jump)\\s+([a-zA-Z_][a-zA-Z_0-9]*\\b)", "captures": { "1": { "name": "keyword.control.jump.lsl" }, "2": { "name": "constant.other.reference.label.lsl" } } }, { "comment": "LSL Flow-control keywords", "match": "\\b(default|state|for|do|while|if|else|jump|return|event|print)\\b", "name": "keyword.control.lsl" }, { "comment": "LSL Types", "match": "\\b(integer|float|string|key|vector|rotation|quaternion|list)\\b", "name": "storage.type.lsl" }, { "comment": "LSL Constants", "match": "\\b(TRUE|FALSE)\\b", "name": "constant.language.boolean.lsl" }, { "comment": "LSL Events", "match": "\\b(l(?:and_collision(?:_(?:start|end))?|i(?:nk_message|sten))|t(?:ouch(?:_(?:start|end))?|ransaction_result|imer)|c(?:o(?:llision(?:_(?:start|end))?|ntrol)|hanged)|e(?:xperience_permissions(?:_denied)?|mail)|r(?:un_time_permissions|emote_data)|no(?:t_a(?:t_ro)?t_target|_sensor)|s(?:tate_e(?:ntry|xit)|ensor)|mo(?:ving_(?:start|end)|ney)|at(?:(?:_rot)?_target|tach)|http_re(?:sponse|quest)|o(?:bject|n)_rez|path_update|dataserver)\\b", "name": "constant.language.events.lsl" }, { "comment": "LSL Functions ll*", "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tG(?:e(?:t(?:P(?:arcel(?:M(?:axPrims|usicURL)|Prim(?:Owners|Count)|(?:Detail|Flag)s)|(?:rim(?:Media|itive)Param|o)s|ermissions(?:Key)?|hysicsMaterial)|S(?:ta(?:t(?:icPath|us)|rtParameter)|im(?:ulatorHostname|Stats)|c(?:ript(?:Stat|Nam)|al)e|u(?:nDirection|bString)|PMaxMemory)|L(?:i(?:nk(?:N(?:umber(?:OfSides)?|ame)|PrimitiveParams|Media|Key)|st(?:EntryType|Length))|ocal(?:Pos|Rot)|andOwnerAt)|A(?:n(?:imation(?:Override|List)?|dResetTime)|gent(?:L(?:anguage|ist)|Info|Size)|ttached(?:List)?|ccel|lpha)|R(?:egion(?:F(?:lags|PS)|TimeDilation|AgentCount|Corner|Name)|o(?:ot(?:Posi|Rota)tion|t))|O(?:bject(?:P(?:rimCount|ermMask)|De(?:tails|sc)|Mass|Name)|wner(?:Key)?|mega)|N(?:umberOf(?:(?:NotecardLin|Sid)e|Prim)s|otecardLine|extEmail)|C(?:amera(?:Pos|Rot)|losestNavPoint|(?:reat|ol)or|enterOfMass)|T(?:exture(?:(?:Offse|Ro)t|Scale)?|ime(?:OfDay|stamp)?|orque)|M(?:a(?:xScaleFactor|ss(?:MKS)?)|inScaleFactor|emoryLimit)|Inventory(?:N(?:umber|ame)|PermMask|Creator|Type|Key)|E(?:xperience(?:ErrorMessage|Details)|n(?:ergy|v))|U(?:se(?:dMemory|rname)|nixTime)|F(?:ree(?:Memory|URLs)|orce)|G(?:eometricCenter|MTclock)|D(?:isplayNam|at)e|BoundingBox|HTTPHeader|Wallclock|Key|Vel)|nerateKey)|round(?:(?:Norma|Repe)l|Contour|Slope)?|ive(?:Inventory(?:List)?|Money))\n\t\t\t\t | S(?:e(?:t(?:L(?:ink(?:PrimitiveParams(?:Fast)?|Texture(?:Anim)?|C(?:amera|olor)|(?:Alph|Medi)a)|ocalRot)|P(?:(?:rim(?:Media|itive)Param|o)s|a(?:rcelMusicURL|yPrice)|hysicsMaterial)|Ve(?:hicle(?:(?:Rotation|Vector)Param|Fl(?:oatParam|ags)|Type)|locity)|C(?:amera(?:(?:Eye|At)Offset|Params)|o(?:ntentType|lor)|lickAction)|S(?:ound(?:Queueing|Radius)|c(?:riptStat|al)e|itText|tatus)|T(?:ext(?:ure(?:Anim)?)?|o(?:uchText|rque)|imerEvent)|A(?:n(?:imationOverride|gularVelocity)|lpha)|R(?:e(?:moteScriptAccessPin|gionPos)|ot)|(?:Forc(?:eAndTorqu)?|Damag)e|(?:HoverHeigh|MemoryLimi)t|Object(?:Desc|Name)|KeyframedMotion|Buoyancy)|n(?:sor(?:Re(?:move|peat))?|dRemoteData))|t(?:op(?:(?:MoveToTarge|LookA)t|Animation|Hover|Sound)|ring(?:T(?:oBase64|rim)|Length)|artAnimation)|c(?:ale(?:ByFactor|Texture)|ript(?:Profil|Dang)er)|i(?:t(?:OnLink|Target)|n)|a(?:meGroup|y)|ubStringIndex|(?:hou|qr)t|HA1String|leep)\n\t\t\t\t | R(?:e(?:quest(?:(?:Experience)?Permissions|S(?:imulatorData|ecureURL)|(?:Inventory|Agent)Data|U(?:sername|RL)|DisplayName)|mo(?:ve(?:FromLand(?:Pass|Ban)List|VehicleFlags|Inventory)|te(?:LoadScriptPin|DataReply))|set(?:(?:Land(?:Pass|Ban)Lis|(?:Other)?Scrip)t|(?:AnimationOverrid|Tim)e)|turnObjectsBy(?:Owner|ID)|lease(?:Controls|URL)|z(?:AtRoo|Objec)t|gionSay(?:To)?|adKeyValue)|o(?:t(?:2(?:A(?:ngle|xis)|Euler|Left|Fwd|Up)|Target(?:Remove)?|ateTexture|Between|LookAt)|und))\n\t\t\t\t | L(?:i(?:st(?:2(?:(?:Intege|Vecto)r|List(?:Strided)?|(?:Floa|Ro)t|String|Json|CSV|Key)|R(?:eplaceList|andomize)|en(?:Control|Remove)?|(?:Insert|Find)List|S(?:tatistics|ort))|nk(?:ParticleSystem|SitTarget))|o(?:o(?:pSound(?:Master|Slave)?|kAt)|g(?:10)?|adURL))\n\t\t\t\t | D(?:e(?:t(?:ected(?:T(?:ouch(?:(?:Bin|N)ormal|Face|Pos|ST|UV)|ype)|(?:LinkNumb|Own)er|Gr(?:oup|ab)|Name|Key|Pos|Rot|Vel)|achFromAvatar)|lete(?:Sub(?:String|List)|Character|KeyValue))|ataSizeKeyValue|umpList2String|i(?:alog|e))\n\t\t\t\t | A(?:(?:vatarOn(?:Link)?SitTarge|x(?:isAngle|es)2Ro)t|(?:pply(?:Rotational)?Impuls|gentInExperienc)e|d(?:dToLand(?:Pass|Ban)List|justSoundVolume)|t(?:tachToAvatar(?:Temp)?|an2)|(?:ngleBetwee|si)n|llowInventoryDrop|(?:co|b)s)\n\t\t\t\t | P(?:a(?:r(?:celMedia(?:CommandList|Query)|seString(?:KeepNulls|2List)|ticleSystem)|(?:ss(?:Collision|Touche)|trolPoint)s)|laySound(?:Slave)?|u(?:shObject|rsue)|reloadSound|ow)\n\t\t\t\t | C(?:l(?:ear(?:(?:Link|Prim)Media|CameraParams)|oseRemoteDataChannel)|reate(?:Character|KeyValue|Link)|o(?:llision(?:Filter|Sound)|s)|SV2List|astRay|eil)\n\t\t\t\t | T(?:r(?:iggerSoun(?:dLimite)?d|ansferLindenDollars)|e(?:leportAgent(?:GlobalCoords|Home)?|xtBox)|a(?:rget(?:Remove|Omega)?|keControls|n)|o(?:Low|Upp)er)\n\t\t\t\t | M(?:a(?:nageEstateAccess|pDestination)|o(?:d(?:ifyLand|Pow)|veToTarget)|essageLinked|inEventDelay|D5String)\n\t\t\t\t | E(?:(?:xecCharacterCm|jectFromLan|dgeOfWorl)d|scapeURL|uler2Rot|mail|vade)\n\t\t\t\t | O(?:penRemoteDataChannel|ffsetTexture|verMyLand|wnerSay)\n\t\t\t\t | B(?:ase64To(?:Integer|String)|reak(?:AllLinks|Link))\n\t\t\t\t | U(?:pdate(?:Character|KeyValue)|n(?:escapeURL|Sit))\n\t\t\t\t | In(?:s(?:tantMessage|ertString)|tegerToBase64)\n\t\t\t\t | F(?:l(?:eeFrom|oor)|orceMouselook|rand|abs)\n\t\t\t\t | Json(?:(?:[GS]etValu|ValueTyp)e|2List)\n\t\t\t\t | V(?:ec(?:Dist|Norm|Mag)|olumeDetect)\n\t\t\t\t | W(?:a(?:nderWithin|ter)|hisper|ind)\n\t\t\t\t | Key(?:(?:Count|s)KeyValu|2Nam)e\n\t\t\t\t | HTTPRe(?:sponse|quest)\n\t\t\t\t | NavigateTo\n\t\t\t\t | XorBase64\n\t\t\t\t))\\b\n\t\t\t", "name": "support.function.lsl" }, { "comment": "LSL Functions only available to certain Linden Lab employees", "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tSet(?:Inventory|Object)PermMask\n\t\t\t\t | GodLikeRezObject\n\t\t\t\t))\\b\n\t\t\t", "name": "support.function.god-mode.lsl" }, { "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tMake(?:Explosion|Fire|Fountain|Smoke)\n\t\t\t\t | XorBase64Strings(?:Correct)?\n\t\t\t\t | Sound(?:Preload)?\n\t\t\t\t | RemoteDataSetRegion\n\t\t\t\t))\\b\n\t\t\t", "name": "invalid.deprecated.support.function.lsl" }, { "match": "(?x)\n\t\t\t\t\\b(ll(?:\n\t\t\t\t\tC(?:l(?:earExperiencePermissions|oud)|ollisionSprite)\n\t\t\t\t | Re(?:freshPrimURL|leaseCamera|moteLoadScript)\n\t\t\t\t | S(?:etPrimURL|topPointAt)\n\t\t\t\t | GetExperienceList\n\t\t\t\t | TakeCamera\n\t\t\t\t | PointAt\n\t\t\t\t))\\b\n\t\t\t", "name": "invalid.illegal.reserved-function.lsl" }, { "comment": "LSL Function Constants", "match": "(?x)\n\t\t\t\t\\b(\n\t\t\t\t\tP(?:R(?:IM_(?:M(?:EDIA_(?:MAX_(?:W(?:HITELIST_(?:COUNT|SIZE)|IDTH_PIXELS)|HEIGHT_PIXELS|URL_LENGTH)|P(?:ERM(?:_(?:(?:ANY|N)ONE|GROUP|OWNER)|S_(?:INTERACT|CONTROL))|ARAM_MAX)|A(?:UTO_(?:SCALE|LOOP|PLAY|ZOOM)|LT_IMAGE_ENABLE)|C(?:ONTROLS(?:_(?:STANDARD|MINI))?|URRENT_URL)|W(?:HITELIST(?:_ENABLE)?|IDTH_PIXELS)|H(?:EIGHT_PIXELS|OME_URL)|FIRST_CLICK_INTERACT)|ATERIAL(?:_(?:PLASTIC|RUBBER|FLESH|GLASS|METAL|STONE|WOOD))?)|S(?:C(?:ULPT_(?:TYPE_(?:(?:SPHER|PLAN)E|CYLINDER|TORUS|MASK)|FLAG_(?:INVERT|MIRROR))|RIPTED_SIT_ONLY)|HINY_(?:MEDIUM|HIGH|NONE|LOW)|I(?:T_TARGET|ZE)|PECULAR|LICE)|BUMP_(?:S(?:T(?:UCCO|ONE)|UCTION|IDING|HINY)|B(?:RI(?:CKS|GHT)|LOBS|ARK)|(?:(?:LARGE)?TIL|NON)E|C(?:ONCRETE|HECKER)|D(?:ISKS|ARK)|W(?:EAVE|OOD)|GRAVEL)|T(?:YPE(?:_(?:S(?:CULPT|PHERE)|T(?:ORUS|UBE)|CYLINDER|PRISM|RING|BOX))?|E(?:X(?:GEN(?:_(?:DEFAULT|PLANAR))?|T(?:URE)?)|MP_ON_REZ))|P(?:H(?:YSICS(?:_SHAPE_(?:(?:NON|TYP)E|CONVEX|PRIM))?|ANTOM)|O(?:S(?:_LOCAL|ITION)|INT_LIGHT))|AL(?:PHA_MODE(?:_(?:(?:EMISSIV|NON)E|BLEND|MASK))?|LOW_UNSIT)|HOLE_(?:(?:(?:TRIANG|CIRC)L|SQUAR)E|DEFAULT)|F(?:ULLBRIGHT|LEXIBLE)|ROT(?:_LOCAL|ATION)|N(?:ORMAL|AME)|LINK_TARGET|COLOR|OMEGA|DESC|GLOW)|OFILE_(?:SCRIPT_MEMORY|NONE))|A(?:RCEL_(?:FLAG_(?:ALLOW_(?:(?:CREATE(?:_GROUP)?_OBJEC|SCRIP)TS|GROUP_(?:OBJECT_ENTRY|SCRIPTS)|(?:ALL_OBJECT_ENTR|FL)Y|TERRAFORM|LANDMARK|DAMAGE)|USE_(?:(?:LAND_PASS|BAN)_LIST|ACCESS_(?:GROUP|LIST))|RESTRICT_PUSHOBJECT|LOCAL_SOUND_ONLY)|MEDIA_COMMAND_(?:A(?:UTO_ALIGN|GENT)|T(?:EXTUR|IM|YP)E|LOOP(?:_SET)?|P(?:AUSE|LAY)|U(?:NLOAD|RL)|S(?:IZE|TOP)|DESC)|DETAILS_(?:SEE_AVATARS|GROUP|OWNER|AREA|DESC|NAME|ID)|COUNT_(?:T(?:OTAL|EMP)|O(?:TH|WN)ER|SELECTED|GROUP))|Y(?:MENT_INFO_(?:ON_FILE|USED)|_(?:DEFAULT|HIDE))|SS(?:_(?:IF_NOT_HANDLED|ALWAYS|NEVER)|IVE)|TROL_PAUSE_AT_WAYPOINTS)|SYS_(?:PART_(?:B(?:F_(?:ONE(?:_MINUS_(?:SOURCE_(?:ALPHA|COLOR)|DEST_COLOR))?|SOURCE_(?:ALPHA|COLOR)|DEST_COLOR|ZERO)|LEND_FUNC_(?:SOURCE|DEST)|OUNCE_MASK)|(?:INTERP_(?:COLOR|SCALE)|TARGET_(?:LINEAR|POS)|RIBBON|WIND)_MASK|E(?:ND_(?:ALPHA|COLOR|SCALE|GLOW)|MISSIVE_MASK)|F(?:OLLOW_(?:VELOCITY|SRC)_MASK|LAGS)|START_(?:ALPHA|COLOR|SCALE|GLOW)|MAX_AGE)|SRC_(?:PATTERN(?:_(?:ANGLE(?:_CONE(?:_EMPTY)?)?|EXPLODE|DROP))?|BURST_(?:SPEED_M(?:AX|IN)|RA(?:DIUS|TE)|PART_COUNT)|A(?:NGLE_(?:BEGIN|END)|CCEL)|T(?:ARGET_KEY|EXTURE)|MAX_AGE|OMEGA))|U(?:_(?:FAILURE_(?:(?:(?:PARCEL_)?UNREACHABL|TARGET_GON)E|NO_(?:VALID_DESTINATION|NAVMESH)|DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:START|GOAL)|OTHER)|(?:SLOWDOWN_DISTANCE|GOAL)_REACHED|EVADE_(?:SPOTTED|HIDDEN))|RSUIT_(?:(?:INTERCEP|OFFSE)T|GOAL_TOLERANCE|FUZZ_FACTOR)|BLIC_CHANNEL)|ERM(?:ISSION_(?:T(?:R(?:IGGER_ANIMATION|ACK_CAMERA)|AKE_CONTROLS|ELEPORT)|(?:OVERRIDE_ANIMATION|RETURN_OBJECT)S|(?:SILENT_ESTATE_MANAGEMEN|DEBI)T|C(?:ONTROL_CAMERA|HANGE_LINKS)|ATTACH)|_(?:MO(?:DIFY|VE)|TRANSFER|COPY|ALL))|I(?:NG_PONG|_BY_TWO)?)\n\t\t\t\t | C(?:HA(?:RACTER_(?:A(?:CCOUNT_FOR_SKIPPED_FRAMES|VOIDANCE_MODE)|MAX_(?:(?:AC|DE)CEL|TURN_RADIUS|SPEED)|CMD_(?:(?:SMOOTH_)?STO|JUM)P|TYPE(?:_(?:[ABCD]|NONE))?|DESIRED(?:_TURN)?_SPEED|STAY_WITHIN_PARCEL|ORIENTATION|LENGTH|RADIUS)|NGED_(?:TE(?:LEPORT|XTURE)|REGION(?:_START)?|(?:COLO|OWNE)R|S(?:CAL|HAP)E|ALLOWED_DROP|INVENTORY|MEDIA|LINK))|AMERA_(?:P(?:OSITION(?:_(?:L(?:OCKED|AG)|THRESHOLD))?|ITCH)|FOCUS(?:_(?:L(?:OCKED|AG)|THRESHOLD|OFFSET))?|BEHINDNESS_(?:ANGLE|LAG)|(?:DISTANC|ACTIV)E)|ONT(?:ROL_(?:R(?:OT_(?:RIGH|LEF)|IGH)T|(?:ML_LBUTTO|DOW)N|L(?:BUTTON|EFT)|BACK|FWD|UP)|ENT_TYPE_(?:(?:X(?:HT)?|HT)ML|(?:ATO|FOR)M|JSON|LLSD|TEXT|RSS))|LICK_ACTION_(?:OPEN(?:_MEDIA)?|(?:PL?A|BU)Y|TOUCH|NONE|SIT))\n\t\t\t\t | A(?:TTACH_(?:H(?:UD_(?:TOP_(?:(?:RIGH|LEF)T|CENTER)|BOTTOM(?:_(?:RIGH|LEF)T)?|CENTER_[12])|IND_[LR]FOOT|EAD)|R(?:H(?:AND(?:_RING1)?|IP)|L(?:ARM|LEG)|U(?:ARM|LEG)|E(?:AR|YE)|IGHT_PEC|SHOULDER|FOOT|WING)|L(?:H(?:AND(?:_RING1)?|IP)|E(?:FT_PEC|AR|YE)|L(?:ARM|LEG)|U(?:ARM|LEG)|SHOULDER|FOOT|WING)|FACE_(?:LE(?:AR|YE)|RE(?:AR|YE)|TONGUE|JAW)|TAIL_(?:BASE|TIP)|AVATAR_CENTER|B(?:ELLY|ACK)|CH(?:EST|IN)|N(?:ECK|OSE)|PELVIS|GROIN|MOUTH)|GENT(?:_(?:A(?:TTACHMENTS|LWAYS_RUN|UTOPILOT|WAY)|LIST_(?:PARCEL(?:_OWNER)?|REGION)|B(?:Y_(?:LEGACY_|USER)NAME|USY)|(?:CROUCH|WALK|FLY|TYP)ING|S(?:CRIPTED|ITTING)|MOUSELOOK|ON_OBJECT|IN_AIR))?|VOID_(?:(?:DYNAMIC_OBSTACLE|CHARACTER)S|NONE)|LL_SIDES|NIM_ON|CTIVE)\n\t\t\t\t | O(?:BJECT_(?:R(?:E(?:TURN_(?:PARCEL(?:_OWNER)?|REGION)|NDER_WEIGHT|ZZER_KEY)|(?:UNNING_SCRIPT_COUN|O?O)T)|P(?:H(?:YSICS(?:_COST)?|ANTOM)|RIM_(?:EQUIVALENCE|COUNT)|ATHFINDING_TYPE|OS)|S(?:(?:E(?:LECT_COUN|RVER_COS)|TREAMING_COS|IT_COUN)T|CRIPT_(?:MEMORY|TIME))|T(?:OTAL_(?:INVENTORY|SCRIPT)_COUNT|EMP_(?:ATTACHED|ON_REZ))|C(?:REAT(?:ION_TIME|OR)|HARACTER_TIME|LICK_ACTION)|ATTACHED_(?:SLOTS_AVAILABLE|POINT)|(?:BODY_SHAPE_TYP|NAM)E|GROUP(?:_TAG)?|O(?:MEGA|WNER)|UNKNOWN_DETAIL|LAST_OWNER_ID|HOVER_HEIGHT|VELOCITY|DESC)|PT_(?:(?:(?:EXCLUSION|MATERIAL)_VOLUM|(?:STATIC_OBSTAC|WALKAB)L)E|(?:(?:CHARACT|OTH)E|AVATA)R|LEGACY_LINKSET))\n\t\t\t\t | VE(?:HICLE_(?:FLAG_(?:HOVER_(?:(?:TERRAIN|WATER|UP)_ONLY|GLOBAL_HEIGHT)|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED|NO_DEFLECTION_UP)|LINEAR_(?:MOTOR_(?:D(?:ECAY_TIMESCALE|IRECTION)|TIMESCALE|OFFSET)|DEFLECTION_(?:EFFICIENCY|TIMESCALE)|FRICTION_TIMESCALE)|ANGULAR_(?:MOTOR_(?:D(?:ECAY_TIMESCALE|IRECTION)|TIMESCALE)|DEFLECTION_(?:EFFICIENCY|TIMESCALE)|FRICTION_TIMESCALE)|TYPE_(?:(?:AIRPLA|NO)NE|B(?:ALLOON|OAT)|SLED|CAR)|B(?:ANKING_(?:EFFICIENCY|TIMESCALE|MIX)|UOYANCY)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|HOVER_(?:EFFICIENCY|TIMESCALE|HEIGHT)|REFERENCE_FRAME)|RTICAL)\n\t\t\t\t | R(?:E(?:GION_FLAG_(?:BLOCK_(?:FLY(?:OVER)?|TERRAFORM)|ALLOW_D(?:IRECT_TELEPORT|AMAGE)|DISABLE_(?:COLLISION|PHYSIC)S|RESTRICT_PUSHOBJECT|FIXED_SUN|SANDBOX)|MOTE_DATA_(?:RE(?:QUEST|PLY)|CHANNEL)|QUIRE_LINE_OF_SIGHT|STITUTION|VERSE)|C(?:_(?:REJECT_(?:(?:NON)?PHYSICAL|(?:AGENT|TYPE)S|LAND)|GET_(?:LINK_NUM|ROOT_KEY|NORMAL)|D(?:ETECT_PHANTOM|ATA_FLAGS)|MAX_HITS)|ERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN))|AD_TO_DEG|OTATE)\n\t\t\t\t | S(?:T(?:ATUS_(?:(?:NOT_(?:SUPPORTE|FOUN)|WHITELIST_FAILE)D|B(?:LOCK_GRAB(?:_OBJECT)?|OUNDS_ERROR)|(?:MALFORMED_PARAM|CAST_SHADOW)S|R(?:ETURN_AT_EDGE|OTATE_[XYZ])|PH(?:ANTOM|YSICS)|INTERNAL_ERROR|TYPE_MISMATCH|DIE_AT_EDGE|SANDBOX|OK)|RING_TRIM(?:_(?:HEAD|TAIL))?)|I(?:T_(?:NO(?:_(?:EXPERIENCE_PERMISSION|SIT_TARGET|ACCESS)|T_EXPERIENCE)|INVALID_(?:(?:OBJEC|AGEN)T|LINK))|M_STAT_PCT_CHARS_STEPPED)|C(?:RIPTED|ALE)|MOOTH|QRT2)\n\t\t\t\t | XP_ERROR_(?:(?:(?:EXPERIENCE(?:_(?:SUSPEND|DISABL)|S_DISABL)|(?:MATURITY|QUOTA)_EXCEED|THROTTL)E|KEY_NOT_FOUN)D|NO(?:T_(?:PERMITTE(?:D_LAN)?|FOUN)D|(?:_EXPERIENC|N)E)|RE(?:QUEST_PERM_TIMEOUT|TRY_UPDATE)|INVALID_(?:EXPERIENCE|PARAMETERS)|STOR(?:AGE_EXCEPTION|E_DISABLED)|UNKNOWN_ERROR)\n\t\t\t\t | L(?:I(?:ST_STAT_(?:S(?:UM(?:_SQUARES)?|TD_DEV)|M(?:(?:E(?:DI)?A|I)N|AX)|GEOMETRIC_MEAN|NUM_COUNT|RANGE)|NK_(?:ALL_(?:CHILDREN|OTHERS)|(?:ROO|SE)T|THIS))|AND_(?:R(?:EVERT|AISE)|L(?:EVEL|OWER)|SMOOTH|NOISE)|OOP)\n\t\t\t\t | T(?:YPE_(?:IN(?:TEGER|VALID)|ROTATION|STRING|VECTOR|FLOAT|KEY)|EXTURE_(?:(?:TRANSPAREN|DEFAUL)T|PLYWOOD|BLANK|MEDIA)|OUCH_INVALID_(?:TEXCOORD|VECTOR|FACE)|RAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|WO_PI)\n\t\t\t\t | E(?:STATE_ACCESS_(?:ALLOWED_(?:AGENT_(?:REMOVE|ADD)|GROUP_(?:REMOVE|ADD))|BANNED_AGENT_(?:REMOVE|ADD))|RR_(?:(?:(?:RUNTIME|PARCEL)_PERMISSION|MALFORMED_PARAM)S|THROTTLED|GENERIC)|OF)\n\t\t\t\t | H(?:TTP_(?:VER(?:BOSE_THROTTLE|IFY_CERT)|BODY_(?:MAXLENGTH|TRUNCATED)|(?:USER_AGEN|ACCEP)T|M(?:IMETYPE|ETHOD)|PRAGMA_NO_CACHE|CUSTOM_HEADER)|ORIZONTAL)\n\t\t\t\t | INVENTORY_(?:(?:BODYPAR|OBJEC)T|A(?:NIMATION|LL)|(?:GES|TEX)TURE|NO(?:TECARD|NE)|S(?:CRIPT|OUND)|CLOTHING|LANDMARK)\n\t\t\t\t | KFM_(?:C(?:MD_(?:P(?:AUSE|LAY)|STOP)|OMMAND)|R(?:OTATION|EVERSE)|TRANSLATION|PING_PONG|FORWARD|DATA|LOOP|MODE)\n\t\t\t\t | D(?:ATA_(?:SIM_(?:(?:STATU|PO)S|RATING)|(?:ONLIN|NAM)E|PAYINFO|BORN)|E(?:BUG_CHANNEL|G_TO_RAD|NSITY))\n\t\t\t\t | JSON_(?:(?:DELET|FALS|TRU)E|A(?:PPEND|RRAY)|NU(?:MBER|LL)|INVALID|OBJECT|STRING)\n\t\t\t\t | G(?:CNP_(?:RADIUS|STATIC)|RAVITY_MULTIPLIER)\n\t\t\t\t | MASK_(?:(?:EVERYON|BAS)E|GROUP|OWNER|NEXT)\n\t\t\t\t | F(?:ORCE_DIRECT_PATH|RICTION)\n\t\t\t\t | URL_REQUEST_(?:GRANT|DENI)ED\n\t\t\t\t | WANDER_PAUSE_AT_WAYPOINTS\n\t\t\t\t | ZERO_(?:ROTATION|VECTOR)\n\t\t\t\t | NULL_KEY\n\t\t\t\t)\\b\n\t\t\t", "name": "support.constant.lsl" }, { "match": "(?x)\n\t\t\t\t\\b(\n\t\t\t\t\tPERMISSION_(?:CHANGE_(?:JOINT|PERMISSION)S|RE(?:MAP_CONTROLS|LEASE_OWNERSHIP))\n\t\t\t\t | LAND_(?:SMALL|MEDIUM|LARGE)_BRUSH\n\t\t\t\t | PRIM_(?:CAST_SHADOWS|MATERIAL_LIGHT)\n\t\t\t\t | PSYS_SRC_(?:(?:INN|OUT)ERANGLE|OBJ_REL_MASK)\n\t\t\t\t | ATTACH_[LR]PEC\n\t\t\t\t | VEHICLE_FLAG_NO_FLY_UP\n\t\t\t\t | DATA_RATING\n\t\t\t\t)\\b\n\t\t\t", "name": "invalid.deprecated.constant.lsl" }, { "match": "\\b[a-zA-Z_][a-zA-Z_0-9]*(?=\\s*\\()", "name": "entity.name.function.lsl" }, { "match": "\\b[a-zA-Z_][a-zA-Z_0-9]*\\b", "name": "variable.other.lsl" }, { "match": "\\B@[a-zA-Z_][a-zA-Z_0-9]*\\b", "name": "constant.other.reference.label.lsl" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.lsl" } }, "end": "\"", "patterns": [ { "match": "\\\\[\\\\\"nt]", "name": "constant.character.escape.lsl" } ], "name": "string.quoted.double.lsl", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.lsl" } } } ], "name": "Second Life LSL", "scopeName": "source.lsl" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/lua.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/sumneko/lua.tmbundle/commit/bc74f9230c3f07c0ecc1bc1727ad98d9e70aff5b", "name": "lua", "scopeName": "source.lua", "patterns": [ { "begin": "\\b(?:(local)\\s+)?(function)\\b(?![,:])", "beginCaptures": { "1": { "name": "keyword.local.lua" }, "2": { "name": "keyword.control.lua" } }, "end": "(?<=[\\)\\-{}\\[\\]\"'])", "name": "meta.function.lua", "patterns": [ { "include": "#comment" }, { "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": "#luadoc.type" } ] } ] }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)", "name": "entity.name.class.lua" }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "entity.name.function.lua" } ] }, { "match": "(?", "captures": { "1": { "name": "string.tag.lua" } } }, { "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|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" } ] }, { "begin": "(?<=---\\s*)@see", "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" } ] }, { "begin": "(?<=---\\s*)@diagnostic", "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" } ] } ] }, { "begin": "(?<=---\\s*)@module", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "include": "#string" } ] }, { "match": "(?<=---\\s*)@(async|nodiscard)", "name": "storage.type.annotation.lua" }, { "begin": "(?<=---)\\|\\s*[\\>\\+]?", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "include": "#string" } ] } ] }, "luadoc.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_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?", "name": "comment.block.gfm" } ] }, "fenced-code-blocks": { "patterns": [ { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(apib|apiblueprint))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.gfm", "contentName": "text.embedded.html.markdown.source.gfm.apib", "patterns": [ { "include": "text.html.markdown.source.gfm.apib" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(mson))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.gfm", "contentName": "text.embedded.html.markdown.source.gfm.mson", "patterns": [ { "include": "text.html.markdown.source.gfm.mson" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(sql))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.sql.gfm", "contentName": "source.embedded.sql", "patterns": [ { "include": "source.sql" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(graphql))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.graphql.gfm", "contentName": "source.embedded.graphql", "patterns": [ { "include": "source.graphql" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(clj|clojure))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.clojure.gfm", "contentName": "source.embedded.clojure", "patterns": [ { "include": "source.clojure" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(coffee-?(script)?|cson))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.coffee.gfm", "contentName": "source.embedded.coffee", "patterns": [ { "include": "source.coffee" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(javascript|js))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.js.gfm", "contentName": "source.embedded.js", "patterns": [ { "include": "source.js" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(typescript|ts))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.ts.gfm", "contentName": "source.embedded.ts", "patterns": [ { "include": "source.ts" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(markdown|md|mdo?wn|mkdn?|mkdown))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.gfm", "contentName": "text.embedded.md", "patterns": [ { "include": "$self" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(json))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.json.gfm", "contentName": "source.embedded.json", "patterns": [ { "include": "source.json" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(css))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.css.gfm", "contentName": "source.embedded.css", "patterns": [ { "include": "source.css" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(less))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.less.gfm", "contentName": "source.embedded.css.less", "patterns": [ { "include": "source.css.less" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(xml))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.xml.gfm", "contentName": "text.embedded.xml", "patterns": [ { "include": "text.xml" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(ruby|rb))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.ruby.gfm", "contentName": "source.embedded.ruby", "patterns": [ { "include": "source.ruby" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(rust|rs))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.rust.gfm", "contentName": "source.embedded.rust", "patterns": [ { "include": "source.rust" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(java))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.java.gfm", "contentName": "source.embedded.java", "patterns": [ { "include": "source.java" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(kotlin))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.kotlin.gfm", "contentName": "source.embedded.kotlin", "patterns": [ { "include": "source.kotlin" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(scala|sbt))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.scala.gfm", "contentName": "source.embedded.scala", "patterns": [ { "include": "source.scala" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(erlang))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.erlang.gfm", "contentName": "source.embedded.erlang", "patterns": [ { "include": "source.erlang" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(go(lang)?))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.go.gfm", "contentName": "source.embedded.go", "patterns": [ { "include": "source.go" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(cs(harp)?))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.cs.gfm", "contentName": "source.embedded.cs", "patterns": [ { "include": "source.cs" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(php))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.php.gfm", "contentName": "source.embedded.php", "patterns": [ { "include": "source.php" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(sh|bash|shell))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.shell.gfm", "contentName": "source.embedded.shell", "patterns": [ { "include": "source.shell" } ] }, { "begin": "^\\s*([`~]{3,})\\s*(?i:(properties))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.git-config.gfm", "contentName": "source.embedded.git-config", "patterns": [ { "include": "source.git-config" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(shellsession|console))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.shell-session.gfm", "contentName": "text.embedded.shell-session", "patterns": [ { "include": "text.shell-session" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(py(thon)?))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.python.gfm", "contentName": "source.embedded.python", "patterns": [ { "include": "source.python" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(pycon))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.python.console.gfm", "contentName": "source.embedded.python.console", "patterns": [ { "include": "text.python.console" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(c))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.c.gfm", "contentName": "source.embedded.c", "patterns": [ { "include": "source.c" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(c(pp|\\+\\+)))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.cpp.gfm", "contentName": "source.embedded.cpp", "patterns": [ { "include": "source.cpp" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(objc|objective-c))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.objc.gfm", "contentName": "source.embedded.objc", "patterns": [ { "include": "source.objc" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(adoc|asciidoc|asciidoctor|asc))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.asciidoc.gfm", "contentName": "source.embedded.asciidoc", "patterns": [ { "include": "source.asciidoc" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(swift))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.swift.gfm", "contentName": "source.embedded.swift", "patterns": [ { "include": "source.swift" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(dockerfile|docker))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.dockerfile.gfm", "contentName": "source.embedded.dockerfile", "patterns": [ { "include": "source.dockerfile" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(makefile|make))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.makefile.gfm", "contentName": "source.embedded.makefile", "patterns": [ { "include": "source.makefile" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(perl))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.perl.gfm", "contentName": "source.embedded.perl", "patterns": [ { "include": "source.perl" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(perl6))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.perl6.gfm", "contentName": "source.embedded.perl6", "patterns": [ { "include": "source.perl6" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(toml))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.toml.gfm", "contentName": "source.embedded.toml", "patterns": [ { "include": "source.toml" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(html))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.html.gfm", "contentName": "text.embedded.html.basic", "patterns": [ { "include": "text.html.basic" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(ya?ml))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.yaml.gfm", "contentName": "source.embedded.yaml", "patterns": [ { "include": "source.yaml" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(elixir))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.elixir.gfm", "contentName": "source.embedded.elixir", "patterns": [ { "include": "source.elixir" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(diff|patch|rej))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.diff.gfm", "contentName": "source.embedded.diff", "patterns": [ { "include": "source.diff" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(julia|jl))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.julia.gfm", "contentName": "source.embedded.julia", "patterns": [ { "include": "source.julia" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*([\\{]{0,1})(?i:(r))([^\\}]*)([\\}]{0,1})\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.r.gfm", "contentName": "source.embedded.r", "patterns": [ { "include": "source.r" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(haskell))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.haskell.gfm", "contentName": "source.embedded.haskell", "patterns": [ { "include": "source.haskell" } ] }, { "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(elm))\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.elm.gfm", "contentName": "source.embedded.elm", "patterns": [ { "include": "source.elm" } ] } ] }, "fenced-code": { "patterns": [ { "begin": "^\\s*(`{3,}|~{3,})\\s*([-\\w]+)\\s*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.code.other.gfm", "contentName": "source.embedded.${2:/downcase}" }, { "begin": "^\\s*(`{3,}|~{3,}).*$", "beginCaptures": { "0": { "name": "support.gfm" } }, "end": "^\\s*\\1((?<=`)`+|(?<=~)~+)?\\s*$", "endCaptures": { "0": { "name": "support.gfm" } }, "name": "markup.raw.gfm" } ] }, "front-matter": { "patterns": [ { "begin": "\\A---$", "end": "^(---|\\.\\.\\.)$", "captures": { "0": { "name": "comment.hr.gfm" } }, "name": "front-matter.yaml.gfm", "patterns": [ { "include": "source.yaml" } ] } ] }, "hr": { "patterns": [ { "match": "^\\s*[*]{3,}\\s*$", "name": "comment.hr.gfm" }, { "match": "^\\s*[-]{3,}\\s*$", "name": "comment.hr.gfm" }, { "match": "^\\s*[_]{3,}\\s*$", "name": "comment.hr.gfm" } ] }, "lists": { "patterns": [ { "match": "^\\s*([*+-])[ \\t]+", "captures": { "1": { "name": "variable.unordered.list.gfm" } } }, { "match": "^\\s*(\\d+\\.)[ \\t]+", "captures": { "1": { "name": "variable.ordered.list.gfm" } } } ] }, "quotes": { "patterns": [ { "begin": "^\\s*(>)", "end": "^\\s*?$", "beginCaptures": { "1": { "name": "support.quote.gfm" } }, "name": "comment.quote.gfm", "patterns": [ { "include": "#blocks" } ] } ] }, "github-blocks": { "patterns": [ { "begin": "^\\|", "end": "(\\|)?\\s*$", "beginCaptures": { "0": { "name": "border.pipe.outer" } }, "endCaptures": { "1": { "name": "border.pipe.outer" } }, "name": "table.gfm", "patterns": [ { "match": "(:?)(-+)(:?)", "captures": { "1": { "name": "border.alignment" }, "2": { "name": "border.header" }, "3": { "name": "border.alignment" } } }, { "match": "\\|", "name": "border.pipe.inner" } ] } ] }, "github-inlines": { "patterns": [ { "match": "(:)(\\+1|\\-1|100|1234|8ball|a|ab|abc|abcd|accept|aerial_tramway|airplane|alarm_clock|alien|ambulance|anchor|angel|anger|angry|anguished|ant|apple|aquarius|aries|arrow_backward|arrow_double_down|arrow_double_up|arrow_down|arrow_down_small|arrow_forward|arrow_heading_down|arrow_heading_up|arrow_left|arrow_lower_left|arrow_lower_right|arrow_right|arrow_right_hook|arrow_up|arrow_up_down|arrow_up_small|arrow_upper_left|arrow_upper_right|arrows_clockwise|arrows_counterclockwise|art|articulated_lorry|astonished|atm|b|baby|baby_bottle|baby_chick|baby_symbol|back|baggage_claim|balloon|ballot_box_with_check|bamboo|banana|bangbang|bank|bar_chart|barber|baseball|basketball|bath|bathtub|battery|bear|bee|beer|beers|beetle|beginner|bell|bento|bicyclist|bike|bikini|bird|birthday|black_circle|black_joker|black_medium_small_square|black_medium_square|black_nib|black_small_square|black_square|black_square_button|blossom|blowfish|blue_book|blue_car|blue_heart|blush|boar|boat|bomb|book|bookmark|bookmark_tabs|books|boom|boot|bouquet|bow|bowling|bowtie|boy|bread|bride_with_veil|bridge_at_night|briefcase|broken_heart|bug|bulb|bullettrain_front|bullettrain_side|bus|busstop|bust_in_silhouette|busts_in_silhouette|cactus|cake|calendar|calling|camel|camera|cancer|candy|capital_abcd|capricorn|car|card_index|carousel_horse|cat|cat2|cd|chart|chart_with_downwards_trend|chart_with_upwards_trend|checkered_flag|cherries|cherry_blossom|chestnut|chicken|children_crossing|chocolate_bar|christmas_tree|church|cinema|circus_tent|city_sunrise|city_sunset|cl|clap|clapper|clipboard|clock1|clock10|clock1030|clock11|clock1130|clock12|clock1230|clock130|clock2|clock230|clock3|clock330|clock4|clock430|clock5|clock530|clock6|clock630|clock7|clock730|clock8|clock830|clock9|clock930|closed_book|closed_lock_with_key|closed_umbrella|cloud|clubs|cn|cocktail|coffee|cold_sweat|collision|computer|confetti_ball|confounded|confused|congratulations|construction|construction_worker|convenience_store|cookie|cool|cop|copyright|corn|couple|couple_with_heart|couplekiss|cow|cow2|credit_card|crocodile|crossed_flags|crown|cry|crying_cat_face|crystal_ball|cupid|curly_loop|currency_exchange|curry|custard|customs|cyclone|dancer|dancers|dango|dart|dash|date|de|deciduous_tree|department_store|diamond_shape_with_a_dot_inside|diamonds|disappointed|disappointed_relieved|dizzy|dizzy_face|do_not_litter|dog|dog2|dollar|dolls|dolphin|donut|door|doughnut|dragon|dragon_face|dress|dromedary_camel|droplet|dvd|e\\-mail|ear|ear_of_rice|earth_africa|earth_americas|earth_asia|egg|eggplant|eight|eight_pointed_black_star|eight_spoked_asterisk|electric_plug|elephant|email|end|envelope|es|euro|european_castle|european_post_office|evergreen_tree|exclamation|expressionless|eyeglasses|eyes|facepunch|factory|fallen_leaf|family|fast_forward|fax|fearful|feelsgood|feet|ferris_wheel|file_folder|finnadie|fire|fire_engine|fireworks|first_quarter_moon|first_quarter_moon_with_face|fish|fish_cake|fishing_pole_and_fish|fist|five|flags|flashlight|floppy_disk|flower_playing_cards|flushed|foggy|football|fork_and_knife|fountain|four|four_leaf_clover|fr|free|fried_shrimp|fries|frog|frowning|fu|fuelpump|full_moon|full_moon_with_face|game_die|gb|gem|gemini|ghost|gift|gift_heart|girl|globe_with_meridians|goat|goberserk|godmode|golf|grapes|green_apple|green_book|green_heart|grey_exclamation|grey_question|grimacing|grin|grinning|guardsman|guitar|gun|haircut|hamburger|hammer|hamster|hand|handbag|hankey|hash|hatched_chick|hatching_chick|headphones|hear_no_evil|heart|heart_decoration|heart_eyes|heart_eyes_cat|heartbeat|heartpulse|hearts|heavy_check_mark|heavy_division_sign|heavy_dollar_sign|heavy_exclamation_mark|heavy_minus_sign|heavy_multiplication_x|heavy_plus_sign|helicopter|herb|hibiscus|high_brightness|high_heel|hocho|honey_pot|honeybee|horse|horse_racing|hospital|hotel|hotsprings|hourglass|hourglass_flowing_sand|house|house_with_garden|hurtrealbad|hushed|ice_cream|icecream|id|ideograph_advantage|imp|inbox_tray|incoming_envelope|information_desk_person|information_source|innocent|interrobang|iphone|it|izakaya_lantern|jack_o_lantern|japan|japanese_castle|japanese_goblin|japanese_ogre|jeans|joy|joy_cat|jp|key|keycap_ten|kimono|kiss|kissing|kissing_cat|kissing_closed_eyes|kissing_face|kissing_heart|kissing_smiling_eyes|koala|koko|kr|large_blue_circle|large_blue_diamond|large_orange_diamond|last_quarter_moon|last_quarter_moon_with_face|laughing|leaves|ledger|left_luggage|left_right_arrow|leftwards_arrow_with_hook|lemon|leo|leopard|libra|light_rail|link|lips|lipstick|lock|lock_with_ink_pen|lollipop|loop|loudspeaker|love_hotel|love_letter|low_brightness|m|mag|mag_right|mahjong|mailbox|mailbox_closed|mailbox_with_mail|mailbox_with_no_mail|man|man_with_gua_pi_mao|man_with_turban|mans_shoe|maple_leaf|mask|massage|meat_on_bone|mega|melon|memo|mens|metal|metro|microphone|microscope|milky_way|minibus|minidisc|mobile_phone_off|money_with_wings|moneybag|monkey|monkey_face|monorail|moon|mortar_board|mount_fuji|mountain_bicyclist|mountain_cableway|mountain_railway|mouse|mouse2|movie_camera|moyai|muscle|mushroom|musical_keyboard|musical_note|musical_score|mute|nail_care|name_badge|neckbeard|necktie|negative_squared_cross_mark|neutral_face|new|new_moon|new_moon_with_face|newspaper|ng|nine|no_bell|no_bicycles|no_entry|no_entry_sign|no_good|no_mobile_phones|no_mouth|no_pedestrians|no_smoking|non\\-potable_water|nose|notebook|notebook_with_decorative_cover|notes|nut_and_bolt|o|o2|ocean|octocat|octopus|oden|office|ok|ok_hand|ok_woman|older_man|older_woman|on|oncoming_automobile|oncoming_bus|oncoming_police_car|oncoming_taxi|one|open_file_folder|open_hands|open_mouth|ophiuchus|orange_book|outbox_tray|ox|package|page_facing_up|page_with_curl|pager|palm_tree|panda_face|paperclip|parking|part_alternation_mark|partly_sunny|passport_control|paw_prints|peach|pear|pencil|pencil2|penguin|pensive|performing_arts|persevere|person_frowning|person_with_blond_hair|person_with_pouting_face|phone|pig|pig2|pig_nose|pill|pineapple|pisces|pizza|plus1|point_down|point_left|point_right|point_up|point_up_2|police_car|poodle|poop|post_office|postal_horn|postbox|potable_water|pouch|poultry_leg|pound|pouting_cat|pray|princess|punch|purple_heart|purse|pushpin|put_litter_in_its_place|question|rabbit|rabbit2|racehorse|radio|radio_button|rage|rage1|rage2|rage3|rage4|railway_car|rainbow|raised_hand|raised_hands|raising_hand|ram|ramen|rat|recycle|red_car|red_circle|registered|relaxed|relieved|repeat|repeat_one|restroom|revolving_hearts|rewind|ribbon|rice|rice_ball|rice_cracker|rice_scene|ring|rocket|roller_coaster|rooster|rose|rotating_light|round_pushpin|rowboat|ru|rugby_football|runner|running|running_shirt_with_sash|sa|sagittarius|sailboat|sake|sandal|santa|satellite|satisfied|saxophone|school|school_satchel|scissors|scorpius|scream|scream_cat|scroll|seat|secret|see_no_evil|seedling|seven|shaved_ice|sheep|shell|ship|shipit|shirt|shit|shoe|shower|signal_strength|six|six_pointed_star|ski|skull|sleeping|sleepy|slot_machine|small_blue_diamond|small_orange_diamond|small_red_triangle|small_red_triangle_down|smile|smile_cat|smiley|smiley_cat|smiling_imp|smirk|smirk_cat|smoking|snail|snake|snowboarder|snowflake|snowman|sob|soccer|soon|sos|sound|space_invader|spades|spaghetti|sparkle|sparkler|sparkles|sparkling_heart|speak_no_evil|speaker|speech_balloon|speedboat|squirrel|star|star2|stars|station|statue_of_liberty|steam_locomotive|stew|straight_ruler|strawberry|stuck_out_tongue|stuck_out_tongue_closed_eyes|stuck_out_tongue_winking_eye|sun_with_face|sunflower|sunglasses|sunny|sunrise|sunrise_over_mountains|surfer|sushi|suspect|suspension_railway|sweat|sweat_drops|sweat_smile|sweet_potato|swimmer|symbols|syringe|tada|tanabata_tree|tangerine|taurus|taxi|tea|telephone|telephone_receiver|telescope|tennis|tent|thought_balloon|three|thumbsdown|thumbsup|ticket|tiger|tiger2|tired_face|tm|toilet|tokyo_tower|tomato|tongue|top|tophat|tractor|traffic_light|train|train2|tram|triangular_flag_on_post|triangular_ruler|trident|triumph|trolleybus|trollface|trophy|tropical_drink|tropical_fish|truck|trumpet|tshirt|tulip|turtle|tv|twisted_rightwards_arrows|two|two_hearts|two_men_holding_hands|two_women_holding_hands|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7981|u7a7a|uk|umbrella|unamused|underage|unlock|up|us|v|vertical_traffic_light|vhs|vibration_mode|video_camera|video_game|violin|virgo|volcano|vs|walking|waning_crescent_moon|waning_gibbous_moon|warning|watch|water_buffalo|watermelon|wave|wavy_dash|waxing_crescent_moon|waxing_gibbous_moon|wc|weary|wedding|whale|whale2|wheelchair|white_check_mark|white_circle|white_flower|white_large_square|white_medium_small_square|white_medium_square|white_small_square|white_square_button|wind_chime|wine_glass|wink|wolf|woman|womans_clothes|womans_hat|womens|worried|wrench|x|yellow_heart|yen|yum|zap|zero|zzz)(:)", "name": "string.emoji.gfm", "captures": { "1": { "name": "string.emoji.start.gfm" }, "2": { "name": "string.emoji.word.gfm" }, "3": { "name": "string.emoji.end.gfm" } } }, { "match": "(?<=^|\\s|\"|'|\\(|\\[)(#)(\\d+)(?=[\\s\"'\\.,;\\)\\]])", "captures": { "1": { "name": "variable.issue.tag.gfm" }, "2": { "name": "string.issue.number.gfm" } } }, { "match": "(?<=^|\\s|\"|'|\\(|\\[)(@)(\\w[-\\w:]*)(?=[\\s\"'.,;\\)\\]])", "captures": { "1": { "name": "variable.mention.gfm" }, "2": { "name": "string.username.gfm" } } }, { "begin": "(?<=^|[^\\w\\d~])~~(?!$|~|\\s)", "end": "(?]+)>", "name": "link", "captures": { "1": { "name": "punctuation.definition.begin.gfm" }, "2": { "name": "entity.gfm" }, "3": { "name": "punctuation.definition.end.gfm" }, "4": { "name": "markup.underline.link.gfm" } } }, { "match": "^\\s*(\\[)([^\\]]+)(\\])\\s*(:)\\s*(\\S+)", "name": "link", "captures": { "1": { "name": "punctuation.definition.begin.gfm" }, "2": { "name": "entity.gfm" }, "3": { "name": "punctuation.definition.end.gfm" }, "4": { "name": "punctuation.separator.key-value.gfm" }, "5": { "name": "markup.underline.link.gfm" } } } ] }, "emphasis": { "patterns": [ { "begin": "(?<=^|[^\\w\\d\\*])\\*\\*\\*(?!$|\\*|\\s)", "end": "(?>", "end": "<<}", "name": "critic.gfm.comment", "captures": { "0": { "name": "critic.gfm.comment.marker" } } }, { "begin": "{~~", "end": "~~}", "name": "markup.changed.critic.gfm.substitution", "captures": { "0": { "name": "punctuation.definition.changed.critic.gfm.substitution.marker" } }, "patterns": [ { "match": "~>", "name": "punctuation.definition.changed.critic.gfm.substitution.operator" }, { "include": "#emphasis" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/markdown-latex-combined.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/syntaxes/markdown.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/69d3321b4923ca2d5e8e900018887cc38b5fe04a", "name": "Markdown", "scopeName": "text.tex.markdown_latex_combined", "patterns": [ { "include": "text.tex.latex" }, { "include": "#frontMatter" }, { "include": "#block" } ], "repository": { "block": { "patterns": [ { "include": "#separator" }, { "include": "#heading" }, { "include": "#blockquote" }, { "include": "#lists" }, { "include": "#fenced_code_block" }, { "include": "#raw_block" }, { "include": "#link-def" }, { "include": "#html" }, { "include": "#paragraph" } ] }, "blockquote": { "begin": "(^|\\G)[ ]{0,3}(>) ?", "captures": { "2": { "name": "punctuation.definition.quote.begin.markdown" } }, "name": "markup.quote.markdown", "patterns": [ { "include": "#block" } ], "while": "(^|\\G)\\s*(>) ?" }, "fenced_code_block_css": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.css", "patterns": [ { "include": "source.css" } ] } ] }, "fenced_code_block_basic": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.html", "patterns": [ { "include": "text.html.basic" } ] } ] }, "fenced_code_block_ini": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.ini", "patterns": [ { "include": "source.ini" } ] } ] }, "fenced_code_block_java": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.java", "patterns": [ { "include": "source.java" } ] } ] }, "fenced_code_block_lua": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.lua", "patterns": [ { "include": "source.lua" } ] } ] }, "fenced_code_block_makefile": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.makefile", "patterns": [ { "include": "source.makefile" } ] } ] }, "fenced_code_block_perl": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.perl", "patterns": [ { "include": "source.perl" } ] } ] }, "fenced_code_block_r": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile|\\{\\.r.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.r", "patterns": [ { "include": "source.r" } ] } ] }, "fenced_code_block_ruby": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.ruby", "patterns": [ { "include": "source.ruby" } ] } ] }, "fenced_code_block_php": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.php", "patterns": [ { "include": "text.html.basic" }, { "include": "source.php" } ] } ] }, "fenced_code_block_sql": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.sql", "patterns": [ { "include": "source.sql" } ] } ] }, "fenced_code_block_vs_net": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.vs_net", "patterns": [ { "include": "source.asp.vb.net" } ] } ] }, "fenced_code_block_xml": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.xml", "patterns": [ { "include": "text.xml" } ] } ] }, "fenced_code_block_xsl": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.xsl", "patterns": [ { "include": "text.xml.xsl" } ] } ] }, "fenced_code_block_yaml": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.yaml", "patterns": [ { "include": "source.yaml" } ] } ] }, "fenced_code_block_dosbatch": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.dosbatch", "patterns": [ { "include": "source.batchfile" } ] } ] }, "fenced_code_block_clojure": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.clojure", "patterns": [ { "include": "source.clojure" } ] } ] }, "fenced_code_block_coffee": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.coffee", "patterns": [ { "include": "source.coffee" } ] } ] }, "fenced_code_block_c": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.c", "patterns": [ { "include": "source.c" } ] } ] }, "fenced_code_block_cpp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.cpp source.cpp", "patterns": [ { "include": "source.cpp" } ] } ] }, "fenced_code_block_diff": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.diff", "patterns": [ { "include": "source.diff" } ] } ] }, "fenced_code_block_dockerfile": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.dockerfile", "patterns": [ { "include": "source.dockerfile" } ] } ] }, "fenced_code_block_git_commit": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.git_commit", "patterns": [ { "include": "text.git-commit" } ] } ] }, "fenced_code_block_git_rebase": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.git_rebase", "patterns": [ { "include": "text.git-rebase" } ] } ] }, "fenced_code_block_go": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.go", "patterns": [ { "include": "source.go" } ] } ] }, "fenced_code_block_groovy": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.groovy", "patterns": [ { "include": "source.groovy" } ] } ] }, "fenced_code_block_pug": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.pug", "patterns": [ { "include": "text.pug" } ] } ] }, "fenced_code_block_js": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|dataviewjs|\\{\\.js.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.javascript", "patterns": [ { "include": "source.js" } ] } ] }, "fenced_code_block_js_regexp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.js_regexp", "patterns": [ { "include": "source.js.regexp" } ] } ] }, "fenced_code_block_json": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|json5|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.json", "patterns": [ { "include": "source.json" } ] } ] }, "fenced_code_block_jsonc": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.jsonc", "patterns": [ { "include": "source.json.comments" } ] } ] }, "fenced_code_block_less": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.less", "patterns": [ { "include": "source.css.less" } ] } ] }, "fenced_code_block_objc": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.objc", "patterns": [ { "include": "source.objc" } ] } ] }, "fenced_code_block_swift": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.swift", "patterns": [ { "include": "source.swift" } ] } ] }, "fenced_code_block_scss": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.scss", "patterns": [ { "include": "source.css.scss" } ] } ] }, "fenced_code_block_perl6": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.perl6", "patterns": [ { "include": "source.perl.6" } ] } ] }, "fenced_code_block_powershell": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.powershell", "patterns": [ { "include": "source.powershell" } ] } ] }, "fenced_code_block_python": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\\{\\.python.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.python", "patterns": [ { "include": "source.python" } ] } ] }, "fenced_code_block_julia": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(julia|\\{\\.julia.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.julia", "patterns": [ { "include": "source.julia" } ] } ] }, "fenced_code_block_regexp_python": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.regexp_python", "patterns": [ { "include": "source.regexp.python" } ] } ] }, "fenced_code_block_rust": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.rust", "patterns": [ { "include": "source.rust" } ] } ] }, "fenced_code_block_scala": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.scala", "patterns": [ { "include": "source.scala" } ] } ] }, "fenced_code_block_shell": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.shellscript", "patterns": [ { "include": "source.shell" } ] } ] }, "fenced_code_block_ts": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.typescript", "patterns": [ { "include": "source.ts" } ] } ] }, "fenced_code_block_tsx": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.typescriptreact", "patterns": [ { "include": "source.tsx" } ] } ] }, "fenced_code_block_csharp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.csharp", "patterns": [ { "include": "source.cs" } ] } ] }, "fenced_code_block_fsharp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.fsharp", "patterns": [ { "include": "source.fsharp" } ] } ] }, "fenced_code_block_dart": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.dart", "patterns": [ { "include": "source.dart" } ] } ] }, "fenced_code_block_handlebars": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(handlebars|hbs)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.handlebars", "patterns": [ { "include": "text.html.handlebars" } ] } ] }, "fenced_code_block_markdown": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(markdown|md)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.markdown", "patterns": [ { "include": "text.html.markdown" } ] } ] }, "fenced_code_block_log": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.log", "patterns": [ { "include": "text.log" } ] } ] }, "fenced_code_block_erlang": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.erlang", "patterns": [ { "include": "source.erlang" } ] } ] }, "fenced_code_block_elixir": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.elixir", "patterns": [ { "include": "source.elixir" } ] } ] }, "fenced_code_block_latex": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(latex|tex)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.latex", "patterns": [ { "include": "text.tex.latex" } ] } ] }, "fenced_code_block_bibtex": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bibtex)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.bibtex", "patterns": [ { "include": "text.bibtex" } ] } ] }, "fenced_code_block": { "patterns": [ { "include": "#fenced_code_block_css" }, { "include": "#fenced_code_block_basic" }, { "include": "#fenced_code_block_ini" }, { "include": "#fenced_code_block_java" }, { "include": "#fenced_code_block_lua" }, { "include": "#fenced_code_block_makefile" }, { "include": "#fenced_code_block_perl" }, { "include": "#fenced_code_block_r" }, { "include": "#fenced_code_block_ruby" }, { "include": "#fenced_code_block_php" }, { "include": "#fenced_code_block_sql" }, { "include": "#fenced_code_block_vs_net" }, { "include": "#fenced_code_block_xml" }, { "include": "#fenced_code_block_xsl" }, { "include": "#fenced_code_block_yaml" }, { "include": "#fenced_code_block_dosbatch" }, { "include": "#fenced_code_block_clojure" }, { "include": "#fenced_code_block_coffee" }, { "include": "#fenced_code_block_c" }, { "include": "#fenced_code_block_cpp" }, { "include": "#fenced_code_block_diff" }, { "include": "#fenced_code_block_dockerfile" }, { "include": "#fenced_code_block_git_commit" }, { "include": "#fenced_code_block_git_rebase" }, { "include": "#fenced_code_block_go" }, { "include": "#fenced_code_block_groovy" }, { "include": "#fenced_code_block_pug" }, { "include": "#fenced_code_block_js" }, { "include": "#fenced_code_block_js_regexp" }, { "include": "#fenced_code_block_json" }, { "include": "#fenced_code_block_jsonc" }, { "include": "#fenced_code_block_less" }, { "include": "#fenced_code_block_objc" }, { "include": "#fenced_code_block_swift" }, { "include": "#fenced_code_block_scss" }, { "include": "#fenced_code_block_perl6" }, { "include": "#fenced_code_block_powershell" }, { "include": "#fenced_code_block_python" }, { "include": "#fenced_code_block_julia" }, { "include": "#fenced_code_block_regexp_python" }, { "include": "#fenced_code_block_rust" }, { "include": "#fenced_code_block_scala" }, { "include": "#fenced_code_block_shell" }, { "include": "#fenced_code_block_ts" }, { "include": "#fenced_code_block_tsx" }, { "include": "#fenced_code_block_csharp" }, { "include": "#fenced_code_block_fsharp" }, { "include": "#fenced_code_block_dart" }, { "include": "#fenced_code_block_handlebars" }, { "include": "#fenced_code_block_markdown" }, { "include": "#fenced_code_block_log" }, { "include": "#fenced_code_block_erlang" }, { "include": "#fenced_code_block_elixir" }, { "include": "#fenced_code_block_latex" }, { "include": "#fenced_code_block_bibtex" }, { "include": "#fenced_code_block_unknown" } ] }, "fenced_code_block_unknown": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`~]*)?$)", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language" } }, "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "name": "markup.fenced_code.block.markdown" }, "heading": { "match": "(?:^|\\G)[ ]{0,3}(#{1,6}\\s+(.*?)(\\s+#{1,6})?\\s*)$", "captures": { "1": { "patterns": [ { "match": "(#{6})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.6.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{5})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.5.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{4})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.4.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{3})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.3.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{2})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.2.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{1})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.1.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } } ] } }, "name": "markup.heading.markdown", "patterns": [ { "include": "#inline" } ] }, "heading-setext": { "patterns": [ { "match": "^(={3,})(?=[ \\t]*$\\n?)", "name": "markup.heading.setext.1.markdown" }, { "match": "^(-{3,})(?=[ \\t]*$\\n?)", "name": "markup.heading.setext.2.markdown" } ] }, "html": { "patterns": [ { "begin": "(^|\\G)\\s*()", "name": "comment.block.html" }, { "begin": "(?i)(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?))", "end": "(?i)(.*)(())", "endCaptures": { "1": { "patterns": [ { "include": "text.html.derivative" } ] }, "2": { "name": "meta.tag.structure.$4.end.html" }, "3": { "name": "punctuation.definition.tag.begin.html" }, "4": { "name": "entity.name.tag.html" }, "5": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "begin": "(\\s*|$)", "patterns": [ { "include": "text.html.derivative" } ], "while": "(?i)^(?!.*)" } ] }, { "begin": "(?i)(^|\\G)\\s*(?=))", "patterns": [ { "include": "text.html.derivative" } ], "while": "^(?!\\s*$)" }, { "begin": "(^|\\G)\\s*(?=(<[a-zA-Z0-9\\-](/?>|\\s.*?>)|)\\s*$)", "patterns": [ { "include": "text.html.derivative" } ], "while": "^(?!\\s*$)" } ] }, "link-def": { "captures": { "1": { "name": "punctuation.definition.constant.markdown" }, "2": { "name": "constant.other.reference.link.markdown" }, "3": { "name": "punctuation.definition.constant.markdown" }, "4": { "name": "punctuation.separator.key-value.markdown" }, "5": { "name": "punctuation.definition.link.markdown" }, "6": { "name": "markup.underline.link.markdown" }, "7": { "name": "punctuation.definition.link.markdown" }, "8": { "name": "markup.underline.link.markdown" }, "9": { "name": "string.other.link.description.title.markdown" }, "10": { "name": "punctuation.definition.string.begin.markdown" }, "11": { "name": "punctuation.definition.string.end.markdown" }, "12": { "name": "string.other.link.description.title.markdown" }, "13": { "name": "punctuation.definition.string.begin.markdown" }, "14": { "name": "punctuation.definition.string.end.markdown" }, "15": { "name": "string.other.link.description.title.markdown" }, "16": { "name": "punctuation.definition.string.begin.markdown" }, "17": { "name": "punctuation.definition.string.end.markdown" } }, "match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (?:(<)([^\\>]+?)(>)|(\\S+?)) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n", "name": "meta.link.reference.def.markdown" }, "list_paragraph": { "begin": "(^|\\G)(?=\\S)(?![*+->]\\s|[0-9]+\\.\\s)", "name": "meta.paragraph.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" }, { "include": "#heading-setext" } ], "while": "(^|\\G)(?!\\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \\t]*$\\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\\.)" }, "lists": { "patterns": [ { "begin": "(^|\\G)([ ]{0,3})([*+-])([ \\t])", "beginCaptures": { "3": { "name": "punctuation.definition.list.begin.markdown" } }, "comment": "Currently does not support un-indented second lines.", "name": "markup.list.unnumbered.markdown", "patterns": [ { "include": "#block" }, { "include": "#list_paragraph" } ], "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" }, { "begin": "(^|\\G)([ ]{0,3})([0-9]+\\.)([ \\t])", "beginCaptures": { "3": { "name": "punctuation.definition.list.begin.markdown" } }, "name": "markup.list.numbered.markdown", "patterns": [ { "include": "#block" }, { "include": "#list_paragraph" } ], "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" } ] }, "paragraph": { "begin": "(^|\\G)[ ]{0,3}(?=\\S)", "name": "meta.paragraph.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" }, { "include": "#heading-setext" } ], "while": "(^|\\G)((?=\\s*[-=]{3,}\\s*$)|[ ]{4,}(?=\\S))" }, "raw_block": { "begin": "(^|\\G)([ ]{4}|\\t)", "name": "markup.raw.block.markdown", "while": "(^|\\G)([ ]{4}|\\t)" }, "separator": { "match": "(^|\\G)[ ]{0,3}([\\*\\-\\_])([ ]{0,2}\\2){2,}[ \\t]*$\\n?", "name": "meta.separator.markdown" }, "frontMatter": { "begin": "\\A-{3}\\s*$", "contentName": "meta.embedded.block.frontmatter", "patterns": [ { "include": "source.yaml" } ], "end": "(^|\\G)-{3}|\\.{3}\\s*$" }, "inline": { "patterns": [ { "include": "text.tex.latex" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#raw" }, { "include": "#strikethrough" }, { "include": "#escape" }, { "include": "#image-inline" }, { "include": "#image-ref" }, { "include": "#link-email" }, { "include": "#link-inet" }, { "include": "#link-inline" }, { "include": "#link-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref-shortcut" } ] }, "ampersand": { "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", "match": "&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)", "name": "meta.other.valid-ampersand.markdown" }, "bold": { "begin": "(?x) (?(\\*\\*(?=\\w)|(?]*+> # HTML tags\n | (?`+)([^`]|(?!(?(?!`))`)*+\\k\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (? # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whitespace\n ? # URL\n [ \\t]*+ # Optional whitespace\n ( # Optional Title\n (?['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=__\\b|\\*\\*)\\k<open> # Close\n)\n", "captures": { "1": { "name": "punctuation.definition.bold.markdown" } }, "end": "(?<=\\S)(\\1)", "name": "markup.bold.markdown", "patterns": [ { "applyEndPatternLast": 1, "begin": "(?=<[^>]*?>)", "end": "(?<=>)", "patterns": [ { "include": "text.html.derivative" } ] }, { "include": "#escape" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#raw" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#image-inline" }, { "include": "#link-inline" }, { "include": "#link-inet" }, { "include": "#link-email" }, { "include": "#image-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref" }, { "include": "#link-ref-shortcut" }, { "include": "#strikethrough" } ] }, "bracket": { "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", "match": "<(?![a-zA-Z/?\\$!])", "name": "meta.other.valid-bracket.markdown" }, "escape": { "match": "\\\\[-`*_#+.!(){}\\[\\]\\\\>]", "name": "constant.character.escape.markdown" }, "image-inline": { "captures": { "1": { "name": "punctuation.definition.link.description.begin.markdown" }, "2": { "name": "string.other.link.description.markdown" }, "4": { "name": "punctuation.definition.link.description.end.markdown" }, "5": { "name": "punctuation.definition.metadata.markdown" }, "6": { "name": "punctuation.definition.link.markdown" }, "7": { "name": "markup.underline.link.image.markdown" }, "8": { "name": "punctuation.definition.link.markdown" }, "9": { "name": "string.other.link.description.title.markdown" }, "10": { "name": "punctuation.definition.string.markdown" }, "11": { "name": "punctuation.definition.string.markdown" }, "12": { "name": "string.other.link.description.title.markdown" }, "13": { "name": "punctuation.definition.string.markdown" }, "14": { "name": "punctuation.definition.string.markdown" }, "15": { "name": "string.other.link.description.title.markdown" }, "16": { "name": "punctuation.definition.string.markdown" }, "17": { "name": "punctuation.definition.string.markdown" }, "18": { "name": "punctuation.definition.metadata.markdown" } }, "match": "(?x)\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n (<?)(\\S+?)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", "name": "meta.image.inline.markdown" }, "image-ref": { "captures": { "1": { "name": "punctuation.definition.link.description.begin.markdown" }, "2": { "name": "string.other.link.description.markdown" }, "4": { "name": "punctuation.definition.link.description.end.markdown" }, "5": { "name": "punctuation.definition.constant.markdown" }, "6": { "name": "constant.other.reference.link.markdown" }, "7": { "name": "punctuation.definition.constant.markdown" } }, "match": "(\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(.*?)(\\])", "name": "meta.image.reference.markdown" }, "italic": { "begin": "(?x) (?<open>(\\*(?=\\w)|(?<!\\w)\\*|(?<!\\w)\\b_))(?=\\S) # Open\n (?=\n (\n <[^>]*+> # HTML tags\n | (?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (?<square> # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g<square>*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whtiespace\n <?(.*?)>? # URL\n [ \\t]*+ # Optional whtiespace\n ( # Optional Title\n (?<title>['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | \\k<open>\\k<open> # Must be bold closer\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=_\\b|\\*)\\k<open> # Close\n )\n", "captures": { "1": { "name": "punctuation.definition.italic.markdown" } }, "end": "(?<=\\S)(\\1)((?!\\1)|(?=\\1\\1))", "name": "markup.italic.markdown", "patterns": [ { "applyEndPatternLast": 1, "begin": "(?=<[^>]*?>)", "end": "(?<=>)", "patterns": [ { "include": "text.html.derivative" } ] }, { "include": "#escape" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#raw" }, { "include": "#bold" }, { "include": "#image-inline" }, { "include": "#link-inline" }, { "include": "#link-inet" }, { "include": "#link-email" }, { "include": "#image-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref" }, { "include": "#link-ref-shortcut" }, { "include": "#strikethrough" } ] }, "link-email": { "captures": { "1": { "name": "punctuation.definition.link.markdown" }, "2": { "name": "markup.underline.link.markdown" }, "4": { "name": "punctuation.definition.link.markdown" } }, "match": "(<)((?:mailto:)?[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)(>)", "name": "meta.link.email.lt-gt.markdown" }, "link-inet": { "captures": { "1": { "name": "punctuation.definition.link.markdown" }, "2": { "name": "markup.underline.link.markdown" }, "3": { "name": "punctuation.definition.link.markdown" } }, "match": "(<)((?:https?|ftp)://.*?)(>)", "name": "meta.link.inet.markdown" }, "link-inline": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "4": { "name": "punctuation.definition.link.title.end.markdown" }, "5": { "name": "punctuation.definition.metadata.markdown" }, "7": { "name": "punctuation.definition.link.markdown" }, "8": { "name": "markup.underline.link.markdown" }, "9": { "name": "punctuation.definition.link.markdown" }, "10": { "name": "markup.underline.link.markdown" }, "12": { "name": "string.other.link.description.title.markdown" }, "13": { "name": "punctuation.definition.string.begin.markdown" }, "14": { "name": "punctuation.definition.string.end.markdown" }, "15": { "name": "string.other.link.description.title.markdown" }, "16": { "name": "punctuation.definition.string.begin.markdown" }, "17": { "name": "punctuation.definition.string.end.markdown" }, "18": { "name": "string.other.link.description.title.markdown" }, "19": { "name": "punctuation.definition.string.begin.markdown" }, "20": { "name": "punctuation.definition.string.end.markdown" }, "21": { "name": "punctuation.definition.metadata.markdown" } }, "match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)([^<>\\n]*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n # The title \n (?:\n ((\\()[^()]*(\\))) # Match title in parens…\n | ((\")[^\"]*(\")) # or in double quotes…\n | ((')[^']*(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", "name": "meta.link.inline.markdown" }, "link-ref": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "4": { "name": "punctuation.definition.link.title.end.markdown" }, "5": { "name": "punctuation.definition.constant.begin.markdown" }, "6": { "name": "constant.other.reference.link.markdown" }, "7": { "name": "punctuation.definition.constant.end.markdown" } }, "match": "(?<![\\]\\\\])(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])(\\[)([^\\]]*+)(\\])", "name": "meta.link.reference.markdown" }, "link-ref-literal": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "4": { "name": "punctuation.definition.link.title.end.markdown" }, "5": { "name": "punctuation.definition.constant.begin.markdown" }, "6": { "name": "punctuation.definition.constant.end.markdown" } }, "match": "(?<![\\]\\\\])(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(\\])", "name": "meta.link.reference.literal.markdown" }, "link-ref-shortcut": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "3": { "name": "punctuation.definition.link.title.end.markdown" } }, "match": "(?<![\\]\\\\])(\\[)(\\S+?)(\\])", "name": "meta.link.reference.markdown" }, "raw": { "captures": { "1": { "name": "punctuation.definition.raw.markdown" }, "3": { "name": "punctuation.definition.raw.markdown" } }, "match": "(`+)((?:[^`]|(?!(?<!`)\\1(?!`))`)*+)(\\1)", "name": "markup.inline.raw.string.markdown" }, "strikethrough": { "captures": { "1": { "name": "punctuation.definition.strikethrough.markdown" }, "2": { "patterns": [ { "applyEndPatternLast": 1, "begin": "(?=<[^>]*?>)", "end": "(?<=>)", "patterns": [ { "include": "text.html.derivative" } ] }, { "include": "#escape" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#raw" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#image-inline" }, { "include": "#link-inline" }, { "include": "#link-inet" }, { "include": "#link-email" }, { "include": "#image-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref" }, { "include": "#link-ref-shortcut" } ] }, "3": { "name": "punctuation.definition.strikethrough.markdown" } }, "match": "(~{2,})((?:[^~]|(?!(?<!~)\\1(?!~))~)*+)(\\1)", "name": "markup.strikethrough.markdown" } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/markdown.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/syntaxes/markdown.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/69d3321b4923ca2d5e8e900018887cc38b5fe04a", "name": "Markdown", "scopeName": "text.html.markdown", "patterns": [ { "include": "#frontMatter" }, { "include": "#block" } ], "repository": { "block": { "patterns": [ { "include": "#separator" }, { "include": "#heading" }, { "include": "#blockquote" }, { "include": "#lists" }, { "include": "#fenced_code_block" }, { "include": "#raw_block" }, { "include": "#link-def" }, { "include": "#html" }, { "include": "#paragraph" } ] }, "blockquote": { "begin": "(^|\\G)[ ]{0,3}(>) ?", "captures": { "2": { "name": "punctuation.definition.quote.begin.markdown" } }, "name": "markup.quote.markdown", "patterns": [ { "include": "#block" } ], "while": "(^|\\G)\\s*(>) ?" }, "fenced_code_block_css": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css|css.erb)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.css", "patterns": [ { "include": "source.css" } ] } ] }, "fenced_code_block_basic": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html|htm|shtml|xhtml|inc|tmpl|tpl)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.html", "patterns": [ { "include": "text.html.basic" } ] } ] }, "fenced_code_block_ini": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.ini", "patterns": [ { "include": "source.ini" } ] } ] }, "fenced_code_block_java": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.java", "patterns": [ { "include": "source.java" } ] } ] }, "fenced_code_block_lua": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.lua", "patterns": [ { "include": "source.lua" } ] } ] }, "fenced_code_block_makefile": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(Makefile|makefile|GNUmakefile|OCamlMakefile)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.makefile", "patterns": [ { "include": "source.makefile" } ] } ] }, "fenced_code_block_perl": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.perl", "patterns": [ { "include": "source.perl" } ] } ] }, "fenced_code_block_r": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(R|r|s|S|Rprofile|\\{\\.r.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.r", "patterns": [ { "include": "source.r" } ] } ] }, "fenced_code_block_ruby": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rb|rbx|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.ruby", "patterns": [ { "include": "source.ruby" } ] } ] }, "fenced_code_block_php": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php|php3|php4|php5|phpt|phtml|aw|ctp)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.php", "patterns": [ { "include": "text.html.basic" }, { "include": "source.php" } ] } ] }, "fenced_code_block_sql": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.sql", "patterns": [ { "include": "source.sql" } ] } ] }, "fenced_code_block_vs_net": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.vs_net", "patterns": [ { "include": "source.asp.vb.net" } ] } ] }, "fenced_code_block_xml": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.xml", "patterns": [ { "include": "text.xml" } ] } ] }, "fenced_code_block_xsl": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xsl|xslt)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.xsl", "patterns": [ { "include": "text.xml.xsl" } ] } ] }, "fenced_code_block_yaml": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yaml|yml)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.yaml", "patterns": [ { "include": "source.yaml" } ] } ] }, "fenced_code_block_dosbatch": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat|batch)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.dosbatch", "patterns": [ { "include": "source.batchfile" } ] } ] }, "fenced_code_block_clojure": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(clj|cljs|clojure)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.clojure", "patterns": [ { "include": "source.clojure" } ] } ] }, "fenced_code_block_coffee": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.coffee", "patterns": [ { "include": "source.coffee" } ] } ] }, "fenced_code_block_c": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c|h)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.c", "patterns": [ { "include": "source.c" } ] } ] }, "fenced_code_block_cpp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cpp|c\\+\\+|cxx)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.cpp source.cpp", "patterns": [ { "include": "source.cpp" } ] } ] }, "fenced_code_block_diff": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.diff", "patterns": [ { "include": "source.diff" } ] } ] }, "fenced_code_block_dockerfile": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dockerfile|Dockerfile)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.dockerfile", "patterns": [ { "include": "source.dockerfile" } ] } ] }, "fenced_code_block_git_commit": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(COMMIT_EDITMSG|MERGE_MSG)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.git_commit", "patterns": [ { "include": "text.git-commit" } ] } ] }, "fenced_code_block_git_rebase": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.git_rebase", "patterns": [ { "include": "text.git-rebase" } ] } ] }, "fenced_code_block_go": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go|golang)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.go", "patterns": [ { "include": "source.go" } ] } ] }, "fenced_code_block_groovy": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(groovy|gvy)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.groovy", "patterns": [ { "include": "source.groovy" } ] } ] }, "fenced_code_block_pug": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.pug", "patterns": [ { "include": "text.pug" } ] } ] }, "fenced_code_block_js": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(js|jsx|javascript|es6|mjs|cjs|dataviewjs|\\{\\.js.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.javascript", "patterns": [ { "include": "source.js" } ] } ] }, "fenced_code_block_js_regexp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.js_regexp", "patterns": [ { "include": "source.js.regexp" } ] } ] }, "fenced_code_block_json": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json|json5|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.json", "patterns": [ { "include": "source.json" } ] } ] }, "fenced_code_block_jsonc": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.jsonc", "patterns": [ { "include": "source.json.comments" } ] } ] }, "fenced_code_block_less": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.less", "patterns": [ { "include": "source.css.less" } ] } ] }, "fenced_code_block_objc": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|m|h)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.objc", "patterns": [ { "include": "source.objc" } ] } ] }, "fenced_code_block_swift": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.swift", "patterns": [ { "include": "source.swift" } ] } ] }, "fenced_code_block_scss": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.scss", "patterns": [ { "include": "source.css.scss" } ] } ] }, "fenced_code_block_perl6": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.perl6", "patterns": [ { "include": "source.perl.6" } ] } ] }, "fenced_code_block_powershell": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(powershell|ps1|psm1|psd1)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.powershell", "patterns": [ { "include": "source.powershell" } ] } ] }, "fenced_code_block_python": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py|py3|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gyp|gypi|\\{\\.python.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.python", "patterns": [ { "include": "source.python" } ] } ] }, "fenced_code_block_julia": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(julia|\\{\\.julia.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.julia", "patterns": [ { "include": "source.julia" } ] } ] }, "fenced_code_block_regexp_python": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.regexp_python", "patterns": [ { "include": "source.regexp.python" } ] } ] }, "fenced_code_block_rust": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.rust", "patterns": [ { "include": "source.rust" } ] } ] }, "fenced_code_block_scala": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scala|sbt)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.scala", "patterns": [ { "include": "source.scala" } ] } ] }, "fenced_code_block_shell": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?\\})((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.shellscript", "patterns": [ { "include": "source.shell" } ] } ] }, "fenced_code_block_ts": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(typescript|ts)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.typescript", "patterns": [ { "include": "source.ts" } ] } ] }, "fenced_code_block_tsx": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.typescriptreact", "patterns": [ { "include": "source.tsx" } ] } ] }, "fenced_code_block_csharp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cs|csharp|c#)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.csharp", "patterns": [ { "include": "source.cs" } ] } ] }, "fenced_code_block_fsharp": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(fs|fsharp|f#)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.fsharp", "patterns": [ { "include": "source.fsharp" } ] } ] }, "fenced_code_block_dart": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.dart", "patterns": [ { "include": "source.dart" } ] } ] }, "fenced_code_block_handlebars": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(handlebars|hbs)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.handlebars", "patterns": [ { "include": "text.html.handlebars" } ] } ] }, "fenced_code_block_markdown": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(markdown|md)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.markdown", "patterns": [ { "include": "text.html.markdown" } ] } ] }, "fenced_code_block_log": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.log", "patterns": [ { "include": "text.log" } ] } ] }, "fenced_code_block_erlang": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.erlang", "patterns": [ { "include": "source.erlang" } ] } ] }, "fenced_code_block_elixir": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.elixir", "patterns": [ { "include": "source.elixir" } ] } ] }, "fenced_code_block_latex": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(latex|tex)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.latex", "patterns": [ { "include": "text.tex.latex" } ] } ] }, "fenced_code_block_bibtex": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bibtex)((\\s+|:|,|\\{|\\?)[^`~]*)?$)", "name": "markup.fenced_code.block.markdown", "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language.markdown" }, "5": { "name": "fenced_code.block.language.attributes.markdown" } }, "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "patterns": [ { "begin": "(^|\\G)(\\s*)(.*)", "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", "contentName": "meta.embedded.block.bibtex", "patterns": [ { "include": "text.bibtex" } ] } ] }, "fenced_code_block": { "patterns": [ { "include": "#fenced_code_block_css" }, { "include": "#fenced_code_block_basic" }, { "include": "#fenced_code_block_ini" }, { "include": "#fenced_code_block_java" }, { "include": "#fenced_code_block_lua" }, { "include": "#fenced_code_block_makefile" }, { "include": "#fenced_code_block_perl" }, { "include": "#fenced_code_block_r" }, { "include": "#fenced_code_block_ruby" }, { "include": "#fenced_code_block_php" }, { "include": "#fenced_code_block_sql" }, { "include": "#fenced_code_block_vs_net" }, { "include": "#fenced_code_block_xml" }, { "include": "#fenced_code_block_xsl" }, { "include": "#fenced_code_block_yaml" }, { "include": "#fenced_code_block_dosbatch" }, { "include": "#fenced_code_block_clojure" }, { "include": "#fenced_code_block_coffee" }, { "include": "#fenced_code_block_c" }, { "include": "#fenced_code_block_cpp" }, { "include": "#fenced_code_block_diff" }, { "include": "#fenced_code_block_dockerfile" }, { "include": "#fenced_code_block_git_commit" }, { "include": "#fenced_code_block_git_rebase" }, { "include": "#fenced_code_block_go" }, { "include": "#fenced_code_block_groovy" }, { "include": "#fenced_code_block_pug" }, { "include": "#fenced_code_block_js" }, { "include": "#fenced_code_block_js_regexp" }, { "include": "#fenced_code_block_json" }, { "include": "#fenced_code_block_jsonc" }, { "include": "#fenced_code_block_less" }, { "include": "#fenced_code_block_objc" }, { "include": "#fenced_code_block_swift" }, { "include": "#fenced_code_block_scss" }, { "include": "#fenced_code_block_perl6" }, { "include": "#fenced_code_block_powershell" }, { "include": "#fenced_code_block_python" }, { "include": "#fenced_code_block_julia" }, { "include": "#fenced_code_block_regexp_python" }, { "include": "#fenced_code_block_rust" }, { "include": "#fenced_code_block_scala" }, { "include": "#fenced_code_block_shell" }, { "include": "#fenced_code_block_ts" }, { "include": "#fenced_code_block_tsx" }, { "include": "#fenced_code_block_csharp" }, { "include": "#fenced_code_block_fsharp" }, { "include": "#fenced_code_block_dart" }, { "include": "#fenced_code_block_handlebars" }, { "include": "#fenced_code_block_markdown" }, { "include": "#fenced_code_block_log" }, { "include": "#fenced_code_block_erlang" }, { "include": "#fenced_code_block_elixir" }, { "include": "#fenced_code_block_latex" }, { "include": "#fenced_code_block_bibtex" }, { "include": "#fenced_code_block_unknown" } ] }, "fenced_code_block_unknown": { "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`~]*)?$)", "beginCaptures": { "3": { "name": "punctuation.definition.markdown" }, "4": { "name": "fenced_code.block.language" } }, "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$", "endCaptures": { "3": { "name": "punctuation.definition.markdown" } }, "name": "markup.fenced_code.block.markdown" }, "heading": { "match": "(?:^|\\G)[ ]{0,3}(#{1,6}\\s+(.*?)(\\s+#{1,6})?\\s*)$", "captures": { "1": { "patterns": [ { "match": "(#{6})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.6.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{5})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.5.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{4})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.4.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{3})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.3.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{2})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.2.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } }, { "match": "(#{1})\\s+(.*?)(?:\\s+(#+))?\\s*$", "name": "heading.1.markdown", "captures": { "1": { "name": "punctuation.definition.heading.markdown" }, "2": { "name": "entity.name.section.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" } ] }, "3": { "name": "punctuation.definition.heading.markdown" } } } ] } }, "name": "markup.heading.markdown", "patterns": [ { "include": "#inline" } ] }, "heading-setext": { "patterns": [ { "match": "^(={3,})(?=[ \\t]*$\\n?)", "name": "markup.heading.setext.1.markdown" }, { "match": "^(-{3,})(?=[ \\t]*$\\n?)", "name": "markup.heading.setext.2.markdown" } ] }, "html": { "patterns": [ { "begin": "(^|\\G)\\s*(<!--)", "captures": { "1": { "name": "punctuation.definition.comment.html" }, "2": { "name": "punctuation.definition.comment.html" } }, "end": "(-->)", "name": "comment.block.html" }, { "begin": "(?i)(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?</(script|style|pre)>))", "end": "(?i)(.*)((</)(script|style|pre)(>))", "endCaptures": { "1": { "patterns": [ { "include": "text.html.derivative" } ] }, "2": { "name": "meta.tag.structure.$4.end.html" }, "3": { "name": "punctuation.definition.tag.begin.html" }, "4": { "name": "entity.name.tag.html" }, "5": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "begin": "(\\s*|$)", "patterns": [ { "include": "text.html.derivative" } ], "while": "(?i)^(?!.*</(script|style|pre)>)" } ] }, { "begin": "(?i)(^|\\G)\\s*(?=</?[a-zA-Z]+[^\\s/>]*(\\s|$|/?>))", "patterns": [ { "include": "text.html.derivative" } ], "while": "^(?!\\s*$)" }, { "begin": "(^|\\G)\\s*(?=(<[a-zA-Z0-9\\-](/?>|\\s.*?>)|</[a-zA-Z0-9\\-]>)\\s*$)", "patterns": [ { "include": "text.html.derivative" } ], "while": "^(?!\\s*$)" } ] }, "link-def": { "captures": { "1": { "name": "punctuation.definition.constant.markdown" }, "2": { "name": "constant.other.reference.link.markdown" }, "3": { "name": "punctuation.definition.constant.markdown" }, "4": { "name": "punctuation.separator.key-value.markdown" }, "5": { "name": "punctuation.definition.link.markdown" }, "6": { "name": "markup.underline.link.markdown" }, "7": { "name": "punctuation.definition.link.markdown" }, "8": { "name": "markup.underline.link.markdown" }, "9": { "name": "string.other.link.description.title.markdown" }, "10": { "name": "punctuation.definition.string.begin.markdown" }, "11": { "name": "punctuation.definition.string.end.markdown" }, "12": { "name": "string.other.link.description.title.markdown" }, "13": { "name": "punctuation.definition.string.begin.markdown" }, "14": { "name": "punctuation.definition.string.end.markdown" }, "15": { "name": "string.other.link.description.title.markdown" }, "16": { "name": "punctuation.definition.string.begin.markdown" }, "17": { "name": "punctuation.definition.string.end.markdown" } }, "match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (?:(<)([^\\>]+?)(>)|(\\S+?)) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n", "name": "meta.link.reference.def.markdown" }, "list_paragraph": { "begin": "(^|\\G)(?=\\S)(?![*+->]\\s|[0-9]+\\.\\s)", "name": "meta.paragraph.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" }, { "include": "#heading-setext" } ], "while": "(^|\\G)(?!\\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \\t]*$\\n?|[ ]{0,3}[*+->]|[ ]{0,3}[0-9]+\\.)" }, "lists": { "patterns": [ { "begin": "(^|\\G)([ ]{0,3})([*+-])([ \\t])", "beginCaptures": { "3": { "name": "punctuation.definition.list.begin.markdown" } }, "comment": "Currently does not support un-indented second lines.", "name": "markup.list.unnumbered.markdown", "patterns": [ { "include": "#block" }, { "include": "#list_paragraph" } ], "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" }, { "begin": "(^|\\G)([ ]{0,3})([0-9]+\\.)([ \\t])", "beginCaptures": { "3": { "name": "punctuation.definition.list.begin.markdown" } }, "name": "markup.list.numbered.markdown", "patterns": [ { "include": "#block" }, { "include": "#list_paragraph" } ], "while": "((^|\\G)([ ]{2,4}|\\t))|(^[ \\t]*$)" } ] }, "paragraph": { "begin": "(^|\\G)[ ]{0,3}(?=\\S)", "name": "meta.paragraph.markdown", "patterns": [ { "include": "#inline" }, { "include": "text.html.derivative" }, { "include": "#heading-setext" } ], "while": "(^|\\G)((?=\\s*[-=]{3,}\\s*$)|[ ]{4,}(?=\\S))" }, "raw_block": { "begin": "(^|\\G)([ ]{4}|\\t)", "name": "markup.raw.block.markdown", "while": "(^|\\G)([ ]{4}|\\t)" }, "separator": { "match": "(^|\\G)[ ]{0,3}([\\*\\-\\_])([ ]{0,2}\\2){2,}[ \\t]*$\\n?", "name": "meta.separator.markdown" }, "frontMatter": { "begin": "\\A-{3}\\s*$", "contentName": "meta.embedded.block.frontmatter", "patterns": [ { "include": "source.yaml" } ], "end": "(^|\\G)-{3}|\\.{3}\\s*$" }, "inline": { "patterns": [ { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#raw" }, { "include": "#strikethrough" }, { "include": "#escape" }, { "include": "#image-inline" }, { "include": "#image-ref" }, { "include": "#link-email" }, { "include": "#link-inet" }, { "include": "#link-inline" }, { "include": "#link-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref-shortcut" } ] }, "ampersand": { "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", "match": "&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)", "name": "meta.other.valid-ampersand.markdown" }, "bold": { "begin": "(?x) (?<open>(\\*\\*(?=\\w)|(?<!\\w)\\*\\*|(?<!\\w)\\b__))(?=\\S) (?=\n (\n <[^>]*+> # HTML tags\n | (?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (?<square> # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g<square>*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whitespace\n <?(.*?)>? # URL\n [ \\t]*+ # Optional whitespace\n ( # Optional Title\n (?<title>['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=__\\b|\\*\\*)\\k<open> # Close\n)\n", "captures": { "1": { "name": "punctuation.definition.bold.markdown" } }, "end": "(?<=\\S)(\\1)", "name": "markup.bold.markdown", "patterns": [ { "applyEndPatternLast": 1, "begin": "(?=<[^>]*?>)", "end": "(?<=>)", "patterns": [ { "include": "text.html.derivative" } ] }, { "include": "#escape" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#raw" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#image-inline" }, { "include": "#link-inline" }, { "include": "#link-inet" }, { "include": "#link-email" }, { "include": "#image-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref" }, { "include": "#link-ref-shortcut" }, { "include": "#strikethrough" } ] }, "bracket": { "comment": "Markdown will convert this for us. We match it so that the HTML grammar will not mark it up as invalid.", "match": "<(?![a-zA-Z/?\\$!])", "name": "meta.other.valid-bracket.markdown" }, "escape": { "match": "\\\\[-`*_#+.!(){}\\[\\]\\\\>]", "name": "constant.character.escape.markdown" }, "image-inline": { "captures": { "1": { "name": "punctuation.definition.link.description.begin.markdown" }, "2": { "name": "string.other.link.description.markdown" }, "4": { "name": "punctuation.definition.link.description.end.markdown" }, "5": { "name": "punctuation.definition.metadata.markdown" }, "6": { "name": "punctuation.definition.link.markdown" }, "7": { "name": "markup.underline.link.image.markdown" }, "8": { "name": "punctuation.definition.link.markdown" }, "9": { "name": "string.other.link.description.title.markdown" }, "10": { "name": "punctuation.definition.string.markdown" }, "11": { "name": "punctuation.definition.string.markdown" }, "12": { "name": "string.other.link.description.title.markdown" }, "13": { "name": "punctuation.definition.string.markdown" }, "14": { "name": "punctuation.definition.string.markdown" }, "15": { "name": "string.other.link.description.title.markdown" }, "16": { "name": "punctuation.definition.string.markdown" }, "17": { "name": "punctuation.definition.string.markdown" }, "18": { "name": "punctuation.definition.metadata.markdown" } }, "match": "(?x)\n (\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n (<?)(\\S+?)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in parens…\n | ((\").+?(\")) # or in double quotes…\n | ((').+?(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", "name": "meta.image.inline.markdown" }, "image-ref": { "captures": { "1": { "name": "punctuation.definition.link.description.begin.markdown" }, "2": { "name": "string.other.link.description.markdown" }, "4": { "name": "punctuation.definition.link.description.end.markdown" }, "5": { "name": "punctuation.definition.constant.markdown" }, "6": { "name": "constant.other.reference.link.markdown" }, "7": { "name": "punctuation.definition.constant.markdown" } }, "match": "(\\!\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(.*?)(\\])", "name": "meta.image.reference.markdown" }, "italic": { "begin": "(?x) (?<open>(\\*(?=\\w)|(?<!\\w)\\*|(?<!\\w)\\b_))(?=\\S) # Open\n (?=\n (\n <[^>]*+> # HTML tags\n | (?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>\n # Raw\n | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+ # Escapes\n | \\[\n (\n (?<square> # Named group\n [^\\[\\]\\\\] # Match most chars\n | \\\\. # Escaped chars\n | \\[ \\g<square>*+ \\] # Nested brackets\n )*+\n \\]\n (\n ( # Reference Link\n [ ]? # Optional space\n \\[[^\\]]*+\\] # Ref name\n )\n | ( # Inline Link\n \\( # Opening paren\n [ \\t]*+ # Optional whtiespace\n <?(.*?)>? # URL\n [ \\t]*+ # Optional whtiespace\n ( # Optional Title\n (?<title>['\"])\n (.*?)\n \\k<title>\n )?\n \\)\n )\n )\n )\n | \\k<open>\\k<open> # Must be bold closer\n | (?!(?<=\\S)\\k<open>). # Everything besides\n # style closer\n )++\n (?<=\\S)(?=_\\b|\\*)\\k<open> # Close\n )\n", "captures": { "1": { "name": "punctuation.definition.italic.markdown" } }, "end": "(?<=\\S)(\\1)((?!\\1)|(?=\\1\\1))", "name": "markup.italic.markdown", "patterns": [ { "applyEndPatternLast": 1, "begin": "(?=<[^>]*?>)", "end": "(?<=>)", "patterns": [ { "include": "text.html.derivative" } ] }, { "include": "#escape" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#raw" }, { "include": "#bold" }, { "include": "#image-inline" }, { "include": "#link-inline" }, { "include": "#link-inet" }, { "include": "#link-email" }, { "include": "#image-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref" }, { "include": "#link-ref-shortcut" }, { "include": "#strikethrough" } ] }, "link-email": { "captures": { "1": { "name": "punctuation.definition.link.markdown" }, "2": { "name": "markup.underline.link.markdown" }, "4": { "name": "punctuation.definition.link.markdown" } }, "match": "(<)((?:mailto:)?[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*)(>)", "name": "meta.link.email.lt-gt.markdown" }, "link-inet": { "captures": { "1": { "name": "punctuation.definition.link.markdown" }, "2": { "name": "markup.underline.link.markdown" }, "3": { "name": "punctuation.definition.link.markdown" } }, "match": "(<)((?:https?|ftp)://.*?)(>)", "name": "meta.link.inet.markdown" }, "link-inline": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "4": { "name": "punctuation.definition.link.title.end.markdown" }, "5": { "name": "punctuation.definition.metadata.markdown" }, "7": { "name": "punctuation.definition.link.markdown" }, "8": { "name": "markup.underline.link.markdown" }, "9": { "name": "punctuation.definition.link.markdown" }, "10": { "name": "markup.underline.link.markdown" }, "12": { "name": "string.other.link.description.title.markdown" }, "13": { "name": "punctuation.definition.string.begin.markdown" }, "14": { "name": "punctuation.definition.string.end.markdown" }, "15": { "name": "string.other.link.description.title.markdown" }, "16": { "name": "punctuation.definition.string.begin.markdown" }, "17": { "name": "punctuation.definition.string.end.markdown" }, "18": { "name": "string.other.link.description.title.markdown" }, "19": { "name": "punctuation.definition.string.begin.markdown" }, "20": { "name": "punctuation.definition.string.end.markdown" }, "21": { "name": "punctuation.definition.metadata.markdown" } }, "match": "(?x)\n (\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\n # Match the link text.\n (\\() # Opening paren for url\n # The url\n [ \\t]*\n (\n (<)([^<>\\n]*)(>)\n | ((?<url>(?>[^\\s()]+)|\\(\\g<url>*\\))*)\n )\n [ \\t]*\n # The title \n (?:\n ((\\()[^()]*(\\))) # Match title in parens…\n | ((\")[^\"]*(\")) # or in double quotes…\n | ((')[^']*(')) # or in single quotes.\n )? # Title is optional\n \\s* # Optional whitespace\n (\\))\n", "name": "meta.link.inline.markdown" }, "link-ref": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "4": { "name": "punctuation.definition.link.title.end.markdown" }, "5": { "name": "punctuation.definition.constant.begin.markdown" }, "6": { "name": "constant.other.reference.link.markdown" }, "7": { "name": "punctuation.definition.constant.end.markdown" } }, "match": "(?<![\\]\\\\])(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])(\\[)([^\\]]*+)(\\])", "name": "meta.link.reference.markdown" }, "link-ref-literal": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "4": { "name": "punctuation.definition.link.title.end.markdown" }, "5": { "name": "punctuation.definition.constant.begin.markdown" }, "6": { "name": "punctuation.definition.constant.end.markdown" } }, "match": "(?<![\\]\\\\])(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])[ ]?(\\[)(\\])", "name": "meta.link.reference.literal.markdown" }, "link-ref-shortcut": { "captures": { "1": { "name": "punctuation.definition.link.title.begin.markdown" }, "2": { "name": "string.other.link.title.markdown" }, "3": { "name": "punctuation.definition.link.title.end.markdown" } }, "match": "(?<![\\]\\\\])(\\[)(\\S+?)(\\])", "name": "meta.link.reference.markdown" }, "raw": { "captures": { "1": { "name": "punctuation.definition.raw.markdown" }, "3": { "name": "punctuation.definition.raw.markdown" } }, "match": "(`+)((?:[^`]|(?!(?<!`)\\1(?!`))`)*+)(\\1)", "name": "markup.inline.raw.string.markdown" }, "strikethrough": { "captures": { "1": { "name": "punctuation.definition.strikethrough.markdown" }, "2": { "patterns": [ { "applyEndPatternLast": 1, "begin": "(?=<[^>]*?>)", "end": "(?<=>)", "patterns": [ { "include": "text.html.derivative" } ] }, { "include": "#escape" }, { "include": "#ampersand" }, { "include": "#bracket" }, { "include": "#raw" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#image-inline" }, { "include": "#link-inline" }, { "include": "#link-inet" }, { "include": "#link-email" }, { "include": "#image-ref" }, { "include": "#link-ref-literal" }, { "include": "#link-ref" }, { "include": "#link-ref-shortcut" } ] }, "3": { "name": "punctuation.definition.strikethrough.markdown" } }, "match": "(~{2,})((?:[^~]|(?!(?<!~)\\1(?!~))~)*+)(\\1)", "name": "markup.strikethrough.markdown" } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mask.tmLanguage.json ================================================ { "fileTypes": ["mask"], "name": "Mask", "patterns": [ { "include": "#comments" }, { "include": "#punctuation" }, { "include": "#literal-string" }, { "include": "#decorator" }, { "include": "#import" }, { "include": "#xml_markdown" }, { "include": "#xml_style" }, { "include": "#xml_script" }, { "include": "#xml" }, { "include": "#define" }, { "include": "#tag_javascript" }, { "include": "#tag_var" }, { "include": "#tag_style" }, { "include": "#tag_markdown" }, { "include": "#tag" }, { "include": "#statement" }, { "include": "#node_klass_id" }, { "include": "#node_template" }, { "include": "#node" } ], "repository": { "punctuation": { "match": "([>;\\{\\}])", "name": "meta.group.braces", "patterns": [ { "include": "$self" } ] }, "import": { "end": "(;|(?<=['|\"]))", "name": "import.mask", "begin": "(import)\\b", "beginCaptures": { "1": { "name": "keyword" } }, "patterns": [ { "match": "\\b(sync|async|as|from)\\b", "name": "keyword" }, { "match": "(,)", "name": "punctuation" }, { "include": "#literal-string" } ] }, "xml_style": { "end": "(?i)</style[^\\>]*>", "name": "syntax.markdown.mask", "beginCaptures": { "0": { "name": "variable.parameter" } }, "patterns": [ { "include": "source.css" } ], "endCaptures": { "0": { "name": "variable.parameter" } }, "begin": "(?i)<style[^\\>]*>" }, "tag_style": { "end": "(?<=\\})|(\\})", "name": "syntax.style.mask", "begin": "(style)\\b", "beginCaptures": { "1": { "name": "support.constant" } }, "patterns": [ { "include": "#klass_id" }, { "include": "#node_attribute" }, { "include": "#style" } ] }, "tag_var": { "end": "([\\};\\]])|(?<=[\\};\\]])", "name": "var.mask", "begin": "(var)\\b", "beginCaptures": { "1": { "name": "support.constant" } }, "patterns": [ { "include": "source.js" } ] }, "node_klass_id": { "end": "(?<=[>;\\{\\}])|(?=[>;\\{\\}])|([>;\\{\\}])", "name": "node.head.mask", "begin": "(?=[\\.#])", "patterns": [ { "include": "#klass_id" }, { "include": "#node_attribute" } ] }, "js-interpolation": { "patterns": [ { "end": "\\]", "name": "other.interpolated.mask", "begin": "\\[", "patterns": [ { "include": "#js-interpolation" }, { "include": "source.js" } ] } ] }, "interpolation": { "patterns": [ { "match": "(?<!\\\\)(~)([\\w\\.]+)", "name": "markup.italic", "captures": { "1": { "name": "variable.parameter" }, "2": { "name": "other.interpolated.mask" } } }, { "end": "\\]", "name": "markup.italic", "beginCaptures": { "0": { "name": "variable.parameter" } }, "patterns": [ { "match": "(\\s*\\w*\\s*:)", "name": "keyword.util.mask" }, { "include": "#js-interpolation" }, { "include": "source.js" } ], "endCaptures": { "0": { "name": "variable.parameter" } }, "begin": "(~\\[)" } ] }, "literal-string": { "patterns": [ { "end": "(''')", "name": "literal-string", "beginCaptures": { "0": { "name": "string.quoted.single.js" } }, "patterns": [ { "include": "#string-content" } ], "endCaptures": { "0": { "name": "string.quoted.single.js" } }, "begin": "(''')" }, { "end": "(\"\"\")", "name": "literal-string", "beginCaptures": { "0": { "name": "string.quoted.single.js" } }, "patterns": [ { "include": "#string-content" } ], "endCaptures": { "0": { "name": "string.quoted.single.js" } }, "begin": "(\"\"\")" }, { "end": "(')", "name": "literal-string", "beginCaptures": { "0": { "name": "string.quoted.single.js" } }, "patterns": [ { "include": "#string-content" } ], "endCaptures": { "0": { "name": "string.quoted.single.js" } }, "begin": "(')" }, { "end": "(\")", "name": "literal-string", "beginCaptures": { "0": { "name": "string.quoted.single.js" } }, "patterns": [ { "include": "#string-content" } ], "endCaptures": { "0": { "name": "string.quoted.single.js" } }, "begin": "(\")" } ] }, "xml": { "end": "(?<=</\\1>)", "name": "syntax.html.mask", "begin": "(?=</?\\s*(\\w+))", "patterns": [ { "end": "(</mask>)", "begin": "(<mask>)", "patterns": [ { "include": "source.mask" } ] }, { "include": "text.html.basic" }, { "include": "#xml" } ] }, "node_attribute_value": { "patterns": [ { "match": "(true|false)(?=[\\s>;\\{])", "name": "constant.character" }, { "match": "([\\d\\.]+)(?=[\\s>;\\{])", "name": "constant.numeric" }, { "include": "#literal-string" }, { "match": "((\\s*)[^\\s>;\\{]+)", "name": "string.quoted" } ] }, "define": { "end": "(?<=[>;\\{\\}])|(?=[>;\\{\\}])|([>;\\{\\}])", "name": "define.mask", "begin": "((define|let)\\b)", "beginCaptures": { "1": { "name": "support.constant" } }, "patterns": [ { "match": "(as|extends)\\b", "name": "keyword" }, { "match": "(,)", "name": "punctuation" }, { "match": "([\\w_\\-:]+)", "name": "entity.other.attribute-name" }, { "match": "(\\([^\\)]*\\))", "name": "variable.parameter" } ] }, "decorator": { "end": "(\\])", "endCaptures": { "1": { "name": "keyword" } }, "begin": "(\\[)", "beginCaptures": { "1": { "name": "keyword" } }, "patterns": [ { "include": "source.js" } ] }, "tag": { "end": "(?<=[>;\\{\\}])|(?=[>;\\{\\}])|([>;\\{\\}])", "name": "tag.mask", "begin": "(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|video|wbr|xmp)(?=[\\s.#;\\{\\}]|$)", "beginCaptures": { "1": { "name": "storage.type.mask" } }, "patterns": [ { "include": "#node_attributes" } ] }, "markdown": { "end": "('''|\"\"\")", "name": "syntax.markdown.mask", "beginCaptures": { "1": { "name": "variable.parameter" } }, "patterns": [ { "include": "text.html.markdown" } ], "endCaptures": { "1": { "name": "variable.parameter" } }, "begin": "((\\{|>)\\s*('''|\"\"\"))" }, "node_template": { "end": "(?<=[>;\\{\\}])|(?=[>;\\{\\}])|([>;\\{\\}])", "name": "node.mask", "begin": "(@[^\\s\\.#;>\\{]+)", "beginCaptures": { "0": { "name": "variable.parameter.mask" } }, "patterns": [ { "include": "#klass_id" }, { "include": "#node_attribute" } ] }, "js-block": { "patterns": [ { "end": "\\}", "name": "other.interpolated.mask", "begin": "\\{", "patterns": [ { "include": "#js-block" }, { "include": "source.js" } ] } ] }, "statement": { "end": "(?<=[>;\\{\\}])|(?=[>;\\{\\}])|([>;\\{\\}])", "name": "tag.mask", "begin": "(if|else|with|each|for|switch|case|\\+if|\\+with|\\+each|\\+for|debugger|log|script|\\:import|\\:template|include)(?=[\\s.#;\\{\\}]|$)", "beginCaptures": { "1": { "name": "support.constant" } }, "patterns": [ { "include": "#node_attributes" } ] }, "node_attribute": { "name": "node.attribute.mask", "patterns": [ { "include": "#comments" }, { "name": "attribute-expression", "include": "#expression" }, { "end": "([\\s;>\\{])", "name": "attribute-key-value", "begin": "([\\w_\\-$]+)(\\s*=\\s*)", "beginCaptures": { "1": { "name": "entity.other.attribute-name" }, "2": { "name": "keyword.operator.assignment" } }, "patterns": [ { "include": "#node_attribute_value" } ] }, { "match": "([\\w_\\-$:]+)(?=([\\s;>\\{])|$)", "name": "entity.other.attribute-name" } ] }, "tag_markdown": { "end": "(?<=\\})|(\\})", "name": "syntax.markdown.mask", "begin": "(md|markdown)\\b", "beginCaptures": { "1": { "name": "support.constant" } }, "patterns": [ { "include": "#klass_id" }, { "include": "#node_attribute" }, { "include": "#markdown" } ] }, "comments": { "patterns": [ { "end": "\\*/", "name": "comment.block.js", "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.js" } } }, { "match": "(//).*$\\n?", "name": "comment.line.double-slash.js", "captures": { "1": { "name": "punctuation.definition.comment.js" } } } ] }, "node_attributes": { "end": "(?<=[>;\\{\\}])", "name": "node.attributes.mask", "begin": "", "patterns": [ { "include": "#klass_id" }, { "include": "#node_attribute" } ] }, "tag_javascript": { "end": "(\\})|(?<=\\})", "name": "slot.mask", "begin": "(slot|pipe|event|function|script)\\b", "beginCaptures": { "1": { "name": "support.constant" } }, "patterns": [ { "match": "\\b(static|private|public|async|self)\\b", "name": "keyword" }, { "include": "#klass_id" }, { "include": "#node_attribute" }, { "include": "#javascript" } ] }, "xml_markdown": { "end": "(?i)</markdown[^\\>]*>", "name": "syntax.markdown.mask", "beginCaptures": { "0": { "name": "variable.parameter" } }, "patterns": [ { "include": "text.html.markdown" } ], "endCaptures": { "0": { "name": "variable.parameter" } }, "begin": "(?i)<markdown[^\\>]*>" }, "html": { "patterns": [ { "end": "(('''|\"\"\"))", "name": "syntax.html.mask", "beginCaptures": { "1": { "name": "variable.parameter" } }, "patterns": [ { "include": "text.html.basic" } ], "endCaptures": { "1": { "name": "variable.parameter" } }, "begin": "((\\{|>)\\s*('''|\"\"\"))" } ] }, "klass_id": { "end": "(?=[\\s\\.#])", "name": "node-head.attribute.mask", "begin": "([\\.#][\\w_\\-$:]*)", "beginCaptures": { "1": { "name": "entity.other.attribute-name.markup.bold.mask" } }, "patterns": [ { "include": "#interpolation" }, { "match": "(([\\w_\\-$]+)(?=[\\s.#]))", "name": "entity.other.attribute-name.mask" } ] }, "js-expression": { "patterns": [ { "end": "\\)", "name": "other.interpolated.mask", "begin": "\\(", "patterns": [ { "include": "#js-expression" }, { "include": "source.js" } ] } ] }, "javascript": { "patterns": [ { "end": "\\}", "name": "syntax.js.mask", "beginCaptures": { "0": { "name": "variable.parameter" } }, "patterns": [ { "include": "#js-block" }, { "include": "source.js" } ], "endCaptures": { "0": { "name": "variable.parameter" } }, "begin": "\\{" } ] }, "xml_script": { "end": "(?i)</script[^\\>]*>", "name": "syntax.markdown.mask", "beginCaptures": { "0": { "name": "variable.parameter" } }, "patterns": [ { "include": "source.js" } ], "endCaptures": { "0": { "name": "variable.parameter" } }, "begin": "(?i)<script[^\\>]*>" }, "string-content": { "patterns": [ { "match": "\\\\(x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|.)", "name": "constant.character.escape.js" }, { "include": "#interpolation" }, { "match": "(.)", "name": "string" } ] }, "node": { "end": "(?<=[>;\\{\\}])|(?=[>;\\{\\}])|([>;\\{\\}])", "name": "node.mask", "begin": "([^\\s\\.#;>\\{\\(]+)", "beginCaptures": { "0": { "name": "entity.name.tag.mask" } }, "patterns": [ { "include": "#node_attributes" } ] }, "style": { "patterns": [ { "end": "(\\})", "name": "syntax.style.mask", "beginCaptures": { "1": { "name": "variable.parameter" } }, "patterns": [ { "include": "source.css" } ], "endCaptures": { "1": { "name": "variable.parameter" } }, "begin": "(\\{)" } ] }, "node_attribute_expression": { "end": "(\\))", "name": "meta.group.braces.round", "begin": "(\\()", "patterns": [ { "include": "#js-expression" } ] }, "expression": { "patterns": [ { "end": "\\)", "name": "markup.italic", "beginCaptures": { "0": { "name": "variable.parameter" } }, "patterns": [ { "include": "#js-expression" }, { "include": "source.js" } ], "endCaptures": { "0": { "name": "variable.parameter" } }, "begin": "(\\()" } ] } }, "scopeName": "source.mask", "uuid": "1a1ae218-751e-4eb8-8c10-4400d892a660" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/matlab.tmLanguage.json ================================================ { "fileTypes": ["m"], "keyEquivalent": "^~M", "name": "matlab", "patterns": [ { "comment": "This and #all_after_command_dual are split out so #command_dual can be excluded in things like (), {}, []", "include": "#all_before_command_dual" }, { "include": "#command_dual" }, { "include": "#all_after_command_dual" } ], "repository": { "all_before_command_dual": { "patterns": [ { "include": "#classdef" }, { "include": "#function" }, { "include": "#blocks" }, { "include": "#control_statements" }, { "include": "#global_persistent" }, { "include": "#parens" }, { "include": "#square_brackets" }, { "include": "#indexing_curly_brackets" }, { "include": "#curly_brackets" } ] }, "all_after_command_dual": { "patterns": [ { "include": "#string" }, { "include": "#line_continuation" }, { "include": "#comments" }, { "include": "#conjugate_transpose" }, { "include": "#transpose" }, { "include": "#constants" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#operators" } ] }, "blocks": { "patterns": [ { "begin": "\\s*(?:^|[\\s,;])(for)\\b", "beginCaptures": { "1": { "name": "keyword.control.for.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.for.matlab" } }, "name": "meta.for.matlab", "patterns": [ { "include": "$self" } ] }, { "begin": "\\s*(?:^|[\\s,;])(if)\\b", "beginCaptures": { "1": { "name": "keyword.control.if.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.if.matlab" }, "2": { "patterns": [ { "include": "$self" } ] } }, "name": "meta.if.matlab", "patterns": [ { "captures": { "2": { "name": "keyword.control.elseif.matlab" }, "3": { "patterns": [ { "include": "$self" } ] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(elseif)\\b(.*)$\\n?", "name": "meta.elseif.matlab" }, { "captures": { "2": { "name": "keyword.control.else.matlab" }, "3": { "patterns": [ { "include": "$self" } ] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(else)\\b(.*)?$\\n?", "name": "meta.else.matlab" }, { "include": "$self" } ] }, { "begin": "\\s*(?:^|[\\s,;])(parfor)\\b", "beginCaptures": { "1": { "name": "keyword.control.for.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.for.matlab" } }, "name": "meta.parfor.matlab", "patterns": [ { "begin": "\\G(?!$)", "end": "$\\n?", "name": "meta.parfor-quantity.matlab", "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] }, { "begin": "\\s*(?:^|[\\s,;])(spmd)\\b", "beginCaptures": { "1": { "name": "keyword.control.spmd.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.spmd.matlab" } }, "name": "meta.spmd.matlab", "patterns": [ { "begin": "\\G(?!$)", "end": "$\\n?", "name": "meta.spmd-statement.matlab", "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] }, { "begin": "\\s*(?:^|[\\s,;])(switch)\\b", "beginCaptures": { "1": { "name": "keyword.control.switch.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.switch.matlab" } }, "name": "meta.switch.matlab", "patterns": [ { "captures": { "2": { "name": "keyword.control.case.matlab" }, "3": { "patterns": [ { "include": "$self" } ] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(case)\\b(.*)$\\n?", "name": "meta.case.matlab" }, { "captures": { "2": { "name": "keyword.control.otherwise.matlab" }, "3": { "patterns": [ { "include": "$self" } ] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(otherwise)\\b(.*)?$\\n?", "name": "meta.otherwise.matlab" }, { "include": "$self" } ] }, { "begin": "\\s*(?:^|[\\s,;])(try)\\b", "beginCaptures": { "1": { "name": "keyword.control.try.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.try.matlab" } }, "name": "meta.try.matlab", "patterns": [ { "captures": { "2": { "name": "keyword.control.catch.matlab" }, "3": { "patterns": [ { "include": "$self" } ] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(catch)\\b(.*)?$\\n?", "name": "meta.catch.matlab" }, { "include": "$self" } ] }, { "begin": "\\s*(?:^|[\\s,;])(while)\\b", "beginCaptures": { "1": { "name": "keyword.control.while.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.while.matlab" } }, "name": "meta.while.matlab", "patterns": [ { "include": "$self" } ] } ] }, "classdef": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t(classdef)\n\t\t\t\t\t\t\t\\b\\s*\n\t\t\t\t\t\t\t(.*)\n\t\t\t\t\t", "beginCaptures": { "2": { "name": "storage.type.class.matlab" }, "3": { "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\t \\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\t\t\t# Class name\n\t\t\t\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t\t# Optional inheritance\n\t\t\t\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t\t\t\t(<)\n\t\t\t\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t\t\t\t([^%]*)\n\t\t\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\\s*($|(?=(%|...)).*)\n\t\t\t\t\t\t\t\t\t", "captures": { "1": { "patterns": [ { "match": "[a-zA-Z][a-zA-Z0-9_]*", "name": "variable.parameter.class.matlab" }, { "begin": "=\\s*", "end": ",|(?=\\))", "patterns": [ { "match": "true|false", "name": "constant.language.boolean.matlab" }, { "include": "#string" } ] } ] }, "2": { "name": "meta.class-declaration.matlab" }, "3": { "name": "entity.name.section.class.matlab" }, "4": { "name": "keyword.operator.other.matlab" }, "5": { "patterns": [ { "match": "[a-zA-Z][a-zA-Z0-9_]*(\\.[a-zA-Z][a-zA-Z0-9_]*)*", "name": "entity.other.inherited-class.matlab" }, { "match": "&", "name": "keyword.operator.other.matlab" } ] }, "6": { "patterns": [ { "include": "$self" } ] } } } ] } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.class.matlab" } }, "name": "meta.class.matlab", "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(properties)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", "beginCaptures": { "2": { "name": "keyword.control.properties.matlab" }, "3": { "patterns": [ { "match": "[a-zA-Z][a-zA-Z0-9_]*", "name": "variable.parameter.properties.matlab" }, { "begin": "=\\s*", "end": ",|(?=\\))", "patterns": [ { "match": "true|false", "name": "constant.language.boolean.matlab" }, { "match": "public|protected|private", "name": "constant.language.access.matlab" } ] } ] } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.properties.matlab" } }, "name": "meta.properties.matlab", "patterns": [ { "include": "#validators" }, { "include": "$self" } ] }, { "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(methods)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", "beginCaptures": { "2": { "name": "keyword.control.methods.matlab" }, "3": { "patterns": [ { "match": "[a-zA-Z][a-zA-Z0-9_]*", "name": "variable.parameter.methods.matlab" }, { "begin": "=\\s*", "end": ",|(?=\\))", "patterns": [ { "match": "true|false", "name": "constant.language.boolean.matlab" }, { "match": "public|protected|private", "name": "constant.language.access.matlab" } ] } ] } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.methods.matlab" } }, "name": "meta.methods.matlab", "patterns": [ { "include": "$self" } ] }, { "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(events)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", "beginCaptures": { "2": { "name": "keyword.control.events.matlab" }, "3": { "patterns": [ { "match": "[a-zA-Z][a-zA-Z0-9_]*", "name": "variable.parameter.events.matlab" }, { "begin": "=\\s*", "end": ",|(?=\\))", "patterns": [ { "match": "true|false", "name": "constant.language.boolean.matlab" }, { "match": "public|protected|private", "name": "constant.language.access.matlab" } ] } ] } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.events.matlab" } }, "name": "meta.events.matlab", "patterns": [ { "include": "$self" } ] }, { "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(enumeration)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", "beginCaptures": { "2": { "name": "keyword.control.enumeration.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.enumeration.matlab" } }, "name": "meta.enumeration.matlab", "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] } ] }, "command_dual": { "captures": { "1": { "name": "string.interpolated.matlab" }, "2": { "name": "variable.other.command.matlab" }, "28": { "name": "comment.line.percentage.matlab" } }, "comment": " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1516 17 18 19 20 21 22 23 24 25 26 27 28", "match": "^\\s*((?# A> )([b-df-hk-moq-zA-HJ-MO-Z]\\w*|a|an|a([A-Za-mo-z0-9_]\\w*|n[A-Za-rt-z0-9_]\\w*|ns\\w+)|e|ep|e([A-Za-oq-z0-9_]\\w*|p[A-Za-rt-z0-9_]\\w*|ps\\w+)|in|i([A-Za-mo-z0-9_]\\w*|n[A-Za-eg-z0-9_]\\w*|nf\\w+)|I|In|I([A-Za-mo-z0-9_]\\w*|n[A-Za-eg-z0-9_]\\w*|nf\\w+)|j\\w+|N|Na|N([A-Zb-z0-9_]\\w*|a[A-MO-Za-z0-9_]\\w*|aN\\w+)|n|na|nar|narg|nargi|nargo|nargou|n([A-Zb-z0-9_]\\w*|a([A-Za-mo-qs-z0-9_]\\w*|n\\w+|r([A-Za-fh-z0-9_]\\w*|g([A-Za-hj-nq-z0-9_]\\w*|i([A-Za-mo-z0-9_]\\w*|n\\w+)|o([A-Za-tv-z0-9_]\\w*|u([A-Za-su-z]\\w*|t\\w+))))))|p|p[A-Za-hj-z0-9_]\\w*|pi\\w+)(?# <A )\\s+(((?# B> )([^\\s;,%()=.{&|~<>:+\\-*/\\\\@^'\"]|(?=')|(?=\"))(?# <B )|(?# C> )(\\.\\^|\\.\\*|\\./|\\.\\\\|\\.'|\\.\\(|&&|==|\\|\\||&(?=[^&])|\\|(?=[^\\|])|~=|<=|>=|~(?!=)|<(?!=)|>(?!=)|:|\\+|-|\\*|/|\\\\|@|\\^)(?# <C )(?# D> )([^\\s]|\\s*(?=%)|\\s+$|\\s+(,|;|\\)|}|\\]|&|\\||<|>|=|:|\\*|/|\\\\|\\^|@|(\\.[^\\d.]|\\.\\.[^.])))(?# <D )|(?# E> )(\\.[^^*/\\\\'(\\sA-Za-z])(?# <E ))(?# F> )([^%]|'[^']*'|\"[^\"]*\")*(?# <F )|(?# X> )(\\.(?=\\s)|\\.[A-Za-z]|(?={))(?# <X )(?# Y> )([^(=\\'\"%]|==|'[^']*'|\"[^\"]*\"|\\(|\\([^)%]*\\)|\\[|\\[[^\\]%]*\\]|{|{[^}%]*})*(\\.\\.\\.[^%]*)?((?=%)|$)(?# <Y )))(%.*)?$" }, "comment_block": { "begin": "(^[\\s]*)%\\{[^\\n\\S]*+\\n", "beginCaptures": { "1": { "name": "punctuation.definition.comment.matlab" } }, "end": "^[\\s]*%\\}[^\\n\\S]*+(?:\\n|$)", "name": "comment.block.percentage.matlab", "patterns": [ { "include": "#comment_block" }, { "match": "^[^\\n]*\\n" } ] }, "comments": { "patterns": [ { "begin": "(^[ \\t]+)?(?=%%\\s)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.matlab" } }, "end": "(?!\\G)", "patterns": [ { "begin": "%%", "beginCaptures": { "0": { "name": "punctuation.definition.comment.matlab" } }, "end": "\\n", "name": "comment.line.double-percentage.matlab", "patterns": [ { "begin": "\\G[^\\S\\n]*(?![\\n\\s])", "contentName": "meta.cell.matlab", "end": "(?=\\n)" } ] } ] }, { "include": "#comment_block" }, { "begin": "(^[ \\t]+)?(?=%)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.matlab" } }, "end": "(?!\\G)", "patterns": [ { "begin": "%", "beginCaptures": { "0": { "name": "punctuation.definition.comment.matlab" } }, "end": "\\n", "name": "comment.line.percentage.matlab" } ] } ] }, "control_statements": { "captures": { "1": { "name": "keyword.control.matlab" } }, "match": "\\s*(?:^|[\\s,;])(break|continue|return)\\b", "name": "meta.control.matlab" }, "function": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t(function)\n\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t\t\t\t\t\t\t# Optional\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t(\\[) ([^\\]]*) (\\])\n\t\t\t\t\t\t\t\t | ([a-zA-Z][a-zA-Z0-9_]*)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\\s* = \\s*\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*(\\.[a-zA-Z][a-zA-Z0-9_]*)*)\t# Function name\n\t\t\t\t\t\t\t\\s*\t\t\t\t\t\t\t\t\t\t\t\t\t# Trailing space\n\t\t\t\t\t\t", "beginCaptures": { "2": { "name": "storage.type.function.matlab" }, "3": { "name": "punctuation.definition.arguments.begin.matlab" }, "4": { "patterns": [ { "match": "\\w+", "name": "variable.parameter.output.matlab" } ] }, "5": { "name": "punctuation.definition.arguments.end.matlab" }, "6": { "name": "variable.parameter.output.function.matlab" }, "7": { "name": "entity.name.function.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b(\\s*\\n)?", "endCaptures": { "1": { "name": "keyword.control.end.function.matlab" } }, "name": "meta.function.matlab", "patterns": [ { "begin": "\\G\\(", "end": "\\)", "name": "meta.arguments.function.matlab", "patterns": [ { "include": "#line_continuation" }, { "match": "\\w+", "name": "variable.parameter.input.matlab" } ] }, { "begin": "(?x)\n\t\t\t\t\t\t\t\t\t(^\\s*)\t\t\t\t\t\t\t\t# Leading whitespace\n\t\t\t\t\t\t\t\t\t(arguments)\\b([^%]*)\n\t\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# Optional attributes\n\t\t\t\t\t\t\t\t\t\t\\( [^)]* \\)\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*($|(?=%))\n\t\t\t\t\t\t\t\t", "beginCaptures": { "2": { "name": "keyword.control.arguments.matlab" }, "3": { "patterns": [ { "match": "[a-zA-Z][a-zA-Z0-9_]*", "name": "variable.parameter.arguments.matlab" } ] } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.arguments.matlab" } }, "name": "meta.arguments.matlab", "patterns": [ { "include": "#validators" }, { "include": "$self" } ] }, { "include": "$self" } ] } ] }, "global_persistent": { "captures": { "1": { "name": "keyword.control.globalpersistent.matlab" } }, "match": "^\\s*(global|persistent)\\b", "name": "meta.globalpersistent.matlab" }, "parens": { "begin": "\\(", "end": "(\\)|(?<!\\.\\.\\.).\\n)", "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", "patterns": [ { "include": "#end_in_parens" }, { "include": "#all_before_command_dual" }, { "include": "#all_after_command_dual" }, { "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", "include": "#block_keywords" } ] }, "square_brackets": { "begin": "\\[", "end": "\\]", "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", "patterns": [ { "include": "#all_before_command_dual" }, { "include": "#all_after_command_dual" }, { "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", "include": "#block_keywords" } ] }, "curly_brackets": { "begin": "\\{", "end": "\\}", "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", "patterns": [ { "include": "#end_in_parens" }, { "include": "#all_before_command_dual" }, { "include": "#all_after_command_dual" }, { "include": "#end_in_parens" }, { "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", "include": "#block_keywords" } ] }, "indexing_curly_brackets": { "Comment": "Match identifier{idx, idx, } and stop at newline without ... This helps with partially written code like x{idx ", "begin": "([a-zA-Z][a-zA-Z0-9_\\.]*\\s*)\\{", "beginCaptures": { "1": { "patterns": [ { "include": "$self" } ] } }, "end": "(\\}|(?<!\\.\\.\\.).\\n)", "comment": "We don't include $self here to avoid matching command syntax inside (), [], {}", "patterns": [ { "include": "#end_in_parens" }, { "include": "#all_before_command_dual" }, { "include": "#all_after_command_dual" }, { "include": "#end_in_parens" }, { "comment": "These block keywords pick up any such missed keywords when the block matching for things like (), if-end, etc. don't work. Useful for when someone has partially written", "include": "#block_keywords" } ] }, "line_continuation": { "captures": { "1": { "name": "keyword.operator.symbols.matlab" }, "2": { "name": "comment.line.continuation.matlab" } }, "comment": "Line continuations", "match": "(\\.\\.\\.)(.*)$", "name": "meta.linecontinuation.matlab" }, "string": { "patterns": [ { "captures": { "1": { "name": "string.interpolated.matlab" }, "2": { "name": "punctuation.definition.string.begin.matlab" } }, "comment": "Shell command", "match": "^\\s*((!).*$\\n?)" }, { "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.matlab" } }, "comment": "Character vector literal (single-quoted)", "end": "'(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\s|;|:|,))", "endCaptures": { "0": { "name": "punctuation.definition.string.end.matlab" } }, "name": "string.quoted.single.matlab", "patterns": [ { "match": "''", "name": "constant.character.escape.matlab" }, { "match": "'(?=.)", "name": "invalid.illegal.unescaped-quote.matlab" }, { "comment": "Operator symbols", "match": "((\\%([\\+\\-0]?\\d{0,3}(\\.\\d{1,3})?)(c|d|e|E|f|g|G|s|((b|t)?(o|u|x|X))))|\\%\\%|\\\\(b|f|n|r|t|\\\\))", "name": "constant.character.escape.matlab" } ] }, { "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.matlab" } }, "comment": "String literal (double-quoted)", "end": "\"(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\||\\s|;|:|,))", "endCaptures": { "0": { "name": "punctuation.definition.string.end.matlab" } }, "name": "string.quoted.double.matlab", "patterns": [ { "match": "\"\"", "name": "constant.character.escape.matlab" }, { "match": "\"(?=.)", "name": "invalid.illegal.unescaped-quote.matlab" } ] } ] }, "conjugate_transpose": { "match": "((?<=[^\\s])|(?<=\\])|(?<=\\))|(?<=\\}))'", "name": "keyword.operator.transpose.matlab" }, "transpose": { "match": "\\.'", "name": "keyword.operator.transpose.matlab" }, "constants": { "comment": "MATLAB Constants", "match": "(?<!\\.)\\b(eps|false|Inf|inf|intmax|intmin|namelengthmax|NaN|nan|on|off|realmax|realmin|true|pi)\\b", "name": "constant.language.matlab" }, "variables": { "comment": "MATLAB variables", "match": "(?<!\\.)\\b(nargin|nargout|varargin|varargout)\\b", "name": "variable.other.function.matlab" }, "end_in_parens": { "comment": "end as operator symbol", "match": "\\bend\\b", "name": "keyword.operator.symbols.matlab" }, "numbers": { "comment": "Valid numbers: 1, .1, 1.1, .1e1, 1.1e1, 1e1, 1i, 1j, 1e2j", "match": "(?<=[\\s\\-\\+\\*\\/\\\\=:\\[\\(\\{,]|^)\\d*\\.?\\d+([eE][+-]?\\d)?([0-9&&[^\\.]])*(i|j)?\\b", "name": "constant.numeric.matlab" }, "operators": { "comment": "Operator symbols", "match": "(?<=\\s)(==|~=|>|>=|<|<=|&|&&|:|\\||\\|\\||\\+|-|\\*|\\.\\*|/|\\./|\\\\|\\.\\\\|\\^|\\.\\^)(?=\\s)", "name": "keyword.operator.symbols.matlab" }, "validators": { "comment": "Property and argument validation. Match an identifier allowing . and ?.", "begin": "\\s*[;]?\\s*([a-zA-Z][a-zA-Z0-9_\\.\\?]*)", "end": "([;\\n%=].*)", "endCaptures": { "1": { "patterns": [ { "comment": "Match comments", "match": "([%].*)", "captures": { "1": { "patterns": [ { "include": "$self" } ] } } }, { "comment": "Handle things like arg = val; nextArg", "match": "(=[^;]*)", "captures": { "1": { "patterns": [ { "include": "$self" } ] } } }, { "comment": "End of property/argument patterns which start a new property/argument. Look for beginning of identifier after semicolon. Otherwise treat as regular code.", "match": "([\\n;]\\s*[a-zA-Z].*)", "captures": { "1": { "patterns": [ { "include": "#validators" } ] } } }, { "include": "$self" } ] } }, "patterns": [ { "include": "#line_continuation" }, { "comment": "Size declaration", "match": "\\s*(\\([^\\)]*\\))", "name": "storage.type.matlab" }, { "comment": "Type declaration", "match": "([a-zA-Z][a-zA-Z0-9_\\.]*)", "name": "storage.type.matlab" }, { "include": "#braced_validator_list" } ] }, "braced_validator_list": { "comment": "Validator functions. Treated as a recursive group to permit nested brackets, quotes, etc.", "begin": "\\s*({)\\s*", "beginCaptures": { "1": { "name": "storage.type.matlab" } }, "end": "(})", "endCaptures": { "1": { "name": "storage.type.matlab" } }, "patterns": [ { "include": "#braced_validator_list" }, { "include": "#validator_strings" }, { "include": "#line_continuation" }, { "match": "([^{}}'\"\\.]+)", "captures": { "1": { "name": "storage.type.matlab" } } }, { "match": "\\.", "name": "storage.type.matlab" } ] }, "validator_strings": { "comment": "Simplified string patterns nested inside validator functions which don't change scopes of matches.", "patterns": [ { "patterns": [ { "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)'", "comment": "Character vector literal (single-quoted)", "end": "'(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\s|;|:|,))", "name": "storage.type.matlab", "patterns": [ { "match": "''" }, { "match": "'(?=.)" }, { "match": "([^']+)" } ] }, { "begin": "((?<=(\\[|\\(|\\{|=|\\s|;|:|,|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^))|^)\"", "comment": "String literal (double-quoted)", "end": "\"(?=(\\[|\\(|\\{|\\]|\\)|\\}|=|~|<|>|&|\\||-|\\+|\\*|/|\\\\|\\.|\\^|\\||\\s|;|:|,))", "name": "storage.type.matlab", "patterns": [ { "match": "\"\"" }, { "match": "\"(?=.)" }, { "match": "[^\"]+" } ] } ] } ] } }, "scopeName": "source.matlab", "uuid": "48F8858B-72FF-11D9-BFEE-000D93589AF6" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mediawiki.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "MediaWiki", "scopeName": "text.html.mediawiki", "fileTypes": ["mediawiki", "wiki"], "patterns": [ { "include": "#variable" }, { "include": "#comment" }, { "include": "#switch" }, { "include": "#redirect" }, { "include": "#entity" }, { "include": "#emphasis" }, { "include": "#tag" }, { "include": "#table" }, { "include": "#hr" }, { "include": "#heading" }, { "include": "#link" }, { "include": "#list" }, { "include": "#template" } ], "repository": { "hr": { "patterns": [{ "name": "markup.bold", "match": "^[-]{4,}" }] }, "variable": { "patterns": [ { "name": "storage.type.variable", "begin": "{{{", "end": "}}}", "patterns": [ { "match": "\\s*(\\w+)\\s*(\\|)?", "captures": { "1": { "name": "variable.other" }, "2": { "name": "keyword.operator" } } } ] } ] }, "switch": { "patterns": [ { "name": "constant.language", "match": "__NOTOC__|__FORCETOC__|__TOC__|__NOEDITSECTION__|__NEWSECTIONLINK__|__NONEWSECTIONLINK__|__NOWYSIWYG__|__NOGALLERY__|__HIDDENCAT__|__EXPECTUNUSEDCATEGORY__|__NOCONTENTCONVERT__|__NOCC__|__NOTITLECONVERT__|__NOTC__|__START__|__END__|__INDEX__|__NOINDEX__|__STATICREDIRECT__|__NOGLOBAL__|__DISAMBIG__" } ] }, "redirect": { "patterns": [ { "match": "(^#REDIRECT|^#redirect|^#Redirect)(\\s+)", "captures": { "1": { "name": "keyword.control.redirect" }, "2": { "name": "meta.keyword.control" } } } ] }, "entity": { "patterns": [{ "name": "constant.character.entity", "match": "&\\w+;" }] }, "list": { "patterns": [ { "name": "markup.list", "begin": "^([#*;:]+)", "end": "$", "beginCaptures": { "1": { "name": "markup.bold" } }, "patterns": [{ "include": "$self" }] } ] }, "template": { "patterns": [ { "name": "meta.template", "begin": "({{)\\s*([\\w ]+)\\s*", "end": "}}", "beginCaptures": { "1": { "name": "storage.type.function" }, "2": { "name": "entity.name.function" } }, "endCaptures": { "0": { "name": "storage.type.function" } }, "patterns": [ { "name": "meta.structure.dictionary", "begin": "(\\|)\\s*([a-zA-Z-]*)\\s*(=)\\s*([^|}]*)", "end": "(?=}}|[|])", "beginCaptures": { "1": { "name": "storage" }, "2": { "name": "support.type.property-name" }, "3": { "name": "punctuation.separator.dictionary.key-value.mediawiki" }, "4": { "name": "meta.structure.dictionary.value", "patterns": [{ "include": "$self" }] } } }, { "name": "meta.template.value", "begin": "(\\|)(.*?)", "end": "(?=}}|[|])", "captures": { "1": { "name": "storage" } }, "patterns": [{ "include": "$self" }] } ] } ] }, "link": { "patterns": [ { "name": "meta.tag.link.internal", "begin": "(\\[\\[)\\s*(Category|Wikipedia)?:?([^\\]\\]\\|]+)\\s*(\\|)*", "end": "\\]\\]", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag.mediawiki" }, "3": { "name": "string.other.link.title.mediawiki" }, "4": { "name": "punctuation.definition.tag" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end" } }, "contentName": "string.unquoted", "patterns": [{ "include": "$self" }] }, { "name": "meta.tag.link.external", "match": "(\\[)(.*?)[\\s]+(.*?)(\\])", "captures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "patterns": [{ "include": "#url" }] }, "3": { "name": "string.unquoted" }, "4": { "name": "punctuation.definition.tag.end" } } } ] }, "comment": { "name": "comment.block.html", "begin": "<!--", "end": "-->", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "patterns": [ { "match": "\\G-?>", "name": "invalid.illegal.characters-not-allowed-here.html" }, { "match": "<!--(?!>)|<!-(?=-->)", "name": "invalid.illegal.characters-not-allowed-here.html" }, { "match": "--!>", "name": "invalid.illegal.characters-not-allowed-here.html" } ] }, "emphasis": { "patterns": [ { "match": "(''''')(?!')((.*?))('''''|$)", "captures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "markup.bold" }, "3": { "name": "markup.italic" }, "4": { "name": "punctuation.definition.tag.end" } } }, { "match": "(''')(?!')(.*?)('''|$)", "captures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "markup.bold" }, "3": { "name": "punctuation.definition.tag.end" } } }, { "match": "('')(?!')(.*?)(''|$)", "captures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "markup.italic" }, "3": { "name": "punctuation.definition.tag.end" } } } ] }, "heading": { "name": "markup.heading", "patterns": [ { "name": "markup.heading", "match": "(={1,6})(.+?)(\\1)(?!=)", "captures": { "1": { "name": "punctuation.definition.heading" }, "2": { "name": "entity.name.section.mediawiki" }, "3": { "name": "punctuation.definition.heading" } } } ] }, "tag": { "patterns": [ { "name": "meta.tag.block.ref", "begin": "(?i)(<)(ref)(\\s+.*?)?(>)", "end": "(?i)(<\\/)(ref)\\s*(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag.end" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "$self" }] }, { "name": "meta.tag.block.syntaxhighlight", "begin": "(?i)(<)(syntaxhighlight)\\s+lang\\=(?:\\'|\")(.*?)?(?:\\'|\")(>)", "end": "(?i)(<\\/)(syntaxhighlight)\\s*(>)", "contentName": "meta.embedded.block.$3", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag.end" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "#template" }, { "include": "source.js" }] }, { "name": "meta.tag.block.nowiki", "begin": "(?i)(<)(nowiki)(\\s+.*?)?(>)", "end": "(?i)(<\\/)(nowiki)\\s*(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag.end" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "name": "punctuation.definition.tag.end" } } }, { "name": "meta.tag.block.html", "begin": "(?i)(<)(html)(\\s+.*?)?(>)", "end": "(?i)(<\\/)(html)\\s*(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag.end" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" }, "3": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "text.html.basic" }] }, { "name": "meta.tag.block.any", "begin": "(?i)(<\\/?)(noinclude|includeonly)(?=\\W)", "end": "(\\/)?(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" } }, "endCaptures": { "1": { "name": "invalid.illegal.characters-not-allowed-here" }, "2": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "#attribute" }] }, { "name": "meta.tag.other", "begin": "(?i)(<)(br|wbr|hr|meta|link)(?=\\W)", "end": "(\\/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "#attribute" }] }, { "name": "meta.tag.block", "begin": "(?i)(<\\/?)(div|center|span|h1|h2|h3|h4|h5|h6|bdo|em|strong|cite|dfn|code|samp|kbd|var|abbr|blockquote|q|sub|sup|p|pre|ins|del|ul|ol|li|dl|dd|dt|table|caption|thead|tfoot|tbody|colgroup|col|tr|td|th|a|img|video|source|track|tt|b|i|big|small|strike|s|u|font|ruby|rb|rp|rt|rtc|math|figure|figcaption|bdi|data|time|mark|html)(?=\\W)", "end": "(\\/)?(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "entity.name.tag" } }, "endCaptures": { "1": { "name": "invalid.illegal.characters-not-allowed-here" }, "2": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "#attribute" }] }, { "name": "meta.tag.other", "begin": "(?i)(<\\/)(br|wbr|hr|meta|link)(?=\\W)", "end": "(\\/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "invalid.illegal.characters-not-allowed-here" }, "3": { "name": "entity.name.tag" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.end" } }, "patterns": [{ "include": "#attribute" }] } ] }, "table": { "patterns": [ { "name": "meta.tag.block.table", "begin": "^\\s*({\\|)(.*?)$", "end": "^\\s*\\|}", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "patterns": [{ "include": "#attribute" }] }, "3": { "name": "invalid.illegal" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.end" } }, "patterns": [ { "include": "#comment" }, { "include": "#template" }, { "include": "#caption" }, { "include": "#tr" }, { "include": "#th" }, { "include": "#td" } ] } ], "repository": { "caption": { "name": "meta.tag.block.table-caption", "begin": "^\\s*(\\|\\+)", "end": "$", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" } } }, "tr": { "name": "meta.tag.block.tr", "match": "^\\s*(\\|\\-)[\\s]*(.*)", "captures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "name": "invalid.illegal" } } }, "th": { "name": "meta.tag.block.th.heading", "begin": "^\\s*(!)((.*?)(\\|))?(.*?)(?=(!!)|$)", "end": "$", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag" }, "5": { "name": "markup.bold" } }, "patterns": [ { "name": "meta.tag.block.th.inline", "match": "(!!)((.*?)(\\|))?(.*?)(?=(!!)|$)", "captures": { "1": { "name": "punctuation.definition.tag.begin" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag" }, "5": { "name": "markup.bold" } } }, { "include": "$self" } ] }, "td": { "name": "meta.tag.block.td", "begin": "^\\s*(\\|)", "end": "$", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin" }, "2": { "patterns": [{ "include": "#attribute" }] }, "3": { "name": "punctuation.definition.tag" } }, "patterns": [{ "include": "$self" }] } } }, "attribute": { "patterns": [ { "include": "#string" }, { "name": "entity.other.attribute-name", "match": "\\w+" } ] }, "string": { "patterns": [ { "name": "string.quoted.double", "begin": "\\\"", "end": "\\\"" }, { "name": "string.quoted.single", "begin": "\\'", "end": "\\'" } ] }, "url": { "patterns": [ { "name": "markup.underline.link", "match": "(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:\\/?#\\[\\]@!\\$&'\\(\\)\\*\\+,;=.]+" }, { "name": "invalid.illegal.characters-not-allowed-here", "match": ".*" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mel.tmLanguage.json ================================================ { "foldingStopMarker": "(\\*\\*/|^\\s*\\})", "foldingStartMarker": "(/\\*\\*|\\{\\s*$)", "keyEquivalent": "^~M", "fileTypes": ["mel", "ma", "mel.erb"], "uuid": "69554E52-391D-42BC-9F65-7A77444BA1CF", "patterns": [ { "match": "\\b(matrix|string|vector|float|int|void)\\b", "name": "storage.type.mel" }, { "match": "\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b", "name": "support.function.mel" }, { "match": "\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b", "name": "support.constant.mel" }, { "match": "\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b", "name": "keyword.control.mel" }, { "match": "\\b(global)\\b", "name": "keyword.other.mel" }, { "match": "\\b(null|undefined)\\b", "name": "constant.language.mel" }, { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b", "name": "constant.numeric.mel" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.mel" } }, "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.mel" } ], "name": "string.quoted.double.mel", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.mel" } } }, { "match": "(\\$)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*?\\b", "name": "variable.other.mel", "captures": { "1": { "name": "punctuation.definition.variable.mel" } } }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.mel" } }, "end": "'", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.mel" } ], "name": "string.quoted.single.mel", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.mel" } } }, { "match": "\\b(false|true|yes|no|on|off)\\b", "name": "constant.language.mel" }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.mel", "captures": { "0": { "name": "punctuation.definition.comment.mel" } } }, { "match": "(//).*$\\n?", "name": "comment.line.double-slash.mel", "captures": { "1": { "name": "punctuation.definition.comment.mel" } } }, { "match": "\\b(instanceof)\\b", "name": "keyword.operator.mel" }, { "match": "[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]", "name": "keyword.operator.symbolic.mel" }, { "match": "^[ \\t]*(#)[a-zA-Z]+", "name": "meta.preprocessor.mel", "captures": { "1": { "name": "punctuation.definition.preprocessor.mel" } } }, { "begin": "((?:global\\s*)?proc)\\s*(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)\\s*(\\()", "endCaptures": { "0": { "name": "punctuation.section.function.mel" } }, "end": "\\)", "patterns": [{ "include": "$self" }], "name": "meta.function.mel", "beginCaptures": { "3": { "name": "entity.name.function.mel" }, "1": { "name": "keyword.other.mel" }, "4": { "name": "punctuation.section.function.mel" }, "2": { "name": "storage.type.mel" } } } ], "name": "MEL", "scopeName": "source.mel" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mermaid.tmLanguage.json ================================================ { "fileTypes": ["mermaid"], "patterns": [ { "include": "#mermaid" } ], "repository": { "mermaid": { "patterns": [ { "comment": "Class Diagram", "begin": "^\\s*(classDiagram)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "comment": "(class name) (\"multiplicity relationship\")? (relationship) (\"multiplicity relationship\")? (class name) :? (labelText)?", "match": "([\\w-]+)\\s(\"(?:\\d+|\\*|0..\\d+|1..\\d+|1..\\*)\")?\\s?(--o|--\\*|\\<--|--\\>|<\\.\\.|\\.\\.\\>|\\<\\|\\.\\.|\\.\\.\\|\\>|\\<\\|--|--\\|>|--\\*|--|\\.\\.|\\*--|o--)\\s(\"(?:\\d+|\\*|0..\\d+|1..\\d+|1..\\*)\")?\\s?([\\w-]+)\\s?(:)?\\s(.*)$", "captures": { "1": { "name": "entity.name.type.class.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "entity.name.type.class.mermaid" }, "6": { "name": "keyword.control.mermaid" }, "7": { "name": "string" } } }, { "comment": "(class name) : (visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$", "match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(\\()([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?(\\))([*\\$])?\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$", "captures": { "1": { "name": "entity.name.type.class.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "entity.name.function.mermaid" }, "5": { "name": "punctuation.parenthesis.open.mermaid" }, "6": { "name": "storage.type.mermaid" }, "7": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "8": { "name": "storage.type.mermaid" }, "9": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "10": { "name": "entity.name.variable.parameter.mermaid" }, "11": { "name": "punctuation.parenthesis.closed.mermaid" }, "12": { "name": "keyword.control.mermaid" }, "13": { "name": "storage.type.mermaid" }, "14": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "15": { "name": "storage.type.mermaid" }, "16": { "name": "punctuation.definition.typeparameters.end.mermaid" } } }, { "comment": "(class name) : (visibility)?(datatype/generic data type) (attribute name)$", "match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(~)?([\\w-]+)?(~)?\\s([\\w-]+)?$", "captures": { "1": { "name": "entity.name.type.class.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "storage.type.mermaid" }, "5": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "6": { "name": "storage.type.mermaid" }, "7": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "8": { "name": "entity.name.variable.field.mermaid" } } }, { "comment": "<<(Annotation)>> (class name)", "match": "(<<)([\\w-]+)(>>)\\s?([\\w-]+)?", "captures": { "1": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "2": { "name": "storage.type.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "4": { "name": "entity.name.type.class.mermaid" } } }, { "comment": "class (class name) ~?(generic type)?~? ({)", "begin": "(class)\\s+([\\w-]+)(~)?([\\w-]+)?(~)?\\s?({)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.type.class.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "4": { "name": "storage.type.mermaid" }, "5": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "6": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "comment": "(visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$", "begin": "\\s([\\+~#-])?([\\w-]+)(\\()", "beginCaptures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.function.mermaid" }, "3": { "name": "punctuation.parenthesis.open.mermaid" } }, "patterns": [ { "comment": "(TBD)", "match": "\\s*,?\\s*([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?", "captures": { "1": { "name": "storage.type.mermaid" }, "2": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "3": { "name": "storage.type.mermaid" }, "4": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "5": { "name": "entity.name.variable.parameter.mermaid" } } } ], "end": "(\\))([*\\$])?\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$", "endCaptures": { "1": { "name": "punctuation.parenthesis.closed.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "storage.type.mermaid" }, "4": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "5": { "name": "storage.type.mermaid" }, "6": { "name": "punctuation.definition.typeparameters.end.mermaid" } } }, { "comment": "(visibility)?(datatype/generic data type) (attribute name)$", "match": "\\s([\\+~#-])?([\\w-]+)(~)?([\\w-]+)?(~)?\\s([\\w-]+)?$", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "storage.type.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "4": { "name": "storage.type.mermaid" }, "5": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "6": { "name": "entity.name.variable.field.mermaid" } } }, { "comment": "<<(Annotation)>> (class name)", "match": "(<<)([\\w-]+)(>>)\\s?([\\w-]+)?", "captures": { "1": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "2": { "name": "storage.type.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "4": { "name": "entity.name.type.class.mermaid" } } } ], "end": "(})", "endCaptures": { "1": { "name": "keyword.control.mermaid" } } }, { "comment": "class (class name) ~?(generic type)?~?", "match": "(class)\\s+([\\w-]+)(~)?([\\w-]+)?(~)?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.type.class.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "4": { "name": "storage.type.mermaid" }, "5": { "name": "punctuation.definition.typeparameters.end.mermaid" } } } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" }, { "comment": "Entity Relationship Diagram", "begin": "^\\s*(erDiagram)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "comment": "(entity)", "match": "^\\s*([\\w-]+)$", "name": "variable" }, { "comment": "(entity) {", "begin": "\\s+([\\w-]+)\\s+({)", "beginCaptures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" } }, "patterns": [ { "comment": "(type) (name) (PK|FK)? (\"comment\")?", "match": "\\s*([\\w-]+)\\s+([\\w-]+)\\s+(PK|FK)?\\s*(\"[\"\\($&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*\")?\\s*", "captures": { "1": { "name": "storage.type.mermaid" }, "2": { "name": "variable" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "string" } } } ], "end": "(})", "endCaptures": { "1": { "name": "keyword.control.mermaid" } } }, { "comment": "(entity) (relationship) (entity) : (label)", "match": "\\s*([\\w-]+)\\s+((?:\\|o|\\|\\||}o|}\\|)(?:..|--)(?:o\\||\\|\\||o{|\\|{))\\s+([\\w-]+)\\s+(:)\\s+((?:\"[\\w\\s]*\")|(?:[\\w-]+))", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "variable" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "string" } } } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" }, { "comment": "Gantt Diagram", "begin": "^\\s*(gantt)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "match": "(dateFormat)\\s+([\\w-]+)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.function.mermaid" } } }, { "match": "(axisFormat)\\s+([\\w\\%/-]+)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.function.mermaid" } } }, { "match": "(title)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "string" } } }, { "match": "(section)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "string" } } }, { "begin": "\\s(.*)(:)", "beginCaptures": { "1": { "name": "string" }, "2": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "(crit|done|active|after)", "name": "entity.name.function.mermaid" }, { "match": "\\%%.*", "name": "comment" } ], "end": "$" } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" }, { "comment": "Graph", "begin": "^\\s*(graph|flowchart)\\s+([A-Za-z\\ 0-9]+)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.function.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "match": "\\b(subgraph)\\s+([A-Za-z\\ 0-9]+)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.function.mermaid" } }, "name": "meta.function.mermaid" }, { "match": "\\b(end|RB|BT|RL|TD|LR)\\b", "name": "keyword.control.mermaid" }, { "comment": "(Entity From)(Graph Link)", "begin": "(\\b[-\\w]+\\b\\s*)(-?-[-\\>]\\|?|=?=[=\\>]|(?:\\.-|-\\.)-?\\>?|<-->)", "beginCaptures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "comment": "(Graph Link Text)?(Graph Link)(Entity To)?(Edge/Shape)?(Text)?(Edge/Shape)?", "match": "(\\s*(?:\"[^\"]+\")|(?:[\\($&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]*))?\\s*(-?-[-\\>]\\|?|=?=[=\\>]|(?:\\.-|-\\.)-?\\>?|\\|)(\\s*[-\\w]+\\b)(\\[|\\(+|\\>|\\{)?(\\s*[-\\w]+\\b)?(\\]|\\)+|\\})?", "captures": { "1": { "name": "string" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "variable" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "string" }, "6": { "name": "keyword.control.mermaid" } } }, { "comment": "(Entity To)(Edge/Shape)?(Text)?(Edge/Shape)?", "match": "(\\s*[-\\w]+\\b)(\\[|\\(+|\\>|\\{)?(\\s*[-\\w]+\\b)?(\\]|\\)+|\\})?", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" }, "4": { "name": "keyword.control.mermaid" } } } ], "end": "$" }, { "comment": "(Entity)(Edge/Shape)(Text)(Edge/Shape)", "begin": "(\\b[-\\w]+\\b\\s*)(\\[|\\(+|\\>|\\{|\\(\\()(\\s*(?:\"[^\"]+\")|(?:[$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]*))(\\]|\\)+|\\}|\\)\\))", "beginCaptures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" }, "4": { "name": "keyword.control.mermaid" } }, "patterns": [ { "comment": "(Entity)(Edge/Shape)(Text)(Edge/Shape)", "match": "(\\s*\\b[-\\w]+\\b\\s*)(\\[|\\(+|\\>|\\{)(\\s*[\"\\($&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)(\\]|\\)+|\\})", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" }, "4": { "name": "keyword.control.mermaid" } } }, { "comment": "(Graph Link)(Graph Link Text)(Graph Link)(Entity)(Edge/Shape)(Text)(Edge/Shape)", "match": "(\\s*-?-[-\\>]\\|?|=?=[=\\>]|(?:\\.-|-\\.)-?\\>?)(\\s*[-\\w\\s]+\\b)?(-?-[-\\>]\\|?|=?=[=\\>]|(?:\\.-|-\\.)-?\\>?|\\|)?(\\s*\\b[-\\w]+\\b\\s*)(\\[|\\(+|\\>|\\{)(\\s*[\"\\($&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)?(\\]|\\)+|\\})", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "string" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "variable" }, "5": { "name": "keyword.control.mermaid" }, "6": { "name": "string" }, "7": { "name": "keyword.control.mermaid" } } } ], "end": "$" }, { "match": "(\\b[-\\w]+\\b\\s*)", "name": "variable" }, { "comment": "(Class)(Node(s))(ClassName)", "match": "\\s*(class)\\s+(\\b[-,\\w]+)\\s+(\\b\\w+\\b)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" }, "3": { "name": "string" } } }, { "comment": "(ClassDef)(ClassName)(Styles)", "match": "\\s*(classDef)\\s+(\\b\\w+\\b)\\s+(\\b[-,:;#\\w]+)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" }, "3": { "name": "string" } } }, { "comment": "(Click)(Entity)(Link)?(Tooltip)", "match": "\\s*(click)\\s+(\\b[-\\w]+\\b\\s*)(\\b\\w+\\b)?\\s(\"*.*\")", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" }, "3": { "name": "variable" }, "4": { "name": "string" } } } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" }, { "comment": "Pie Chart", "begin": "^\\s*(pie)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "match": "(title)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "string" } } }, { "begin": "\\s(.*)(:)", "beginCaptures": { "1": { "name": "string" }, "2": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" } ], "end": "$" } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" }, { "comment": "Sequence Diagram", "begin": "^\\s*(sequenceDiagram)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "(\\%%|#).*", "name": "comment" }, { "comment": "(title)", "match": "(title)\\s*(:)\\s+(\\s*[\"\\(\\)$&%\\^/#.,?!:*+=<>\\'\\\\\\-\\w\\s]*)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" } } }, { "comment": "(participant)(Actor)(as)?(Label)?", "match": "\\s*(participant)\\s+([\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+?)(?:\\s+(as))?\\s([\"\\(\\)$&%\\^/#.,?!*=<>\\'\\\\\\w\\s]+)?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "string" } } }, { "comment": "(activate/deactivate)(Actor)", "match": "\\s*((?:de)?activate)\\s+(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b\\s*)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" } } }, { "comment": "(Note)(direction)(Actor)(,)?(Actor)?(:)(Message)", "match": "\\s*(Note)\\s+((?:left|right)\\sof|over)\\s+(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b\\s*)(,)?(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b\\s*)?(:)(?:\\s+([^;#]*))?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.function.mermaid" }, "3": { "name": "variable" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "variable" }, "6": { "name": "keyword.control.mermaid" }, "7": { "name": "string" } } }, { "comment": "(loop)(loop text)", "match": "\\s*(loop)(?:\\s+([^;#]*))?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "string" } } }, { "comment": "(end)", "match": "\\s*(end)", "captures": { "1": { "name": "keyword.control.mermaid" } } }, { "comment": "(alt/else/opt/par/and/autonumber)(text)", "match": "\\s*(alt|else|opt|par|and|rect|autonumber)(?:\\s+([^#;]*))?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "string" } } }, { "comment": "(Actor)(Arrow)(Actor)(:)(Message)", "match": "\\s*(\\b[\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b)\\s*(-?-(?:\\>|x|\\))\\>?[+-]?)\\s*([\"\\(\\)$&%\\^/#.?!*=<>\\'\\\\\\w\\s]+\\b)\\s*(:)\\s*([^;#]*)", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "variable" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "string" } } } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" }, { "comment": "State Diagram", "begin": "^\\s*(stateDiagram)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "match": "\\%%.*", "name": "comment" }, { "comment": "}", "match": "\\s+(})\\s+", "captures": { "1": { "name": "keyword.control.mermaid" } } }, { "comment": "--", "match": "\\s+(--)\\s+", "captures": { "1": { "name": "keyword.control.mermaid" } } }, { "comment": "(state)", "match": "^\\s*([\\w-]+)$", "name": "variable" }, { "comment": "(state) : (description)", "match": "([\\w-]+)\\s+(:)\\s+(\\s*[-\\w\\s]+\\b)", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" } } }, { "comment": "state", "begin": "(state)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [ { "comment": "\"(description)\" as (state)", "match": "\\s+(\"[-\\w\\s]+\\b\")\\s+(as)\\s+([\\w-]+)", "captures": { "1": { "name": "string" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "variable" } } }, { "comment": "(state name) {", "match": "\\s+([\\w-]+)\\s+({)", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" } } }, { "comment": "(state name) <<fork|join>>", "match": "\\s+([\\w-]+)\\s+(<<(?:fork|join)>>)", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" } } } ], "end": "$" }, { "comment": "(state) -->", "begin": "([\\w-]+)\\s+(-->)", "beginCaptures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" } }, "patterns": [ { "comment": "(state) (:)? (transition text)?", "match": "\\s+([\\w-]+)\\s*(:)?\\s*(\\s*[-\\w\\s]+\\b)?", "captures": { "1": { "name": "variable" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" } } }, { "comment": "[*] (:)? (transition text)?", "match": "(\\[\\*\\])\\s*(:)?\\s*(\\s*[-\\w\\s]+\\b)?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "string" } } } ], "end": "$" }, { "comment": "[*] --> (state) (:)? (transition text)?", "match": "(\\[\\*\\])\\s+(-->)\\s+([\\w-]+)\\s*(:)?\\s*(\\s*[-\\w\\s]+\\b)?", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "variable" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "string" } } }, { "comment": "note left|right of (state name)", "match": "(note (?:left|right) of)\\s+([\\w-]+)\\s+(:)\\s*(\\s*[-\\w\\s]+\\b)", "captures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "string" } } }, { "comment": "note left|right of (state name) (note text) end note", "begin": "(note (?:left|right) of)\\s+([\\w-]+)(.|\\n)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "variable" } }, "contentName": "string", "end": "(end note)", "endCaptures": { "1": { "name": "keyword.control.mermaid" } } } ], "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)" } ] } }, "scopeName": "source.mermaid", "name": "mermaid" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mikrotik.tmLanguage.json ================================================ { "fileTypes": ["rsc"], "name": "Mikrotik Script", "patterns": [ { "include": "#literal-string" }, { "include": "#comments" }, { "include": "#parameters-readwrite" }, { "include": "#literal-constants" }, { "include": "#literal-boolean" }, { "include": "#literal-ip" }, { "include": "#literal-mac" }, { "include": "#literal-date" }, { "include": "#literal-number" }, { "include": "#variable" }, { "include": "#variable-definition" }, { "include": "#control-flow" }, { "include": "#commands" }, { "include": "#parameters-readonly" }, { "include": "#operators" }, { "include": "#line-continuation" } ], "repository": { "commands": { "patterns": [ { "match": "(?x) \\b(?<![\\-=])( Neighbor| aaa| accept\\-filter| access\\-list| access| accounting| action| address\\-list| address| add| advertise\\-filter| advertisements| aggregate| alert| align| area| arp| bandwidth\\-server| bandwidth\\-test| beep| bfd| bgp\\-vpls| bgp| binding| bonding| bridge| cache\\-contents| cache| certificate| cisco\\-bgp\\-vpls| client| config| connect\\-list| connections| connection| cookie| cpu| delay| detail| dhcp\\-client| dhcp\\-relay| dhcp\\-server| direct| disable| discovery| dns\\-update| e\\-mail| edit| enable| environment| eoip| error| ethernet| export| fdb| fetch| file| filter| find| find| firewall| firmware| flush| get| gps| graphing| gre6| gre| group| host| hotspot| identity| inbox| info| inserts| installed\\-sa| instance| interfaces| interface| interface| ip\\-binding| ip\\-scan| ipip| ipsec| ipv6| ip| ip| irq| keys| key| l2tp\\-client| l2tp\\-server| latency\\-distribution| layer7\\-protocol| lcd| ldp| lease| leds| len| logging| log| lookup| lsa| mac\\-server| mac\\-winbox| mangle| manual\\-sa| manual\\-tx\\-power\\-table| mesh| mirror| mme| mode\\-cfg| monitor| mpls| nat| nbma\\-neighbor| nd| neighbor| netwatch| network| note| nstreme\\-dual| nstreme| ntp| option| originators| ospf\\-router| ospf| ovpn\\-client| ovpn\\-server| packet\\-generator| packet\\-template| packet| parse| path\\-state| pci| peer| pick| ping| policy| pool| port| ppp\\-client| pppoe\\-client| pppoe\\-server| ppp| pptp\\-client| pptp\\-server| prefix\\-list| prefix| print| profile| proposal| protocol| proxy| put| queue| range| raw| registration\\-table| remote\\-peers| remove| resolve| resource| resv\\-state| rip| routerboard| route| routing| run| scan| scep| scheduler| script| security\\-profiles| send| server| service| settings| set| set| sham\\-link| shares| share| smb| sms| snapshot| sniffer| socks| sstp\\-client| sstp\\-server| statistics| stats| status| switch| system| target| terminal| time| toarray| tobool| toid| toip6| toip| tonum| tool| tostr| totime| typeof| tracking| traffic\\-eng| traffic\\-flow| traffic\\-generator| traffic\\-monitor| tunnel\\-path| type| uncounted| upgrade| upnp| ups| usb| used| users| user| virtual\\-link| vlan| vpls| vpnv4\\-route| vrf| vrrp| walled\\-garden| watchdog| wds| web\\-access| wireless| return )(?!-)\\b\n", "name": "support.function.mikrotik-script" } ] }, "comments": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.mikrotik-script" } }, "comment": "comments are ignored by syntax", "match": "(#).*$\\n?", "name": "comment.line.number-sign.mikrotik-script" } ] }, "control-flow": { "patterns": [ { "captures": { "1": { "name": "keyword.control.flow.mikrotik-script" }, "2": { "name": "invalid.illegal.whitespace.mikrotik-script" }, "3": { "name": "keyword.operator.comparison.mikrotik-script" } }, "match": "\\b(from|to|step|in|do|else|while)\\b([\\s|\\t]*)(=)" }, { "match": "\\b(while|for|foreach|on-error|if|do)\\b", "name": "keyword.control.flow.mikrotik-script" } ] }, "line-continuation": { "patterns": [ { "captures": { "1": { "name": "punctuation.separator.continuation.line.mikrotik-script" }, "2": { "name": "invalid.illegal.unexpected-text.mikrotik-script" } }, "match": "(\\\\)(.*)$\\n?" } ] }, "literal-boolean": { "patterns": [ { "comment": "boolean", "match": "\\b(true|false)\\b", "name": "constant.language.mikrotik-script" } ] }, "literal-date": { "patterns": [ { "comment": "1s, 2m, 3h, 4d", "match": "\\b([1-9]+[0-9]*|0)(ms|s|m|h|d|w)\\b", "name": "constant.other.time.mikrotik-script" }, { "comment": "1w5d12:20:59", "match": "\\b(([1-9]+[0-9]*w)?([1-9]+[0-9]*d)?([0-9]{2}:[0-9]{2}:[0-9]{2}))\\b", "name": "constant.other.time.mikrotik-script" }, { "match": "\\b((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\/[0-9]{2}\\/[1-9]+[0-9]*)\\b", "name": "constant.other.date.mikrotik-script" }, { "match": "([\\+\\-]?[0-9]{2}:[0-9]{2})", "name": "constant.other.time.delta.mikrotik-script" } ] }, "literal-ip": { "patterns": [ { "comment": "IPv6 address, zero compressed IPv6 addresses, link-local IPv6 addresses with zone index, IPv4-Embedded IPv6 Address, IPv4-mapped IPv6 addresses, IPv4-translated addresses (http://stackoverflow.com/a/17871737/188530)", "match": "\\b((\\h{1,4}\\:){7}\\h{1,4}|(\\h{1,4}\\:){1,7}\\:|(\\h{1,4}\\:){1,6}\\:\\h{1,4}|(\\h{1,4}\\:){1,5}(\\:\\h{1,4}){1,2}|(\\h{1,4}\\:){1,4}(\\:\\h{1,4}){1,3}|(\\h{1,4}\\:){1,3}(\\:\\h{1,4}){1,4}|(\\h{1,4}\\:){1,2}(\\:\\h{1,4}){1,5}|\\h{1,4}\\:((\\:\\h{1,4}){1,6})|\\:((\\:\\h{1,4}){1,7}|\\:)|fe80\\:(\\:\\h{,4}){,4}\\%[0-9a-zA-Z]{1,}|\\:\\:(ffff(\\:0{1,4})?\\:)?((25[0-5]|(2[0-4]|1?[0-9])?[0-9]).){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9])|(\\h{1,4}\\:){1,4}\\:((25[0-5]|(2[0-4]|1?[0-9])?[0-9]).){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9]))\\b", "name": "constant.other.ipv6.mikrotik-script" }, { "comment": "IPv4 address (http://stackoverflow.com/a/5284179/188530)", "match": "\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\/([0-9]|1[0-9]|2[0-4]))?\\b", "name": "constant.other.ipv4.mikrotik-script" } ] }, "literal-mac": { "patterns": [ { "comment": "MAC address (http://stackoverflow.com/a/4260512/188530)", "match": "\\b(\\h{2}[:-]){5}(\\h{2})\\b", "name": "constant.other.mac.mikrotik-script" } ] }, "literal-number": { "patterns": [ { "comment": "64bit signed integer in hexadecimal form", "match": "\\b(?i:(0x\\h*))\\b", "name": "constant.numeric.integer.hexadecimal.mikrotik-script" }, { "comment": "64bit signed integer in decimal form", "match": "\\b([1-9]+[0-9]*|0)\\b", "name": "constant.numeric.integer.decimal.mikrotik-script" } ] }, "literal-string": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.mikrotik-script" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.mikrotik-script" } }, "name": "string.quoted.double.mikrotik-script", "patterns": [ { "include": "#string-escape" }, { "include": "#string-expression" }, { "include": "#line-continuation" }, { "match": "\\n", "name": "invalid.illegal.newline.mikrotik-script" } ] } ] }, "operators": { "patterns": [ { "comment": "arithmetic operators", "match": "\\+|\\-|\\*|\\/", "name": "keyword.operator.arithmetic.mikrotik-script" }, { "comment": "relational operators", "match": "<|>|<=|>=", "name": "keyword.operator.relational.mikrotik-script" }, { "comment": "comparison operators", "match": "=|!=", "name": "keyword.operator.comparison.mikrotik-script" }, { "comment": "logical operators", "match": "\\!|&&|\\|\\|", "name": "keyword.operator.logical.mikrotik-script" }, { "comment": "bitwise operators", "match": "~|\\||\\^|\\&|<<|>>", "name": "keyword.operator.bitwise.mikrotik-script" }, { "comment": "concatenation operators", "match": "\\.|\\,", "name": "keyword.operator.concatenation.mikrotik-script" }, { "comment": "access array element by key", "match": "->", "name": "keyword.operator.other.mikrotik-script" }, { "comment": "delimeters", "match": ":|\\$|\\/", "name": "keyword.operator.other.mikrotik-script" }, { "match": ";", "name": "punctuation.terminator.statement.mikrotik-script" }, { "match": "\\(|\\)", "name": "meta.brace.round.mikrotik-script" }, { "match": "\\{|\\}", "name": "meta.brace.curly.mikrotik-script" }, { "match": "\\[|\\]", "name": "meta.brace.square.mikrotik-script" } ] }, "parameters-readonly": { "patterns": [ { "match": "(?x) \\b(?<![\\-=])( 802\\.1x\\-port\\-enabled| ac\\-mac| ack\\-timeout| active\\-address| active\\-client\\-id| active\\-cpu| active\\-interfaces| active\\-links| active\\-mac\\-address| active\\-server| actual\\-interface| actual\\-tx\\-interval| addresses| adjacency| agent\\-circuit\\-id| agent\\-remote\\-id| aggregator| ap| architecture\\-name| as\\-path| as4\\-capability| assured| atomic\\-aggregate| authentication\\-type| authority| backup\\-dr\\-address| bad\\-blocks| bgp\\-ext\\-communities| bgp| blocked| board\\-name| bytes\\-in| bytes\\-out| ca\\-crl\\-host| caller\\-id| category| ca| checksum| cisco\\-bgp\\-signaled| client| cluster\\-list| communities| cpu\\-count| cpu\\-frequency| cpu\\-load| creation\\-time| crl| data\\-byte| db\\-exchanges| db\\-summaries| denied| desired\\-tx\\-interval| dhcp| dijkstras| disk| dr\\-address| dsa| dst\\-user| dst| dynamic| effective\\-router\\-id| egress| encoding| encryption| errors| established| evm\\-ch0| evm\\-ch1| evm\\-ch2| expire\\-time| expired| expires\\-after| expires\\-in| external\\-imports| file\\-size| file\\ type| fingerprint| first\\-header| frame\\-bytes| frames| framing\\-current\\-size| framing\\-limit| framing\\-mode| free\\-hdd\\-space| free\\-memory| gateway\\-status| global| gre\\-key| gre\\-version| group\\-encryption| header\\-stack| hits| hw\\-frame\\-bytes| hw\\-frames| icmp\\-code| icmp\\-id| icmp\\-type| idle\\-time| id| imposed\\-label| in\\-accepted| in\\-dropped| in\\-label| in\\-previous\\-hop| in\\-transformed| inactive| info| inteface| invalid\\-after| invalid\\-before| invalid| io| ip\\-dscp| ip\\-dst| ip\\-frag\\-off| ip\\-gateway| ip\\-id| ip\\-src| ip\\-ttl| irq| issued| issuer| label| last\\-accessed\\-time| last\\-accessed| last\\-activity| last\\-ip| last\\-modified\\-time| last\\-modified| last\\-seen| latency\\-distribution\\-measure\\-interval| latency\\-distribution\\-samples| link\\-local| local\\-label| local\\-pref| local\\-transport| locally\\-originated| ls\\-requests| ls\\-retransmits| mac\\-dst| mac\\-src| management\\-protection| manufacture\\-date| max\\-entries| med| memory| message| model| mru| next\\-hop| nexthop| no\\-expiration\\-info| no\\-memory| nominal\\-battery\\-voltage| non\\-cacheable| non\\-output| not\\-found| nstreme| offline\\-after| operational| options| originator\\-id| origin| ospf\\-metric| ospf| out\\-accepted| out\\-dropped| out\\-label| out\\-next\\-hop| out\\-transformed| owner| p\\-throughput| package\\-architecture| package\\-built\\-time| package\\-name| package\\-version| packed\\-bytes| packed\\-frames| packets\\-in| packets\\-out| packets\\-rx| path\\-in\\-explicit\\-route| path\\-in\\-record\\-route| path\\-out\\-explicit\\-route| path\\-out\\-record\\-route| peer| ph2\\-state| pool| prefix\\-count| primary\\-dns| primary\\-ntp| protocols| radius| raw\\-header| received\\-from| recorded\\-route| refresh\\-capability| remaining\\-bw| remote\\-group| remote\\-hold\\-time| remote\\-id| remote\\-label| remote\\-min\\-rx| remote\\-status| reply\\-dst\\-address| reply\\-src\\-address| required\\-min\\-rx| resv\\-bandwidth| resv\\-out\\-record\\-route| revoked| rip| routeros\\-version| router| running| rx\\-1024\\-1518| rx\\-128\\-255| rx\\-1519\\-max| rx\\-256\\-511| rx\\-512\\-1023| rx\\-64| rx\\-65\\-127| rx\\-align\\-error| rx\\-broadcast| rx\\-bytes| rx\\-ccq| rx\\-fcs\\-error| rx\\-fragment| rx\\-multicast| rx\\-overflow| rx\\-pause| rx\\-rate| rx\\-runt| rx\\-too\\-long| scep\\-url| secondary\\-dns| secondary\\-ntp| seen\\ reply| sending\\-path| sending\\-resv| sending\\-targeted\\-hello| sequence\\-number| serial| service| shared| side| signal\\-strength\\-ch0| signal\\-strength\\-ch1| signal\\-strength\\-ch2| signal\\-strength| signal\\-to\\-noise| since| slave| smart\\-card\\-key| src\\-user| src| state\\-changes| static| strength\\-at\\-rates| successes| switch| tcp\\-state| tdma\\-retx| tdma\\-rx\\-size| tdma\\-timing\\-offset| tdma\\-tx\\-size| tdma\\-windfull| timestamp| too\\-large| total\\-entries| total\\-hdd\\-space| total\\-memory| transport\\-nexthop| tx\\-1024\\-1518| tx\\-128\\-255| tx\\-1519\\-max| tx\\-256\\-511| tx\\-512\\-1023| tx\\-64| tx\\-65\\-127| tx\\-align\\-error| tx\\-broadcast| tx\\-bytes| tx\\-ccq| tx\\-evm\\-ch0| tx\\-evm\\-ch1| tx\\-evm\\-ch2| tx\\-fcs\\-error| tx\\-fragment| tx\\-frames\\-timed\\-out| tx\\-multicast| tx\\-overflow| tx\\-pause| tx\\-rate| tx\\-runt| tx\\-signal\\-strength\\-ch0| tx\\-signal\\-strength\\-ch1| tx\\-signal\\-strength\\-ch2| tx\\-signal\\-strength| tx\\-too\\-long| udp\\-dst\\-port| udp\\-src\\-port| unknown\\-server| unreachable| updates\\-received| updates\\-sent| up| uri| used\\-hold\\-time| used\\-keepalive\\-time| users| vlan\\-protocol| vpls| wds| withdraws\\-received| withdraws\\-sent| wmm\\-enabled| write\\-sect\\-since\\-reboot| write\\-sect\\-total )(?!-)\\b\n", "name": "entity.other.attribute-name.readonly.mikrotik-script" } ] }, "parameters-readwrite": { "patterns": [ { "captures": { "2": { "name": "entity.other.attribute-name.readwrite.mikrotik-script" }, "4": { "name": "invalid.illegal.unexpected-text.mikrotik-script" }, "5": { "name": "keyword.operator.assigment.mikrotik-script" } }, "match": "(?x) (\\b(?<![\\/\\-=])(?<words> 2ghz\\-10mhz\\-power\\-channels| 2ghz\\-11n\\-channels| 2ghz\\-5mhz\\-power\\-channels| 2ghz\\-b\\-channels| 2ghz\\-g\\-channels| 2ghz\\-g\\-turbo\\-channels| 5ghz\\-10mhz\\-power\\-channels| 5ghz\\-11n\\-channels| 5ghz\\-5mhz\\-power\\-channels| 5ghz\\-channels| 5ghz\\-turbo\\-channels| 6to4\\-interface| 802\\.3\\-sap| 802\\.3\\-type| AH| DNS| ESP| NET\\-BIOS| SNMP| ac\\-name| accept\\-dynamic\\-neighbors| accept\\-redirects| accept\\-router\\-advertisements| accept\\-source\\-route| accept| accessible\\-via\\-web| account\\-local\\-traffic| accounting| action| active\\-flow\\-timeout| active\\-mode| active\\-port\\-type| active| adaptive\\-noise\\-immunity| add\\-arp| add\\-default\\-route| add\\-lifetime| add\\-mac\\-cookie| add\\-relay\\-info| address\\-families| address\\-family| address\\-list\\-timeout| address\\-list| address\\-pool| address\\-prefix\\-length| address6| addresses| address| addtime| adjacent\\-neighbors| admin\\-mac| advertise\\-dns| advertise\\-filter| advertise\\-interval| advertise\\-mac\\-address| advertise\\-timeout| advertise\\-url| advertised\\-l2mtu| advertise| affinity\\-exclude| affinity\\-include\\-all| affinity\\-include\\-any| ageing\\-time| age| ah\\-algorithm| ah\\-key| ah\\-spi| alarm\\-setting| alert\\-timeout| allocate\\-udp\\-ports\\-from| allow\\-address| allow\\-as\\-in| allow\\-disable\\-external\\-interface| allow\\-fast\\-path| allow\\-guests| allow\\-remote\\-requests| allow\\-sharedkey| allow\\-target| allowed\\-number| allow| always\\-broadcast| always\\-from\\-cache| antenna\\-gain| antenna\\-mode| ap\\-tx\\-limit| apn| append\\-bgp\\-communities| append\\-route\\-targets| area\\-id| area\\-prefix| area| arp\\-dst\\-address| arp\\-dst\\-mac\\-address| arp\\-gratuitous| arp\\-hardware\\-type| arp\\-interval| arp\\-ip\\-targets| arp\\-opcode| arp\\-packet\\-type| arp\\-ping| arp\\-src\\-address| arp\\-src\\-mac\\-address| arp\\-timeout| arp| as\\-override| ascii| as| attribute\\-filter| audio\\-max| audio\\-min| audio\\-monitor| auth\\-algorithms| auth\\-algorithm| auth\\-key| auth\\-method| authenticate| authentication\\-key\\-id| authentication\\-key| authentication\\-password| authentication\\-protocol| authentication\\-types| authentication| authoritative| auth| auto\\-bandwidth\\-avg\\-interval| auto\\-bandwidth\\-range| auto\\-bandwidth\\-reserve| auto\\-bandwidth\\-update\\-interval| auto\\-mac| auto\\-negotiation| auto\\-send\\-supout| automatic\\-supout| autonomous| backup\\-designated\\-router| bandwidth\\-limit| bandwidth| band| basic\\-rates\\-a\\/g| basic\\-rates\\-b| battery\\-charge| battery\\-voltage| baud\\-rate| bearing| bgp\\-as\\-path\\-length| bgp\\-as\\-path| bgp\\-atomic\\-aggregate| bgp\\-communities| bgp\\-local\\-pref| bgp\\-med| bgp\\-origin| bgp\\-prepend| bgp\\-weight| bidirectional\\-timeout| blink| block\\-access| blockade\\-k\\-factor| board| body| boot\\-device| boot\\-file\\-name| boot\\-protocol| bootp\\-support| bridge\\-cost| bridge\\-horizon| bridge\\-mode| bridge\\-path\\-cost| bridge\\-port\\-priority| bridge| broadcast| bsd\\-syslog| burst\\-time| bytes| ca\\-fingerprint| ca\\-identity| cable\\-setting| cable\\-test| cache\\-administrator| cache\\-entries| cache\\-hit\\-dscp| cache\\-max\\-ttl| cache\\-on\\-disk| cache\\-size| capabilities| cc| certificate| chain| challenge\\-password| change\\-tcp\\-mss| channel\\-time| channel\\-width| channel| check\\-certificate| check\\-gateway| check\\-interval| check\\-status| chip\\-info| cipher| cisco\\-style\\-id| cisco\\-style| cisco\\-vpls\\-nlri\\-len\\-fmt| client\\-id| client\\-to\\-client\\-reflection| client\\-tx\\-limit| cluster\\-id| code| comment| common\\-name| compression| confederation\\-peers| confederation| connect\\-to| connection\\-bytes| connection\\-limit| connection\\-mark| connection\\-rate| connection\\-state| connection\\-type| connect| contact| contents| content| contrast| cost| country| count| cpu\\-frequency| cpu| current\\-bytes| current\\-mac\\-address| data\\-bits| data\\-channel| data| date\\-and\\-time| days\\-valid| dead\\-interval| default\\-ap\\-tx\\-limit| default\\-authentication| default\\-cable\\-settings| default\\-client\\-tx\\-limit| default\\-cost| default\\-forwarding| default\\-group| default\\-name| default\\-originate| default\\-periodic\\-calibration| default\\-profile| default\\-route\\-distance| default\\-vlan\\-id| default| delay\\-threshold| designated\\-port\\-count| designated\\-router| device\\-id| device| dfs\\-mode| dh\\-group| dhcp\\-options| dhcp\\-option| dhcp\\-server| dial\\-command| dial\\-on\\-demand| direction| directory| disable\\-csma| disable\\-running\\-check| disabled| disconnect\\-timeout| discover| disk\\-file\\-count| disk\\-file\\-name| disk\\-lines\\-per\\-file| disk\\-stop\\-on\\-full| distance| distribute\\-default| distribute\\-for\\-default\\-route| dns\\-name| dns\\-server| do\\-not\\-fragment| domain\\-id| domain\\-tag| domain| down\\-delay| down\\-flood\\-thresholds| down\\-script| dpd\\-interval| dpd\\-maximum\\-failures| dscp| dst\\-address\\-list| dst\\-address\\-type| dst\\-address| dst\\-delta| dst\\-end| dst\\-host| dst\\-limit| dst\\-mac\\-address| dst\\-path| dst\\-port| dst\\-start| duid| duration| dynamic\\-label\\-range| eap\\-methods| edge\\-port\\-discovery| edge\\-port| edge| email\\-to| email| enable\\-nstreme| enable\\-polling| enabled| enc\\-algorithms| enc\\-algorithm| encryption\\-password| encryption\\-protocol| engine\\-id| esp\\-auth\\-algorithm| esp\\-auth\\-key| esp\\-enc\\-algorithm| esp\\-enc\\-key| esp\\-spi| eui\\-64| exchange\\-mode| exclude\\-groups| export\\-pub\\-key| export\\-route\\-target| external\\-fdb| file\\-limit| file\\-name| file| filter\\-direction| filter\\-interface| filter\\-ip\\-address| filter\\-ip\\-protocol| filter\\-mac\\-address| filter\\-mac\\-protocol| filter\\-mac| filter\\-operator\\-between\\-entries| filter\\-port| filter\\-stream| fingerprint\\-algorithm| firmware| flow\\-control\\-auto| flow\\-control\\-rx| flow\\-control\\-tx| flow\\-control| force\\-aes| force\\-backup\\-booter| forward\\-delay| forwarding| forward| fragment\\-offset| fragment| frame\\-lifetime| frame\\-size| framer\\-limit| framer\\-policy| frames\\-per\\-second| frequency\\-mode| frequency\\-offset| frequency| from\\-address| from\\-date| from\\-pool| from\\-time| from| full\\-duplex| garbage\\-timer| gateway\\-class| gateway\\-keepalive| gateway\\-selection| gateway| generate\\-key| generate\\-policy| generic\\-timeout| graph| group\\-ciphers| group\\-key\\-update| group| hash\\-algorithm| hello\\-interval| hide\\-ssid| hold\\-time| holding\\-priority| hop\\-limit| hoplimit| hops| horizon| host\\-name| host| hotspot\\-address| hotspot| ht\\-ampdu\\-priorities| ht\\-amsdu\\-limit| ht\\-amsdu\\-threshold| ht\\-basic\\-mcs| ht\\-chains| ht\\-channel\\-width| ht\\-guard\\-interval| ht\\-rates| ht\\-rxchains| ht\\-streams| ht\\-supported\\-mcs| ht\\-txchains| html\\-directory| http\\-cookie\\-lifetime| http\\-proxy| hw\\-fragmentation\\-threshold| hw\\-protection\\-mode| hw\\-protection\\-threshold| hw\\-retries| hwmp\\-default\\-hoplimit| hwmp\\-prep\\-lifetime| hwmp\\-preq\\-destination\\-only| hwmp\\-preq\\-reply\\-and\\-forward| hwmp\\-preq\\-retries| hwmp\\-preq\\-waiting\\-time| hwmp\\-rann\\-interval| hwmp\\-rann\\-lifetime| hwmp\\-rann\\-propagation\\-delay| iaid| icmp\\-options| icmp\\-rate\\-limit| icmp\\-rate\\-mask| icmp\\-timeout| identification| identity| idle\\-timeout| ignore\\-as\\-path\\-len| ignore\\-directip\\-modem| igp\\-flood\\-period| import\\-route\\-target| import| in\\-bridge\\-port| in\\-bridge| in\\-buffer\\-errors| in\\-errors| in\\-filter| in\\-header\\-errors| in\\-interface| in\\-no\\-policies| in\\-no\\-states| in\\-policy\\-blocked| in\\-policy\\-errors| in\\-prefix\\-list| in\\-state\\-expired| in\\-state\\-invalid| in\\-state\\-mismatches| in\\-state\\-mode\\-errors| in\\-state\\-protocol\\-errors| in\\-state\\-sequence\\-errors| in\\-template\\-mismatches| inactive\\-flow\\-timeout| include\\-igp| incoming\\-filter| incoming\\-packet\\-mark| info\\-channel| ingress\\-priority| inherit\\-attributes| inject\\-summary\\-lsas| insert\\-queue\\-before| instance| interface\\-name| interface\\-type| interfaces| interface| interim\\-update| interval| invert\\-math| ip\\-address| ip\\-forwarding| ip\\-forward| ip\\-header\\-size| ip\\-packet\\-size| ip\\-protocol| ipsec\\-protocols| ipv4\\-options| ipv6| jump\\-target| k\\-factor| keep\\-max\\-sms| keep\\-result| keepalive\\-timeout| keepalive\\-time| keepalive| key\\-bits| key\\-chain| key\\-id| key\\-name| key\\-size| key\\-usage| key| kind| l2mtu| l2router\\-id| lacp\\-rate| last\\-packet\\-before| latency\\-distribution\\-max| latency\\-distribution\\-scale| latency| latitude| layer7\\-protocol| learning| lease\\-script| lease\\-time| leds| level| life\\-time| lifebytes| lifetime| limit\\-bytes\\-in| limit\\-bytes\\-out| limit\\-bytes\\-total| limit\\-uptime| limit| line\\-voltage| link\\-monitoring| list| load| local\\-address| local\\-port| local\\-tx\\-speed| local\\-udp\\-tx\\-size| locality| locally\\-originated\\-bgp| local| location| log\\-prefix| login\\-by| longitude| loop\\-detect| low\\-battery| lsr\\-id| mac\\-address| mac\\-auth\\-password| mac\\-cookie\\-timeout| mac\\-protocol| make\\-static| managed\\-address\\-configuration| management\\-protection\\-key| management\\-protection| manual\\-sa| manual\\-tx\\-powers| master\\-interface| master\\-port| match\\-chain| max\\-cache\\-object\\-size| max\\-cache\\-size| max\\-client\\-connections| max\\-connections| max\\-fresh\\-time| max\\-message\\-age| max\\-mru| max\\-mtu| max\\-prefix\\-limit| max\\-prefix\\-restart\\-time| max\\-server\\-connections| max\\-sessions| max\\-station\\-count| max\\-udp\\-packet\\-size| mbps| mdix\\-enable| memory\\-limit| memory\\-lines| memory\\-scroll| memory\\-stop\\-on\\-full| mesh\\-portal| mesh| messages\\-rx| messages\\-tx| method| metric\\-bgp| metric\\-connected| metric\\-default| metric\\-ospf| metric\\-other\\-ospf| metric\\-rip| metric\\-static| metric| mii\\-interval| min\\-runtime| min\\-rx| mirror\\-source| mirror\\-target| mode\\-cfg| modem\\-init| modem\\-signal\\-treshold| mode| monitor| mpls\\-mtu| mpls\\-te\\-area| mpls\\-te\\-router\\-id| mq\\-pfifo\\-limit| mrru| mschapv2\\-password| mschapv2\\-username| mss| mtu| multicast\\-buffering| multicast\\-helper| multihop| multiple\\-channels| multiplier| my\\-id\\-user\\-fqdn| name| nas\\-port\\-type| nat\\-traversal| neighbor\\-id| neighbors| neighbor| netmask| network\\-type| network| new\\-connection\\-mark| new\\-dscp| new\\-mss| new\\-packet\\-mark| new\\-priority| new\\-routing\\-mark| new\\-ttl| next\\-server| nexthop\\-choice| no\\-ping\\-delay| noise\\-floor\\-threshold| note| nth| ntp\\-server| null\\-modem| num| nv2\\-cell\\-radius| nv2\\-noise\\-floor\\-offset| nv2\\-preshared\\-key| nv2\\-qos| nv2\\-queue\\-count| nv2\\-security| offline\\-time| on\\-alert| on\\-backup| on\\-battery| on\\-event| on\\-fail\\-retry\\-time| on\\-interface| on\\-line| on\\-link| on\\-login| on\\-logout| on\\-master| one\\-session\\-per\\-host| only\\-headers| only\\-one| open\\-status\\-page| organization| organziation| orig\\-mac\\-address| origination\\-interval| originator| ospf\\-type| other\\-configuration| out\\-bridge\\-port| out\\-bridge| out\\-bundle\\-check\\-errors| out\\-bundle\\-errors| out\\-errors| out\\-filter| out\\-interface| out\\-no\\-states| out\\-policy\\-blocked| out\\-policy\\-dead| out\\-policy\\-errors| out\\-prefix\\-list| out\\-state\\-expired| out\\-state\\-mode\\-errors| out\\-state\\-protocol\\-errors| out\\-state\\-sequence\\-errors| outgoing\\-filter| outgoing\\-packet\\-mark| output\\-voltage| overloaded\\-output| p2p| packet\\-mark| packet\\-size| packet\\-type| packets| page\\-refresh| parent\\-proxy\\-port| parent\\-proxy| parent\\-queue| parity| passive| password| path\\-cost| path\\-vector\\-limit| path| pci\\-info| pcq\\-burst\\-rate| pcq\\-burst\\-threshold| pcq\\-burst\\-time| pcq\\-classifier| pcq\\-dst\\-address\\-mask| pcq\\-dst\\-address6\\-mask| pcq\\-limit| pcq\\-rate| pcq\\-src\\-address\\-mask| pcq\\-src\\-address6\\-mask| pcq\\-total\\-limit| peek\\-rate| per\\-connection\\-classifier| periodic\\-calibration\\-interval| periodic\\-calibration| pfifo\\-limit| pfs\\-group| pfs| phone| phy\\-regs| pin| platform| poe\\-out| poe\\-priority| point\\-to\\-point\\-port| point\\-to\\-point| policy\\-group| policy| poll\\-interval| pool\\-name| pool\\-prefix\\-length| port\\-count| port\\-number| port\\-type| ports| port| pps| preamble\\-mode| preemption\\-mode| pref\\-src| preferred\\-gateway| preferred\\-lifetime| prefix\\-length| prefix| primary\\-ntp| primary\\-path| primary\\-retry\\-interval| primary\\-server| primary| priority| prism\\-cardtype| private\\-algo| private\\-key| private\\-pre\\-shared\\-key| profile| propagate\\-ttl| proposal\\-check| proposal| proprietary\\-extensions| proprietary\\-extension| protocol\\-mode| protocol| psd| pw\\-mtu| pw\\-type| query\\-server\\-timeout| query\\-total\\-timeout| queue\\-type| queue| quick| ra\\-delay| ra\\-interval| ra\\-lifetime| radio\\-name| radius\\-accounting| radius\\-default\\-domain| radius\\-eap\\-accounting| radius\\-interim\\-update| radius\\-location\\-name| radius\\-mac\\-authentication| radius\\-mac\\-caching| radius\\-mac\\-format| radius\\-mac\\-mode| random\\-data| random| ranges| range| rate\\-limit| rate\\-selection| rate\\-set| rates\\-a\\/g| rates\\-b| rate| raw\\-value| reachable\\-time| read\\-access| read\\-only| receive\\-all| receive\\-enabled| receive\\-errors| receive| record\\-route| red\\-avg\\-packet| red\\-burst| red\\-limit| red\\-max\\-threshold| red\\-min\\-threshold| redirect\\-to| redistribute\\-bgp| redistribute\\-connected| redistribute\\-ospf| redistribute\\-other\\-bgp| redistribute\\-other\\-ospf| redistribute\\-rip| redistribute\\-static| refresh\\-time| regexp| reject\\-with| relay| release| remember| remote\\-address| remote\\-as| remote\\-certificate| remote\\-mac| remote\\-peer| remote\\-port| remote\\-tx\\-speed| remote\\-udp\\-tx\\-size| remote| remove\\-private\\-as| renew| reoptimize\\-interval| reoptimize\\-paths| replace\\-battery| replay| req\\-fingerprint| require\\-client\\-certificate| resends| reset\\-alert| reset\\-counters\\-all| reset\\-counters| reset\\-mac\\-address| resource\\-class| retransmit\\-interval| role| root\\-bridge\\-id| root\\-bridge| root\\-path\\-cost| root\\-port| route\\-comment| route\\-distinguisher| route\\-reflect| route\\-tag| route\\-target| router\\-id| routes| routing\\-mark| routing\\-table| rp\\-filter| rp_filter| runtime\\-calibration\\-running| runtime\\-left| rx\\-band| rx\\-channel\\-width| rx\\-frequency| rx\\-radio| sa\\-dst\\-address| sa\\-src\\-address| sa\\-type| same\\-not\\-by\\-dst| satellites| scan\\-list| scope| secondary\\-ntp| secondary\\-paths| secondary\\-server| secret| secure\\-redirects| security\\-profile| security| send\\-dns| send\\-email\\-from| send\\-email\\-to| send\\-initial\\-contact| send\\-redirects| send\\-smtp\\-server| send\\-targeted| sending\\-rstp| send| seq\\-number| serial\\-number| serialize\\-connections| servers| server| service\\-name| session\\-timeout| set\\-bgp\\-communities| set\\-bgp\\-local\\-pref| set\\-bgp\\-med| set\\-bgp\\-prepend\\-path| set\\-bgp\\-prepend| set\\-bgp\\-weight| set\\-check\\-gateway| set\\-disabled| set\\-distance| set\\-in\\-nexthop\\-direct| set\\-in\\-nexthop\\-ipv6| set\\-in\\-nexthop\\-linklocal| set\\-in\\-nexthop| set\\-metric| set\\-out\\-nexthop\\-ipv6| set\\-out\\-nexthop\\-linklocal| set\\-out\\-nexthop| set\\-pref\\-src| set\\-route\\-comment| set\\-route\\-tag| set\\-route\\-targets| set\\-routing\\-mark| set\\-scope| set\\-site\\-of\\-origin| set\\-system\\-time| set\\-target\\-scope| set\\-type| set\\-use\\-te\\-nexthop| setup\\-priority| setup| sfp\\-rate\\-select| sfq\\-allot| sfq\\-perturb| shared\\-users| share| show\\-at\\-login| show\\-dummy\\-rule| signal\\-range| silent\\-boot| sim\\-pin| simple\\-queue| sip\\-direct\\-media| site\\-id| site\\-of\\-origin| size| skin| slaves| smart\\-boost\\-mode| smart\\-ssdd\\-mode| smtp\\-server| software\\-id| source| speed| spi| split\\-include| split\\-user\\-domain| src\\-address\\-list| src\\-address\\-type| src\\-address| src\\-mac\\-address| src\\-mac| src\\-path| src\\-port| ssid\\-all| ssid| ssl\\-certificate| start\\-time| start| state| static\\-algo\\-0| static\\-algo\\-1| static\\-algo\\-2| static\\-algo\\-3| static\\-key\\-0| static\\-key\\-1| static\\-key\\-2| static\\-key\\-3| static\\-sta\\-private\\-algo| static\\-sta\\-private\\-key| static\\-transmit\\-key| station\\-bridge\\-clone\\-mac| stats\\-samples\\-to\\-keep| status\\-autorefresh| status| stop\\-bits| stop| store\\-every| store\\-leases\\-disk| store\\-name| store\\-on\\-disk| stp\\-flags| stp\\-forward\\-delay| stp\\-hello\\-time| stp\\-max\\-age| stp\\-msg\\-age| stp\\-port| stp\\-root\\-address| stp\\-root\\-cost| stp\\-root\\-priority| stp\\-sender\\-address| stp\\-sender\\-priority| stp\\-type| streaming\\-enabled| streaming\\-max\\-rate| streaming\\-server| subject| summary\\-only| supplicant\\-identity| supported\\-bands| supported\\-rates\\-a\\/g| supported\\-rates\\-b| suppress\\-filter| synchronize| syslog\\-facility| syslog\\-severity| syslog\\-time\\-format| target\\-scope| target| tcp\\-close\\-timeout| tcp\\-close\\-wait\\-timeout| tcp\\-connection\\-count| tcp\\-established\\-timeout| tcp\\-fin\\-wait\\-timeout| tcp\\-flags| tcp\\-last\\-ack\\-timeout| tcp\\-md5\\-key| tcp\\-mss| tcp\\-syn\\-received\\-timeout| tcp\\-syn\\-sent\\-timeout| tcp\\-syncookies| tcp\\-time\\-wait\\-timeout| tcp_syncookies| tdma\\-debug| tdma\\-hw\\-test\\-mode| tdma\\-override\\-rate| tdma\\-override\\-size| tdma\\-period\\-size| tdma\\-test\\-mode| te\\-metric| template| test\\-audio| test\\-id| threshold| time\\-zone\\-name| time\\-zone| timeout\\-timer| timeout| time| tls\\-certificate| tls\\-mode| tls| to\\-addresses| to\\-address| to\\-arp\\-reply\\-mac\\-address| to\\-dst\\-mac\\-address| to\\-ports| to\\-src\\-mac\\-address| top\\-bits| topics| total| to| traffic| transfer\\-cause| transit\\-area| translator\\-role| transmit\\-delay| transmit\\-hash\\-policy| transmit\\-hold\\-count| transparent\\-proxy| transport\\-address| transport| trap\\-generators| trap\\-target| trap\\-version| trial\\-uptime| trial\\-user\\-profile| trigger| trusted| ttl| tunnel\\-id| tunnel| tx\\-band| tx\\-channel\\-width| tx\\-frequency| tx\\-power\\-mode| tx\\-power| tx\\-radio| tx\\-template| type| udp\\-stream\\-timeout| udp\\-timeout| unicast\\-ciphers| unit| unpack| up\\-delay| up\\-flood\\-thresholds| up\\-script| update\\-source| update\\-stats\\-interval| update\\-timer| upload| uptime| url| usb\\-version| use\\-bfd| use\\-compression| use\\-control\\-word| use\\-cspf| use\\-dn| use\\-encryption| use\\-explicit\\-null| use\\-ip\\-firewall\\-for\\-pppoe| use\\-ip\\-firewall\\-for\\-vlan| use\\-ip\\-firewall| use\\-mpls| use\\-peer\\-dns| use\\-peer\\-ntp| use\\-radius| use\\-service\\-tag| use\\-src\\-mac| use\\-udp| use\\-vj\\-compression| username| user| v3\\-protocol| v9\\-template\\-refresh| v9\\-template\\-timeout| valid\\-lifetime| valid\\-server| valid| value| vendor\\-id| vendor| verify\\-client\\-certificate| verify\\-server\\-address\\-from\\-certificate| verify\\-server\\-certificate| version| vlan\\-encap| vlan\\-header| vlan\\-id| vlan\\-mode| vlan\\-priority| vpls\\-id| vrid| watch\\-address| watchdog\\-timer| wds\\-address| wds\\-cost\\-range| wds\\-default\\-bridge| wds\\-default\\-cost| wds\\-ignore\\-ssid| wds\\-mode| wins\\-server| wireless\\-protocol| wmm\\-support| wpa\\-pre\\-shared\\-key| wpa2\\-pre\\-shared\\-key| write\\-access| xauth\\-login| xauth\\-password| zone )\\b(?!-)(([\\s\\t]*?)(=))?)\n" } ] }, "string-escape": { "patterns": [ { "match": "\\\\\\\"|\\\\\\\\|\\\\n|\\\\r|\\\\t|\\\\\\$|\\\\\\?|\\\\_|\\\\a|\\\\b|\\\\f|\\\\v|\\\\\\h\\h", "name": "constant.character.escape.mikrotik-script" } ] }, "string-expression": { "patterns": [ { "begin": "\\$\\(", "end": "\\)", "patterns": [ { "include": "$self" }, { "include": "#line-continuation" }, { "match": "\\n", "name": "invalid.illegal.newline.mikrotik-script" } ] }, { "begin": "\\$\\[", "end": "\\]", "patterns": [ { "include": "$self" }, { "include": "#line-continuation" }, { "match": "\\n", "name": "invalid.illegal.newline.mikrotik-script" } ] } ] }, "variable": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.variable.mikrotik-script" } }, "match": "(\\$)([0-9a-zA-Z]+)", "name": "variable.other.mikrotik-script" }, { "begin": "(\\$)(\\\")", "beginCaptures": { "1": { "name": "punctuation.definition.variable.mikrotik-script" }, "2": { "name": "punctuation.definition.variable.begin.mikrotik-script" } }, "end": "\\\"", "endCaptures": { "0": { "name": "punctuation.definition.variable.end.mikrotik-script" } }, "name": "variable.other.mikrotik-script", "patterns": [ { "include": "#string-escape" }, { "include": "#line-continuation" }, { "match": "\\n", "name": "invalid.illegal.newline.mikrotik-script" } ] } ] }, "variable-definition": { "patterns": [ { "captures": { "1": { "name": "keyword.operator.other.mikrotik-script" }, "2": { "name": "storage.modifier.mikrotik-script" } }, "match": "(\\:)(global|local)\\b" } ] } }, "scopeName": "source.mikrotik-script", "uuid": "1a4e4c34-d9fb-4371-b819-9934ebed400c" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mips.tmLanguage.json ================================================ { "scopeName": "source.mips", "fileTypes": ["s", "mips", "spim", "asm"], "patterns": [ { "comment": "ok actually this are instructions, but one also could call them funtions…", "match": "\\b(mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s)\\b", "name": "support.function.pseudo.mips" }, { "match": "\\b(abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|ceil\\.w\\.d|ceil\\.w\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b", "name": "support.function.mips" }, { "match": "\\.(ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\\s*(noat|at))\\b", "name": "storage.type.mips" }, { "match": "\\.(align|extern||globl)\\b", "name": "storage.modifier.mips" }, { "match": "\\b([A-Za-z0-9_]+):", "name": "meta.function.label.mips", "captures": { "1": { "name": "entity.name.function.label.mips" } } }, { "match": "(\\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\\b", "name": "variable.other.register.usable.by-number.mips", "captures": { "1": { "name": "punctuation.definition.variable.mips" } } }, { "match": "(\\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\\b", "name": "variable.other.register.usable.by-name.mips", "captures": { "1": { "name": "punctuation.definition.variable.mips" } } }, { "match": "(\\$)(at|k[01]|1|2[67])\\b", "name": "variable.other.register.reserved.mips", "captures": { "1": { "name": "punctuation.definition.variable.mips" } } }, { "match": "(\\$)f([0-9]|1[0-9]|2[0-9]|3[0-1])\\b", "name": "variable.other.register.usable.floating-point.mips", "captures": { "1": { "name": "punctuation.definition.variable.mips" } } }, { "match": "\\b\\d+\\.\\d+\\b", "name": "constant.numeric.float.mips" }, { "match": "\\b(\\d+|0(x|X)[a-fA-F0-9]+)\\b", "name": "constant.numeric.integer.mips" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.mips" } }, "end": "\"", "patterns": [ { "match": "\\\\[rnt\\\\\"]", "name": "constant.character.escape.mips" } ], "name": "string.quoted.double.mips", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.mips" } } }, { "begin": "(^[ \\t]+)?(?=#)", "end": "(?!\\G)", "patterns": [ { "begin": "#", "end": "\\n", "name": "comment.line.number-sign.mips", "beginCaptures": { "0": { "name": "punctuation.definition.comment.mips" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.mips" } } } ], "name": "MIPS Assembler", "keyEquivalent": "^~M", "uuid": "7FD88C2E-6BE3-11D9-9A40-0011242E4184" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/mysql.tmLanguage.json ================================================ { "foldingStartMarker": "\\s*\\(\\s*$", "bundleUUID": "AAB4CBF7-73F9-11D9-B89A-000D93589AF6", "foldingStopMarker": "^\\s*\\)", "keyEquivalent": "^~S", "fileTypes": ["sql", "ddl", "dml"], "repository": { "comments": { "patterns": [ { "match": "(--).*$\\n?", "name": "comment.line.double-dash.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "(#).*$\\n?", "name": "comment.line.number-sign.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.c", "captures": { "0": { "name": "punctuation.definition.comment.sql" } } } ] }, "string_escape": { "match": "\\\\.", "name": "constant.character.escape.sql" }, "string_interpolation": { "match": "(#\\{)([^\\}]*)(\\})", "name": "string.interpolated.sql", "captures": { "1": { "name": "punctuation.definition.string.end.sql" } } }, "strings": { "patterns": [ { "match": "(')[^'\\\\]*(')", "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "name": "string.quoted.single.sql", "captures": { "1": { "name": "punctuation.definition.string.begin.sql" }, "3": { "name": "punctuation.definition.string.end.sql" } } }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "end": "'", "patterns": [{ "include": "#string_escape" }], "name": "string.quoted.single.sql", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } } }, { "match": "(?<!\\.)(`)[^`\\\\]*(`)(?!\\.)", "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "name": "source.sql.mysql.identifier", "captures": { "1": { "name": "punctuation.definition.identifier.begin.sql" }, "3": { "name": "punctuation.definition.identifier.end.sql" } } }, { "begin": "`", "endCaptures": { "0": { "name": "punctuation.definition.identifier.end.sql" } }, "end": "`", "patterns": [{ "include": "#string_escape" }], "name": "source.sql.mysql.identifier", "beginCaptures": { "0": { "name": "punctuation.definition.identifier.begin.sql" } } }, { "match": "(\")[^\"#]*(\")", "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "name": "source.sql.mysql.identifier", "captures": { "1": { "name": "punctuation.definition.identifier.begin.sql" }, "3": { "name": "punctuation.definition.identifier.end.sql" } } }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.identifier.end.sql" } }, "end": "\"", "patterns": [{ "include": "#string_interpolation" }], "name": "source.sql.mysql.identifier", "beginCaptures": { "0": { "name": "punctuation.definition.identifier.begin.sql" } } }, { "begin": "%\\{", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "end": "\\}", "patterns": [{ "include": "#string_interpolation" }], "name": "string.other.quoted.brackets.sql", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } } } ] }, "regexps": { "patterns": [ { "begin": "/(?=\\S.*/)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "end": "/", "patterns": [ { "include": "#string_interpolation" }, { "match": "\\\\/", "name": "constant.character.escape.slash.sql" } ], "name": "string.regexp.sql", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } } }, { "end": "\\}", "begin": "%r\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "patterns": [{ "include": "#string_interpolation" }], "comment": "We should probably handle nested bracket pairs!?! -- Allan", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.regexp.modr.sql" } ] } }, "uuid": "6FBEE1E0-D923-4DE8-9B57-6096FAB14BB0", "patterns": [ { "include": "#comments" }, { "match": "(?i:^\\s*(create)\\s+(aggregate|conversion|database|domain|function|group|(unique\\s+)?index|language|operator class|operator|rule|schema|sequence|tablespace|type|user)\\s+)(?:([\"`]?)(\\w+)\\4\\.)?([\"`]?)(\\w+)\\6", "name": "meta.create.sql", "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.sql" }, "7": { "name": "entity.name.function.sql" }, "5": { "name": "entity.other.inherited-class.sql" } } }, { "match": "(?i:^\\s*(create)\\s+((?:temporary\\s+)?table(?:\\s+if\\s+not\\s+exists)?\\s+)(?:([\"`]?)(\\w+)\\3\\.)?([\"`]?)(\\w+)\\5)(?i:\\s+(\\(?)\\s*(like)\\s+(?:([\"`]?)(\\w+)\\9\\.)?([\"`]?)(\\w+)\\11\\s*\\7)?", "name": "meta.create.table.sql", "captures": { "8": { "name": "keyword.other.create.table.sql" }, "4": { "name": "entity.other.inherited-class.sql" }, "1": { "name": "keyword.other.create.sql" }, "12": { "name": "constant.other.table-name.sql" }, "6": { "name": "entity.name.function.sql" }, "10": { "name": "constant.other.database-name.sql" }, "2": { "name": "keyword.other.create.table.sql" } } }, { "match": "(?i:^\\s*(create(?:\\s+or\\s+replace)?)(?:\\s+(algorithm)\\s*=\\s*(undefined|merge|temptable))?(?:\\s+(definer)\\s*=\\s*(?:(current_user)|\\w+))?(?:\\s+(sql\\s+security)\\s*=\\s*(definer|invoker))?\\s+(view)\\s+)(?:([\"`]?)(\\w+)\\9\\.)?([\"`]?)(\\w+)\\11", "name": "meta.create.view.sql", "captures": { "7": { "name": "constant.other.security.mysql.sql" }, "3": { "name": "constant.other.algorithm.mysql.sql" }, "8": { "name": "keyword.other.view.sql" }, "4": { "name": "keyword.other.create.view.mysql.sql" }, "5": { "name": "constant.other.definer.mysql.sql" }, "1": { "name": "keyword.other.create.sql" }, "12": { "name": "entity.name.function.sql" }, "6": { "name": "keyword.other.create.view.mysql.sql" }, "10": { "name": "entity.other.inherited-class.sql" }, "2": { "name": "keyword.other.create.view.mysql.sql" } } }, { "match": "(?i:^\\s*(create)(?:\\s+(definer)\\s*=\\s*(?:(current_user)|\\w+))?\\s+(trigger)\\s+(\\w+)\\s+(before|after)\\s+(insert|update|delete)\\s+(on)\\s+)(?:([\"`]?)(\\w+)\\9\\.)?([\"`]?)(\\w+)\\11(?i:\\s+(for)\\s+(each)\\s+(row))", "name": "meta.create.trigger.sql", "captures": { "10": { "name": "constant.other.database-name.sql" }, "2": { "name": "keyword.other.create.trigger.mysql.sql" }, "15": { "name": "keyword.other.create.trigger.mysql.sql" }, "3": { "name": "constant.other.definer.mysql.sql" }, "4": { "name": "keyword.other.trigger.sql" }, "5": { "name": "entity.name.function.sql" }, "12": { "name": "constant.other.table-name.sql" }, "6": { "name": "keyword.other.create.trigger.mysql.sql" }, "13": { "name": "keyword.other.create.trigger.mysql.sql" }, "7": { "name": "keyword.other.create.trigger.mysql.sql" }, "8": { "name": "keyword.other.create.trigger.mysql.sql" }, "14": { "name": "keyword.other.create.trigger.mysql.sql" }, "1": { "name": "keyword.other.create.sql" } } }, { "match": "(?i:^\\s*(drop)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table(?:\\s+if\\s+exists)?|tablespace|trigger|type|user|view))", "name": "meta.drop.sql", "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.sql" } } }, { "match": "(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)", "name": "meta.drop.sql", "captures": { "3": { "name": "entity.name.function.sql" }, "1": { "name": "keyword.other.create.sql" }, "4": { "name": "keyword.other.cascade.sql" }, "2": { "name": "keyword.other.table.sql" } } }, { "match": "(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)", "name": "meta.alter.sql", "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.table.sql" } } }, { "match": "(?xi)\n\n\t\t\t\t# Data Types\n\n\t\t\t\t# Non-suffix types\n\t\t\t\t# Capture 1\n\t\t\t\t\\b(year|time(?:stamp)?|date(?:time)?|(?:long|medium|tiny)?blob)\\b\n\n\t\t\t\t# Non-suffix types with optional qualifiers\n\t\t\t\t# Capture 2 + 3i\n\t\t\t\t|\\b((?:long|medium|tiny)?text)\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# Required numeric suffix types\n\t\t\t\t# Capture 4 + 5i\n\t\t\t\t|\\b(varbinary)\\((\\d+)\\)\n\n\t\t\t\t# Required numeric suffix types with optional qualifiers\n\t\t\t\t# Capture 6 + 7i + 8o + 9c + 10o + 11c\n\t\t\t\t|\\b(varchar)\\((\\d+)\\)(?:\\s+(char(?:set|acter\\sset))\\s+([a-zA-Z0-9]+)(?:\\s+(collate)\\s+([_a-zA-Z0-9]+))?)?\n\n\t\t\t\t# Optianal single numeric suffix\n\t\t\t\t# Capture 12 + 13i\n\t\t\t\t|\\b(bi(?:t|nary))\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# Optional single numeric suffix with optional qualifiers\n\t\t\t\t# Capture 14 + 15i + 16l + 17l\n\t\t\t\t|\\b((?:big|medium|small|tiny)?int|integer|decimal|numeric)\\b(?:\\((\\d+)\\))?(?:\\s+(unsigned))?(?:\\s+(zerofill))?\n\n\t\t\t\t# Optional single numeric suffix with optional qualifiers\n\t\t\t\t# Capture 18 + 19i + 20o + 21c + 22o + 23c\n\t\t\t\t|\\b(char)\\b(?:\\((\\d+)\\))?(?:\\s+(char(?:set|acter\\sset))\\s+([a-zA-Z0-9]+)(?:\\s+(collate)\\s+([_a-zA-Z0-9]+))?)?\n\n\t\t\t\t# Optional double numeric suffix with optional qualifiers\n\t\t\t\t# Capture 24 + 25i + 26i + 27l + 28l\n\t\t\t\t|\\b(numeric|d(?:ouble|ecimal)|float|real)\\b(?:\\((\\d+),\\s*(\\d+)\\))?(?:\\s+(unsigned))?(?:\\s+(zerofill))?\n\n\t\t\t\t# Required multi-valued suffix with optional qualifiers\n\t\t\t\t# Capture 29 + 30x + 31s + 32o + 33c + 34o + 35c\n\t\t\t\t|\\b(set|enum)\\(([^\\,\\)]+(?:(,\\s*)[^\\,\\)]+)*)\\)(?:\\s+(char(?:set|acter\\sset))\\s+([a-zA-Z0-9]+)(?:\\s+(collate)\\s+([_a-zA-Z0-9]+))?)?\n \n\t\t\t", "captures": { "3": { "name": "constant.numeric.sql" }, "12": { "name": "storage.type.sql" }, "21": { "name": "constant.other.charset.mysql.sql" }, "4": { "name": "storage.type.sql" }, "30": { "name": "constant.other.user-defined.sql" }, "13": { "name": "constant.numeric.sql" }, "5": { "name": "constant.numeric.sql" }, "22": { "name": "keyword.other.mysql.sql" }, "6": { "name": "storage.type.sql" }, "31": { "name": "source.sql.mysql" }, "14": { "name": "storage.type.sql" }, "7": { "name": "constant.numeric.sql" }, "23": { "name": "constant.other.charset.mysql.sql" }, "32": { "name": "keyword.other.mysql.sql" }, "15": { "name": "constant.numeric.sql" }, "8": { "name": "keyword.other.mysql.sql" }, "24": { "name": "storage.type.sql" }, "9": { "name": "constant.other.charset.mysql.sql" }, "33": { "name": "constant.other.charset.mysql.sql" }, "16": { "name": "constant.language.mysql.sql" }, "25": { "name": "constant.numeric.sql" }, "34": { "name": "keyword.other.mysql.sql" }, "17": { "name": "constant.language.mysql.sql" }, "26": { "name": "constant.numeric.sql" }, "35": { "name": "constant.other.charset.mysql.sql" }, "18": { "name": "storage.type.sql" }, "27": { "name": "constant.language.mysql.sql" }, "19": { "name": "constant.numeric.sql" }, "28": { "name": "constant.language.mysql.sql" }, "29": { "name": "storage.type.sql" }, "10": { "name": "keyword.other.mysql.sql" }, "1": { "name": "storage.type.sql" }, "11": { "name": "constant.other.charset.mysql.sql" }, "2": { "name": "storage.type.sql" }, "20": { "name": "keyword.other.mysql.sql" } } }, { "match": "(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|check|constraint)\\b)", "name": "storage.modifier.sql" }, { "match": "(?ix)\n\t\t\t\n\t\t\t # Column Definitions\n\t\t\t \n\t\t\t # Capture 1\n\t\t\t \\b(?:not\\s+)?(null)\\b\n\t\t\t \n\t\t\t # Capture\n\t\t\t |\\b(?:default\\s+)\n\t\t\t \n\t\t\t # Capture\n\t\t\t |\\bauto_increment\\b\n\t\t\t \n\t\t\t # Capture\n\t\t\t |\\b(?:unique(?:\\s+key)?|(?:primary\\s+)?key)\\b\n\t\t\t \n\t\t\t # Capture\n\t\t\t |\\bcomment\\s+\n\t\t\t \n\t\t\t # Capture 2\n\t\t\t |\\bcolumn_format\\s+(d(?:ynamic|efault)|fixed)\\b\n\t\t\t \n\t\t\t # Capture 3\n\t\t\t |\\bstorage\\s+(d(?:isk|efault)|memory)\\b\n\t\t\t \n\t\t\t", "name": "storage.modifier.mysql.sql", "captures": { "1": { "name": "constant.language.sql" }, "2": { "name": "constant.language.mysql.sql" }, "3": { "name": "constant.language.mysql.sql" } } }, { "match": "\\b\\d+\\b", "name": "constant.numeric.sql" }, { "match": "(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\sby|or|like|and|union(\\s+all)?|having|order\\sby|limit|(inner|cross)\\s+join|straight_join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)", "name": "keyword.other.DML.sql" }, { "match": "(?i:\\b(on|((is\\s+)?not\\s+)?null)\\b)", "name": "keyword.other.DDL.create.II.sql" }, { "match": "(?i:\\bvalues\\b)", "name": "keyword.other.DML.II.sql" }, { "match": "(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)", "name": "keyword.other.LUW.sql" }, { "match": "(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)", "name": "keyword.other.authorization.sql" }, { "match": "(?i:\\bin\\b)", "name": "keyword.other.data-integrity.sql" }, { "match": "(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)", "name": "keyword.other.object-comments.sql" }, { "match": "(?i)\\bAS\\b", "name": "keyword.other.alias.sql" }, { "match": "(?i)\\b(DESC|ASC)\\b", "name": "keyword.other.order.sql" }, { "match": "\\*", "name": "keyword.operator.star.sql" }, { "match": "[!<>]?=|<>|<|>", "name": "keyword.operator.comparison.sql" }, { "match": "-|\\+|/", "name": "keyword.operator.math.sql" }, { "match": "\\|\\|", "name": "keyword.operator.concatenator.sql" }, { "comment": "List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html", "match": "(?i)\\b(CURRENT_(DATE|TIME(STAMP)?|USER)|(SESSION|SYSTEM)_USER)\\b", "name": "support.function.scalar.sql" }, { "comment": "List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html", "match": "(?i)\\b(AVG|COUNT|MIN|MAX|SUM)(?=\\s*\\()", "name": "support.function.aggregate.sql" }, { "match": "(?i)\\b(CONCATENATE|CONVERT|LOWER|SUBSTRING|TRANSLATE|TRIM|UPPER)\\b", "name": "support.function.string.sql" }, { "match": "(?:(?:`?(\\w+)`?)\\.)?(?:`?(\\w+)`?)?\\.`?(\\w+)`?", "captures": { "1": { "name": "constant.other.database-name.sql" }, "2": { "name": "constant.other.table-name.sql" }, "3": { "name": "constant.other.column-name.sql" } } }, { "include": "#strings" }, { "include": "#regexps" } ], "name": "SQL (MySQL)", "scopeName": "source.sql.mysql" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/nginx.tmLanguage.json ================================================ { "fileTypes": [ "conf.erb", "conf", "ngx", "nginx.conf", "mime.types", "fastcgi_params", "scgi_params", "uwsgi_params" ], "foldingStartMarker": "\\{\\s*$", "foldingStopMarker": "^\\s*\\}", "keyEquivalent": "^~N", "name": "nginx", "patterns": [ { "name": "comment.line.number-sign", "match": "\\#.*" }, { "name": "meta.context.lua.nginx", "begin": "\\b((?:content|rewrite|access|init_worker|init|set|log|balancer|ssl_(?:client_hello|session_fetch|certificate))_by_lua(?:_block)?)\\s*\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "contentName": "meta.embedded.block.lua", "patterns": [ { "include": "source.lua" } ] }, { "name": "meta.context.lua.nginx", "begin": "\\b((?:content|rewrite|access|init_worker|init|set|log|balancer|ssl_(?:client_hello|session_fetch|certificate))_by_lua)\\s*'", "end": "'", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "contentName": "meta.embedded.block.lua", "patterns": [ { "include": "source.lua" } ] }, { "name": "meta.context.events.nginx", "begin": "\\b(events) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.http.nginx", "begin": "\\b(http) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.mail.nginx", "begin": "\\b(mail) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.stream.nginx", "begin": "\\b(stream) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.server.nginx", "begin": "\\b(server) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.location.nginx", "begin": "\\b(location) +([\\^]?~[\\*]?|=) +(.*?)\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" }, "2": { "name": "keyword.operator.nginx" }, "3": { "name": "string.regexp.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.location.nginx", "begin": "\\b(location) +(.*?)\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" }, "2": { "name": "entity.name.context.location.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.limit_except.nginx", "begin": "\\b(limit_except) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.if.nginx", "begin": "\\b(if) +\\(", "end": "\\)", "beginCaptures": { "1": { "name": "keyword.control.nginx" } }, "patterns": [ { "include": "#if_condition" } ] }, { "name": "meta.context.upstream.nginx", "begin": "\\b(upstream) +(.*?)\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" }, "2": { "name": "entity.name.context.location.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.types.nginx", "begin": "\\b(types) +\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" } }, "patterns": [ { "include": "$self" } ] }, { "name": "meta.context.map.nginx", "begin": "\\b(map) +(\\$)([A-Za-z0-9\\_]+) +(\\$)([A-Za-z0-9\\_]+) *\\{", "end": "\\}", "beginCaptures": { "1": { "name": "storage.type.directive.context.nginx" }, "2": { "name": "punctuation.definition.variable.nginx" }, "3": { "name": "variable.parameter.nginx" }, "4": { "name": "punctuation.definition.variable.nginx" }, "5": { "name": "variable.other.nginx" } }, "patterns": [ { "include": "#values" }, { "name": "punctuation.terminator.nginx", "match": ";" }, { "name": "comment.line.number-sign", "match": "\\#.*" } ] }, { "name": "meta.block.nginx", "begin": "\\{", "end": "\\}", "patterns": [ { "include": "$self" } ] }, { "begin": "\\b(return)\\b", "end": ";", "beginCaptures": { "1": { "name": "keyword.control.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "\\b(rewrite)\\s+", "end": "(last|break|redirect|permanent)?(;)", "beginCaptures": { "1": { "name": "keyword.directive.nginx" } }, "endCaptures": { "1": { "name": "keyword.other.nginx" }, "2": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "\\b(server)\\s+", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" } }, "endCaptures": { "1": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#server_parameters" } ] }, { "begin": "\\b(internal|empty_gif|f4f|flv|hls|mp4|break|status|stub_status|ip_hash|ntlm|least_conn|upstream_conf|least_conn|zone_sync)\\b", "end": "(;|$)", "beginCaptures": { "1": { "name": "keyword.directive.nginx" } }, "endCaptures": { "1": { "name": "punctuation.terminator.nginx" } } }, { "begin": "([\"'\\s]|^)(accept_)(mutex|mutex_delay)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(debug_)(connection|points)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(error_)(log|page)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(ssl_)(engine|buffer_size|certificate|certificate_key|ciphers|client_certificate|conf_command|crl|dhparam|early_data|ecdh_curve|ocsp|ocsp_cache|ocsp_responder|password_file|prefer_server_ciphers|protocols|reject_handshake|session_cache|session_ticket_key|session_tickets|session_timeout|stapling|stapling_file|stapling_responder|stapling_verify|trusted_certificate|verify_client|verify_depth|alpn|handshake_timeout|preread)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(worker_)(aio_requests|connections|cpu_affinity|priority|processes|rlimit_core|rlimit_nofile|shutdown_timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(auth_)(delay|basic|basic_user_file|jwt|jwt_claim_set|jwt_header_set|jwt_key_file|jwt_key_request|jwt_leeway|jwt_type|jwt_require|request|request_set|http|http_header|http_pass_client_cert|http_timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(client_)(body_buffer_size|body_in_file_only|body_in_single_buffer|body_temp_path|body_timeout|header_buffer_size|header_timeout|max_body_size)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(keepalive_)(disable|requests|time|timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(limit_)(rate|rate_after|conn|conn_dry_run|conn_log_level|conn_status|conn_zone|zone|req|req_dry_run|req_log_level|req_status|req_zone)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(lingering_)(close|time|timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(log_)(not_found|subrequest|format)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(max_)(ranges|errors)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(msie_)(padding|refresh)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(open_)(file_cache|file_cache_errors|file_cache_min_uses|file_cache_valid|log_file_cache)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(send_)(lowat|timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(server_)(name|name_in_redirect|names_hash_bucket_size|names_hash_max_size|tokens)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(tcp_)(nodelay|nopush)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(types_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(variables_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(add_)(before_body|after_body|header|trailer)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(status_)(zone|format)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(autoindex_)(exact_size|format|localtime)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(ancient_)(browser|browser_value)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(modern_)(browser|browser_value)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(charset_)(map|types)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(dav_)(access|methods)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(fastcgi_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|catch_stderr|connect_timeout|force_ranges|hide_header|ignore_client_abort|ignore_headers|index|intercept_errors|keep_conn|limit_rate|max_temp_file_size|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|param|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|request_buffering|send_lowat|send_timeout|socket_keepalive|split_path_info|store|store_access|temp_file_write_size|temp_path)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(geoip_)(country|city|org|proxy|proxy_recursive)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(grpc_)(bind|buffer_size|connect_timeout|hide_header|ignore_headers|intercept_errors|next_upstream|next_upstream_timeout|next_upstream_tries|pass|pass_header|read_timeout|send_timeout|set_header|socket_keepalive|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_conf_command|ssl_crl|ssl_name|ssl_password_file|ssl_protocols|ssl_server_name|ssl_session_reuse|ssl_trusted_certificate|ssl_verify|ssl_verify_depth)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(gzip_)(buffers|comp_level|disable|http_version|min_length|proxied|types|vary|static)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(hls_)(buffers|forward_args|fragment|mp4_buffer_size|mp4_max_buffer_size)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(image_)(filter|filter_buffer|filter_interlace|filter_jpeg_quality|filter_sharpen|filter_transparency|filter_webp_quality)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(map_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(memcached_)(bind|buffer_size|connect_timeout|force_ranges|gzip_flag|next_upstream|next_upstream_timeout|next_upstream_tries|pass|read_timeout|send_timeout|socket_keepalive)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(mp4_)(buffer_size|max_buffer_size|limit_rate|limit_rate_after)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(perl_)(modules|require|set)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(proxy_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_convert_head|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|connect_timeout|cookie_domain|cookie_flags|cookie_path|force_ranges|headers_hash_bucket_size|headers_hash_max_size|hide_header|http_version|ignore_client_abort|ignore_headers|intercept_errors|limit_rate|max_temp_file_size|method|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|redirect|request_buffering|send_lowat|send_timeout|set_body|set_header|socket_keepalive|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_conf_command|ssl_crl|ssl_name|ssl_password_file|ssl_protocols|ssl_server_name|ssl_session_reuse|ssl_trusted_certificate|ssl_verify|ssl_verify_depth|store|store_access|temp_file_write_size|temp_path|buffer|pass_error_message|protocol|smtp_auth|timeout|protocol_timeout|download_rate|half_close|requests|responses|session_drop|ssl|upload_rate)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(real_)(ip_header|ip_recursive)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(referer_)(hash_bucket_size|hash_max_size)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(scgi_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|connect_timeout|force_ranges|hide_header|ignore_client_abort|ignore_headers|intercept_errors|limit_rate|max_temp_file_size|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|param|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|request_buffering|send_timeout|socket_keepalive|store|store_access|temp_file_write_size|temp_path)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(secure_)(link|link_md5|link_secret)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(session_)(log|log_format|log_zone)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(spdy_)(chunk_size|headers_comp)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(ssi_)(last_modified|min_file_chunk|silent_errors|types|value_length)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(sub_)(filter|filter_last_modified|filter_once|filter_types)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(health_)(check|check_timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(userid_)(domain|expires|flags|mark|name|p3p|path|service)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(uwsgi_)(bind|buffer_size|buffering|buffers|busy_buffers_size|cache|cache_background_update|cache_bypass|cache_key|cache_lock|cache_lock_age|cache_lock_timeout|cache_max_range_offset|cache_methods|cache_min_uses|cache_path|cache_purge|cache_revalidate|cache_use_stale|cache_valid|connect_timeout|force_ranges|hide_header|ignore_client_abort|ignore_headers|intercept_errors|limit_rate|max_temp_file_size|modifier1|modifier2|next_upstream|next_upstream_timeout|next_upstream_tries|no_cache|param|pass|pass_header|pass_request_body|pass_request_headers|read_timeout|request_buffering|send_timeout|socket_keepalive|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_conf_command|ssl_crl|ssl_name|ssl_password_file|ssl_protocols|ssl_server_name|ssl_session_reuse|ssl_trusted_certificate|ssl_verify|ssl_verify_depth|store|store_access|temp_file_write_size|temp_path)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(http2_)(body_preread_size|chunk_size|idle_timeout|max_concurrent_pushes|max_concurrent_streams|max_field_size|max_header_size|max_requests|push|push_preload|recv_buffer_size|recv_timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(xslt_)(last_modified|param|string_param|stylesheet|types)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(imap_)(auth|capabilities|client_buffer)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(pop3_)(auth|capabilities)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(smtp_)(auth|capabilities|client_buffer|greeting_delay)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(preread_)(buffer_size|timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(zone_)(sync_buffers|sync_connect_retry_interval|sync_connect_timeout|sync_interval|sync_recv_buffer_size|sync_server|sync_ssl|sync_ssl_certificate|sync_ssl_certificate_key|sync_ssl_ciphers|sync_ssl_conf_command|sync_ssl_crl|sync_ssl_name|sync_ssl_password_file|sync_ssl_protocols|sync_ssl_server_name|sync_ssl_trusted_certificate|sync_ssl_verify|sync_ssl_verify_depth|sync_timeout)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(js_)(body_filter|content|fetch_ciphers|fetch_protocols|fetch_trusted_certificate|fetch_verify_depth|header_filter|import|include|path|set|var|access|filter|preread)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" }, "4": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "([\"'\\s]|^)(daemon|env|include|pid|use|user|aio|alias|directio|etag|listen|resolver|root|satisfy|sendfile|allow|deny|api|autoindex|charset|geo|gunzip|gzip|expires|index|keyval|mirror|perl|set|slice|ssi|ssl|zone|state|hash|keepalive|queue|random|sticky|match|userid|protocol|timeout|xclient|starttls|load_module|lock_file|master_process|multi_accept|pcre_jit|thread_pool|timer_resolution|working_directory|absolute_redirect|aio_write|chunked_transfer_encoding|connection_pool_size|default_type|directio_alignment|disable_symlinks|if_modified_since|ignore_invalid_headers|large_client_header_buffers|merge_slashes|output_buffers|port_in_redirect|postpone_output|read_ahead|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver_timeout|sendfile_max_chunk|subrequest_output_buffer_size|try_files|underscores_in_headers|addition_types|override_charset|source_charset|create_full_put_path|min_delete_depth|f4f_buffer_size|gunzip_buffers|keyval_zone|access_log|mirror_request_body|random_index|set_real_ip_from|valid_referers|rewrite_log|uninitialized_variable_warn|split_clients|least_time|sticky_cookie_insert|xml_entities|google_perftools_profiles)([\"'\\s]|$)", "end": ";", "beginCaptures": { "1": { "name": "keyword.directive.nginx" }, "2": { "name": "keyword.directive.nginx" }, "3": { "name": "keyword.directive.nginx" } }, "endCaptures": { "0": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "\\b([a-zA-Z0-9\\_]+)\\s+", "end": "(;|$)", "beginCaptures": { "1": { "name": "keyword.directive.unknown.nginx" } }, "endCaptures": { "1": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] }, { "begin": "\\b([a-z]+\\/[A-Za-z0-9\\-\\.\\+]+)\\b", "end": "(;)", "beginCaptures": { "1": { "name": "constant.other.mediatype.nginx" } }, "endCaptures": { "1": { "name": "punctuation.terminator.nginx" } }, "patterns": [ { "include": "#values" } ] } ], "repository": { "if_condition": { "patterns": [ { "include": "#variables" }, { "name": "keyword.operator.nginx", "match": "\\!?\\~\\*?\\s" }, { "name": "keyword.operator.nginx", "match": "\\!?\\-[fdex]\\s" }, { "name": "keyword.operator.nginx", "match": "\\!?=[^=]" }, { "include": "#regexp_and_string" } ] }, "server_parameters": { "patterns": [ { "match": "(?:^|\\s)(weight|max_conn|max_fails|fail_timeout|slow_start)(=)([0-9][0-9\\.]*[bBkKmMgGtTsShHdD]?)(?:\\s|;|$)", "captures": { "1": { "name": "variable.parameter.nginx" }, "2": { "name": "keyword.operator.nginx" }, "3": { "name": "constant.numeric.nginx" } } }, { "include": "#values" } ] }, "variables": { "patterns": [ { "match": "(\\$)([A-Za-z0-9\\_]+)\\b", "captures": { "1": { "name": "punctuation.definition.variable.nginx" }, "2": { "name": "variable.other.nginx" } } }, { "match": "(\\$\\{)([A-Za-z0-9\\_]+)(\\})", "captures": { "1": { "name": "punctuation.definition.variable.nginx" }, "2": { "name": "variable.other.nginx" }, "3": { "name": "punctuation.definition.variable.nginx" } } } ] }, "regexp_and_string": { "patterns": [ { "name": "string.regexp.nginx", "match": "\\^.*?\\$" }, { "name": "string.quoted.double.nginx", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.nginx", "match": "\\\\[\"'nt\\\\]" }, { "include": "#variables" } ] }, { "name": "string.quoted.single.nginx", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.nginx", "match": "\\\\[\"'nt\\\\]" }, { "include": "#variables" } ] } ] }, "values": { "patterns": [ { "include": "#variables" }, { "name": "comment.line.number-sign", "match": "\\#.*" }, { "match": "[\\t ](=?[0-9][0-9\\.]*[bBkKmMgGtTsShHdD]?)(?=[\\t ;])", "captures": { "1": { "name": "constant.numeric.nginx" } } }, { "name": "constant.language.nginx", "match": "[\\t ](on|off|true|false)(?=[\\t ;])" }, { "name": "constant.language.nginx", "match": "[\\t ](kqueue|rtsig|epoll|\\/dev\\/poll|select|poll|eventport|max|all|default_server|default|main|crit|error|debug|warn|notice|last)(?=[\\t ;])" }, { "name": "keyword.operator.nginx", "match": "\\\\.*\\ |\\~\\*|\\~|\\!\\~\\*|\\!\\~" }, { "include": "#regexp_and_string" } ] } }, "scopeName": "source.nginx", "uuid": "0C04066A-12D2-43CA-8238-00A12CE4C12D" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/nim.tmLanguage.json ================================================ { "fileTypes": ["nim"], "keyEquivalent": "^~N", "name": "nim", "patterns": [ { "begin": "[ \\t]*##\\[", "contentName": "comment.block.doc-comment.content.nim", "end": "\\]##", "name": "comment.block.doc-comment.nim", "patterns": [ { "include": "#multilinedoccomment", "name": "comment.block.doc-comment.nested.nim" } ] }, { "begin": "[ \\t]*#\\[", "contentName": "comment.block.content.nim", "end": "\\]#", "name": "comment.block.nim", "patterns": [ { "include": "#multilinecomment", "name": "comment.block.nested.nim" } ] }, { "begin": "(^[ \\t]+)?(?=##)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.nim" } }, "end": "(?!\\G)", "patterns": [ { "begin": "##", "beginCaptures": { "0": { "name": "punctuation.definition.comment.nim" } }, "end": "\\n", "name": "comment.line.number-sign.doc-comment.nim" } ] }, { "begin": "(^[ \\t]+)?(?=#[^\\[])", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.nim" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.nim" } }, "end": "\\n", "name": "comment.line.number-sign.nim" } ] }, { "comment": "A nim procedure or method", "name": "meta.proc.nim", "patterns": [ { "begin": "\\b(proc|method|template|macro|iterator|converter|func)\\s+\\`?([^\\:\\{\\s\\`\\*\\(]*)\\`?(\\s*\\*)?\\s*(?=\\(|\\=|:|\\[|\\n|\\{)", "captures": { "1": { "name": "keyword.other" }, "2": { "name": "entity.name.function.nim" }, "3": { "name": "keyword.control.export" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] } ] }, { "begin": "discard \"\"\"", "comment": "A discarded triple string literal comment", "end": "\"\"\"(?!\")", "name": "comment.line.discarded.nim" }, { "include": "#float_literal" }, { "include": "#integer_literal" }, { "comment": "Operator as function name", "match": "(?<=\\`)[^\\` ]+(?=\\`)", "name": "entity.name.function.nim" }, { "captures": { "1": { "name": "keyword.control.export" } }, "comment": "Export qualifier.", "match": "\\b\\s*(\\*)(?:\\s*(?=[,:])|\\s+(?=[=]))" }, { "comment": "Export qualifier following a type def.", "match": "\\b([A-Z]\\w+)(\\*)", "captures": { "1": { "name": "support.type.nim" }, "2": { "name": "keyword.control.export" } } }, { "include": "#string_literal" }, { "comment": "Language Constants.", "match": "\\b(true|false|Inf|NegInf|NaN|nil)\\b", "name": "constant.language.nim" }, { "comment": "Keywords that affect program control flow or scope.", "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield)\\b", "name": "keyword.control.nim" }, { "comment": "Keyword boolean operators for expressions.", "match": "(\\b(and|in|is|isnot|not|notin|or|xor)\\b)", "name": "keyword.boolean.nim" }, { "comment": "Generic operators for expressions.", "match": "(=|\\+|-|\\*|/|<|>|@|\\$|~|&|%|!|\\?|\\^|\\.|:|\\\\)+", "name": "keyword.operator.nim" }, { "comment": "Other keywords.", "match": "(\\b(addr|as|asm|atomic|bind|cast|const|converter|concept|defer|discard|distinct|div|enum|export|from|import|include|let|mod|mixin|object|of|ptr|ref|shl|shr|static|type|using|var|tuple|iterator|macro|func|method|proc|template)\\b)", "name": "keyword.other.nim" }, { "comment": "Invalid and unused keywords.", "match": "(\\b(generic|interface|lambda|out|shared)\\b)", "name": "invalid.illegal.invalid-keyword.nim" }, { "comment": "Common functions", "match": "\\b(new|await|assert|echo|defined|declared|newException|countup|countdown|high|low)\\b", "name": "keyword.other.common.function.nim" }, { "comment": "Built-in, concrete types.", "match": "\\b(((uint|int)(8|16|32|64)?)|float(32|64)?|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed)\\b", "name": "storage.type.concrete.nim" }, { "comment": "Built-in, generic types.", "match": "\\b(range|array|seq|set|pointer)\\b", "name": "storage.type.generic.nim" }, { "comment": "Special types.", "match": "\\b(openarray|varargs|void)\\b", "name": "storage.type.generic.nim" }, { "comment": "Other constants.", "match": "\\b[A-Z][A-Z0-9_]+\\b", "name": "support.constant.nim" }, { "comment": "Other types.", "match": "\\b[A-Z]\\w+\\b", "name": "support.type.nim" }, { "comment": "Function call.", "match": "\\b\\w+\\b(?=(\\[([a-zA-Z0-9_,]|\\s)+\\])?\\()", "name": "support.function.any-method.nim" }, { "comment": "Function call (no parenthesis).", "match": "(?!(openarray|varargs|void|range|array|seq|set|pointer|new|await|assert|echo|defined|declared|newException|countup|countdown|high|low|((uint|int)(8|16|32|64)?)|float(32|64)?|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed|addr|as|asm|atomic|bind|cast|const|converter|concept|defer|discard|distinct|div|enum|export|from|import|include|let|mod|mixin|object|of|ptr|ref|shl|shr|static|type|using|var|tuple|iterator|macro|func|method|proc|template|and|in|is|isnot|not|notin|or|xor|proc|method|template|macro|iterator|converter|func|true|false|Inf|NegInf|NaN|nil|block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield)\\b)\\w+\\s+(?!(and|in|is|isnot|not|notin|or|xor|[^a-zA-Z0-9_\"'`(-+]+)\\b)(?=[a-zA-Z0-9_\"'`(-+])", "name": "support.function.any-method.nim" }, { "begin": "(^\\s*)?(?=\\{\\.emit: ?\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "\\{\\.(emit:) ?(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "source.c", "end": "(\")\"\"(?!\")(\\.{0,1}\\})?", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "source.c" } }, "name": "meta.embedded.block.c", "patterns": [ { "begin": "\\`", "end": "\\`", "name": "keyword.operator.nim" }, { "include": "source.c" } ] } ] }, { "begin": "\\{\\.", "beginCaptures": { "0": { "name": "punctuation.pragma.start.nim" } }, "end": "\\.?\\}", "endCaptures": { "0": { "name": "punctuation.pragma.end.nim" } }, "patterns": [ { "begin": "\\b([[:alpha:]]\\w*)(?:\\s|\\s*:)", "beginCaptures": { "1": { "name": "meta.preprocessor.pragma.nim" } }, "end": "(?=\\.?\\}|,)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "\\b([[:alpha:]]\\w*)\\(", "beginCaptures": { "1": { "name": "meta.preprocessor.pragma.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "match": "\\b([[:alpha:]]\\w*)(?=\\.?\\}|,)", "captures": { "1": { "name": "meta.preprocessor.pragma.nim" } } }, { "begin": "\\b([[:alpha:]]\\w*)(\"\"\")", "beginCaptures": { "1": { "name": "meta.preprocessor.pragma.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.triple.raw.nim" }, { "begin": "\\b([[:alpha:]]\\w*)(\")", "beginCaptures": { "1": { "name": "meta.preprocessor.pragma.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.raw.nim" }, { "begin": "\\b(hint\\[\\w+\\]):", "beginCaptures": { "1": { "name": "meta.preprocessor.pragma.nim" } }, "end": "(?=\\.?\\}|,)", "patterns": [ { "include": "source.nim" } ] }, { "match": ",", "name": "punctuation.separator.comma.nim" } ] }, { "begin": "(^\\s*)?(?=asm \"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(asm) (\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "source.asm", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "source.asm" } }, "name": "meta.embedded.block.asm", "patterns": [ { "begin": "\\`", "end": "\\`", "name": "keyword.operator.nim" }, { "include": "source.asm" } ] } ] }, { "captures": { "1": { "name": "storage.type.function.nim" }, "2": { "name": "keyword.operator.nim" } }, "comment": "tmpl specifier", "match": "(tmpl(i)?)(?=( (html|xml|js|css|glsl|md))?\"\"\")" }, { "begin": "(^\\s*)?(?=html\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(html)(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "text.html", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "text.html" } }, "name": "meta.embedded.block.html", "patterns": [ { "begin": "(?<!\\$)(\\$)\\(", "captures": { "1": { "name": "keyword.operator.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)\\{", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "\\}", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "(\\{|\\n)", "endCaptures": { "1": { "name": "plain" } }, "patterns": [ { "include": "source.nim" } ] }, { "match": "(?<!\\$)(\\$\\w+)", "name": "keyword.operator.nim" }, { "include": "text.html.basic" } ] } ] }, { "begin": "(^\\s*)?(?=xml\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(xml)(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "text.xml", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "text.xml" } }, "name": "meta.embedded.block.xml", "patterns": [ { "begin": "(?<!\\$)(\\$)\\(", "captures": { "1": { "name": "keyword.operator.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)\\{", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "\\}", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "(\\{|\\n)", "endCaptures": { "1": { "name": "plain" } }, "patterns": [ { "include": "source.nim" } ] }, { "match": "(?<!\\$)(\\$\\w+)", "name": "keyword.operator.nim" }, { "include": "text.xml" } ] } ] }, { "begin": "(^\\s*)?(?=js\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(js)(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "source.js", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "source.js" } }, "name": "meta.embedded.block.js", "patterns": [ { "begin": "(?<!\\$)(\\$)\\(", "captures": { "1": { "name": "keyword.operator.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)\\{", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "\\}", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "(\\{|\\n)", "endCaptures": { "1": { "name": "plain" } }, "patterns": [ { "include": "source.nim" } ] }, { "match": "(?<!\\$)(\\$\\w+)", "name": "keyword.operator.nim" }, { "include": "source.js" } ] } ] }, { "begin": "(^\\s*)?(?=css\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(css)(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "source.css", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "source.css" } }, "name": "meta.embedded.block.css", "patterns": [ { "begin": "(?<!\\$)(\\$)\\(", "captures": { "1": { "name": "keyword.operator.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)\\{", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "\\}", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "(\\{|\\n)", "endCaptures": { "1": { "name": "plain" } }, "patterns": [ { "include": "source.nim" } ] }, { "match": "(?<!\\$)(\\$\\w+)", "name": "keyword.operator.nim" }, { "include": "source.css" } ] } ] }, { "begin": "(^\\s*)?(?=glsl\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(glsl)(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "source.glsl", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "source.glsl" } }, "name": "meta.embedded.block.glsl", "patterns": [ { "begin": "(?<!\\$)(\\$)\\(", "captures": { "1": { "name": "keyword.operator.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)\\{", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "\\}", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "(\\{|\\n)", "endCaptures": { "1": { "name": "plain" } }, "patterns": [ { "include": "source.nim" } ] }, { "match": "(?<!\\$)(\\$\\w+)", "name": "keyword.operator.nim" }, { "include": "source.glsl" } ] } ] }, { "begin": "(^\\s*)?(?=md\"\"\")", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.nim" } }, "end": "(?!\\G)(\\s*$\\n?)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.nim" } }, "patterns": [ { "begin": "(md)(\"\"\")", "captures": { "1": { "name": "keyword.other.nim" }, "2": { "name": "punctuation.section.embedded.begin.nim" } }, "contentName": "text.html.markdown", "end": "(\")\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nim" }, "1": { "name": "text.html.markdown" } }, "name": "meta.embedded.block.html.markdown", "patterns": [ { "begin": "(?<!\\$)(\\$)\\(", "captures": { "1": { "name": "keyword.operator.nim" } }, "end": "\\)", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)\\{", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "\\}", "patterns": [ { "include": "source.nim" } ] }, { "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )", "captures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "keyword.operator.nim" } }, "end": "(\\{|\\n)", "endCaptures": { "1": { "name": "plain" } }, "patterns": [ { "include": "source.nim" } ] }, { "match": "(?<!\\$)(\\$\\w+)", "name": "keyword.operator.nim" }, { "include": "text.html.markdown" } ] } ] } ], "repository": { "multilinecomment": { "begin": "#\\[", "end": "\\]#", "patterns": [ { "include": "#multilinecomment" } ] }, "multilinedoccomment": { "begin": "##\\[", "end": "\\]##", "patterns": [ { "include": "#multilinedoccomment" } ] }, "char_escapes": { "patterns": [ { "match": "\\\\[cC]|\\\\[rR]", "name": "constant.character.escape.carriagereturn.nim" }, { "match": "\\\\[lL]|\\\\[nN]", "name": "constant.character.escape.linefeed.nim" }, { "match": "\\\\[fF]", "name": "constant.character.escape.formfeed.nim" }, { "match": "\\\\[tT]", "name": "constant.character.escape.tabulator.nim" }, { "match": "\\\\[vV]", "name": "constant.character.escape.verticaltabulator.nim" }, { "match": "\\\\\\\"", "name": "constant.character.escape.double-quote.nim" }, { "match": "\\\\'", "name": "constant.character.escape.single-quote.nim" }, { "match": "\\\\[0-9]+", "name": "constant.character.escape.chardecimalvalue.nim" }, { "match": "\\\\[aA]", "name": "constant.character.escape.alert.nim" }, { "match": "\\\\[bB]", "name": "constant.character.escape.backspace.nim" }, { "match": "\\\\[eE]", "name": "constant.character.escape.escape.nim" }, { "match": "\\\\[xX]\\h\\h", "name": "constant.character.escape.hex.nim" }, { "match": "\\\\\\\\", "name": "constant.character.escape.backslash.nim" } ] }, "string_escapes": { "patterns": [ { "match": "\\\\[pP]", "name": "constant.character.escape.newline.nim" }, { "match": "\\\\[uU]\\h\\h\\h\\h", "name": "constant.character.escape.hex.nim" }, { "match": "\\\\[uU]\\{\\h+\\}", "name": "constant.character.escape.hex.nim" }, { "include": "#char_escapes" } ] }, "raw_string_escapes": { "match": "[^\"](\"\")", "captures": { "1": { "name": "constant.character.escape.double-quote.nim" } } }, "fmt_interpolation": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.nim" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.nim" } }, "patterns": [ { "begin": ":", "end": "(?=\\})", "name": "meta.template.format-specifier.nim" }, { "include": "source.nim" } ], "name": "meta.template.expression.nim" }, "string_literal": { "patterns": [ { "include": "#fmt_string_triple" }, { "include": "#fmt_string_triple_operator" }, { "include": "#extended_string_quoted_triple_raw" }, { "include": "#string_quoted_triple_raw" }, { "include": "#fmt_string_operator" }, { "include": "#fmt_string" }, { "include": "#fmt_string_call" }, { "include": "#string_quoted_double_raw" }, { "include": "#extended_string_quoted_double_raw" }, { "include": "#string_quoted_single" }, { "include": "#string_quoted_triple" }, { "include": "#string_quoted_double" } ] }, "fmt_string": { "begin": "\\b(fmt)(\")", "beginCaptures": { "1": { "name": "support.function.any-method.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.raw.nim", "patterns": [ { "match": "(?<!\")\"(?!\")", "name": "invalid.illegal.nim" }, { "include": "#raw_string_escapes" }, { "include": "#fmt_interpolation" } ] }, "fmt_string_triple": { "begin": "\\b(fmt)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.any-method.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.triple.raw.nim", "patterns": [ { "include": "#fmt_interpolation" } ] }, "fmt_string_operator": { "begin": "(&)(\")", "beginCaptures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.nim", "patterns": [ { "match": "\"", "name": "invalid.illegal.nim" }, { "include": "#string_escapes" }, { "include": "#fmt_interpolation" } ] }, "fmt_string_triple_operator": { "begin": "(&)(\"\"\")", "beginCaptures": { "1": { "name": "keyword.operator.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.triple.raw.nim", "patterns": [ { "include": "#fmt_interpolation" } ] }, "fmt_string_call": { "begin": "(fmt)\\((?=\")", "beginCaptures": { "1": { "name": "support.function.any-method.nim" } }, "end": "\\)", "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"(?=\\))", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.nim", "patterns": [ { "match": "\"", "name": "invalid.illegal.nim" }, { "include": "#string_escapes" }, { "include": "#fmt_interpolation" } ] } ] }, "string_quoted_double": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nim" } }, "comment": "Double Quoted String", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.nim", "patterns": [ { "include": "#string_escapes" } ] }, "string_quoted_double_raw": { "begin": "\\br\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.raw.nim", "patterns": [ { "include": "#raw_string_escapes" } ] }, "extended_string_quoted_double_raw": { "begin": "\\b(\\w+)(\")", "beginCaptures": { "1": { "name": "support.function.any-method.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.double.raw.nim", "patterns": [ { "include": "#raw_string_escapes" } ] }, "string_quoted_single": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nim" } }, "comment": "Single quoted character literal", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.single.nim", "patterns": [ { "include": "#char_escapes" }, { "match": "([^']{2,}?)", "name": "invalid.illegal.character.nim" } ] }, "string_quoted_triple": { "begin": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nim" } }, "comment": "Triple Quoted String", "end": "\"\"\"(?!\")", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.triple.nim" }, "string_quoted_triple_raw": { "begin": "r\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nim" } }, "comment": "Raw Triple Quoted String", "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.triple.raw.nim" }, "extended_string_quoted_triple_raw": { "begin": "\\b(\\w+)(\"\"\")", "beginCaptures": { "1": { "name": "support.function.any-method.nim" }, "2": { "name": "punctuation.definition.string.begin.nim" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nim" } }, "name": "string.quoted.triple.raw.nim" }, "float_literal": { "patterns": [ { "match": "\\b\\d[_\\d]*((\\.\\d[_\\d]*([eE][\\+\\-]?\\d[_\\d]*)?)|([eE][\\+\\-]?\\d[_\\d]*))('([fF](32|64|128)|[fFdD]))?", "name": "constant.numeric.float.decimal.nim" }, { "match": "\\b0[xX]\\h[_\\h]*'([fF](32|64|128)|[fFdD])", "name": "constant.numeric.float.hexadecimal.nim" }, { "match": "\\b0o[0-7][_0-7]*'([fF](32|64|128)|[fFdD])", "name": "constant.numeric.float.octal.nim" }, { "match": "\\b0(b|B)[01][_01]*'([fF](32|64|128)|[fFdD])", "name": "constant.numeric.float.binary.nim" }, { "match": "\\b(\\d[_\\d]*)'([fF](32|64|128)|[fFdD])", "name": "constant.numeric.float.decimal.nim" } ] }, "integer_literal": { "patterns": [ { "match": "\\b(0[xX]\\h[_\\h]*)('(([iIuU](8|16|32|64))|[uU]))?", "name": "constant.numeric.integer.hexadecimal.nim" }, { "match": "\\b(0o[0-7][_0-7]*)('(([iIuU](8|16|32|64))|[uU]))?", "name": "constant.numeric.integer.octal.nim" }, { "match": "\\b(0(b|B)[01][_01]*)('(([iIuU](8|16|32|64))|[uU]))?", "name": "constant.numeric.integer.binary.nim" }, { "match": "\\b(\\d[_\\d]*)('(([iIuU](8|16|32|64))|[uU]))?", "name": "constant.numeric.integer.decimal.nim" } ] } }, "scopeName": "source.nim", "uuid": "6DD62CE8-B129-4554-BD8E-CE5DB490E5A4" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/nix.tmLanguage.json ================================================ { "fileTypes": ["nix"], "name": "nix", "patterns": [ { "include": "#expression" } ], "repository": { "attribute-bind": { "patterns": [ { "include": "#attribute-name" }, { "include": "#attribute-bind-from-equals" } ] }, "attribute-bind-from-equals": { "begin": "\\=", "beginCaptures": { "0": { "name": "keyword.operator.bind.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.bind.nix" } }, "patterns": [ { "include": "#expression" } ] }, "attribute-inherit": { "begin": "\\binherit\\b", "beginCaptures": { "0": { "name": "keyword.other.inherit.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.inherit.nix" } }, "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [ { "begin": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [ { "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" } ] }, { "include": "#expression" } ] }, { "begin": "(?=[a-zA-Z\\_])", "end": "(?=\\;)", "patterns": [ { "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" } ] }, { "include": "#others" } ] }, "attribute-name": { "patterns": [ { "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.multipart.nix" }, { "match": "\\." }, { "include": "#string-quoted" }, { "include": "#interpolation" } ] }, "attribute-name-single": { "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.single.nix" }, "attrset-contents": { "patterns": [ { "include": "#attribute-inherit" }, { "include": "#bad-reserved" }, { "include": "#attribute-bind" }, { "include": "#others" } ] }, "attrset-definition": { "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "begin": "(\\{)", "beginCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "end": "(\\})", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [ { "include": "#attrset-contents" } ] }, { "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] } ] }, "attrset-definition-brace-opened": { "patterns": [ { "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, { "begin": "(?=.?)", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [ { "include": "#attrset-contents" } ] } ] }, "attrset-for-sure": { "patterns": [ { "begin": "(?=\\brec\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "begin": "\\brec\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=\\{)", "patterns": [ { "include": "#others" } ] }, { "include": "#attrset-definition" }, { "include": "#others" } ] }, { "begin": "(?=\\{\\s*(\\}|[^,?]*(=|;)))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#attrset-definition" }, { "include": "#others" } ] } ] }, "attrset-or-function": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.attrset-or-function.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [ { "begin": "(?=(\\s*\\}|\\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#attrset-definition-brace-opened" } ] }, { "begin": "(?=(\\.\\.\\.|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[,?]))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-definition-brace-opened" } ] }, { "include": "#bad-reserved" }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.maybe.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [ { "begin": "(?=\\.)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#attrset-definition-brace-opened" } ] }, { "begin": "\\s*(\\,)", "beginCaptures": { "1": { "name": "keyword.operator.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-definition-brace-opened" } ] }, { "begin": "(?=\\=)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#attribute-bind-from-equals" }, { "include": "#attrset-definition-brace-opened" } ] }, { "begin": "(?=\\?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-parameter-default" }, { "begin": "\\,", "beginCaptures": { "0": { "name": "keyword.operator.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-definition-brace-opened" } ] } ] }, { "include": "#others" } ] }, { "include": "#others" } ] }, "bad-reserved": { "match": "\\b(if|then|else|assert|with|let|in|rec|inherit)\\b", "name": "invalid.illegal.reserved.nix" }, "comment": { "patterns": [ { "begin": "/\\*([^*]|\\*[^\\/])*", "end": "\\*\\/", "name": "comment.block.nix", "patterns": [ { "include": "#comment-remark" } ] }, { "begin": "\\#", "end": "$", "name": "comment.line.number-sign.nix", "patterns": [ { "include": "#comment-remark" } ] } ] }, "comment-remark": { "captures": { "1": { "name": "markup.bold.comment.nix" } }, "match": "(TODO|FIXME|BUG|\\!\\!\\!):?" }, "constants": { "patterns": [ { "begin": "\\b(builtins|true|false|null)\\b", "beginCaptures": { "0": { "name": "constant.language.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, { "begin": "\\b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\\b", "beginCaptures": { "0": { "name": "support.function.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, { "begin": "\\b[0-9]+\\b", "beginCaptures": { "0": { "name": "constant.numeric.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] } ] }, "expression": { "patterns": [ { "include": "#parens-and-cont" }, { "include": "#list-and-cont" }, { "include": "#string" }, { "include": "#interpolation" }, { "include": "#with-assert" }, { "include": "#function-for-sure" }, { "include": "#attrset-for-sure" }, { "include": "#attrset-or-function" }, { "include": "#let" }, { "include": "#if" }, { "include": "#operator-unary" }, { "include": "#constants" }, { "include": "#bad-reserved" }, { "include": "#parameter-name-and-cont" }, { "include": "#others" } ] }, "expression-cont": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#parens" }, { "include": "#list" }, { "include": "#string" }, { "include": "#interpolation" }, { "include": "#function-for-sure" }, { "include": "#attrset-for-sure" }, { "include": "#attrset-or-function" }, { "match": "(\\bor\\b|\\.|==|!=|!|\\<\\=|\\<|\\>\\=|\\>|&&|\\|\\||-\\>|//|\\?|\\+\\+|-|\\*|/(?=([^*]|$))|\\+)", "name": "keyword.operator.nix" }, { "include": "#constants" }, { "include": "#bad-reserved" }, { "include": "#parameter-name" }, { "include": "#others" } ] }, "function-body": { "begin": "(@\\s*([a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)\\s*)?(\\:)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression" } ] }, "function-body-from-colon": { "begin": "(\\:)", "beginCaptures": { "0": { "name": "punctuation.definition.function.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression" } ] }, "function-contents": { "patterns": [ { "include": "#bad-reserved" }, { "include": "#function-parameter" }, { "include": "#others" } ] }, "function-definition": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-body-from-colon" }, { "begin": "(?=.?)", "end": "(?=\\:)", "patterns": [ { "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", "beginCaptures": { "0": { "name": "variable.parameter.function.4.nix" } }, "end": "(?=\\:)", "patterns": [ { "begin": "\\@", "end": "(?=\\:)", "patterns": [ { "include": "#function-header-until-colon-no-arg" }, { "include": "#others" } ] }, { "include": "#others" } ] }, { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [ { "include": "#function-header-until-colon-with-arg" } ] } ] }, { "include": "#others" } ] }, "function-definition-brace-opened": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-body-from-colon" }, { "begin": "(?=.?)", "end": "(?=\\:)", "patterns": [ { "include": "#function-header-close-brace-with-arg" }, { "begin": "(?=.?)", "end": "(?=\\})", "patterns": [ { "include": "#function-contents" } ] } ] }, { "include": "#others" } ] }, "function-for-sure": { "patterns": [ { "begin": "(?=(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[:@]|\\{[^}]*\\}\\s*:|\\{[^#}\"'/=]*[,\\?]))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#function-definition" } ] } ] }, "function-header-close-brace-no-arg": { "begin": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.nix" } }, "end": "(?=\\:)", "patterns": [ { "include": "#others" } ] }, "function-header-close-brace-with-arg": { "begin": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.nix" } }, "end": "(?=\\:)", "patterns": [ { "include": "#function-header-terminal-arg" }, { "include": "#others" } ] }, "function-header-open-brace": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.2.nix" } }, "end": "(?=\\})", "patterns": [ { "include": "#function-contents" } ] }, "function-header-terminal-arg": { "begin": "(?=@)", "end": "(?=\\:)", "patterns": [ { "begin": "\\@", "end": "(?=\\:)", "patterns": [ { "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", "end": "(?=\\:)", "name": "variable.parameter.function.3.nix" }, { "include": "#others" } ] }, { "include": "#others" } ] }, "function-header-until-colon-no-arg": { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [ { "include": "#function-header-open-brace" }, { "include": "#function-header-close-brace-no-arg" } ] }, "function-header-until-colon-with-arg": { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [ { "include": "#function-header-open-brace" }, { "include": "#function-header-close-brace-with-arg" } ] }, "function-parameter": { "patterns": [ { "begin": "(\\.\\.\\.)", "end": "(,|(?=\\}))", "name": "keyword.operator.nix", "patterns": [ { "include": "#others" } ] }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.1.nix" } }, "end": "(,|(?=\\}))", "endCaptures": { "0": { "name": "keyword.operator.nix" } }, "patterns": [ { "include": "#whitespace" }, { "include": "#comment" }, { "include": "#function-parameter-default" }, { "include": "#expression" } ] }, { "include": "#others" } ] }, "function-parameter-default": { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.nix" } }, "end": "(?=[,}])", "patterns": [ { "include": "#expression" } ] }, "if": { "begin": "(?=\\bif\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "begin": "\\bif\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\bth(?=en\\b)", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [ { "include": "#expression" } ] }, { "begin": "(?<=th)en\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\bel(?=se\\b)", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [ { "include": "#expression" } ] }, { "begin": "(?<=el)se\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [ { "include": "#expression" } ] } ] }, "illegal": { "match": ".", "name": "invalid.illegal" }, "interpolation": { "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.nix" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nix" } }, "name": "markup.italic", "patterns": [ { "include": "#expression" } ] }, "let": { "begin": "(?=\\blet\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "begin": "\\blet\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(in|else|then)\\b))", "patterns": [ { "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#attrset-contents" } ] }, { "begin": "(^|(?<=\\}))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, { "include": "#others" } ] }, { "include": "#attrset-contents" }, { "include": "#others" } ] }, { "begin": "\\bin\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression" } ] } ] }, "list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.list.nix" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.list.nix" } }, "patterns": [ { "include": "#expression" } ] }, "list-and-cont": { "begin": "(?=\\[)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#list" }, { "include": "#expression-cont" } ] }, "operator-unary": { "match": "(!|-)", "name": "keyword.operator.unary.nix" }, "others": { "patterns": [ { "include": "#whitespace" }, { "include": "#comment" }, { "include": "#illegal" } ] }, "parameter-name": { "captures": { "0": { "name": "variable.parameter.name.nix" } }, "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*" }, "parameter-name-and-cont": { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.name.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, "parens": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.expression.nix" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.expression.nix" } }, "patterns": [ { "include": "#expression" } ] }, "parens-and-cont": { "begin": "(?=\\()", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#parens" }, { "include": "#expression-cont" } ] }, "string": { "patterns": [ { "begin": "(?=\\'\\')", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "begin": "\\'\\'", "beginCaptures": { "0": { "name": "punctuation.definition.string.other.start.nix" } }, "end": "\\'\\'(?!\\$|\\'|\\\\.)", "endCaptures": { "0": { "name": "punctuation.definition.string.other.end.nix" } }, "name": "string.quoted.other.nix", "patterns": [ { "match": "\\'\\'(\\$|\\'|\\\\.)", "name": "constant.character.escape.nix" }, { "include": "#interpolation" } ] }, { "include": "#expression-cont" } ] }, { "begin": "(?=\\\")", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#string-quoted" }, { "include": "#expression-cont" } ] }, { "begin": "([a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)", "beginCaptures": { "0": { "name": "string.unquoted.path.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, { "begin": "(\\<[a-zA-Z0-9\\.\\_\\-\\+]+(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)*\\>)", "beginCaptures": { "0": { "name": "string.unquoted.spath.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] }, { "begin": "([a-zA-Z][a-zA-Z0-9\\+\\-\\.]*\\:[a-zA-Z0-9\\%\\/\\?\\:\\@\\&\\=\\+\\$\\,\\-\\_\\.\\!\\~\\*\\']+)", "beginCaptures": { "0": { "name": "string.unquoted.url.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [ { "include": "#expression-cont" } ] } ] }, "string-quoted": { "begin": "\\\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.double.start.nix" } }, "end": "\\\"", "endCaptures": { "0": { "name": "punctuation.definition.string.double.end.nix" } }, "name": "string.quoted.double.nix", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.nix" }, { "include": "#interpolation" } ] }, "whitespace": { "match": "\\s+" }, "with-assert": { "begin": "\\b(with|assert)\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\;", "patterns": [ { "include": "#expression" } ] } }, "scopeName": "source.nix", "uuid": "0514fd5f-acb6-436d-b42c-7643e6d36c8f" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/nsis.tmLanguage.json ================================================ { "scopeName": "source.nsis", "fileTypes": ["nsi", "nsh"], "patterns": [ { "match": "(\\b|^\\s*)\\!(include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|finalize|getdllversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace)\\b", "name": "keyword.compiler.nsis" }, { "match": "(\\b|^\\s*)(Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|IntCmp|IntCmpU|IntFmt|IntOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetPluginUnload|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegStr|WriteUninstaller|XPStyle)\\b", "name": "keyword.command.nsis" }, { "match": "(\\b|^\\s*)\\!(ifdef|ifndef|if|ifmacrodef|ifmacrondef|else|endif)\\b", "name": "keyword.control.nsis" }, { "match": "(\\b|^\\s*)(?i)\\w+\\:\\:\\w+", "name": "keyword.plugin.nsis" }, { "match": "[!<>]?=|<>|<|>", "name": "keyword.operator.comparison.nsis" }, { "match": "(\\b|^\\s*)(Function|FunctionEnd|Section|SectionEnd|SectionGroup|SectionGroupEnd|SubSection|SubSectionEnd|PageEx|PageExEnd)\\b", "name": "support.function.nsis" }, { "match": "(\\b|^\\s*)(?i)(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\\b", "name": "support.constant.nsis" }, { "match": "\\b(true|on)\\b", "name": "constant.language.boolean.true.nsis" }, { "match": "\\b(false|off)\\b", "name": "constant.language.boolean.false.nsis" }, { "match": "(\\b|^\\s*)(?i)((un\\.)?components|(un\\.)?custom|(un\\.)?directory|(un\\.)?instfiles|(un\\.)?license|uninstConfirm|admin|all|auto|both|bottom|bzip2|current|force|hide|highest|ifdiff|ifnewer|lastused|leave|left|listonly|lzma|nevershow|none|normal|notset|right|show|silent|silentlog|textonly|top|try|user|Win10|Win7|Win8|WinVista|zlib)\\b", "name": "constant.language.option.nsis" }, { "match": "\\/(?i)(a|BRANDING|CENTER|COMPONENTSONLYONCUSTOM|CUSTOMSTRING\\=|date|e|ENABLECANCEL|FILESONLY|file|FINAL|GLOBAL|gray|ifempty|ifndef|ignorecase|IMGID\\=|ITALIC|LANG\\=|NOCUSTOM|noerrors|NONFATAL|nonfatal|oname\\=|o|REBOOTOK|redef|RESIZETOFIT|r|SHORT|SILENT|SOLID|STRIKE|TRIM|UNDERLINE|utcdate|windows|x)\\b", "name": "constant.language.slash-option.nsis" }, { "match": "\\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\b", "name": "constant.numeric.nsis" }, { "match": "\\${[\\w]+}", "name": "entity.name.function.nsis" }, { "match": "\\$[\\w]+", "name": "storage.type.function.nsis" }, { "begin": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nsis" } }, "end": "`", "patterns": [ { "match": "\\$\\\\.", "name": "constant.character.escape.nsis" } ], "name": "string.quoted.back.nsis", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nsis" } } }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nsis" } }, "end": "\"", "patterns": [ { "match": "\\$\\\\.", "name": "constant.character.escape.nsis" } ], "name": "string.quoted.double.nsis", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nsis" } } }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nsis" } }, "end": "'", "patterns": [ { "match": "\\$\\\\.", "name": "constant.character.escape.nsis" } ], "name": "string.quoted.single.nsis", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nsis" } } }, { "match": "(;|#).*$\\n?", "name": "comment.line.nsis", "captures": { "1": { "name": "punctuation.definition.comment.nsis" } } }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.nsis", "captures": { "0": { "name": "punctuation.definition.comment.nsis" } } }, { "match": "(\\!include|\\!insertmacro)\\b", "captures": { "match": { "name": "keyword.control.import.nsis" } } } ], "comment": "\n\ttodo: - highlight functions\n\t", "name": "NSIS", "uuid": "B6872F8A-D31D-11E0-9572-0800200C9A66" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/nu.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "nushell", "scopeName": "source.nushell", "patterns": [ { "include": "#define-variable" }, { "include": "#define-alias" }, { "include": "#function" }, { "include": "#extern" }, { "include": "#module" }, { "include": "#use-module" }, { "include": "#expression" }, { "include": "#comment" } ], "repository": { "string": { "patterns": [ { "include": "#string-single-quote" }, { "include": "#string-backtick" }, { "include": "#string-double-quote" }, { "include": "#string-interpolated-double" }, { "include": "#string-interpolated-single" }, { "include": "#string-raw" }, { "include": "#string-bare" } ] }, "string-escape": { "match": "\\\\(?:[bfrnt\\\\'\"/]|u[0-9a-fA-F]{4})", "name": "constant.character.escape.nushell" }, "string-bare": { "match": "[^$\\[{(\"',|#\\s|;][^\\[\\]{}()\"'\\s,|;]*", "name": "string.bare.nushell" }, "string-raw": { "begin": "r(#+)'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nushell" } }, "end": "'\\1", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nushell" } }, "name": "string.raw.nushell" }, "string-single-quote": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nushell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nushell" } }, "name": "string.quoted.single.nushell" }, "string-backtick": { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nushell" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nushell" } }, "name": "string.quoted.single.nushell" }, "string-double-quote": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nushell" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nushell" } }, "name": "string.quoted.double.nushell", "patterns": [ { "match": "\\w+" }, { "include": "#string-escape" } ] }, "string-interpolated-double": { "begin": "\\$\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nushell" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nushell" } }, "name": "string.interpolated.double.nushell", "patterns": [ { "match": "\\\\[()]", "name": "constant.character.escape.nushell" }, { "include": "#string-escape" }, { "include": "#paren-expression" } ] }, "string-interpolated-single": { "begin": "\\$'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.nushell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.nushell" } }, "name": "string.interpolated.single.nushell", "patterns": [{ "include": "#paren-expression" }] }, "control-keywords": { "comment": "Regex generated with list-to-tree (https://github.com/glcraft/list-to-tree)", "match": "(?<![0-9a-zA-Z_\\-.\\/:\\\\])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![0-9a-zA-Z_\\-.\\/:\\\\])", "name": "keyword.control.nushell" }, "comment": { "match": "(#.*)$", "name": "comment.nushell" }, "keyword": { "match": "(?:def(?:-env)?)", "name": "keyword.other.nushell" }, "parameters": { "match": "(?<=\\s)(-{1,2})[\\w-]+", "name": "variable.parameter.nushell", "captures": { "1": { "name": "keyword.control.nushell" } } }, "variables": { "match": "(\\$[a-zA-Z0-9_]+)((?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))*)", "captures": { "1": { "patterns": [ { "include": "#internal-variables" }, { "match": "\\$.+", "name": "variable.other.nushell" } ] }, "2": { "name": "variable.other.nushell" } } }, "variable-fields": { "match": "(?<=\\)|\\}|\\])(?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))+", "name": "variable.other.nushell" }, "internal-variables": { "match": "\\$(?:nu|env)\\b", "name": "variable.language.nushell" }, "datetime": { "match": "\\b\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:\\+\\d{2}:?\\d{2}|Z)?)?\\b", "name": "constant.numeric.nushell" }, "numbers-hexa": { "match": "(?<![\\w-])_*+0_*+x_*+[0-9a-fA-F][0-9a-fA-F_]*+(?![\\w.])", "name": "constant.numeric.nushell" }, "numbers-octal": { "match": "(?<![\\w-])_*+0_*+o_*+[0-7][0-7_]*+(?![\\w.])", "name": "constant.numeric.nushell" }, "numbers-binary": { "match": "(?<![\\w-])_*+0_*+b_*+[01][01_]*+(?![\\w.])", "name": "constant.numeric.nushell" }, "numbers": { "match": "(?<![\\w-])_*+[-+]?_*+(?:(?i:NaN|infinity|inf)_*+|(?:\\d[\\d_]*+\\.?|\\._*+\\d)[\\d_]*+(?i:E_*+[-+]?_*+\\d[\\d_]*+)?)(?i:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\w.])|(?=\\.\\.))", "name": "constant.numeric.nushell" }, "binary": { "begin": "\\b(0x)(\\[)", "beginCaptures": { "1": { "name": "constant.numeric.nushell" }, "2": { "name": "meta.brace.square.begin.nushell" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.begin.nushell" } }, "name": "constant.binary.nushell", "patterns": [ { "match": "[0-9a-fA-F]{2}", "name": "constant.numeric.nushell" } ] }, "constant-keywords": { "match": "\\b(?:true|false|null)\\b", "name": "constant.language.nushell" }, "constant-value": { "patterns": [ { "include": "#constant-keywords" }, { "include": "#datetime" }, { "include": "#numbers" }, { "include": "#numbers-hexa" }, { "include": "#numbers-octal" }, { "include": "#numbers-binary" }, { "include": "#binary" } ] }, "spread": { "match": "\\.\\.\\.(?=[^\\s\\]}])", "name": "keyword.control.nushell" }, "ranges": { "match": "\\.\\.<?", "name": "keyword.control.nushell" }, "operators-word": { "match": "(?<= |\\()(?:mod|in|not-(?:in|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?= |\\)|$)", "name": "keyword.control.nushell" }, "operators-symbols": { "match": "(?<= )(?:(?:\\+|\\-|\\*|\\/)=?|\\/\\/|\\*\\*|!=|[<>=]=?|[!=]~|\\+\\+=?)(?= |$)", "name": "keyword.control.nushell" }, "operators": { "patterns": [ { "include": "#operators-word" }, { "include": "#operators-symbols" }, { "include": "#ranges" } ] }, "table": { "begin": "\\[", "beginCaptures": { "0": { "name": "meta.brace.square.begin.nushell" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.end.nushell" } }, "name": "meta.table.nushell", "patterns": [ { "include": "#spread" }, { "include": "#value" }, { "match": ",", "name": "punctuation.separator.nushell" } ] }, "types": { "patterns": [ { "name": "meta.list.nushell", "begin": "\\b(list)\\s*<", "beginCaptures": { "1": { "name": "entity.name.type.nushell" } }, "end": ">", "patterns": [{ "include": "#types" }] }, { "name": "meta.record.nushell", "begin": "\\b(record)\\s*<", "beginCaptures": { "1": { "name": "entity.name.type.nushell" } }, "end": ">", "patterns": [ { "match": "([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*", "captures": { "1": { "name": "variable.parameter.nushell" } } }, { "include": "#types" } ] }, { "match": "\\b(\\w+)\\b", "name": "entity.name.type.nushell" } ] }, "function-parameter": { "patterns": [ { "match": "(-{0,2}|\\.{3})[\\w-]+(?:\\((-[\\w?])\\))?", "name": "variable.parameter.nushell", "captures": { "1": { "name": "keyword.control.nushell" } } }, { "begin": "\\??:\\s*", "end": "(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))", "patterns": [{ "include": "#types" }] }, { "begin": "@(?=\"|')", "end": "(?<=\"|')", "patterns": [{ "include": "#string" }] }, { "name": "default.value.nushell", "begin": "=\\s*", "end": "(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))", "patterns": [{ "include": "#value" }] } ] }, "function-parameters": { "begin": "\\[", "beginCaptures": { "0": { "name": "meta.brace.square.begin.nushell" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.end.nushell" } }, "patterns": [ { "include": "#function-parameter" }, { "include": "#comment" } ], "name": "meta.function.parameters.nushell" }, "function-multiple-inout": { "begin": "(?<=]\\s*)(:)\\s+(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.in-out.nushell" }, "2": { "name": "meta.brace.square.begin.nushell" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.end.nushell" } }, "patterns": [ { "include": "#types" }, { "match": "\\s*(,)\\s*", "captures": { "1": { "name": "punctuation.separator.nushell" } } }, { "match": "\\s+(->)\\s+", "captures": { "1": { "name": "keyword.operator.nushell" } } } ] }, "function-inout": { "patterns": [ { "include": "#types" }, { "match": "->", "name": "keyword.operator.nushell" }, { "include": "#function-multiple-inout" } ] }, "function-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.function.begin.nushell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.function.end.nushell" } }, "name": "meta.function.body.nushell", "patterns": [{ "include": "source.nushell" }] }, "function": { "begin": "((?:export\\s+)?def)(?:\\s+((?:--\\w+(?:\\s+--\\w+)*)))?\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(?:\\s+((?:--\\w+(?:\\s+--\\w+)*)))?", "beginCaptures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.function.nushell" }, "3": { "name": "entity.name.type.nushell" }, "4": { "name": "entity.name.function.nushell" } }, "end": "(?<=\\})", "patterns": [ { "include": "#function-parameters" }, { "include": "#function-body" }, { "include": "#function-inout" } ] }, "extern": { "begin": "((?:export\\s+)?extern)\\s+([\\w\\-]+|\"[\\w\\- ]+\")", "beginCaptures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.type.nushell" } }, "end": "(?<=\\])", "endCaptures": { "0": { "name": "punctuation.definition.function.end.nushell" } }, "patterns": [{ "include": "#function-parameters" }] }, "module": { "begin": "((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{", "beginCaptures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.namespace.nushell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.module.end.nushell" } }, "name": "meta.module.nushell", "patterns": [{ "include": "source.nushell" }] }, "use-module": { "patterns": [ { "match": "^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*))?\\s*;?$", "captures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.namespace.nushell" }, "3": { "name": "keyword.other.nushell" } } }, { "begin": "^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')\\s*\\[", "beginCaptures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.namespace.nushell" } }, "end": "(\\])\\s*;?\\s*$", "endCaptures": { "1": { "name": "meta.brace.square.end.nushell" } }, "patterns": [ { "match": "([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?", "captures": { "1": { "name": "keyword.other.nushell" } } }, { "include": "#comment" } ] }, { "match": "(?<path>(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g<path>\"|'\\g<path>\\'|(?![\"'])\\g<path>)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$", "captures": { "2": { "name": "entity.name.function.nushell" }, "3": { "name": "string.bare.nushell", "patterns": [ { "match": "([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')", "captures": { "1": { "name": "entity.name.namespace.nushell" } } } ] }, "4": { "name": "keyword.other.nushell" } } }, { "begin": "(?<path>(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g<path>\"|'\\g<path>\\'|(?![\"'])\\g<path>)\\s+\\[", "beginCaptures": { "2": { "name": "entity.name.function.nushell" }, "3": { "name": "string.bare.nushell", "patterns": [ { "match": "([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')", "captures": { "1": { "name": "entity.name.namespace.nushell" } } } ] } }, "end": "(\\])\\s*;?\\s*$", "endCaptures": { "1": { "name": "meta.brace.square.end.nushell" } }, "patterns": [ { "match": "([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?", "captures": { "0": { "name": "keyword.other.nushell" } } }, { "include": "#comment" } ] }, { "match": "^\\s*(?:export )?use\\b", "captures": { "0": { "name": "entity.name.function.nushell" } } } ] }, "for-loop": { "begin": "(for)\\s+(\\$?\\w+)\\s+(in)\\s+(.+)\\s*(\\{)", "beginCaptures": { "1": { "name": "keyword.other.nushell" }, "2": { "name": "variable.other.nushell" }, "3": { "name": "keyword.other.nushell" }, "4": { "patterns": [{ "include": "#value" }] }, "5": { "name": "punctuation.section.block.begin.bracket.curly.nushell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.nushell" } }, "name": "meta.for-loop.nushell", "patterns": [{ "include": "source.nushell" }] }, "paren-expression": { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.begin.nushell" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.end.nushell" } }, "name": "meta.expression.parenthesis.nushell", "patterns": [{ "include": "#expression" }] }, "braced-expression": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.nushell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.nushell" } }, "name": "meta.expression.braced.nushell", "patterns": [ { "begin": "(?<=\\{)\\s*\\|", "end": "\\|", "name": "meta.closure.parameters.nushell", "patterns": [{ "include": "#function-parameter" }] }, { "match": "(\\w+)\\s*(:)\\s*", "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "keyword.control.nushell" } } }, { "match": "(\\$\"((?:[^\"\\\\]|\\\\.)*)\")\\s*(:)\\s*", "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "variable.other.nushell", "patterns": [{ "include": "#paren-expression" }] }, "3": { "name": "keyword.control.nushell" } }, "name": "meta.record-entry.nushell" }, { "match": "(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(:)\\s*", "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "keyword.control.nushell" } }, "name": "meta.record-entry.nushell" }, { "match": "(\\$'([^']*)')\\s*(:)\\s*", "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "variable.other.nushell", "patterns": [{ "include": "#paren-expression" }] }, "3": { "name": "keyword.control.nushell" } }, "name": "meta.record-entry.nushell" }, { "match": "('[^']*')\\s*(:)\\s*", "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "keyword.control.nushell" } }, "name": "meta.record-entry.nushell" }, { "include": "#spread" }, { "include": "source.nushell" } ] }, "define-variable": { "match": "(let|mut|(?:export\\s+)?const)\\s+(\\w+)\\s+(=)", "captures": { "1": { "name": "keyword.other.nushell" }, "2": { "name": "variable.other.nushell" }, "3": { "patterns": [{ "include": "#operators" }] } } }, "define-alias": { "match": "((?:export )?alias)\\s+([\\w\\-!]+)\\s*(=)", "captures": { "1": { "name": "entity.name.function.nushell" }, "2": { "name": "entity.name.type.nushell" }, "3": { "patterns": [{ "include": "#operators" }] } } }, "pre-command": { "begin": "(\\w+)(=)", "beginCaptures": { "1": { "name": "variable.other.nushell" }, "2": { "patterns": [{ "include": "#operators" }] } }, "end": "(?=\\s+)", "patterns": [{ "include": "#value" }] }, "command": { "begin": "(?<!\\w)(?:(\\^)|(?![0-9]|\\$))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?<=\\^)\\$?(?:\"[^\"]+\"|'[^']+'))", "beginCaptures": { "1": { "name": "keyword.operator.nushell" }, "2": { "patterns": [ { "include": "#control-keywords" }, { "match": "(?:ansi|char) \\w+", "captures": { "0": { "name": "keyword.other.builtin.nushell" } } }, { "comment": "Regex generated with list-to-tree (https://github.com/glcraft/list-to-tree)", "match": "(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st|ttr(?: (?:category|deprecated|example|search-terms))?)|b(?:its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|f(?:ault)?|scribe|tect(?: columns)?)|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex))?|umerate)|rror(?: make)?|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:e|l|ter)|nd|rst)|latten|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|msgpack(?:z)?|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup-by)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|session))?))|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:o(?:b(?: (?:flush|id|kill|list|recv|s(?:end|pawn)|tag|unfreeze))?|in)|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cos(?:h)?|sin(?:h)?|tan(?:h)?)|vg)|c(?:eil|os(?:h)?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:in(?:h)?|qrt|tddev|um)|tan(?:h)?|variance))?)|e(?:rge(?: deep)?|tadata(?: (?:access|set))?)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|s(?:elf|plit)|type))?)|lugin(?: (?:add|list|rm|stop|use))?|o(?:lars(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str)?|tains|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|d(?:atepart|ecimal|rop(?:-(?:duplicates|nulls))?|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:th|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|verse)|olling)|s(?:a(?:mple|ve)|chema|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|ore-(?:get|ls|rm)|r(?:-(?:join|lengths|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-(?:external|internal))|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:mpress|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|xpand)|inde(?:nt|x-of)|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase|wrap)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|html|json|m(?:d|sgpack(?:z)?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|y(?:aml|ml))|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|files|ir|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|zip)(?![\\w-])( (.*))?", "captures": { "1": { "name": "keyword.other.builtin.nushell" }, "2": { "patterns": [{ "include": "#value" }] } } }, { "match": "(?<=\\^)(?:\\$(\"[^\"]+\"|'[^']+')|\"[^\"]+\"|'[^']+')", "name": "entity.name.type.external.nushell", "captures": { "1": { "patterns": [{ "include": "#paren-expression" }] } } }, { "match": "([\\w.]+(?:-[\\w.!]+)*)(?: (.*))?", "captures": { "1": { "name": "entity.name.type.external.nushell" }, "2": { "patterns": [{ "include": "#value" }] } } }, { "include": "#value" } ] } }, "end": "(?=\\||\\)|\\}|;)|$", "name": "meta.command.nushell", "patterns": [ { "include": "#parameters" }, { "include": "#spread" }, { "include": "#value" } ] }, "expression": { "patterns": [ { "include": "#pre-command" }, { "include": "#for-loop" }, { "include": "#operators" }, { "match": "\\|", "name": "keyword.control.nushell" }, { "include": "#control-keywords" }, { "include": "#constant-value" }, { "include": "#string-raw" }, { "include": "#command" }, { "include": "#value" } ] }, "value": { "patterns": [ { "include": "#variables" }, { "include": "#variable-fields" }, { "include": "#control-keywords" }, { "include": "#constant-value" }, { "include": "#table" }, { "include": "#operators" }, { "include": "#paren-expression" }, { "include": "#braced-expression" }, { "include": "#string" }, { "include": "#comment" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/nunjucks.tmLanguage.json ================================================ { "scopeName": "text.html.nunjucks", "fileTypes": ["nj", "njk", "nunjucks"], "patterns": [ { "begin": "{% comment %}", "end": "{% endcomment %}", "name": "comment.block.nunjucks" }, { "begin": "{#", "end": "#}", "name": "comment.line.number-sign.nunjucks" }, { "begin": "{{", "end": "}}", "patterns": [{ "include": "#template_filter" }], "name": "storage.type.variable.nunjucks", "captures": { "0": { "name": "entity.tag.tagbraces.nunjucks" } } }, { "begin": "{%-|{%", "end": "-%}|%}", "patterns": [ { "include": "#template_tag" }, { "include": "#template_filter" } ], "name": "storage.type.templatetag.nunjucks", "captures": { "0": { "name": "entity.tag.tagbraces.nunjucks" } } }, { "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*></\\2>)", "endCaptures": { "3": { "name": "punctuation.definition.tag.begin.html" }, "1": { "name": "punctuation.definition.tag.end.html" }, "4": { "name": "entity.name.tag.html" }, "2": { "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" }, "5": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)(<)(/)(\\2)(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } } }, { "begin": "(<\\?)(xml)", "end": "(\\?>)", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ], "name": "meta.tag.preprocessor.xml.html", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } } }, { "begin": "<!--", "end": "--\\s*>", "patterns": [ { "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" }, { "include": "#embedded-code" } ], "name": "comment.block.html", "captures": { "0": { "name": "punctuation.definition.comment.html" } } }, { "begin": "<!", "end": ">", "patterns": [ { "begin": "(?i:DOCTYPE)", "end": "(?=>)", "patterns": [ { "match": "\"[^\">]*\"", "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" } ], "name": "meta.tag.sgml.doctype.html", "captures": { "1": { "name": "entity.name.tag.doctype.html" } } }, { "begin": "\\[CDATA\\[", "end": "]](?=>)", "name": "constant.other.inline-data.html" }, { "match": "(\\s*)(?!--|>)\\S(\\s*)", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ], "name": "meta.tag.sgml.html", "captures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "include": "#embedded-code" }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [ { "begin": "{% comment %}", "end": "{% endcomment %}", "name": "comment.block.nunjucks" }, { "begin": "{#", "end": "#}", "name": "comment.line.number-sign.nunjucks" }, { "begin": "{{", "end": "}}", "patterns": [{ "include": "#template_filter" }], "name": "storage.type.variable.nunjucks", "captures": { "0": { "name": "entity.tag.tagbraces.nunjucks" } } }, { "begin": "{%", "end": "%}", "patterns": [ { "include": "#template_tag" }, { "include": "#template_filter" } ], "name": "storage.type.templatetag.nunjucks", "captures": { "0": { "name": "entity.tag.tagbraces.nunjucks" } } }, { "include": "#embedded-code" }, { "include": "source.css.nunjucks" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.css.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "end": "(</)((?i:script))", "patterns": [ { "begin": "{% comment %}", "end": "{% endcomment %}", "name": "comment.block.nunjucks" }, { "begin": "{#", "end": "#}", "name": "comment.line.number-sign.nunjucks" }, { "begin": "{{", "end": "}}", "patterns": [{ "include": "#template_filter" }], "name": "storage.type.variable.nunjucks", "captures": { "0": { "name": "entity.tag.tagbraces.nunjucks" } } }, { "begin": "{%", "end": "%}", "patterns": [ { "include": "#template_tag" }, { "include": "#template_filter" } ], "name": "storage.type.templatetag.nunjucks", "captures": { "0": { "name": "entity.tag.tagbraces.nunjucks" } } }, { "match": "(//).*?((?=</script)|$\\n?)", "name": "comment.line.double-slash.js", "captures": { "1": { "name": "punctuation.definition.comment.js" } } }, { "begin": "/\\*", "end": "\\*/|(?=</script)", "name": "comment.block.js", "captures": { "0": { "name": "punctuation.definition.comment.js" } } }, { "include": "#php" }, { "include": "source.js" } ], "captures": { "1": { "name": "punctuation.definition.tag.end.html" }, "2": { "name": "entity.name.tag.script.html" } } } ], "name": "source.js.embedded.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } }, { "begin": "(</?)((?i:body|head|html)\\b)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.structure.any.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.structure.any.html" } } }, { "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.block.any.html" } } }, { "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "((?: ?/)?>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.inline.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.inline.any.html" } } }, { "begin": "(</?)([a-zA-Z0-9:]+)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.other.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.other.html" } } }, { "include": "#entities" }, { "match": "<>", "name": "invalid.illegal.incomplete.html" }, { "match": "<", "name": "invalid.illegal.bad-angle-bracket.html" } ], "repository": { "tag-stuff": { "patterns": [ { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#embedded-code" } ] }, "php": { "begin": "(?=(^\\s*)?<\\?)", "end": "(?!(^\\s*)?<\\?)", "patterns": [{ "include": "source.php" }] }, "string-double-quoted": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "\"", "patterns": [{ "include": "#embedded-code" }, { "include": "#entities" }], "name": "string.quoted.double.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "python": { "begin": "(?:^\\s*)<\\?python(?!.*\\?>)", "end": "\\?>(?:\\s*$\\n)?", "patterns": [{ "include": "source.python" }], "name": "source.python.embedded.html" }, "template_tag": { "patterns": [ { "match": "\\b(autoescape|endautoescape|block|endblock|blocktrans|endblocktrans|trans|plural|debug|extends|filter|firstof|for|empty|endfor|if|elif|else|endif|include|ifchanged|endifchanged|ifequal|endifequal|ifnotequal|endifnotequal|load|from|low|regroup|ssi|spaceless|endspaceless|templatetag|widthratio|with|endwith|csrf_token|cycle|url|lorem|thumbnail|endthumbnail|get_static_prefix)\\b", "name": "keyword.control.tag-name.nunjucks" }, { "match": "\\b(and|or|not|in|by|as)\\b", "name": "keyword.operator.nunjucks" } ] }, "embedded-code": { "patterns": [ { "include": "#ruby" }, { "include": "#php" }, { "include": "#python" } ] }, "string-single-quoted": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "'", "patterns": [{ "include": "#embedded-code" }, { "include": "#entities" }], "name": "string.quoted.single.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "tag-generic-attribute": { "match": "\\b([a-zA-Z\\-:]+)", "name": "entity.other.attribute-name.html" }, "entities": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "end": "(?<='|\")", "patterns": [ { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html" }, { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html" } ], "name": "meta.attribute-with-value.id.html", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "ruby": { "patterns": [ { "begin": "<%+#", "end": "%>", "name": "comment.block.erb", "captures": { "0": { "name": "punctuation.definition.comment.erb" } } }, { "begin": "<%+(?!>)=?", "end": "-?%>", "patterns": [ { "match": "(#).*?(?=-?%>)", "name": "comment.line.number-sign.ruby", "captures": { "1": { "name": "punctuation.definition.comment.ruby" } } }, { "include": "source.ruby" } ], "name": "source.ruby.embedded.html", "captures": { "0": { "name": "punctuation.section.embedded.ruby" } } }, { "begin": "<\\?r(?!>)=?", "end": "-?\\?>", "patterns": [ { "match": "(#).*?(?=-?\\?>)", "name": "comment.line.number-sign.ruby.nitro", "captures": { "1": { "name": "punctuation.definition.comment.ruby.nitro" } } }, { "include": "source.ruby" } ], "name": "source.ruby.nitro.embedded.html", "captures": { "0": { "name": "punctuation.section.embedded.ruby.nitro" } } } ] }, "template_filter": { "patterns": [ { "match": "(add|addslashes|capfirst|center|cut|date|default|default_if_none|dictsort|dictsortreversed|divisibleby|escape|escapejs|filesizeformat|first|fix_ampersands|floatformat|force_escape|get_digit|iriencode|join|last|length|length_is|linebreaks|linebreaksbr|linenumbers|ljust|lower|make_list|phone2numeric|pluralize|pprint|random|removetags|rjust|safe|safeseq|slice|slugify|stringformat|striptags|time|timesince|timeutil|title|truncatewords|truncatewords_html|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|yesno|apnumber|intcomma|intword|naturalday|ordinal|STATIC_PREFIX)\\b", "name": "keyword.control.filter.nunjucks" }, { "begin": ":\"|\"", "end": "\"", "name": "storage.type.attr.nunjucks" }, { "begin": ":\\'|\\'", "end": "\\'", "name": "storage.type.attr.nunjucks" }, { "match": "\\|", "name": "string.unquoted.filter-pipe.nunjucks" }, { "match": "[a-zA-Z0-9_.]+", "name": "string.unquoted.tag-string.nunjucks" } ] } }, "name": "Nunjucks", "uuid": "0AAEDD0E-56AD-4B71-95C8-2FF271DE5B19" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/objective-c.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/jeff-hykin/better-objc-syntax/blob/master/autogenerated/objc.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/jeff-hykin/better-objc-syntax/commit/119b75fb1f4d3e8726fa62588e3b935e0b719294", "name": "objective-c", "scopeName": "source.objc", "patterns": [ { "include": "#anonymous_pattern_1" }, { "include": "#anonymous_pattern_2" }, { "include": "#anonymous_pattern_3" }, { "include": "#anonymous_pattern_4" }, { "include": "#anonymous_pattern_5" }, { "include": "#apple_foundation_functional_macros" }, { "include": "#anonymous_pattern_7" }, { "include": "#anonymous_pattern_8" }, { "include": "#anonymous_pattern_9" }, { "include": "#anonymous_pattern_10" }, { "include": "#anonymous_pattern_11" }, { "include": "#anonymous_pattern_12" }, { "include": "#anonymous_pattern_13" }, { "include": "#anonymous_pattern_14" }, { "include": "#anonymous_pattern_15" }, { "include": "#anonymous_pattern_16" }, { "include": "#anonymous_pattern_17" }, { "include": "#anonymous_pattern_18" }, { "include": "#anonymous_pattern_19" }, { "include": "#anonymous_pattern_20" }, { "include": "#anonymous_pattern_21" }, { "include": "#anonymous_pattern_22" }, { "include": "#anonymous_pattern_23" }, { "include": "#anonymous_pattern_24" }, { "include": "#anonymous_pattern_25" }, { "include": "#anonymous_pattern_26" }, { "include": "#anonymous_pattern_27" }, { "include": "#anonymous_pattern_28" }, { "include": "#anonymous_pattern_29" }, { "include": "#anonymous_pattern_30" }, { "include": "#bracketed_content" }, { "include": "#c_lang" } ], "repository": { "anonymous_pattern_1": { "begin": "((@)(interface|protocol))(?!.+;)\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*((:)(?:\\s*)([A-Za-z][A-Za-z0-9]*))?(\\s|\\n)?", "captures": { "1": { "name": "storage.type.objc" }, "2": { "name": "punctuation.definition.storage.type.objc" }, "4": { "name": "entity.name.type.objc" }, "6": { "name": "punctuation.definition.entity.other.inherited-class.objc" }, "7": { "name": "entity.other.inherited-class.objc" }, "8": { "name": "meta.divider.objc" }, "9": { "name": "meta.inherited-class.objc" } }, "contentName": "meta.scope.interface.objc", "end": "((@)end)\\b", "name": "meta.interface-or-protocol.objc", "patterns": [ { "include": "#interface_innards" } ] }, "anonymous_pattern_10": { "captures": { "1": { "name": "punctuation.definition.keyword.objc" } }, "match": "(@)(defs|encode)\\b", "name": "keyword.other.objc" }, "anonymous_pattern_11": { "match": "\\bid\\b", "name": "storage.type.id.objc" }, "anonymous_pattern_12": { "match": "\\b(IBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class|instancetype)\\b", "name": "storage.type.objc" }, "anonymous_pattern_13": { "captures": { "1": { "name": "punctuation.definition.storage.type.objc" } }, "match": "(@)(class|protocol)\\b", "name": "storage.type.objc" }, "anonymous_pattern_14": { "begin": "((@)selector)\\s*(\\()", "beginCaptures": { "1": { "name": "storage.type.objc" }, "2": { "name": "punctuation.definition.storage.type.objc" }, "3": { "name": "punctuation.definition.storage.type.objc" } }, "contentName": "meta.selector.method-name.objc", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.storage.type.objc" } }, "name": "meta.selector.objc", "patterns": [ { "captures": { "1": { "name": "punctuation.separator.arguments.objc" } }, "match": "\\b(?:[a-zA-Z_:][\\w]*)+", "name": "support.function.any-method.name-of-parameter.objc" } ] }, "anonymous_pattern_15": { "captures": { "1": { "name": "punctuation.definition.storage.modifier.objc" } }, "match": "(@)(synchronized|public|package|private|protected)\\b", "name": "storage.modifier.objc" }, "anonymous_pattern_16": { "match": "\\b(YES|NO|Nil|nil)\\b", "name": "constant.language.objc" }, "anonymous_pattern_17": { "match": "\\bNSApp\\b", "name": "support.variable.foundation.objc" }, "anonymous_pattern_18": { "captures": { "1": { "name": "punctuation.whitespace.support.function.cocoa.leopard.objc" }, "2": { "name": "support.function.cocoa.leopard.objc" } }, "match": "(\\s*)\\b(NS(Rect(ToCGRect|FromCGRect)|MakeCollectable|S(tringFromProtocol|ize(ToCGSize|FromCGSize))|Draw(NinePartImage|ThreePartImage)|P(oint(ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))\\b" }, "anonymous_pattern_19": { "captures": { "1": { "name": "punctuation.whitespace.support.function.leading.cocoa.objc" }, "2": { "name": "support.function.cocoa.objc" } }, "match": "(\\s*)\\b(NS(R(ound(DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(CriticalAlertPanel(RelativeToWindow)?|InformationalAlertPanel(RelativeToWindow)?|AlertPanel(RelativeToWindow)?)|e(set(MapTable|HashTable)|c(ycleZone|t(Clip(List)?|F(ill(UsingOperation|List(UsingOperation|With(Grays|Colors(UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(dPixel|l(MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(s)?|WindowServerMemory|AlertPanel)|M(i(n(X|Y)|d(X|Y))|ouseInRect|a(p(Remove|Get|Member|Insert(IfAbsent|KnownAbsent)?)|ke(R(ect|ange)|Size|Point)|x(Range|X|Y)))|B(itsPer(SampleFromDepth|PixelFromDepth)|e(stDepth|ep|gin(CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(ho(uldRetainWithZone|w(sServicesMenuItem|AnimationEffect))|tringFrom(R(ect|ange)|MapTable|S(ize|elector)|HashTable|Class|Point)|izeFromString|e(t(ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(Big(ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(ToHost|LongToHost))|Short|Host(ShortTo(Big|Little)|IntTo(Big|Little)|DoubleTo(Big|Little)|FloatTo(Big|Little)|Long(To(Big|Little)|LongTo(Big|Little)))|Int|Double|Float|L(ittle(ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(ToHost|LongToHost))|ong(Long)?)))|H(ighlightRect|o(stByteOrder|meDirectory(ForUser)?)|eight|ash(Remove|Get|Insert(IfAbsent|KnownAbsent)?)|FSType(CodeFromFileType|OfFile))|N(umberOfColorComponents|ext(MapEnumeratorPair|HashEnumeratorItem))|C(o(n(tainsRect|vert(GlyphsToPackedGlyphs|Swapped(DoubleToHost|FloatToHost)|Host(DoubleToSwapped|FloatToSwapped)))|unt(MapTable|HashTable|Frames|Windows(ForContext)?)|py(M(emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(MapTables|HashTables))|lassFromString|reate(MapTable(WithZone)?|HashTable(WithZone)?|Zone|File(namePboardType|ContentsPboardType)))|TemporaryDirectory|I(s(ControllerMarker|EmptyRect|FreedObject)|n(setRect|crementExtraRefCount|te(r(sect(sRect|ionR(ect|ange))|faceStyleForKey)|gralRect)))|Zone(Realloc|Malloc|Name|Calloc|Fr(omPointer|ee))|O(penStepRootDirectory|ffsetRect)|D(i(sableScreenUpdates|videRect)|ottedFrameRect|e(c(imal(Round|Multiply|S(tring|ubtract)|Normalize|Co(py|mpa(ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(MemoryPages|Object))|raw(Gr(oove|ayBezel)|B(itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(hiteBezel|indowBackground)|LightBezel))|U(serName|n(ionR(ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(Bundle(Setup|Cleanup)|Setup(VirtualMachine)?|Needs(ToLoadClasses|VirtualMachine)|ClassesF(orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(oint(InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(n(d(MapTableEnumeration|HashTableEnumeration)|umerate(MapTable|HashTable)|ableScreenUpdates)|qual(R(ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(ileTypeForHFSTypeCode|ullUserName|r(ee(MapTable|HashTable)|ame(Rect(WithWidth(UsingOperation)?)?|Address)))|Wi(ndowList(ForContext)?|dth)|Lo(cationInRange|g(v|PageSize)?)|A(ccessibility(R(oleDescription(ForUIElement)?|aiseBadArgumentException)|Unignored(Children(ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(Main|Load)|vailableWindowDepths|ll(MapTable(Values|Keys)|HashTableObjects|ocate(MemoryPages|Collectable|Object)))))\\b" }, "anonymous_pattern_2": { "begin": "((@)(implementation))\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*(?::\\s*([A-Za-z][A-Za-z0-9]*))?", "captures": { "1": { "name": "storage.type.objc" }, "2": { "name": "punctuation.definition.storage.type.objc" }, "4": { "name": "entity.name.type.objc" }, "5": { "name": "entity.other.inherited-class.objc" } }, "contentName": "meta.scope.implementation.objc", "end": "((@)end)\\b", "name": "meta.implementation.objc", "patterns": [ { "include": "#implementation_innards" } ] }, "anonymous_pattern_20": { "match": "\\bNS(RuleEditor|G(arbageCollector|radient)|MapTable|HashTable|Co(ndition|llectionView(Item)?)|T(oolbarItemGroup|extInputClient|r(eeNode|ackingArea))|InvocationOperation|Operation(Queue)?|D(ictionaryController|ockTile)|P(ointer(Functions|Array)|athC(o(ntrol(Delegate)?|mponentCell)|ell(Delegate)?)|r(intPanelAccessorizing|edicateEditor(RowTemplate)?))|ViewController|FastEnumeration|Animat(ionContext|ablePropertyContainer))\\b", "name": "support.class.cocoa.leopard.objc" }, "anonymous_pattern_21": { "match": "\\bNS(R(u(nLoop|ler(Marker|View))|e(sponder|cursiveLock|lativeSpecifier)|an(domSpecifier|geSpecifier))|G(etCommand|lyph(Generator|Storage|Info)|raphicsContext)|XML(Node|D(ocument|TD(Node)?)|Parser|Element)|M(iddleSpecifier|ov(ie(View)?|eCommand)|utable(S(tring|et)|C(haracterSet|opying)|IndexSet|D(ictionary|ata)|URLRequest|ParagraphStyle|A(ttributedString|rray))|e(ssagePort(NameServer)?|nu(Item(Cell)?|View)?|t(hodSignature|adata(Item|Query(ResultGroup|AttributeValueTuple)?)))|a(ch(BootstrapServer|Port)|trix))|B(itmapImageRep|ox|u(ndle|tton(Cell)?)|ezierPath|rowser(Cell)?)|S(hadow|c(anner|r(ipt(SuiteRegistry|C(o(ercionHandler|mmand(Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(er|View)|een))|t(epper(Cell)?|atus(Bar|Item)|r(ing|eam))|imple(HorizontalTypesetter|CString)|o(cketPort(NameServer)?|und|rtDescriptor)|p(e(cifierTest|ech(Recognizer|Synthesizer)|ll(Server|Checker))|litView)|e(cureTextField(Cell)?|t(Command)?|archField(Cell)?|rializer|gmentedC(ontrol|ell))|lider(Cell)?|avePanel)|H(ost|TTP(Cookie(Storage)?|URLResponse)|elpManager)|N(ib(Con(nector|trolConnector)|OutletConnector)?|otification(Center|Queue)?|u(ll|mber(Formatter)?)|etService(Browser)?|ameSpecifier)|C(ha(ngeSpelling|racterSet)|o(n(stantString|nection|trol(ler)?|ditionLock)|d(ing|er)|unt(Command|edSet)|pying|lor(Space|P(ick(ing(Custom|Default)|er)|anel)|Well|List)?|m(p(oundPredicate|arisonPredicate)|boBox(Cell)?))|u(stomImageRep|rsor)|IImageRep|ell|l(ipView|o(seCommand|neCommand)|assDescription)|a(ched(ImageRep|URLResponse)|lendar(Date)?)|reateCommand)|T(hread|ypesetter|ime(Zone|r)|o(olbar(Item(Validations)?)?|kenField(Cell)?)|ext(Block|Storage|Container|Tab(le(Block)?)?|Input|View|Field(Cell)?|List|Attachment(Cell)?)?|a(sk|b(le(Header(Cell|View)|Column|View)|View(Item)?))|reeController)|I(n(dex(S(pecifier|et)|Path)|put(Manager|S(tream|erv(iceProvider|er(MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(Rep|Cell|View)?)|O(ut(putStream|lineView)|pen(GL(Context|Pixel(Buffer|Format)|View)|Panel)|bj(CTypeSerializationCallBack|ect(Controller)?))|D(i(st(antObject(Request)?|ributed(NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(Controller)?|e(serializer|cimalNumber(Behaviors|Handler)?|leteCommand)|at(e(Components|Picker(Cell)?|Formatter)?|a)|ra(wer|ggingInfo))|U(ser(InterfaceValidations|Defaults(Controller)?)|RL(Re(sponse|quest)|Handle(Client)?|C(onnection|ache|redential(Storage)?)|Download(Delegate)?|Prot(ocol(Client)?|ectionSpace)|AuthenticationChallenge(Sender)?)?|n(iqueIDSpecifier|doManager|archiver))|P(ipe|o(sitionalSpecifier|pUpButton(Cell)?|rt(Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(steboard|nel|ragraphStyle|geLayout)|r(int(Info|er|Operation|Panel)|o(cessInfo|tocolChecker|perty(Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(numerator|vent|PSImageRep|rror|x(ception|istsCommand|pression))|V(iew(Animation)?|al(idated(ToobarItem|UserInterfaceItem)|ue(Transformer)?))|Keyed(Unarchiver|Archiver)|Qui(ckDrawView|tCommand)|F(ile(Manager|Handle|Wrapper)|o(nt(Manager|Descriptor|Panel)?|rm(Cell|atter)))|W(hoseSpecifier|indow(Controller)?|orkspace)|L(o(c(k(ing)?|ale)|gicalTest)|evelIndicator(Cell)?|ayoutManager)|A(ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(ication|e(Script|Event(Manager|Descriptor)))|ffineTransform|lert|r(chiver|ray(Controller)?)))\\b", "name": "support.class.cocoa.objc" }, "anonymous_pattern_22": { "match": "\\bNS(R(oundingMode|ule(Editor(RowType|NestingMode)|rOrientation)|e(questUserAttentionType|lativePosition))|G(lyphInscription|radientDrawingOptions)|XML(NodeKind|D(ocumentContentKind|TDNodeKind)|ParserError)|M(ultibyteGlyphPacking|apTableOptions)|B(itmapFormat|oxType|ezierPathElement|ackgroundStyle|rowserDropOperation)|S(tr(ing(CompareOptions|DrawingOptions|EncodingConversionOptions)|eam(Status|Event))|p(eechBoundary|litViewDividerStyle)|e(archPathD(irectory|omainMask)|gmentS(tyle|witchTracking))|liderType|aveOptions)|H(TTPCookieAcceptPolicy|ashTableOptions)|N(otification(SuspensionBehavior|Coalescing)|umberFormatter(RoundingMode|Behavior|Style|PadPosition)|etService(sError|Options))|C(haracterCollection|o(lor(RenderingIntent|SpaceModel|PanelMode)|mp(oundPredicateType|arisonPredicateModifier))|ellStateValue|al(culationError|endarUnit))|T(ypesetterControlCharacterAction|imeZoneNameStyle|e(stComparisonOperation|xt(Block(Dimension|V(erticalAlignment|alueType)|Layer)|TableLayoutAlgorithm|FieldBezelStyle))|ableView(SelectionHighlightStyle|ColumnAutoresizingStyle)|rackingAreaOptions)|I(n(sertionPosition|te(rfaceStyle|ger))|mage(RepLoadStatus|Scaling|CacheMode|FrameStyle|LoadStatus|Alignment))|Ope(nGLPixelFormatAttribute|rationQueuePriority)|Date(Picker(Mode|Style)|Formatter(Behavior|Style))|U(RL(RequestCachePolicy|HandleStatus|C(acheStoragePolicy|redentialPersistence))|Integer)|P(o(stingStyle|int(ingDeviceType|erFunctionsOptions)|pUpArrowPosition)|athStyle|r(int(ing(Orientation|PaginationMode)|erTableStatus|PanelOptions)|opertyList(MutabilityOptions|Format)|edicateOperatorType))|ExpressionType|KeyValue(SetMutationKind|Change)|QTMovieLoopMode|F(indPanel(SubstringMatchType|Action)|o(nt(RenderingMode|FamilyClass)|cusRingPlacement))|W(hoseSubelementIdentifier|ind(ingRule|ow(B(utton|ackingLocation)|SharingType|CollectionBehavior)))|L(ine(MovementDirection|SweepDirection|CapStyle|JoinStyle)|evelIndicatorStyle)|Animation(BlockingMode|Curve))\\b", "name": "support.type.cocoa.leopard.objc" }, "anonymous_pattern_23": { "match": "\\bC(I(Sampler|Co(ntext|lor)|Image(Accumulator)?|PlugIn(Registration)?|Vector|Kernel|Filter(Generator|Shape)?)|A(Renderer|MediaTiming(Function)?|BasicAnimation|ScrollLayer|Constraint(LayoutManager)?|T(iledLayer|extLayer|rans(ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(nimation(Group)?|ction)))\\b", "name": "support.class.quartz.objc" }, "anonymous_pattern_24": { "match": "\\bC(G(Float|Point|Size|Rect)|IFormat|AConstraintAttribute)\\b", "name": "support.type.quartz.objc" }, "anonymous_pattern_25": { "match": "\\bNS(R(ect(Edge)?|ange)|G(lyph(Relation|LayoutMode)?|radientType)|M(odalSession|a(trixMode|p(Table|Enumerator)))|B(itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(cr(oll(er(Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(Granularity|Direction|Affinity)|wapped(Double|Float)|aveOperationType)|Ha(sh(Table|Enumerator)|ndler(2)?)|C(o(ntrol(Size|Tint)|mp(ositingOperation|arisonResult))|ell(State|Type|ImagePosition|Attribute))|T(hreadPrivate|ypesetterGlyphInfo|i(ckMarkPosition|tlePosition|meInterval)|o(ol(TipTag|bar(SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(TabType|Alignment)|ab(State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(ContextAuxiliary|PixelFormatAuxiliary)|D(ocumentChangeType|atePickerElementFlags|ra(werState|gOperation))|UsableScrollerParts|P(oint|r(intingPageOrder|ogressIndicator(Style|Th(ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(nt(SymbolicTraits|TraitMask|Action)|cusRingType)|W(indow(OrderingMode|Depth)|orkspace(IconCreationOptions|LaunchOptions)|ritingDirection)|L(ineBreakMode|ayout(Status|Direction))|A(nimation(Progress|Effect)|ppl(ication(TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle))\\b", "name": "support.type.cocoa.objc" }, "anonymous_pattern_26": { "match": "\\bNS(NotFound|Ordered(Ascending|Descending|Same))\\b", "name": "support.constant.cocoa.objc" }, "anonymous_pattern_27": { "match": "\\bNS(MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification\\b", "name": "support.constant.notification.cocoa.leopard.objc" }, "anonymous_pattern_28": { "match": "\\bNS(Menu(Did(RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(ystemColorsDidChange|plitView(DidResizeSubviews|WillResizeSubviews))|C(o(nt(extHelpModeDid(Deactivate|Activate)|rolT(intDidChange|extDid(BeginEditing|Change|EndEditing)))|lor(PanelColorDidChange|ListDidChange)|mboBox(Selection(IsChanging|DidChange)|Will(Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(oolbar(DidRemoveItem|WillAddItem)|ext(Storage(DidProcessEditing|WillProcessEditing)|Did(BeginEditing|Change|EndEditing)|View(DidChange(Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(Selection(IsChanging|DidChange)|ColumnDid(Resize|Move)))|ImageRepRegistryDidChange|OutlineView(Selection(IsChanging|DidChange)|ColumnDid(Resize|Move)|Item(Did(Collapse|Expand)|Will(Collapse|Expand)))|Drawer(Did(Close|Open)|Will(Close|Open))|PopUpButton(CellWillPopUp|WillPopUp)|View(GlobalFrameDidChange|BoundsDidChange|F(ocusDidChange|rameDidChange))|FontSetChanged|W(indow(Did(Resi(ze|gn(Main|Key))|M(iniaturize|ove)|Become(Main|Key)|ChangeScreen(|Profile)|Deminiaturize|Update|E(ndSheet|xpose))|Will(M(iniaturize|ove)|BeginSheet|Close))|orkspace(SessionDid(ResignActive|BecomeActive)|Did(Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(Sleep|Unmount|PowerOff|LaunchApplication)))|A(ntialiasThresholdChanged|ppl(ication(Did(ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(nhide|pdate)|FinishLaunching)|Will(ResignActive|BecomeActive|Hide|Terminate|U(nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification\\b", "name": "support.constant.notification.cocoa.objc" }, "anonymous_pattern_29": { "match": "\\bNS(RuleEditor(RowType(Simple|Compound)|NestingMode(Si(ngle|mple)|Compound|List))|GradientDraws(BeforeStartingLocation|AfterEndingLocation)|M(inusSetExpressionType|a(chPortDeallocate(ReceiveRight|SendRight|None)|pTable(StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(oxCustom|undleExecutableArchitecture(X86|I386|PPC(64)?)|etweenPredicateOperatorType|ackgroundStyle(Raised|Dark|L(ight|owered)))|S(tring(DrawingTruncatesLastVisibleLine|EncodingConversion(ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(e(ech(SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(GrammarFlag|SpellingFlag))|litViewDividerStyleThi(n|ck))|e(rvice(RequestTimedOutError|M(iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(inimum|aximum)|Application(NotFoundError|LaunchFailedError))|gmentStyle(Round(Rect|ed)|SmallSquare|Capsule|Textured(Rounded|Square)|Automatic)))|H(UDWindowMask|ashTable(StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(oModeColorPanel|etServiceNoAutoRename)|C(hangeRedone|o(ntainsPredicateOperatorType|l(orRenderingIntent(RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(None|ContentArea|TrackableArea|EditableTextArea))|T(imeZoneNameStyle(S(hort(Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(Regular|SourceList)|racking(Mouse(Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(ssumeInside|ctive(In(KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(n(tersectSetExpressionType|dexedColorSpaceModel)|mageScale(None|Proportionally(Down|UpOrDown)|AxesIndependently))|Ope(nGLPFAAllowOfflineRenderers|rationQueue(DefaultMaxConcurrentOperationCount|Priority(High|Normal|Very(High|Low)|Low)))|D(iacriticInsensitiveSearch|ownloadsDirectory)|U(nionSetExpressionType|TF(16(BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(ointerFunctions(Ma(chVirtualMemory|llocMemory)|Str(ongMemory|uctPersonality)|C(StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(paque(Memory|Personality)|bjectP(ointerPersonality|ersonality)))|at(hStyle(Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(Scaling|Copies|Orientation|P(a(perSize|ge(Range|SetupAccessory))|review)))|Executable(RuntimeMismatchError|NotLoadableError|ErrorM(inimum|aximum)|L(inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(Initial|Prior)|F(i(ndPanelSubstringMatchType(StartsWith|Contains|EndsWith|FullWord)|leRead(TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(ndow(BackingLocation(MainMemory|Default|VideoMemory)|Sharing(Read(Only|Write)|None)|CollectionBehavior(MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType)\\b", "name": "support.constant.cocoa.leopard.objc" }, "anonymous_pattern_3": { "begin": "@\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.objc", "patterns": [ { "include": "#string_escaped_char" }, { "match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t[@] # conversion type\n\t\t\t\t\t", "name": "constant.other.placeholder.objc" }, { "include": "#string_placeholder" } ] }, "anonymous_pattern_30": { "match": "\\bNS(R(GB(ModeColorPanel|ColorSpaceModel)|ight(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|T(ext(Movement|Alignment)|ab(sBezelBorder|StopType))|ArrowFunctionKey)|ound(RectBezelStyle|Bankers|ed(BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(CapStyle|JoinStyle))|un(StoppedResponse|ContinuesResponse|AbortedResponse)|e(s(izableWindowMask|et(CursorRectsRunLoopOrdering|FunctionKey))|ce(ssedBezelStyle|iver(sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(evancyLevelIndicatorStyle|ative(Before|After))|gular(SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(n(domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(ModeMatrix|Button)))|G(IFFileType|lyph(Below|Inscribe(B(elow|ase)|Over(strike|Below)|Above)|Layout(WithPrevious|A(tAPoint|gainstAPoint))|A(ttribute(BidiLevel|Soft|Inscribe|Elastic)|bove))|r(ooveBorder|eaterThan(Comparison|OrEqualTo(Comparison|PredicateOperatorType)|PredicateOperatorType)|a(y(ModeColorPanel|ColorSpaceModel)|dient(None|Con(cave(Strong|Weak)|vex(Strong|Weak)))|phiteControlTint)))|XML(N(o(tationDeclarationKind|de(CompactEmptyElement|IsCDATA|OptionsNone|Use(SingleQuotes|DoubleQuotes)|Pre(serve(NamespaceOrder|C(haracterReferences|DATA)|DTD|Prefixes|E(ntities|mptyElements)|Quotes|Whitespace|A(ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(ocument(X(MLKind|HTMLKind|Include)|HTMLKind|T(idy(XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(arser(GTRequiredError|XMLDeclNot(StartedError|FinishedError)|Mi(splaced(XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(StartedError|FinishedError))|S(t(andaloneValueError|ringNot(StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(MTOKENRequiredError|o(t(ationNot(StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(haracterRef(In(DTDError|PrologError|EpilogError)|AtEOFError)|o(nditionalSectionNot(StartedError|FinishedError)|mment(NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(ternalError|valid(HexCharacterRefError|C(haracter(RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(NameError|Error)))|OutOfMemoryError|D(ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(RI(RequiredError|FragmentError)|n(declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(MissingSemiError|NoNameError|In(Internal(SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(ocessingInstructionNot(StartedError|FinishedError)|ematureDocumentEndError))|E(n(codingNotSupportedError|tity(Ref(In(DTDError|PrologError|EpilogError)|erence(MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(StartedError|FinishedError)|Is(ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(StartedError|FinishedError)|xt(ernalS(tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(iteralNot(StartedError|FinishedError)|T(RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(RedefinedError|HasNoValueError|Not(StartedError|FinishedError)|ListNot(StartedError|FinishedError)))|rocessingInstructionKind)|E(ntity(GeneralKind|DeclarationKind|UnparsedKind|P(ar(sedKind|ameterKind)|redefined))|lement(Declaration(MixedKind|UndefinedKind|E(lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(N(MToken(sKind|Kind)|otationKind)|CDATAKind|ID(Ref(sKind|Kind)|Kind)|DeclarationKind|En(tit(yKind|iesKind)|umerationKind)|Kind))|M(i(n(XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(nthCalendarUnit|deSwitchFunctionKey|use(Moved(Mask)?|E(ntered(Mask)?|ventSubtype|xited(Mask)?))|veToBezierPathElement|mentary(ChangeButton|Push(Button|InButton)|Light(Button)?))|enuFunctionKey|a(c(intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(XEdge|YEdge))|ACHOperatingSystem)|B(MPFileType|o(ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(Se(condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(zelBorder|velLineJoinStyle|low(Bottom|Top)|gin(sWith(Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(spaceCharacter|tabTextMovement|ingStore(Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(owser(NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(h(ift(JISStringEncoding|KeyMask)|ow(ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(s(ReqFunctionKey|tem(D(omainMask|efined(Mask)?)|FunctionKey))|mbolStringEncoding)|c(a(nnedOption|le(None|ToFit|Proportionally))|r(oll(er(NoPart|Increment(Page|Line|Arrow)|Decrement(Page|Line|Arrow)|Knob(Slot)?|Arrows(M(inEnd|axEnd)|None|DefaultSetting))|Wheel(Mask)?|LockFunctionKey)|eenChangedEventType))|t(opFunctionKey|r(ingDrawing(OneShot|DisableScreenFontSubstitution|Uses(DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(Status(Reading|NotOpen|Closed|Open(ing)?|Error|Writing|AtEnd)|Event(Has(BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(ndEncountered|rrorOccurred)))))|i(ngle(DateMode|UnderlineStyle)|ze(DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(condCalendarUnit|lect(By(Character|Paragraph|Word)|i(ng(Next|Previous)|onAffinity(Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(Momentary|Select(One|Any)))|quareLineCapStyle|witchButton|ave(ToOperation|Op(tions(Yes|No|Ask)|eration)|AsOperation)|mall(SquareBezelStyle|C(ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(ighlightModeMatrix|SBModeColorPanel|o(ur(Minute(SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(Never|OnlyFromMainDocumentDomain|Always)|e(lp(ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(MonthDa(yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(o(n(StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(ification(SuspensionBehavior(Hold|Coalesce|D(eliverImmediately|rop))|NoCoalescing|CoalescingOn(Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(cr(iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(itle|opLevelContainersSpecifierError|abs(BezelBorder|NoBorder|LineBorder))|I(nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(ll(Glyph|CellType)|m(eric(Search|PadKeyMask)|berFormatter(Round(Half(Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(10|Default)|S(cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(ercentStyle|ad(Before(Suffix|Prefix)|After(Suffix|Prefix))))))|e(t(Services(BadArgumentError|NotFoundError|C(ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(t(iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(hange(ReadOtherContents|GrayCell(Mask)?|BackgroundCell(Mask)?|Cleared|Done|Undone|Autosaved)|MYK(ModeColorPanel|ColorSpaceModel)|ircular(BezelStyle|Slider)|o(n(stantValueExpressionType|t(inuousCapacityLevelIndicatorStyle|entsCellMask|ain(sComparison|erSpecifierError)|rol(Glyph|KeyMask))|densedFontMask)|lor(Panel(RGBModeMask|GrayModeMask|HSBModeMask|C(MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(p(osite(XOR|Source(In|O(ut|ver)|Atop)|Highlight|C(opy|lear)|Destination(In|O(ut|ver)|Atop)|Plus(Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(stom(SelectorPredicateOperatorType|PaletteModeColorPanel)|r(sor(Update(Mask)?|PointingDevice)|veToBezierPathElement))|e(nterT(extAlignment|abStopType)|ll(State|H(ighlighted|as(Image(Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(Bordered|InsetButton)|Disabled|Editable|LightsBy(Gray|Background|Contents)|AllowsMixedState))|l(ipPagination|o(s(ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(ControlTint|DisplayFunctionKey|LineFunctionKey))|a(seInsensitive(Search|PredicateOption)|n(notCreateScriptCommandError|cel(Button|TextMovement))|chesDirectory|lculation(NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(itical(Request|AlertStyle)|ayonModeColorPanel))|T(hick(SquareBezelStyle|erSquareBezelStyle)|ypesetter(Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(ineBreakAction|atestBehavior))|i(ckMark(Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(olbarItemVisibilityPriority(Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(Compression(N(one|EXT)|CCITTFAX(3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(rminate(Now|Cancel|Later)|xt(Read(InapplicableDocumentTypeError|WriteErrorM(inimum|aximum))|Block(M(i(nimum(Height|Width)|ddleAlignment)|a(rgin|ximum(Height|Width)))|B(o(ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(Characters|Attributes)|CellType|ured(RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(Character|TextMovement|le(tP(oint(Mask|EventSubtype)?|roximity(Mask|EventSubtype)?)|Column(NoResizing|UserResizingMask|AutoresizingMask)|View(ReverseSequentialColumnAutoresizingStyle|GridNone|S(olid(HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(n(sert(CharFunctionKey|FunctionKey|LineFunctionKey)|t(Type|ernalS(criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(2022JPStringEncoding|Latin(1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(R(ight|ep(MatchesDevice|LoadStatus(ReadingHeader|Completed|InvalidData|Un(expectedEOF|knownType)|WillNeedAllData)))|Below|C(ellType|ache(BySize|Never|Default|Always))|Interpolation(High|None|Default|Low)|O(nly|verlaps)|Frame(Gr(oove|ayBezel)|Button|None|Photo)|L(oadStatus(ReadError|C(ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(lign(Right|Bottom(Right|Left)?|Center|Top(Right|Left)?|Left)|bove)))|O(n(State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|TextMovement)|SF1OperatingSystem|pe(n(GL(GO(Re(setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(R(obust|endererID)|M(inimumPolicy|ulti(sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(creenMask|te(ncilSize|reo)|ingleRenderer|upersample|ample(s|Buffers|Alpha))|NoRecovery|C(o(lor(Size|Float)|mpliant)|losestPolicy)|OffScreen|D(oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(cc(umSize|elerated)|ux(Buffers|DepthStencil)|l(phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(B(itfield|oolType)|S(hortType|tr(ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(Type|longType)|ArrayType))|D(i(s(c(losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(Selection|PredicateModifier))|o(c(ModalWindowMask|ument(Directory|ationDirectory))|ubleType|wn(TextMovement|ArrowFunctionKey))|e(s(cendingPageOrder|ktopDirectory)|cimalTabStopType|v(ice(NColorSpaceModel|IndependentModifierFlagsMask)|eloper(Directory|ApplicationDirectory))|fault(ControlTint|TokenStyle)|lete(Char(acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(yCalendarUnit|teFormatter(MediumStyle|Behavior(10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(wer(Clos(ingState|edState)|Open(ingState|State))|gOperation(Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(ser(CancelledError|D(irectory|omainMask)|FunctionKey)|RL(Handle(NotLoaded|Load(Succeeded|InProgress|Failed))|CredentialPersistence(None|Permanent|ForSession))|n(scaledWindowMask|cachedRead|i(codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(o(CloseGroupingRunLoopOrdering|FunctionKey)|e(finedDateComponent|rline(Style(Single|None|Thick|Double)|Pattern(Solid|D(ot|ash(Dot(Dot)?)?)))))|known(ColorSpaceModel|P(ointingDevice|ageOrder)|KeyS(criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(ustifiedTextAlignment|PEG(2000FileType|FileType)|apaneseEUC(GlyphPacking|StringEncoding))|P(o(s(t(Now|erFontMask|WhenIdle|ASAP)|iti(on(Replace|Be(fore|ginning)|End|After)|ve(IntType|DoubleType|FloatType)))|pUp(NoArrow|ArrowAt(Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(InCell(Mask)?|OnPushOffButton)|e(n(TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(Mask)?)|P(S(caleField|tatus(Title|Field)|aveButton)|N(ote(Title|Field)|ame(Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(a(perFeedButton|ge(Range(To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(useFunctionKey|ragraphSeparatorCharacter|ge(DownFunctionKey|UpFunctionKey))|r(int(ing(ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(NotFound|OK|Error)|FunctionKey)|o(p(ertyList(XMLFormat|MutableContainers(AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(BarStyle|SpinningStyle|Preferred(SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(ssedTab|vFunctionKey))|L(HeightForm|CancelButton|TitleField|ImageButton|O(KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(n(terCharacter|d(sWith(Comparison|PredicateOperatorType)|FunctionKey))|v(e(nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(Comparison|PredicateOperatorType)|ra(serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(clude(10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(i(ew(M(in(XMargin|YMargin)|ax(XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(lidationErrorM(inimum|aximum)|riableExpressionType))|Key(SpecifierEvaluationScriptError|Down(Mask)?|Up(Mask)?|PathExpressionType|Value(MinusSetMutation|SetSetMutation|Change(Re(placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(New|Old)|UnionSetMutation|ValidationError))|QTMovie(NormalPlayback|Looping(BackAndForthPlayback|Playback))|F(1(1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(nd(PanelAction(Replace(A(ndFind|ll(InSelection)?))?|S(howFindPanel|e(tFindString|lectAll(InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(Read(No(SuchFileError|PermissionError)|CorruptFileError|In(validFileNameError|applicableStringEncodingError)|Un(supportedSchemeError|knownError))|HandlingPanel(CancelButton|OKButton)|NoSuchFileError|ErrorM(inimum|aximum)|Write(NoPermissionError|In(validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(nt(Mo(noSpaceTrait|dernSerifsClass)|BoldTrait|S(ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(o(ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(ntegerAdvancementsRenderingMode|talicTrait)|O(ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(nknownClass|IOptimizedTrait)|Panel(S(hadowEffectModeMask|t(andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(amilyClassMask|reeformSerifsClass)|Antialiased(RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(Below|Type(None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(attingError(M(inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(ExpressionType|KeyMask)|3(1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(RevertButton|S(ize(Title|Field)|etButton)|CurrentField|Preview(Button|Field))|l(oat(ingPointSamplesBitmapFormat|Type)|agsChanged(Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(heelModeColorPanel|indow(s(NTOperatingSystem|CP125(1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(InterfaceStyle|OperatingSystem))|M(iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(ctivation|ddingToRecents)|A(sync|nd(Hide(Others)?|Print)|llowingClassicStartup))|eek(day(CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(ntsBidiLevels|rningAlertStyle)|r(itingDirection(RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(i(stModeMatrix|ne(Moves(Right|Down|Up|Left)|B(order|reakBy(C(harWrapping|lipping)|Truncating(Middle|Head|Tail)|WordWrapping))|S(eparatorCharacter|weep(Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(ssThan(Comparison|OrEqualTo(Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(Mouse(D(own(Mask)?|ragged(Mask)?)|Up(Mask)?)|T(ext(Movement|Alignment)|ab(sBezelBorder|StopType))|ArrowFunctionKey))|a(yout(RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(sc(iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(y(Type|PredicateModifier|EventMask)|choredSearch|imation(Blocking|Nonblocking(Threaded)?|E(ffect(DisappearingItemDefault|Poof)|ase(In(Out)?|Out))|Linear)|dPredicateType)|t(Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(obe(GB1CharacterCollection|CNS1CharacterCollection|Japan(1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(saveOperation|Pagination)|pp(lication(SupportDirectory|D(irectory|e(fined(Mask)?|legateReply(Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(Mask)?)|l(ternateKeyMask|pha(ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(sWrongScriptError|EvaluationScriptError)|bove(Bottom|Top)|WTEventType))\\b", "name": "support.constant.cocoa.objc" }, "anonymous_pattern_4": { "begin": "\\b(id)\\s*(?=<)", "beginCaptures": { "1": { "name": "storage.type.objc" } }, "end": "(?<=>)", "name": "meta.id-with-protocol.objc", "patterns": [ { "include": "#protocol_list" } ] }, "anonymous_pattern_5": { "match": "\\b(NS_DURING|NS_HANDLER|NS_ENDHANDLER)\\b", "name": "keyword.control.macro.objc" }, "anonymous_pattern_7": { "captures": { "1": { "name": "punctuation.definition.keyword.objc" } }, "match": "(@)(try|catch|finally|throw)\\b", "name": "keyword.control.exception.objc" }, "anonymous_pattern_8": { "captures": { "1": { "name": "punctuation.definition.keyword.objc" } }, "match": "(@)(synchronized)\\b", "name": "keyword.control.synchronize.objc" }, "anonymous_pattern_9": { "captures": { "1": { "name": "punctuation.definition.keyword.objc" } }, "match": "(@)(required|optional)\\b", "name": "keyword.control.protocol-specification.objc" }, "apple_foundation_functional_macros": { "begin": "(\\b(?:API_AVAILABLE|API_DEPRECATED|API_UNAVAILABLE|NS_AVAILABLE|NS_AVAILABLE_MAC|NS_AVAILABLE_IOS|NS_DEPRECATED|NS_DEPRECATED_MAC|NS_DEPRECATED_IOS|NS_SWIFT_NAME))(?:(?:\\s)+)?(\\()", "end": "\\)", "beginCaptures": { "1": { "name": "entity.name.function.preprocessor.apple-foundation.objc" }, "2": { "name": "punctuation.section.macro.arguments.begin.bracket.round.apple-foundation.objc" } }, "endCaptures": { "0": { "name": "punctuation.section.macro.arguments.end.bracket.round.apple-foundation.objc" } }, "name": "meta.preprocessor.macro.callable.apple-foundation.objc", "patterns": [ { "include": "#c_lang" } ] }, "bracketed_content": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.scope.begin.objc" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.scope.end.objc" } }, "name": "meta.bracketed.objc", "patterns": [ { "begin": "(?=predicateWithFormat:)(?<=NSPredicate )(predicateWithFormat:)", "beginCaptures": { "1": { "name": "support.function.any-method.objc" }, "2": { "name": "punctuation.separator.arguments.objc" } }, "end": "(?=\\])", "name": "meta.function-call.predicate.objc", "patterns": [ { "captures": { "1": { "name": "punctuation.separator.arguments.objc" } }, "match": "\\bargument(Array|s)(:)", "name": "support.function.any-method.name-of-parameter.objc" }, { "captures": { "1": { "name": "punctuation.separator.arguments.objc" } }, "match": "\\b\\w+(:)", "name": "invalid.illegal.unknown-method.objc" }, { "begin": "@\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.objc", "patterns": [ { "match": "\\b(AND|OR|NOT|IN)\\b", "name": "keyword.operator.logical.predicate.cocoa.objc" }, { "match": "\\b(ALL|ANY|SOME|NONE)\\b", "name": "constant.language.predicate.cocoa.objc" }, { "match": "\\b(NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", "name": "constant.language.predicate.cocoa.objc" }, { "match": "\\b(MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", "name": "keyword.operator.comparison.predicate.cocoa.objc" }, { "match": "\\bC(ASEINSENSITIVE|I)\\b", "name": "keyword.other.modifier.predicate.cocoa.objc" }, { "match": "\\b(ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", "name": "keyword.other.predicate.cocoa.objc" }, { "match": "\\\\(\\\\|[abefnrtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-zA-Z0-9]+)", "name": "constant.character.escape.objc" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objc" } ] }, { "include": "#special_variables" }, { "include": "#c_functions" }, { "include": "$base" } ] }, { "begin": "(?=\\w)(?<=[\\w\\])\"] )(\\w+(?:(:)|(?=\\])))", "beginCaptures": { "1": { "name": "support.function.any-method.objc" }, "2": { "name": "punctuation.separator.arguments.objc" } }, "end": "(?=\\])", "name": "meta.function-call.objc", "patterns": [ { "captures": { "1": { "name": "punctuation.separator.arguments.objc" } }, "match": "\\b\\w+(:)", "name": "support.function.any-method.name-of-parameter.objc" }, { "include": "#special_variables" }, { "include": "#c_functions" }, { "include": "$base" } ] }, { "include": "#special_variables" }, { "include": "#c_functions" }, { "include": "$self" } ] }, "c_functions": { "patterns": [ { "captures": { "1": { "name": "punctuation.whitespace.support.function.leading.objc" }, "2": { "name": "support.function.C99.objc" } }, "match": "(\\s*)\\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\\b" }, { "captures": { "1": { "name": "punctuation.whitespace.function-call.leading.objc" }, "2": { "name": "support.function.any-method.objc" }, "3": { "name": "punctuation.definition.parameters.objc" } }, "match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n \t\t\t(\\b \n \t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n \t\t\t)\n \t\t\t \\s*(\\()", "name": "meta.function-call.objc" } ] }, "c_lang": { "patterns": [ { "include": "#preprocessor-rule-enabled" }, { "include": "#preprocessor-rule-disabled" }, { "include": "#preprocessor-rule-conditional" }, { "include": "#comments" }, { "include": "#switch_statement" }, { "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b", "name": "keyword.control.objc" }, { "include": "#storage_types" }, { "match": "typedef", "name": "keyword.other.typedef.objc" }, { "match": "\\bin\\b", "name": "keyword.other.in.objc" }, { "match": "\\b(const|extern|register|restrict|static|volatile|inline|__block)\\b", "name": "storage.modifier.objc" }, { "match": "\\bk[A-Z]\\w*\\b", "name": "constant.other.variable.mac-classic.objc" }, { "match": "\\bg[A-Z]\\w*\\b", "name": "variable.other.readwrite.global.mac-classic.objc" }, { "match": "\\bs[A-Z]\\w*\\b", "name": "variable.other.readwrite.static.mac-classic.objc" }, { "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", "name": "constant.language.objc" }, { "include": "#operators" }, { "include": "#numbers" }, { "include": "#strings" }, { "include": "#special_variables" }, { "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+\t# define\n((?<id>[a-zA-Z_$][\\w$]*))\t # macro name\n(?:\n (\\()\n\t(\n\t \\s* \\g<id> \\s*\t\t # first argument\n\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\t (?:\\.\\.\\.)?\t\t\t# varargs ellipsis?\n\t)\n (\\))\n)?", "beginCaptures": { "1": { "name": "keyword.control.directive.define.objc" }, "2": { "name": "punctuation.definition.directive.objc" }, "3": { "name": "entity.name.function.preprocessor.objc" }, "5": { "name": "punctuation.definition.parameters.begin.objc" }, "6": { "name": "variable.parameter.preprocessor.objc" }, "8": { "name": "punctuation.separator.parameters.objc" }, "9": { "name": "punctuation.definition.parameters.end.objc" } }, "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.macro.objc", "patterns": [ { "include": "#preprocessor-rule-define-line-contents" } ] }, { "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*", "beginCaptures": { "1": { "name": "keyword.control.directive.diagnostic.$3.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.diagnostic.objc", "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "\"|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.objc", "patterns": [ { "include": "#line_continuation_character" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "'|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.single.objc", "patterns": [ { "include": "#line_continuation_character" } ] }, { "begin": "[^'\"]", "end": "(?<!\\\\)(?=\\s*\\n)", "name": "string.unquoted.single.objc", "patterns": [ { "include": "#line_continuation_character" }, { "include": "#comments" } ] } ] }, { "begin": "^\\s*((#)\\s*(include(?:_next)?|import))\\b\\s*", "beginCaptures": { "1": { "name": "keyword.control.directive.$3.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.include.objc", "patterns": [ { "include": "#line_continuation_character" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.include.objc" }, { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.other.lt-gt.include.objc" } ] }, { "include": "#pragma-mark" }, { "begin": "^\\s*((#)\\s*line)\\b", "beginCaptures": { "1": { "name": "keyword.control.directive.line.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#strings" }, { "include": "#numbers" }, { "include": "#line_continuation_character" } ] }, { "begin": "^\\s*(?:((#)\\s*undef))\\b", "beginCaptures": { "1": { "name": "keyword.control.directive.undef.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "match": "[a-zA-Z_$][\\w$]*", "name": "entity.name.function.preprocessor.objc" }, { "include": "#line_continuation_character" } ] }, { "begin": "^\\s*(?:((#)\\s*pragma))\\b", "beginCaptures": { "1": { "name": "keyword.control.directive.pragma.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.pragma.objc", "patterns": [ { "include": "#strings" }, { "match": "[a-zA-Z_$][\\w\\-$]*", "name": "entity.other.attribute-name.pragma.preprocessor.objc" }, { "include": "#numbers" }, { "include": "#line_continuation_character" } ] }, { "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b", "name": "support.type.sys-types.objc" }, { "match": "\\b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b", "name": "support.type.pthread.objc" }, { "match": "(?x) \\b\n(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t\n|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t\n|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t\n|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t\n|uintmax_t|uintmax_t)\n\\b", "name": "support.type.stdint.objc" }, { "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b", "name": "support.constant.mac-classic.objc" }, { "match": "(?x) \\b\n(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam\n|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr\n|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber\n|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64\n|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32\n|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr\n|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\n\\b", "name": "support.type.mac-classic.objc" }, { "match": "\\b([A-Za-z0-9_]+_t)\\b", "name": "support.type.posix-reserved.objc" }, { "include": "#block" }, { "include": "#parens" }, { "name": "meta.function.objc", "begin": "(?<!\\w)(?!\\s*(?:not|compl|sizeof|not_eq|bitand|xor|bitor|and|or|and_eq|xor_eq|or_eq|alignof|alignas|_Alignof|_Alignas|while|for|do|if|else|goto|switch|return|break|case|continue|default|void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|NULL|true|false|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t|struct|union|enum|typedef|auto|register|static|extern|thread_local|inline|_Noreturn|const|volatile|restrict|_Atomic)\\s*\\()(?=[a-zA-Z_]\\w*\\s*\\()", "end": "(?<=\\))", "patterns": [ { "include": "#function-innards" } ] }, { "include": "#line_continuation_character" }, { "name": "meta.bracket.square.access.objc", "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))?(\\[)(?!\\])", "beginCaptures": { "1": { "name": "variable.object.objc" }, "2": { "name": "punctuation.definition.begin.bracket.square.objc" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square.objc" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "name": "storage.modifier.array.bracket.square.objc", "match": "\\[\\s*\\]" }, { "match": ";", "name": "punctuation.terminator.statement.objc" }, { "match": ",", "name": "punctuation.separator.delimiter.objc" } ], "repository": { "probably_a_parameter": { "match": "(?<=(?:[a-zA-Z_0-9] |[&*>\\]\\)]))\\s*([a-zA-Z_]\\w*)\\s*(?=(?:\\[\\]\\s*)?(?:,|\\)))", "captures": { "1": { "name": "variable.parameter.probably.objc" } } }, "access-method": { "name": "meta.function-call.member.objc", "begin": "([a-zA-Z_][a-zA-Z_0-9]*|(?<=[\\]\\)]))\\s*(?:(\\.)|(->))((?:(?:[a-zA-Z_][a-zA-Z_0-9]*)\\s*(?:(?:\\.)|(?:->)))*)\\s*([a-zA-Z_][a-zA-Z_0-9]*)(\\()", "beginCaptures": { "1": { "name": "variable.object.objc" }, "2": { "name": "punctuation.separator.dot-access.objc" }, "3": { "name": "punctuation.separator.pointer-access.objc" }, "4": { "patterns": [ { "match": "\\.", "name": "punctuation.separator.dot-access.objc" }, { "match": "->", "name": "punctuation.separator.pointer-access.objc" }, { "match": "[a-zA-Z_][a-zA-Z_0-9]*", "name": "variable.object.objc" }, { "name": "everything.else.objc", "match": ".+" } ] }, "5": { "name": "entity.name.function.member.objc" }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.function.member.objc" } }, "patterns": [ { "include": "#function-call-innards" } ] }, "block": { "patterns": [ { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.objc" } }, "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.objc" } }, "name": "meta.block.objc", "patterns": [ { "include": "#block_innards" } ] } ] }, "block_innards": { "patterns": [ { "include": "#preprocessor-rule-enabled-block" }, { "include": "#preprocessor-rule-disabled-block" }, { "include": "#preprocessor-rule-conditional-block" }, { "include": "#method_access" }, { "include": "#member_access" }, { "include": "#c_function_call" }, { "name": "meta.initialization.objc", "begin": "(?x)\n(?:\n (?:\n\t(?=\\s)(?<!else|new|return)\n\t(?<=\\w) \\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas) # or word + space before name\n )\n)\n(\n (?:[A-Za-z_][A-Za-z0-9_]*+ | :: )++ # actual name\n |\n (?:(?<=operator) (?:[-*&<>=+!]+ | \\(\\) | \\[\\]))\n)\n\\s*(\\() # opening bracket", "beginCaptures": { "1": { "name": "variable.other.objc" }, "2": { "name": "punctuation.section.parens.begin.bracket.round.initialization.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.initialization.objc" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.objc" } }, "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.objc" } }, "patterns": [ { "include": "#block_innards" } ] }, { "include": "#parens-block" }, { "include": "$base" } ] }, "c_function_call": { "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", "end": "(?<=\\))(?!\\w)", "name": "meta.function-call.objc", "patterns": [ { "include": "#function-call-innards" } ] }, "comments": { "patterns": [ { "captures": { "1": { "name": "meta.toc-list.banner.block.objc" } }, "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?", "name": "comment.block.objc" }, { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.objc" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.objc" } }, "name": "comment.block.objc" }, { "captures": { "1": { "name": "meta.toc-list.banner.line.objc" } }, "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?", "name": "comment.line.banner.objc" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.objc" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.objc" } }, "end": "(?=\\n)", "name": "comment.line.double-slash.objc", "patterns": [ { "include": "#line_continuation_character" } ] } ] } ] }, "disabled": { "begin": "^\\s*#\\s*if(n?def)?\\b.*$", "end": "^\\s*#\\s*endif\\b", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, "line_continuation_character": { "patterns": [ { "match": "(\\\\)\\n", "captures": { "1": { "name": "constant.character.escape.line-continuation.objc" } } } ] }, "parens": { "name": "meta.parens.objc", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.objc" } }, "patterns": [ { "include": "$base" } ] }, "parens-block": { "name": "meta.parens.block.objc", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.objc" } }, "patterns": [ { "include": "#block_innards" }, { "match": "(?-mix:(?<!:):(?!:))", "name": "punctuation.range-based.objc" } ] }, "pragma-mark": { "captures": { "1": { "name": "meta.preprocessor.pragma.objc" }, "2": { "name": "keyword.control.directive.pragma.pragma-mark.objc" }, "3": { "name": "punctuation.definition.directive.objc" }, "4": { "name": "entity.name.tag.pragma-mark.objc" } }, "match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))", "name": "meta.section.objc" }, "operators": { "patterns": [ { "match": "(?<![\\w$])(sizeof)(?![\\w$])", "name": "keyword.operator.sizeof.objc" }, { "match": "--", "name": "keyword.operator.decrement.objc" }, { "match": "\\+\\+", "name": "keyword.operator.increment.objc" }, { "match": "%=|\\+=|-=|\\*=|(?<!\\()/=", "name": "keyword.operator.assignment.compound.objc" }, { "match": "&=|\\^=|<<=|>>=|\\|=", "name": "keyword.operator.assignment.compound.bitwise.objc" }, { "match": "<<|>>", "name": "keyword.operator.bitwise.shift.objc" }, { "match": "!=|<=|>=|==|<|>", "name": "keyword.operator.comparison.objc" }, { "match": "&&|!|\\|\\|", "name": "keyword.operator.logical.objc" }, { "match": "&|\\||\\^|~", "name": "keyword.operator.objc" }, { "match": "=", "name": "keyword.operator.assignment.objc" }, { "match": "%|\\*|/|-|\\+", "name": "keyword.operator.objc" }, { "begin": "(\\?)", "beginCaptures": { "1": { "name": "keyword.operator.ternary.objc" } }, "end": "(:)", "endCaptures": { "1": { "name": "keyword.operator.ternary.objc" } }, "patterns": [ { "include": "#function-call-innards" }, { "include": "$base" } ] } ] }, "strings": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.objc", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" }, { "include": "#line_continuation_character" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.single.objc", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#line_continuation_character" } ] } ] }, "string_escaped_char": { "patterns": [ { "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", "name": "constant.character.escape.objc" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objc" } ] }, "string_placeholder": { "patterns": [ { "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", "name": "constant.other.placeholder.objc" }, { "match": "(%)(?!\"\\s*(PRI|SCN))", "captures": { "1": { "name": "invalid.illegal.placeholder.objc" } } } ] }, "storage_types": { "patterns": [ { "match": "(?-mix:(?<!\\w)(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool)(?!\\w))", "name": "storage.type.built-in.primitive.objc" }, { "match": "(?-mix:(?<!\\w)(?:_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t)(?!\\w))", "name": "storage.type.built-in.objc" }, { "match": "(?-mix:\\b(asm|__asm__|enum|struct|union)\\b)", "name": "storage.type.$1.objc" } ] }, "vararg_ellipses": { "match": "(?<!\\.)\\.\\.\\.(?!\\.)", "name": "punctuation.vararg-ellipses.objc" }, "preprocessor-rule-conditional": { "patterns": [ { "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "^\\s*((#)\\s*endif\\b)", "endCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#preprocessor-rule-enabled-elif" }, { "include": "#preprocessor-rule-enabled-else" }, { "include": "#preprocessor-rule-disabled-elif" }, { "begin": "^\\s*((#)\\s*elif\\b)", "beginCaptures": { "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "$base" } ] }, { "match": "^\\s*#\\s*(else|elif|endif)\\b", "captures": { "0": { "name": "invalid.illegal.stray-$1.objc" } } } ] }, "preprocessor-rule-conditional-block": { "patterns": [ { "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "^\\s*((#)\\s*endif\\b)", "endCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#preprocessor-rule-enabled-elif-block" }, { "include": "#preprocessor-rule-enabled-else-block" }, { "include": "#preprocessor-rule-disabled-elif" }, { "begin": "^\\s*((#)\\s*elif\\b)", "beginCaptures": { "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#block_innards" } ] }, { "match": "^\\s*#\\s*(else|elif|endif)\\b", "captures": { "0": { "name": "invalid.illegal.stray-$1.objc" } } } ] }, "preprocessor-rule-conditional-line": { "patterns": [ { "match": "(?:\\bdefined\\b\\s*$)|(?:\\bdefined\\b(?=\\s*\\(*\\s*(?:(?!defined\\b)[a-zA-Z_$][\\w$]*\\b)\\s*\\)*\\s*(?:\\n|//|/\\*|\\?|\\:|&&|\\|\\||\\\\\\s*\\n)))", "name": "keyword.control.directive.conditional.objc" }, { "match": "\\bdefined\\b", "name": "invalid.illegal.macro-name.objc" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#numbers" }, { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.ternary.objc" } }, "end": ":", "endCaptures": { "0": { "name": "keyword.operator.ternary.objc" } }, "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#operators" }, { "match": "\\b(NULL|true|false|TRUE|FALSE)\\b", "name": "constant.language.objc" }, { "match": "[a-zA-Z_$][\\w$]*", "name": "entity.name.function.preprocessor.objc" }, { "include": "#line_continuation_character" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.objc" } }, "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.objc" } }, "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] } ] }, "preprocessor-rule-disabled": { "patterns": [ { "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "^\\s*((#)\\s*endif\\b)", "endCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "include": "#preprocessor-rule-enabled-elif" }, { "include": "#preprocessor-rule-enabled-else" }, { "include": "#preprocessor-rule-disabled-elif" }, { "begin": "^\\s*((#)\\s*elif\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "$base" } ] }, { "contentName": "comment.block.preprocessor.if-branch.objc", "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] } ] } ] }, "preprocessor-rule-disabled-block": { "patterns": [ { "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "^\\s*((#)\\s*endif\\b)", "endCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "include": "#preprocessor-rule-enabled-elif-block" }, { "include": "#preprocessor-rule-enabled-else-block" }, { "include": "#preprocessor-rule-disabled-elif" }, { "begin": "^\\s*((#)\\s*elif\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#block_innards" } ] }, { "contentName": "comment.block.preprocessor.if-branch.in-block.objc", "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] } ] } ] }, "preprocessor-rule-disabled-elif": { "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))", "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "contentName": "comment.block.preprocessor.elif-branch.objc", "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] } ] }, "preprocessor-rule-enabled": { "patterns": [ { "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" }, "3": { "name": "constant.numeric.preprocessor.objc" } }, "end": "^\\s*((#)\\s*endif\\b)", "endCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "contentName": "comment.block.preprocessor.else-branch.objc", "begin": "^\\s*((#)\\s*else\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "contentName": "comment.block.preprocessor.if-branch.objc", "begin": "^\\s*((#)\\s*elif\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "$base" } ] } ] } ] }, "preprocessor-rule-enabled-block": { "patterns": [ { "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "^\\s*((#)\\s*endif\\b)", "endCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "contentName": "comment.block.preprocessor.else-branch.in-block.objc", "begin": "^\\s*((#)\\s*else\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "contentName": "comment.block.preprocessor.if-branch.in-block.objc", "begin": "^\\s*((#)\\s*elif\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#block_innards" } ] } ] } ] }, "preprocessor-rule-enabled-elif": { "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", "patterns": [ { "contentName": "comment.block.preprocessor.elif-branch.objc", "begin": "^\\s*((#)\\s*(else)\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "contentName": "comment.block.preprocessor.elif-branch.objc", "begin": "^\\s*((#)\\s*(elif)\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "include": "$base" } ] } ] }, "preprocessor-rule-enabled-elif-block": { "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "begin": "\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)", "name": "meta.preprocessor.objc", "patterns": [ { "include": "#preprocessor-rule-conditional-line" } ] }, { "include": "#comments" }, { "begin": "\\n", "end": "(?=^\\s*((#)\\s*(?:endif)\\b))", "patterns": [ { "contentName": "comment.block.preprocessor.elif-branch.in-block.objc", "begin": "^\\s*((#)\\s*(else)\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "contentName": "comment.block.preprocessor.elif-branch.objc", "begin": "^\\s*((#)\\s*(elif)\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "include": "#block_innards" } ] } ] }, "preprocessor-rule-enabled-else": { "begin": "^\\s*((#)\\s*else\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "include": "$base" } ] }, "preprocessor-rule-enabled-else-block": { "begin": "^\\s*((#)\\s*else\\b)", "beginCaptures": { "0": { "name": "meta.preprocessor.objc" }, "1": { "name": "keyword.control.directive.conditional.objc" }, "2": { "name": "punctuation.definition.directive.objc" } }, "end": "(?=^\\s*((#)\\s*endif\\b))", "patterns": [ { "include": "#block_innards" } ] }, "preprocessor-rule-define-line-contents": { "patterns": [ { "include": "#vararg_ellipses" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.objc" } }, "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.objc" } }, "name": "meta.block.objc", "patterns": [ { "include": "#preprocessor-rule-define-line-blocks" } ] }, { "match": "\\(", "name": "punctuation.section.parens.begin.bracket.round.objc" }, { "match": "\\)", "name": "punctuation.section.parens.end.bracket.round.objc" }, { "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)", "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)", "name": "meta.function.objc", "patterns": [ { "include": "#preprocessor-rule-define-line-functions" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "\"|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.double.objc", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" }, { "include": "#line_continuation_character" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.objc" } }, "end": "'|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.objc" } }, "name": "string.quoted.single.objc", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#line_continuation_character" } ] }, { "include": "#method_access" }, { "include": "#member_access" }, { "include": "$base" } ] }, "preprocessor-rule-define-line-blocks": { "patterns": [ { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.objc" } }, "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.objc" } }, "patterns": [ { "include": "#preprocessor-rule-define-line-blocks" }, { "include": "#preprocessor-rule-define-line-contents" } ] }, { "include": "#preprocessor-rule-define-line-contents" } ] }, "preprocessor-rule-define-line-functions": { "patterns": [ { "include": "#comments" }, { "include": "#storage_types" }, { "include": "#vararg_ellipses" }, { "include": "#method_access" }, { "include": "#member_access" }, { "include": "#operators" }, { "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.objc" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.objc" } }, "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.objc" } }, "patterns": [ { "include": "#preprocessor-rule-define-line-functions" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.objc" } }, "end": "(\\))|(?<!\\\\)(?=\\s*\\n)", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.objc" } }, "patterns": [ { "include": "#preprocessor-rule-define-line-functions" } ] }, { "include": "#preprocessor-rule-define-line-contents" } ] }, "function-innards": { "patterns": [ { "include": "#comments" }, { "include": "#storage_types" }, { "include": "#operators" }, { "include": "#vararg_ellipses" }, { "name": "meta.function.definition.parameters.objc", "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.objc" }, "2": { "name": "punctuation.section.parameters.begin.bracket.round.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parameters.end.bracket.round.objc" } }, "patterns": [ { "include": "#probably_a_parameter" }, { "include": "#function-innards" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.objc" } }, "patterns": [ { "include": "#function-innards" } ] }, { "include": "$base" } ] }, "function-call-innards": { "patterns": [ { "include": "#comments" }, { "include": "#storage_types" }, { "include": "#method_access" }, { "include": "#member_access" }, { "include": "#operators" }, { "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.objc" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arguments.end.bracket.round.objc" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.bracket.round.objc" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.bracket.round.objc" } }, "patterns": [ { "include": "#function-call-innards" } ] }, { "include": "#block_innards" } ] }, "default_statement": { "name": "meta.conditional.case.objc", "begin": "((?<!\\w)default(?!\\w))", "beginCaptures": { "1": { "name": "keyword.control.default.objc" } }, "end": "(:)", "endCaptures": { "1": { "name": "punctuation.separator.case.default.objc" } }, "patterns": [ { "include": "#conditional_context" } ] }, "case_statement": { "name": "meta.conditional.case.objc", "begin": "((?<!\\w)case(?!\\w))", "beginCaptures": { "1": { "name": "keyword.control.case.objc" } }, "end": "(:)", "endCaptures": { "1": { "name": "punctuation.separator.case.objc" } }, "patterns": [ { "include": "#conditional_context" } ] }, "switch_statement": { "name": "meta.block.switch.objc", "begin": "(((?<!\\w)switch(?!\\w)))", "beginCaptures": { "1": { "name": "meta.head.switch.objc" }, "2": { "name": "keyword.control.switch.objc" } }, "end": "(?:(?<=\\})|(?=[;>\\[\\]=]))", "patterns": [ { "name": "meta.head.switch.objc", "begin": "\\G ?", "end": "((?:\\{|(?=;)))", "endCaptures": { "1": { "name": "punctuation.section.block.begin.bracket.curly.switch.objc" } }, "patterns": [ { "include": "#switch_conditional_parentheses" }, { "include": "$base" } ] }, { "name": "meta.body.switch.objc", "begin": "(?<=\\{)", "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.block.end.bracket.curly.switch.objc" } }, "patterns": [ { "include": "#default_statement" }, { "include": "#case_statement" }, { "include": "$base" }, { "include": "#block_innards" } ] }, { "name": "meta.tail.switch.objc", "begin": "(?<=})[\\s\\n]*", "end": "[\\s\\n]*(?=;)", "patterns": [ { "include": "$base" } ] } ] }, "switch_conditional_parentheses": { "name": "meta.conditional.switch.objc", "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.objc" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.bracket.round.conditional.switch.objc" } }, "patterns": [ { "include": "#conditional_context" } ] }, "static_assert": { "begin": "(static_assert|_Static_assert)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.static_assert.objc" }, "2": { "name": "punctuation.section.arguments.begin.bracket.round.objc" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.objc" } }, "patterns": [ { "name": "meta.static_assert.message.objc", "begin": "(,)\\s*(?=(?:L|u8|u|U\\s*\\\")?)", "beginCaptures": { "1": { "name": "punctuation.separator.delimiter.objc" } }, "end": "(?=\\))", "patterns": [ { "include": "#string_context" }, { "include": "#string_context_c" } ] }, { "include": "#function_call_context" } ] }, "conditional_context": { "patterns": [ { "include": "$base" }, { "include": "#block_innards" } ] }, "member_access": { "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:void|char|short|int|signed|unsigned|long|float|double|bool|_Bool|_Complex|_Imaginary|u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t|pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t|memory_order|atomic_bool|atomic_char|atomic_schar|atomic_uchar|atomic_short|atomic_ushort|atomic_int|atomic_uint|atomic_long|atomic_ulong|atomic_llong|atomic_ullong|atomic_char16_t|atomic_char32_t|atomic_wchar_t|atomic_int_least8_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_least16_t|atomic_int_least32_t|atomic_uint_least32_t|atomic_int_least64_t|atomic_uint_least64_t|atomic_int_fast8_t|atomic_uint_fast8_t|atomic_int_fast16_t|atomic_uint_fast16_t|atomic_int_fast32_t|atomic_uint_fast32_t|atomic_int_fast64_t|atomic_uint_fast64_t|atomic_intptr_t|atomic_uintptr_t|atomic_size_t|atomic_ptrdiff_t|atomic_intmax_t|atomic_uintmax_t))[a-zA-Z_]\\w*\\b(?!\\())", "captures": { "1": { "patterns": [ { "include": "#special_variables" }, { "name": "variable.other.object.access.objc", "match": "(.+)" } ] }, "2": { "name": "punctuation.separator.dot-access.objc" }, "3": { "name": "punctuation.separator.pointer-access.objc" }, "4": { "patterns": [ { "include": "#member_access" }, { "include": "#method_access" }, { "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", "captures": { "1": { "patterns": [ { "include": "#special_variables" }, { "name": "variable.other.object.access.objc", "match": "(.+)" } ] }, "2": { "name": "punctuation.separator.dot-access.objc" }, "3": { "name": "punctuation.separator.pointer-access.objc" } } } ] }, "5": { "name": "variable.other.member.objc" } } }, "method_access": { "contentName": "meta.function-call.member.objc", "begin": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?-mix:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*([a-zA-Z_]\\w*)(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#special_variables" }, { "name": "variable.other.object.access.objc", "match": "(.+)" } ] }, "2": { "name": "punctuation.separator.dot-access.objc" }, "3": { "name": "punctuation.separator.pointer-access.objc" }, "4": { "patterns": [ { "include": "#member_access" }, { "include": "#method_access" }, { "match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))", "captures": { "1": { "patterns": [ { "include": "#special_variables" }, { "name": "variable.other.object.access.objc", "match": "(.+)" } ] }, "2": { "name": "punctuation.separator.dot-access.objc" }, "3": { "name": "punctuation.separator.pointer-access.objc" } } } ] }, "5": { "name": "entity.name.function.member.objc" }, "6": { "name": "punctuation.section.arguments.begin.bracket.round.function.member.objc" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.arguments.end.bracket.round.function.member.objc" } }, "patterns": [ { "include": "#function-call-innards" } ] }, "numbers": { "begin": "(?<!\\w)(?=\\d|\\.\\d)", "end": "(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "patterns": [ { "match": "(\\G0[xX])(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9a-fA-F])\\.|\\.(?=[0-9a-fA-F])))(?:([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "captures": { "1": { "name": "keyword.other.unit.hexadecimal.objc" }, "2": { "name": "constant.numeric.hexadecimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "3": { "name": "punctuation.separator.constant.numeric.objc" }, "4": { "name": "constant.numeric.hexadecimal.objc" }, "5": { "name": "constant.numeric.hexadecimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "6": { "name": "punctuation.separator.constant.numeric.objc" }, "8": { "name": "keyword.other.unit.exponent.hexadecimal.objc" }, "9": { "name": "keyword.operator.plus.exponent.hexadecimal.objc" }, "10": { "name": "keyword.operator.minus.exponent.hexadecimal.objc" }, "11": { "name": "constant.numeric.exponent.hexadecimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "12": { "name": "keyword.other.unit.suffix.floating-point.objc" } } }, { "match": "(\\G(?=[0-9.])(?!0[xXbB]))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?((?:(?<=[0-9])\\.|\\.(?=[0-9])))(?:([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*))?(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:([lLfF](?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "captures": { "2": { "name": "constant.numeric.decimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "3": { "name": "punctuation.separator.constant.numeric.objc" }, "4": { "name": "constant.numeric.decimal.point.objc" }, "5": { "name": "constant.numeric.decimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "6": { "name": "punctuation.separator.constant.numeric.objc" }, "8": { "name": "keyword.other.unit.exponent.decimal.objc" }, "9": { "name": "keyword.operator.plus.exponent.decimal.objc" }, "10": { "name": "keyword.operator.minus.exponent.decimal.objc" }, "11": { "name": "constant.numeric.exponent.decimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "12": { "name": "keyword.other.unit.suffix.floating-point.objc" } } }, { "match": "(\\G0[bB])([01](?:(?:[01]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "captures": { "1": { "name": "keyword.other.unit.binary.objc" }, "2": { "name": "constant.numeric.binary.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "3": { "name": "punctuation.separator.constant.numeric.objc" }, "4": { "name": "keyword.other.unit.suffix.integer.objc" } } }, { "match": "(\\G0)((?:(?:[0-7]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))+)(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "captures": { "1": { "name": "keyword.other.unit.octal.objc" }, "2": { "name": "constant.numeric.octal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "3": { "name": "punctuation.separator.constant.numeric.objc" }, "4": { "name": "keyword.other.unit.suffix.integer.objc" } } }, { "match": "(\\G0[xX])([0-9a-fA-F](?:(?:[0-9a-fA-F]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([pP])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "captures": { "1": { "name": "keyword.other.unit.hexadecimal.objc" }, "2": { "name": "constant.numeric.hexadecimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "3": { "name": "punctuation.separator.constant.numeric.objc" }, "5": { "name": "keyword.other.unit.exponent.hexadecimal.objc" }, "6": { "name": "keyword.operator.plus.exponent.hexadecimal.objc" }, "7": { "name": "keyword.operator.minus.exponent.hexadecimal.objc" }, "8": { "name": "constant.numeric.exponent.hexadecimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "9": { "name": "keyword.other.unit.suffix.integer.objc" } } }, { "match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:(?:[0-9]|((?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)(?:((?<!')([eE])(\\+)?(\\-)?((?-mix:(?:[0-9](?:(?:[0-9]|(?:(?<=[0-9a-fA-F])'(?=[0-9a-fA-F]))))*)))))?(?:((?:(?:(?:(?:(?:[uU]|[uU]ll?)|[uU]LL?)|ll?[uU]?)|LL?[uU]?)|[fF])(?!\\w)))?(?!(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))", "captures": { "2": { "name": "constant.numeric.decimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "3": { "name": "punctuation.separator.constant.numeric.objc" }, "5": { "name": "keyword.other.unit.exponent.decimal.objc" }, "6": { "name": "keyword.operator.plus.exponent.decimal.objc" }, "7": { "name": "keyword.operator.minus.exponent.decimal.objc" }, "8": { "name": "constant.numeric.exponent.decimal.objc", "patterns": [ { "match": "(?<=[0-9a-fA-F])'(?=[0-9a-fA-F])", "name": "punctuation.separator.constant.numeric.objc" } ] }, "9": { "name": "keyword.other.unit.suffix.integer.objc" } } }, { "match": "(?:(?:['0-9a-zA-Z_\\.']|(?<=[eEpP])[+-]))+", "name": "invalid.illegal.constant.numeric.objc" } ] } } }, "comment": { "patterns": [ { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.objc" } }, "end": "\\*/", "name": "comment.block.objc" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.objc" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.objc" } }, "end": "\\n", "name": "comment.line.double-slash.objc", "patterns": [ { "match": "(?>\\\\\\s*\\n)", "name": "punctuation.separator.continuation.objc" } ] } ] } ] }, "disabled": { "begin": "^\\s*#\\s*if(n?def)?\\b.*$", "comment": "eat nested preprocessor if(def)s", "end": "^\\s*#\\s*endif\\b.*$", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, "implementation_innards": { "patterns": [ { "include": "#preprocessor-rule-enabled-implementation" }, { "include": "#preprocessor-rule-disabled-implementation" }, { "include": "#preprocessor-rule-other-implementation" }, { "include": "#property_directive" }, { "include": "#method_super" }, { "include": "$base" } ] }, "interface_innards": { "patterns": [ { "include": "#preprocessor-rule-enabled-interface" }, { "include": "#preprocessor-rule-disabled-interface" }, { "include": "#preprocessor-rule-other-interface" }, { "include": "#properties" }, { "include": "#protocol_list" }, { "include": "#method" }, { "include": "$base" } ] }, "method": { "begin": "^(-|\\+)\\s*", "end": "(?=\\{|#)|;", "name": "meta.function.objc", "patterns": [ { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.type.begin.objc" } }, "end": "(\\))\\s*(\\w+\\b)", "endCaptures": { "1": { "name": "punctuation.definition.type.end.objc" }, "2": { "name": "entity.name.function.objc" } }, "name": "meta.return-type.objc", "patterns": [ { "include": "#protocol_list" }, { "include": "#protocol_type_qualifier" }, { "include": "$base" } ] }, { "match": "\\b\\w+(?=:)", "name": "entity.name.function.name-of-parameter.objc" }, { "begin": "((:))\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.name-of-parameter.objc" }, "2": { "name": "punctuation.separator.arguments.objc" }, "3": { "name": "punctuation.definition.type.begin.objc" } }, "end": "(\\))\\s*(\\w+\\b)?", "endCaptures": { "1": { "name": "punctuation.definition.type.end.objc" }, "2": { "name": "variable.parameter.function.objc" } }, "name": "meta.argument-type.objc", "patterns": [ { "include": "#protocol_list" }, { "include": "#protocol_type_qualifier" }, { "include": "$base" } ] }, { "include": "#comment" } ] }, "method_super": { "begin": "^(?=-|\\+)", "end": "(?<=\\})|(?=#)", "name": "meta.function-with-body.objc", "patterns": [ { "include": "#method" }, { "include": "$base" } ] }, "pragma-mark": { "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.pragma.objc" }, "3": { "name": "meta.toc-list.pragma-mark.objc" } }, "match": "^\\s*(#\\s*(pragma\\s+mark)\\s+(.*))", "name": "meta.section.objc" }, "preprocessor-rule-disabled-implementation": { "begin": "^\\s*(#(if)\\s+(0)\\b).*", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.if.objc" }, "3": { "name": "constant.numeric.preprocessor.objc" } }, "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "begin": "^\\s*(#\\s*(else)\\b)", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.else.objc" } }, "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "include": "#interface_innards" } ] }, { "begin": "", "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", "name": "comment.block.preprocessor.if-branch.objc", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] } ] }, "preprocessor-rule-disabled-interface": { "begin": "^\\s*(#(if)\\s+(0)\\b).*", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.if.objc" }, "3": { "name": "constant.numeric.preprocessor.objc" } }, "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "begin": "^\\s*(#\\s*(else)\\b)", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.else.objc" } }, "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "include": "#interface_innards" } ] }, { "begin": "", "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", "name": "comment.block.preprocessor.if-branch.objc", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] } ] }, "preprocessor-rule-enabled-implementation": { "begin": "^\\s*(#(if)\\s+(0*1)\\b)", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.if.objc" }, "3": { "name": "constant.numeric.preprocessor.objc" } }, "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "begin": "^\\s*(#\\s*(else)\\b).*", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.else.objc" } }, "contentName": "comment.block.preprocessor.else-branch.objc", "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "begin": "", "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "include": "#implementation_innards" } ] } ] }, "preprocessor-rule-enabled-interface": { "begin": "^\\s*(#(if)\\s+(0*1)\\b)", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.if.objc" }, "3": { "name": "constant.numeric.preprocessor.objc" } }, "end": "^\\s*(#\\s*(endif)\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "begin": "^\\s*(#\\s*(else)\\b).*", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.else.objc" } }, "contentName": "comment.block.preprocessor.else-branch.objc", "end": "(?=^\\s*#\\s*endif\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "include": "#disabled" }, { "include": "#pragma-mark" } ] }, { "begin": "", "end": "(?=^\\s*#\\s*(else|endif)\\b.*?(?:(?=(?://|/\\*))|$))", "patterns": [ { "include": "#interface_innards" } ] } ] }, "preprocessor-rule-other-implementation": { "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.objc" } }, "end": "^\\s*(#\\s*(endif)\\b).*?(?:(?=(?://|/\\*))|$)", "patterns": [ { "include": "#implementation_innards" } ] }, "preprocessor-rule-other-interface": { "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))", "captures": { "1": { "name": "meta.preprocessor.objc" }, "2": { "name": "keyword.control.import.objc" } }, "end": "^\\s*(#\\s*(endif)\\b).*?(?:(?=(?://|/\\*))|$)", "patterns": [ { "include": "#interface_innards" } ] }, "properties": { "patterns": [ { "begin": "((@)property)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.property.objc" }, "2": { "name": "punctuation.definition.keyword.objc" }, "3": { "name": "punctuation.section.scope.begin.objc" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.scope.end.objc" } }, "name": "meta.property-with-attributes.objc", "patterns": [ { "match": "\\b(getter|setter|readonly|readwrite|assign|retain|copy|nonatomic|atomic|strong|weak|nonnull|nullable|null_resettable|null_unspecified|class|direct)\\b", "name": "keyword.other.property.attribute.objc" } ] }, { "captures": { "1": { "name": "keyword.other.property.objc" }, "2": { "name": "punctuation.definition.keyword.objc" } }, "match": "((@)property)\\b", "name": "meta.property.objc" } ] }, "property_directive": { "captures": { "1": { "name": "punctuation.definition.keyword.objc" } }, "match": "(@)(dynamic|synthesize)\\b", "name": "keyword.other.property.directive.objc" }, "protocol_list": { "begin": "(<)", "beginCaptures": { "1": { "name": "punctuation.section.scope.begin.objc" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.section.scope.end.objc" } }, "name": "meta.protocol-list.objc", "patterns": [ { "match": "\\bNS(GlyphStorage|M(utableCopying|enuItem)|C(hangeSpelling|o(ding|pying|lorPicking(Custom|Default)))|T(oolbarItemValidations|ext(Input|AttachmentCell))|I(nputServ(iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(CTypeSerializationCallBack|ect)|D(ecimalNumberBehaviors|raggingInfo)|U(serInterfaceValidations|RL(HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(ToobarItem|UserInterfaceItem)|Locking)\\b", "name": "support.other.protocol.objc" } ] }, "protocol_type_qualifier": { "match": "\\b(in|out|inout|oneway|bycopy|byref|nonnull|nullable|_Nonnull|_Nullable|_Null_unspecified)\\b", "name": "storage.modifier.protocol.objc" }, "special_variables": { "patterns": [ { "match": "\\b_cmd\\b", "name": "variable.other.selector.objc" }, { "match": "\\b(self|super)\\b", "name": "variable.language.objc" } ] }, "string_escaped_char": { "patterns": [ { "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3]\\d{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", "name": "constant.character.escape.objc" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.objc" } ] }, "string_placeholder": { "patterns": [ { "match": "(?x) %\n(\\d+\\$)?\t\t\t\t\t\t # field (argument #)\n[#0\\- +']*\t\t\t\t\t\t # flags\n[,;:_]?\t\t\t\t\t\t\t # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)?\t\t # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?\t# precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%]\t\t # conversion type", "name": "constant.other.placeholder.objc" }, { "match": "(%)(?!\"\\s*(PRI|SCN))", "captures": { "1": { "name": "invalid.illegal.placeholder.objc" } } } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/ocaml.tmLanguage.json ================================================ { "name": "ocaml", "scopeName": "source.ocaml", "fileTypes": [".ml", ".mli"], "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "include": "#decl" } ], "repository": { "attribute": { "begin": "(\\[)[[:space:]]*((?<![#\\-:!?.@*/&%^+<=>|~$])@{1,3}(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\]", "beginCaptures": { "1": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [ { "include": "#attributePayload" } ] }, "attributeIdentifier": { "match": "((?<![#\\-:!?.@*/&%^+<=>|~$])%(?![#\\-:!?.@*/&%^+<=>|~$]))((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))", "captures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "punctuation.definition.tag" } } }, "attributePayload": { "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]%|^%))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "((?<![#\\-:!?.@*/&%^+<=>|~$])[:\\?](?![#\\-:!?.@*/&%^+<=>|~$]))|(?<=[[:space:]])|(?=\\])", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#pathModuleExtended" }, { "include": "#pathRecord" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\])", "patterns": [ { "include": "#signature" }, { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\])", "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\])|\\bwhen\\b", "endCaptures": { "1": {} }, "patterns": [ { "include": "#pattern" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]when|^when))(?![[:word:]]))", "end": "(?=\\])", "patterns": [ { "include": "#term" } ] } ] }, { "include": "#term" } ] }, "bindClassTerm": { "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|(=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?=\\btype\\b)", "endCaptures": { "0": { "name": "entity.name.function strong emphasis" } }, "patterns": [ { "include": "#attributeIdentifier" } ] }, { "begin": "\\[", "end": "\\]", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#type" } ] }, { "include": "#bindTermArgs" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|val)\\b)", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "include": "#literalClassType" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "include": "#term" } ] } ] }, "bindClassType": { "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|(=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?=\\btype\\b)", "endCaptures": { "0": { "name": "entity.name.function strong emphasis" } }, "patterns": [ { "include": "#attributeIdentifier" } ] }, { "begin": "\\[", "end": "\\]", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#type" } ] }, { "include": "#bindTermArgs" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|val)\\b)", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "include": "#literalClassType" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "include": "#literalClassType" } ] } ] }, "bindConstructor": { "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]exception|^exception))(?![[:word:]]))|(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\+=|^\\+=|[^#\\-:!?.@*/&%^+<=>|~$]=|^=|[^#\\-:!?.@*/&%^+<=>|~$]\\||^\\|))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(:)|(\\bof\\b)|((?<![#\\-:!?.@*/&%^+<=>|~$])\\|(?![#\\-:!?.@*/&%^+<=>|~$]))|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "punctuation.definition.tag" }, "3": { "name": "support.type strong" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "match": "\\.\\.", "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, { "match": "\\b(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)\\b(?![[:space:]]*(?:\\.|\\([^\\*]))", "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]of|^of))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\|(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "include": "#type" } ] } ] }, "bindSignature": { "patterns": [ { "include": "#comment" }, { "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModuleExtended" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "include": "#signature" } ] } ] }, "bindStructure": { "patterns": [ { "include": "#comment" }, { "begin": "(?:(?<=(?:[^[:word:]]and|^and))(?![[:word:]]))|(?=[[:upper:]])", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:(?!=))|(:?=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#comment" }, { "match": "\\bmodule\\b", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" }, { "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", "name": "entity.name.function strong emphasis" }, { "begin": "\\((?!\\))", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "(?=\\))", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" } }, "patterns": [ { "include": "#signature" } ] }, { "include": "#variableModule" } ] }, { "include": "#literalUnit" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\b(and)\\b|((?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$]))|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#signature" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:=|^:=|[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\b(?:(and)|(with))\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "include": "#structure" } ] } ] }, "bindTerm": { "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]!|^!))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]external|^external|[^[:word:]]let|^let|[^[:word:]]method|^method|[^[:word:]]val|^val))(?![[:word:]]))", "end": "(\\bmodule\\b)|(\\bopen\\b)|(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|((?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$]))(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "4": { "name": "support.type strong" } }, "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]!|^!))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]external|^external|[^[:word:]]let|^let|[^[:word:]]method|^method|[^[:word:]]val|^val))(?![[:word:]]))", "end": "(?=\\b(?:module|open)\\b)|(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(\\brec\\b)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "2": { "name": "entity.name.function strong emphasis" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#comment" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]rec|^rec))(?![[:word:]]))", "end": "((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(?=[^[:space:][:alpha:]])", "endCaptures": { "0": { "name": "entity.name.function strong emphasis" } }, "patterns": [ { "include": "#bindTermArgs" } ] }, { "include": "#bindTermArgs" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#declModule" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]open|^open))(?![[:word:]]))", "end": "(?=\\bin\\b)|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#pathModuleSimple" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\btype\\b|(?=[^[:space:]])", "endCaptures": { "0": { "name": "keyword.control" } } }, { "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#pattern" } ] }, { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "include": "#term" } ] } ] }, "bindTermArgs": { "patterns": [ { "begin": "~|\\?", "end": ":|(?=[^[:space:]])", "applyEndPatternLast": true, "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]~|^~|[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?<=\\))", "endCaptures": { "0": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } }, "patterns": [ { "include": "#comment" }, { "begin": "\\((?!\\*)", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "begin": "(?<=\\()", "end": ":|=", "endCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } ] }, { "begin": "(?<=:)", "end": "=|(?=\\))", "endCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\))", "patterns": [ { "include": "#term" } ] } ] } ] } ] }, { "include": "#pattern" } ] }, "bindType": { "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\+=|=(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#pathType" }, { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "entity.name.function strong" }, { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\+=|^\\+=|[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\band\\b|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "include": "#bindConstructor" } ] } ] }, "comment": { "patterns": [ { "include": "#attribute" }, { "include": "#extension" }, { "include": "#commentBlock" }, { "include": "#commentDoc" } ] }, "commentBlock": { "begin": "\\(\\*(?!\\*[^\\)])", "end": "\\*\\)", "name": "comment constant.regexp meta.separator.markdown", "contentName": "emphasis", "patterns": [ { "include": "#commentBlock" }, { "include": "#commentDoc" } ] }, "commentDoc": { "begin": "\\(\\*\\*", "end": "\\*\\)", "name": "comment constant.regexp meta.separator.markdown", "patterns": [ { "match": "\\*" }, { "include": "#comment" } ] }, "decl": { "patterns": [ { "include": "#declClass" }, { "include": "#declException" }, { "include": "#declInclude" }, { "include": "#declModule" }, { "include": "#declOpen" }, { "include": "#declTerm" }, { "include": "#declType" } ] }, "declClass": { "begin": "\\bclass\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "entity.name.class constant.numeric markup.underline" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "begin": "(?:(?<=(?:[^[:word:]]class|^class))(?![[:word:]]))", "end": "\\btype\\b|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|val)\\b)", "beginCaptures": { "0": { "name": "entity.name.class constant.numeric markup.underline" } }, "endCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "include": "#bindClassTerm" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#bindClassType" } ] } ] }, "declException": { "begin": "\\bexception\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "keyword markup.underline" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#comment" }, { "include": "#pragma" }, { "include": "#bindConstructor" } ] }, "declInclude": { "begin": "\\binclude\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#comment" }, { "include": "#pragma" }, { "include": "#signature" } ] }, "declModule": { "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))|\\bmodule\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename markup.underline" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", "end": "(\\btype\\b)|(?=[[:upper:]])", "endCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#comment" }, { "match": "\\brec\\b", "name": "variable.other.class.js message.error variable.interpolation string.regexp" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#bindSignature" } ] }, { "begin": "(?=[[:upper:]])", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#bindStructure" } ] } ] }, "declOpen": { "begin": "\\bopen\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#comment" }, { "include": "#pragma" }, { "include": "#pathModuleExtended" } ] }, "declTerm": { "begin": "\\b(?:(external|val)|(method)|(let))\\b(!?)", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "1": { "name": "support.type markup.underline" }, "2": { "name": "storage.type markup.underline" }, "3": { "name": "keyword.control markup.underline" }, "4": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "include": "#bindTerm" } ] }, "declType": { "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))|\\btype\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "keyword markup.underline" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "include": "#bindType" } ] }, "extension": { "begin": "(\\[)((?<![#\\-:!?.@*/&%^+<=>|~$])%{1,3}(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\]", "beginCaptures": { "1": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [ { "include": "#attributePayload" } ] }, "literal": { "patterns": [ { "include": "#termConstructor" }, { "include": "#literalArray" }, { "include": "#literalBoolean" }, { "include": "#literalCharacter" }, { "include": "#literalList" }, { "include": "#literalNumber" }, { "include": "#literalObjectTerm" }, { "include": "#literalString" }, { "include": "#literalRecord" }, { "include": "#literalUnit" } ] }, "literalArray": { "begin": "\\[\\|", "end": "\\|\\]", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [ { "include": "#term" } ] }, "literalBoolean": { "match": "\\bfalse|true\\b", "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "literalCharacter": { "begin": "(?<![[:word:]])'", "end": "'", "name": "markup.punctuation.quote.beginning", "patterns": [ { "include": "#literalCharacterEscape" } ] }, "literalCharacterEscape": { "match": "\\\\(?:[\\\\\"'ntbr]|[[:digit:]][[:digit:]][[:digit:]]|x[[:xdigit:]][[:xdigit:]]|o[0-3][0-7][0-7])" }, "literalClassType": { "patterns": [ { "include": "#comment" }, { "begin": "\\bobject\\b", "end": "\\bend\\b", "captures": { "0": { "name": "punctuation.definition.tag emphasis" } }, "patterns": [ { "begin": "\\binherit\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "begin": "\\bas\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#variablePattern" } ] }, { "include": "#type" } ] }, { "include": "#pattern" }, { "include": "#declTerm" } ] }, { "begin": "\\[", "end": "\\]" } ] }, "literalList": { "patterns": [ { "begin": "\\[", "end": "\\]", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [ { "include": "#term" } ] } ] }, "literalNumber": { "match": "(?<![[:alpha:]])[[:digit:]][[:digit:]]*(\\.[[:digit:]][[:digit:]]*)?", "name": "constant.numeric" }, "literalObjectTerm": { "patterns": [ { "include": "#comment" }, { "begin": "\\bobject\\b", "end": "\\bend\\b", "captures": { "0": { "name": "punctuation.definition.tag emphasis" } }, "patterns": [ { "begin": "\\binherit\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "begin": "\\bas\\b", "end": ";;|(?=\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#variablePattern" } ] }, { "include": "#term" } ] }, { "include": "#pattern" }, { "include": "#declTerm" } ] }, { "begin": "\\[", "end": "\\]" } ] }, "literalRecord": { "begin": "\\{", "end": "\\}", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" } }, "patterns": [ { "begin": "(?<=\\{|;)", "end": "(:)|(=)|(;)|(with)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "4": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModulePrefixSimple" }, { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", "end": "(:)|(=)|(;)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(;)|(=)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": ";|(?=\\})", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#term" } ] } ] }, "literalString": { "patterns": [ { "begin": "\"", "end": "\"", "name": "string beginning.punctuation.definition.quote.markdown", "patterns": [ { "include": "#literalStringEscape" } ] }, { "begin": "(\\{)([_[:lower:]]*?)(\\|)", "end": "(\\|)(\\2)(\\})", "name": "string beginning.punctuation.definition.quote.markdown", "patterns": [ { "include": "#literalStringEscape" } ] } ] }, "literalStringEscape": { "match": "\\\\(?:[\\\\\"ntbr]|[[:digit:]][[:digit:]][[:digit:]]|x[[:xdigit:]][[:xdigit:]]|o[0-3][0-7][0-7])" }, "literalUnit": { "match": "\\(\\)", "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "pathModuleExtended": { "patterns": [ { "include": "#pathModulePrefixExtended" }, { "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", "name": "entity.name.class constant.numeric" } ] }, "pathModulePrefixExtended": { "begin": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.|$|\\()", "end": "(?![[:space:]\\.]|$|\\()", "beginCaptures": { "0": { "name": "entity.name.class constant.numeric" } }, "patterns": [ { "include": "#comment" }, { "begin": "\\(", "end": "\\)", "captures": { "0": { "name": "keyword.control" } }, "patterns": [ { "match": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\)))", "name": "string.other.link variable.language variable.parameter emphasis" }, { "include": "#structure" } ] }, { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.|$))|((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*(?:$|\\()))|((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\)))|(?![[:space:]\\.[:upper:]]|$|\\()", "beginCaptures": { "0": { "name": "keyword strong" } }, "endCaptures": { "1": { "name": "entity.name.class constant.numeric" }, "2": { "name": "entity.name.function strong" }, "3": { "name": "string.other.link variable.language variable.parameter emphasis" } } } ] }, "pathModulePrefixExtendedParens": { "begin": "\\(", "end": "\\)", "captures": { "0": { "name": "keyword.control" } }, "patterns": [ { "match": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\)))", "name": "string.other.link variable.language variable.parameter emphasis" }, { "include": "#structure" } ] }, "pathModulePrefixSimple": { "begin": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.)", "end": "(?![[:space:]\\.])", "beginCaptures": { "0": { "name": "entity.name.class constant.numeric" } }, "patterns": [ { "include": "#comment" }, { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*\\.))|((?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)(?=[[:space:]]*))|(?![[:space:]\\.[:upper:]])", "beginCaptures": { "0": { "name": "keyword strong" } }, "endCaptures": { "1": { "name": "entity.name.class constant.numeric" }, "2": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } } } ] }, "pathModuleSimple": { "patterns": [ { "include": "#pathModulePrefixSimple" }, { "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", "name": "entity.name.class constant.numeric" } ] }, "pathRecord": { "patterns": [ { "begin": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "end": "(?=[^[:space:]\\.])(?!\\(\\*)", "patterns": [ { "include": "#comment" }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\.|^\\.))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "((?<![#\\-:!?.@*/&%^+<=>|~$])\\.(?![#\\-:!?.@*/&%^+<=>|~$]))|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|mutable|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(?<=\\))|(?<=\\])", "beginCaptures": { "0": { "name": "keyword strong" } }, "endCaptures": { "1": { "name": "keyword strong" }, "2": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModulePrefixSimple" }, { "begin": "\\((?!\\*)", "end": "\\)", "captures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#term" } ] }, { "begin": "\\[", "end": "\\]", "captures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#pattern" } ] } ] } ] } ] }, "pattern": { "patterns": [ { "include": "#comment" }, { "include": "#patternArray" }, { "include": "#patternLazy" }, { "include": "#patternList" }, { "include": "#patternMisc" }, { "include": "#patternModule" }, { "include": "#patternRecord" }, { "include": "#literal" }, { "include": "#patternParens" }, { "include": "#patternType" }, { "include": "#variablePattern" }, { "include": "#termOperator" } ] }, "patternArray": { "begin": "\\[\\|", "end": "\\|\\]", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [ { "include": "#pattern" } ] }, "patternLazy": { "match": "lazy", "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "patternList": { "begin": "\\[", "end": "\\]", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [ { "include": "#pattern" } ] }, "patternMisc": { "match": "((?<![#\\-:!?.@*/&%^+<=>|~$]),(?![#\\-:!?.@*/&%^+<=>|~$]))|([#\\-:!?.@*/&%^+<=>|~$]+)|\\b(as)\\b", "captures": { "1": { "name": "string.regexp strong" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } } }, "patternModule": { "begin": "\\bmodule\\b", "end": "(?=\\))", "beginCaptures": { "0": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } }, "patterns": [ { "include": "#declModule" } ] }, "patternParens": { "begin": "\\((?!\\))", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "(?=\\))", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" } }, "patterns": [ { "include": "#type" } ] }, { "include": "#pattern" } ] }, "patternRecord": { "begin": "\\{", "end": "\\}", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" } }, "patterns": [ { "begin": "(?<=\\{|;)", "end": "(:)|(=)|(;)|(with)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "4": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModulePrefixSimple" }, { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", "end": "(:)|(=)|(;)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(;)|(=)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": ";|(?=\\})", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#pattern" } ] } ] }, "patternType": { "begin": "\\btype\\b", "end": "(?=\\))", "beginCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "include": "#declType" } ] }, "pragma": { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])#(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "include": "#literalNumber" }, { "include": "#literalString" } ] }, "signature": { "patterns": [ { "include": "#comment" }, { "include": "#signatureLiteral" }, { "include": "#signatureFunctor" }, { "include": "#pathModuleExtended" }, { "include": "#signatureParens" }, { "include": "#signatureRecovered" }, { "include": "#signatureConstraints" } ] }, "signatureConstraints": { "begin": "\\bwith\\b", "end": "(?=\\))|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", "end": "\\b(?:(module)|(type))\\b", "endCaptures": { "1": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" }, "2": { "name": "keyword" } } }, { "include": "#declModule" }, { "include": "#declType" } ] }, "signatureFunctor": { "patterns": [ { "begin": "\\bfunctor\\b", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]functor|^functor))(?![[:word:]]))", "end": "(\\(\\))|(\\((?!\\)))", "endCaptures": { "1": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "2": { "name": "punctuation.definition.tag" } } }, { "begin": "(?<=\\()", "end": "(:)|(\\))", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#variableModule" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#signature" } ] }, { "begin": "(?<=\\))", "end": "(\\()|((?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", "endCaptures": { "1": { "name": "punctuation.definition.tag" }, "2": { "name": "support.type strong" } } }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#signature" } ] } ] }, { "match": "(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$])", "name": "support.type strong" } ] }, "signatureLiteral": { "begin": "\\bsig\\b", "end": "\\bend\\b", "captures": { "0": { "name": "punctuation.definition.tag emphasis" } }, "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "include": "#decl" } ] }, "signatureParens": { "begin": "\\((?!\\))", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#comment" }, { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "(?=\\))", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" } }, "patterns": [ { "include": "#signature" } ] }, { "include": "#signature" } ] }, "signatureRecovered": { "patterns": [ { "begin": "\\(|(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:|[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?:(?<=(?:[^[:word:]]include|^include|[^[:word:]]open|^open))(?![[:word:]]))", "end": "\\bmodule\\b|(?!$|[[:space:]]|\\bmodule\\b)", "endCaptures": { "0": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } } }, { "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]module|^module))(?![[:word:]]))", "end": "\\btype\\b", "endCaptures": { "0": { "name": "keyword" } } }, { "begin": "(?:(?<=(?:[^[:word:]]type|^type))(?![[:word:]]))", "end": "\\bof\\b", "endCaptures": { "0": { "name": "punctuation.definition.tag" } } }, { "begin": "(?:(?<=(?:[^[:word:]]of|^of))(?![[:word:]]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#signature" } ] } ] } ] }, "structure": { "patterns": [ { "include": "#comment" }, { "include": "#structureLiteral" }, { "include": "#structureFunctor" }, { "include": "#pathModuleExtended" }, { "include": "#structureParens" } ] }, "structureFunctor": { "patterns": [ { "begin": "\\bfunctor\\b", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]functor|^functor))(?![[:word:]]))", "end": "(\\(\\))|(\\((?!\\)))", "endCaptures": { "1": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "2": { "name": "punctuation.definition.tag" } } }, { "begin": "(?<=\\()", "end": "(:)|(\\))", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#variableModule" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#signature" } ] }, { "begin": "(?<=\\))", "end": "(\\()|((?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", "endCaptures": { "1": { "name": "punctuation.definition.tag" }, "2": { "name": "support.type strong" } } }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "patterns": [ { "include": "#structure" } ] } ] }, { "match": "(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$])", "name": "support.type strong" } ] }, "structureLiteral": { "begin": "\\bstruct\\b", "end": "\\bend\\b", "captures": { "0": { "name": "punctuation.definition.tag emphasis" } }, "patterns": [ { "include": "#comment" }, { "include": "#pragma" }, { "include": "#decl" } ] }, "structureParens": { "begin": "\\(", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#structureUnpack" }, { "include": "#structure" } ] }, "structureUnpack": { "begin": "\\bval\\b", "end": "(?=\\))", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } } }, "term": { "patterns": [ { "include": "#termLet" }, { "include": "#termAtomic" } ] }, "termAtomic": { "patterns": [ { "include": "#comment" }, { "include": "#termConditional" }, { "include": "#termConstructor" }, { "include": "#termDelim" }, { "include": "#termFor" }, { "include": "#termFunction" }, { "include": "#literal" }, { "include": "#termMatch" }, { "include": "#termMatchRule" }, { "include": "#termPun" }, { "include": "#termOperator" }, { "include": "#termTry" }, { "include": "#termWhile" }, { "include": "#pathRecord" } ] }, "termConditional": { "match": "\\b(?:if|then|else)\\b", "name": "keyword.control" }, "termConstructor": { "patterns": [ { "include": "#pathModulePrefixSimple" }, { "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } ] }, "termDelim": { "patterns": [ { "begin": "\\((?!\\))", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#term" } ] }, { "begin": "\\bbegin\\b", "end": "\\bend\\b", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "include": "#attributeIdentifier" }, { "include": "#term" } ] } ] }, "termFor": { "patterns": [ { "begin": "\\bfor\\b", "end": "\\bdone\\b", "beginCaptures": { "0": { "name": "keyword.control" } }, "endCaptures": { "0": { "name": "keyword.control" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]for|^for))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])=(?![#\\-:!?.@*/&%^+<=>|~$])", "endCaptures": { "0": { "name": "support.type strong" } }, "patterns": [ { "include": "#pattern" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "\\b(?:downto|to)\\b", "endCaptures": { "0": { "name": "keyword.control" } }, "patterns": [ { "include": "#term" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]to|^to))(?![[:word:]]))", "end": "\\bdo\\b", "endCaptures": { "0": { "name": "keyword.control" } }, "patterns": [ { "include": "#term" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]do|^do))(?![[:word:]]))", "end": "(?=\\bdone\\b)", "patterns": [ { "include": "#term" } ] } ] } ] }, "termFunction": { "match": "\\b(?:(fun)|(function))\\b", "captures": { "1": { "name": "storage.type" }, "2": { "name": "storage.type" } } }, "termLet": { "patterns": [ { "begin": "(?:(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=|[^#\\-:!?.@*/&%^+<=>|~$]->|^->))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?<=;|\\())(?=[[:space:]]|\\blet\\b)|(?:(?<=(?:[^[:word:]]begin|^begin|[^[:word:]]do|^do|[^[:word:]]else|^else|[^[:word:]]in|^in|[^[:word:]]struct|^struct|[^[:word:]]then|^then|[^[:word:]]try|^try))(?![[:word:]]))|(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]@@|^@@))(?![#\\-:!?.@*/&%^+<=>|~$]))[[:space:]]+", "end": "\\b(?:(and)|(let))\\b|(?=[^[:space:]])(?!\\(\\*)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" }, "2": { "name": "storage.type markup.underline" } }, "patterns": [ { "include": "#comment" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]let|^let))(?![[:word:]]))|(let)", "end": "\\b(?:(and)|(in))\\b|(?=\\}|\\)|\\]|\\b(?:end|class|exception|external|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "1": { "name": "storage.type markup.underline" } }, "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp markup.underline" }, "2": { "name": "storage.type markup.underline" } }, "patterns": [ { "include": "#bindTerm" } ] } ] }, "termMatch": { "begin": "\\bmatch\\b", "end": "\\bwith\\b", "captures": { "0": { "name": "keyword.control" } }, "patterns": [ { "include": "#term" } ] }, "termMatchRule": { "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]fun|^fun|[^[:word:]]function|^function|[^[:word:]]with|^with))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(\\|)|(->)(?![#\\-:!?.@*/&%^+<=>|~$])", "endCaptures": { "1": { "name": "support.type strong" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#comment" }, { "include": "#attributeIdentifier" }, { "include": "#pattern" } ] }, { "begin": "(?:(?<=(?:[^\\[#\\-:!?.@*/&%^+<=>|~$]\\||^\\|))(?![#\\-:!?.@*/&%^+<=>|~$]))|(?<![#\\-:!?.@*/&%^+<=>|~$])\\|(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(\\|)|(->)(?![#\\-:!?.@*/&%^+<=>|~$])", "beginCaptures": { "0": { "name": "support.type strong" } }, "endCaptures": { "1": { "name": "support.type strong" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#pattern" }, { "begin": "\\bwhen\\b", "end": "(?=(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#term" } ] } ] } ] }, "termOperator": { "patterns": [ { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])#(?![#\\-:!?.@*/&%^+<=>|~$])", "end": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "beginCaptures": { "0": { "name": "keyword" } }, "endCaptures": { "0": { "name": "entity.name.function" } } }, { "match": "<-", "captures": { "0": { "name": "keyword.control strong" } } }, { "match": "(,|[#\\-:!?.@*/&%^+<=>|~$]+)|(;)", "captures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } } }, { "match": "\\b(?:and|assert|asr|land|lazy|lsr|lxor|mod|new|or)\\b", "name": "variable.other.class.js message.error variable.interpolation string.regexp" } ] }, "termPun": { "begin": "(?<![#\\-:!?.@*/&%^+<=>|~$])\\?|~(?![#\\-:!?.@*/&%^+<=>|~$])", "end": ":|(?=[^[:space:]:])", "applyEndPatternLast": true, "beginCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "endCaptures": { "0": { "name": "keyword" } }, "patterns": [ { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?|[^#\\-:!?.@*/&%^+<=>|~$]~|^~))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "endCaptures": { "0": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } } } ] }, "termTry": { "begin": "\\btry\\b", "end": "\\bwith\\b", "captures": { "0": { "name": "keyword.control" } }, "patterns": [ { "include": "#term" } ] }, "termWhile": { "patterns": [ { "begin": "\\bwhile\\b", "end": "\\bdone\\b", "beginCaptures": { "0": { "name": "keyword.control" } }, "endCaptures": { "0": { "name": "keyword.control" } }, "patterns": [ { "begin": "(?:(?<=(?:[^[:word:]]while|^while))(?![[:word:]]))", "end": "\\bdo\\b", "endCaptures": { "0": { "name": "keyword.control" } }, "patterns": [ { "include": "#term" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]do|^do))(?![[:word:]]))", "end": "(?=\\bdone\\b)", "patterns": [ { "include": "#term" } ] } ] } ] }, "type": { "patterns": [ { "include": "#comment" }, { "match": "\\bnonrec\\b", "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, { "include": "#pathModulePrefixExtended" }, { "include": "#typeLabel" }, { "include": "#typeObject" }, { "include": "#typeOperator" }, { "include": "#typeParens" }, { "include": "#typePolymorphicVariant" }, { "include": "#typeRecord" }, { "include": "#typeConstructor" } ] }, "typeConstructor": { "patterns": [ { "begin": "(_)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(')((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))|(?<=[^\\*]\\)|\\])", "end": "(?=\\((?!\\*)|\\*|:|,|=|\\.|>|-|\\{|\\[|\\+|\\}|\\)|\\]|;|\\|)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))[:space:]*(?!\\(\\*|[[:word:]])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "beginCaptures": { "1": { "name": "comment constant.regexp meta.separator.markdown" }, "3": { "name": "string.other.link variable.language variable.parameter emphasis strong emphasis" }, "4": { "name": "keyword.control emphasis" } }, "endCaptures": { "1": { "name": "entity.name.function strong" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModulePrefixExtended" } ] } ] }, "typeLabel": { "patterns": [ { "begin": "(\\??)((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))[[:space:]]*((?<![#\\-:!?.@*/&%^+<=>|~$]):(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=(?<![#\\-:!?.@*/&%^+<=>|~$])->(?![#\\-:!?.@*/&%^+<=>|~$]))", "captures": { "1": { "name": "keyword strong emphasis" }, "2": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" }, "3": { "name": "keyword" } }, "patterns": [ { "include": "#type" } ] } ] }, "typeModule": { "begin": "\\bmodule\\b", "end": "(?=\\))", "beginCaptures": { "0": { "name": "markup.inserted constant.language support.constant.property-value entity.name.filename" } }, "patterns": [ { "include": "#pathModuleExtended" }, { "include": "#signatureConstraints" } ] }, "typeObject": { "begin": "<", "end": ">", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" } }, "patterns": [ { "begin": "(?<=<|;)", "end": "(:)|(?=>)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "4": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModulePrefixSimple" }, { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(;)|(?=>)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#type" } ] } ] }, "typeOperator": { "patterns": [ { "match": ",|;|[#\\-:!?.@*/&%^+<=>|~$]+", "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" } ] }, "typeParens": { "begin": "\\(", "end": "\\)", "captures": { "0": { "name": "punctuation.definition.tag" } }, "patterns": [ { "match": ",", "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, { "include": "#typeModule" }, { "include": "#type" } ] }, "typePolymorphicVariant": { "begin": "\\[", "end": "\\]", "patterns": [] }, "typeRecord": { "begin": "\\{", "end": "\\}", "captures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong strong" } }, "patterns": [ { "begin": "(?<=\\{|;)", "end": "(:)|(=)|(;)|(with)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "4": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#comment" }, { "include": "#pathModulePrefixSimple" }, { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^[:word:]]with|^with))(?![[:word:]]))", "end": "(:)|(=)|(;)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" }, "3": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "match": "(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)", "name": "markup.inserted constant.language support.constant.property-value entity.name.filename emphasis" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(;)|(=)|(?=\\})", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" }, "2": { "name": "support.type strong" } }, "patterns": [ { "include": "#type" } ] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]=|^=))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": ";|(?=\\})", "endCaptures": { "0": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [ { "include": "#type" } ] } ] }, "variableModule": { "match": "(?:\\b(?=[[:upper:]])[[:alpha:]_][[:word:]']*)", "captures": { "0": { "name": "string.other.link variable.language variable.parameter emphasis" } } }, "variablePattern": { "match": "(\\b_\\b)|((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|\"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))", "captures": { "1": { "name": "comment constant.regexp meta.separator.markdown" }, "2": { "name": "string.other.link variable.language variable.parameter emphasis" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/oeabl.tmLanguage.json ================================================ { "fileTypes": [ "p", "w", "i", "cls" ], "name": "OpenEdge ABL", "patterns": [ { "include": "#statements" } ], "repository": { "trigger-procedure": { "begin": "(?i)\\b(trigger)\\s+(proce(?:dure|dur|du|d)?)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } }, "end": "(?=:|\\.)", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "include": "#comment" }, { "include": "#preprocessors" }, { "include": "#primitive-type" }, { "include": "#variable-as" }, { "include": "#variable-like" }, { "include": "#keywords" }, { "include": "#db-dot-table" }, { "include": "#string" } ] }, "procedure-definition": { "name": "meta.procedure.abl", "comment": "Look ahead to the procedure name, quoted or not. It will be resolved in the patterns. 'Names must begin with a letter.' from https://docs.progress.com/bundle/openedge-abl-manage-applications/page/Name-limits.html", "begin": "(?i)\\s*(proce(?:dure|dur|du|d)?)\\s+(?=[a-zA-Z_])", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=:|\\.)", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "match": "(?i)\\b(private|external|cdecl|pascal|stdcall|ordinal|(persist(?:ent|en|e)?)|thread-safe|in|super)\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#string" }, { "match": "([a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]+)(?<!\\.)", "comment": "A procedure name may contain a . but cannot end in one, unless the procedure name is in quotes", "captures": { "1": { "name": "entity.name.procedure.abl" } } }, { "include": "#argument-reference" }, { "include": "#preprocessor-reference" }, { "include": "#numeric" }, { "include": "#comment" } ] }, "translation-attribute": { "comment": "The attribute must have one of L, R, T, or C and/or a U and/or one integer value. For example, R1 as the attribute value for Label.", "match": "(:[LlRrTtCcUu]\\d*)\\b", "captures": { "1": { "name": "support.other.abl" } } }, "language-functions": { "match": "(?i)\\b(opsys|(provers(?:ion|io|i)?)|guid|generate-uuid)\\b", "comment": "These are functions that do not require parens when called.", "captures": { "1": { "name": "support.function.abl" } } }, "function-definition": { "name": "meta.define.function.abl", "begin": "(?i)\\b(function)\\s+([a-zA-Z0-9_][a-zA-Z0-9_#$\\-%&]+)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.function.abl" } }, "end": "(\\.|:)", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "match": "(?i)\\b(map|to)\\s+(?!to\\s+)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]+)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.function.abl" } } }, { "match": "(?i)\\b(returns|private|class|extent|in|super|forward|map)\\b", "comment": "Captures the allowed keywords before the parenthesis. Some keywords are after the 'parens' when there are no parens used", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#function-parameter-definition" }, { "include": "#parens" }, { "comment": "This captures everything after the parens, which may contain variables and methods", "begin": "(?i)(?<=\\)|in)", "end": "(?=(\\.|:)\\s)", "patterns": [ { "match": "\\b([Ii][Nn])\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "match": "\\b([Ss][Uu][Pp][Ee][Rr])\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#type-member-call" }, { "include": "#variable-name" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#string" }, { "include": "#preprocessors" } ] }, { "include": "#primitive-type" }, { "include": "#type-name" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#preprocessors" } ] }, "method-definition": { "name": "meta.define.method.abl", "begin": "(?i)^\\s*(method|constructor|destructor)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "comment": "The lookahead on the regex for the closing colon is required to make this scope end properly", "end": "(?=:|\\.)", "patterns": [ { "include": "#access-modifier" }, { "match": "(?i)\\s*(void)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "begin": "(?i)\\s*([a-zA-Z0-9_]+[a-zA-Z0-9_\\-{}#$%&]*)?\\s*(\\()\\s*", "beginCaptures": { "1": { "name": "entity.name.function.abl" }, "2": { "name": "meta.brace.round.js" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#parameter-definition" } ] }, { "include": "#parameter-as" }, { "include": "#string", "comment": "For the return type" }, { "include": "#extent", "comment": "For the return type" }, { "include": "#primitive-type", "comment": "For the return type" }, { "comment": "The last word on the line is assumed to me the method name. Legal ABL can have each word of the method definition on its own line, so this rule may not return the correct values", "match": "(?i)\\b([a-zA-Z0-9_]+[a-zA-Z0-9_\\-{}#$%&]*)\\b\\R", "captures": { "1": { "name": "entity.name.function.abl" } } }, { "include": "#dll-type", "comment": "For the return type" }, { "include": "#type-names", "comment": "For the return type" }, { "include": "#comment" } ] }, "end-function-procedure-method-block": { "match": "(?i)\\s*(end)\\s*(method|procedure|function)?\\s*(?=\\.)\\s*", "comment": "This regex exists to make sure that END PROCEDURE is not seen as a new procedure block", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "as-type": { "begin": "\\s*([Aa][Ss])\\s*([Cc][Ll][Aa][Ss]{2})?", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } }, "end": "\\s*(\\.|\\,|\\s*)", "patterns": [ { "include": "#primitive-type" }, { "include": "#type-names" } ] }, "parameter-definition": { "name": "meta.define.parameter.abl", "patterns": [ { "match": "(?i)\\s*((input-o(?:utput|utpu|utp|u)?)|input|output|append|bind|by-value|(presel(?:ect|ec|e)?)|buffer|(param(?:eter|ete|et|e)?)|no-undo)\\s*", "comment": "Certain keywords like NO-UNDO are 'gathered' by a DEFINE INPUT PARAMETER statement. ", "captures": { "1": { "name": "keyword.other.abl" } } }, { "match": "(?i)\\s*(dataset-handle|table-handle)\\s+([a-zA-Z][a-zA-Z0-9_\\-]*)", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.parameter.abl" } } }, { "match": "(?i)\\s*(dataset)\\s+([a-zA-Z][a-zA-Z0-9_\\-]*)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.dataset.abl" } } }, { "match": "(?i)\\s*(table)\\s+([a-zA-Z][a-zA-Z0-9_\\-]*)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, { "include": "#parameter-as" }, { "match": "(?i)\\s*((char(?:acter|acte|act|ac|a)?)|com-handle|date|datetime-tz|datetime|(dec(?:imal|ima|im|i)?)|handle|int64|(int(?:eger|ege|eg|e)?)|(log(?:ical|ica|ic|i)?)|(longch(?:ar|a)?)|memptr|raw|recid|rowid|(widget-h(?:andle|andl|and|an|a)?))(?![=a-zA-Z0-9_\\-])\\s*(,*)", "captures": { "1": { "name": "storage.type.abl" }, "2": { "name": "punctuation.separator.comma.abl" } } }, { "match": "\\s*(,)\\s*", "captures": { "1": { "name": "punctuation.separator.comma.abl" } } }, { "include": "#buffer-for-table" }, { "include": "#extent" }, { "include": "#property-call" }, { "include": "#abl-functions" }, { "include": "#array-literal" }, { "include": "#decimals" }, { "include": "#constant" }, { "include": "#abl-system-handles" }, { "include": "#keywords" }, { "include": "#handle-attributes" }, { "include": "#handle-methods" }, { "include": "#type-names" }, { "include": "#string" }, { "include": "#comment" }, { "include": "#preprocessors" } ] }, "function-parameter-definition": { "comment": "https://docs.progress.com/bundle/abl-reference/page/Parameter-definition-syntax.html", "name": "meta.function.parameters", "begin": "(\\()", "beginCaptures": { "1": { "name": "meta.brace.round.js" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#parameter-definition" } ] }, "statements": { "name": "meta.statements.abl", "patterns": [ { "include": "#comment" }, { "include": "#buffer-copy" }, { "include": "#preprocessors" }, { "include": "#argument-reference" }, { "include": "#trigger-procedure" }, { "include": "#abl-function-variable-arg" }, { "include": "#while-expression" }, { "include": "#rowid-function" }, { "include": "#var-statement" }, { "include": "#input-output-from-to" }, { "include": "#function-definition" }, { "include": "#record-buffer-functions" }, { "include": "#create-statement" }, { "include": "#can-find" }, { "include": "#release" }, { "include": "#copy-lob" }, { "include": "#event-un-subscribe" }, { "include": "#dataset-name" }, { "include": "#buffer-name" }, { "include": "#temp-table-name" }, { "include": "#annotation" }, { "include": "#undo-statement" }, { "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": "#if-then" }, { "include": "#string" }, { "include": "#translation-attribute" }, { "include": "#break-group" }, { "include": "#event-un-subscribe" }, { "include": "#property-call" }, { "include": "#handle-attributes" }, { "include": "#handle-methods" }, { "include": "#abl-functions" }, { "include": "#unqualified-method-call" }, { "include": "#function-arguments" }, { "include": "#method-definition" }, { "include": "#access-modifier" }, { "match": "(?i)\\s*(void)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#parens" }, { "include": "#declarations" }, { "include": "#decimals" }, { "include": "#numeric" }, { "include": "#constant" }, { "include": "#timestamp-constant" }, { "include": "#break-by" }, { "include": "#new-record" }, { "include": "#type-reference" }, { "include": "#procedure-definition" }, { "include": "#for-join" }, { "include": "#operator" }, { "include": "#label-variable" }, { "include": "#define-field" }, { "include": "#define-like" }, { "include": "#format-constant" }, { "include": "#escape-endline" }, { "include": "#dll-type" }, { "include": "#parameter-as" }, { "include": "#buffer-for-table" }, { "include": "#primitive-type" }, { "include": "#property-accessor" }, { "include": "#for-each-table" }, { "include": "#for-each-join" }, { "include": "#of-phrase" }, { "include": "#db-dot-table-dot-field", "comment": "this include must be after any type references so that eg get-class(package.type) can continue to work" }, { "include": "#code-block" }, { "include": "#language-functions" }, { "include": "#comment" }, { "include": "#array-literal" }, { "include": "#punctuation-semicolon" }, { "include": "#punctuation-comma" }, { "include": "#punctuation-colon" }, { "include": "#parens" }, { "include": "#keywords" }, { "include": "#variable-name" }, { "include": "#punctuation-period" }, { "include": "#punctuation-colon" } ] }, "declarations": { "patterns": [ { "include": "#define" } ] }, "break-by": { "match": "(?i)\\s*((break)\\s+)?(by)\\s+(([a-zA-Z][a-zA-Z_\\-#$%]*\\.)?([a-zA-Z][a-zA-Z_\\-#$%]*\\.)([a-zA-Z][a-zA-Z_\\-#$%]*)(\\[\\d+\\])?)\\b", "comment": "The match needs a space capture before the BREAK, not a word break", "captures": { "2": { "name": "keyword.other.abl" }, "3": { "name": "keyword.other.abl" }, "4": { "name": "storage.data.table.abl" } } }, "preprocessor-directives": { "patterns": [ { "match": "(?i)((&)(elseif|endif|else|then|if))\\s*", "captures": { "2": { "name": "punctuation.definition.preprocessor.abl" }, "3": { "name": "keyword.control.directive.conditional.abl" } } }, { "match": "(?i)((&)(message))\\s*", "captures": { "2": { "name": "punctuation.definition.preprocessor.abl" }, "3": { "name": "storage.type.function.abl" } } } ] }, "preprocessor-reference": { "patterns": [ { "comment": "https://docs.progress.com/bundle/abl-reference/page/Preprocessor-name-reference.html#Preprocessor-name-reference", "match": "(?i)\\s*(({)(&)(window-system|line-number|batch-mode|file-name|sequence|opsys|process-architecture)\\s*(}))", "captures": { "1": { "name": "meta.preprocessor.abl" }, "2": { "name": "punctuation.section.abl" }, "3": { "name": "punctuation.definition.preprocessor.abl" }, "4": { "name": "entity.name.function.preprocessor.abl" }, "5": { "name": "punctuation.section.abl" } } }, { "match": "\\s*(({)(&)([a-zA-Z0-9_\\-#$%\\s\\(\\)]+)\\s*(}))", "captures": { "1": { "name": "meta.preprocessor.abl" }, "2": { "name": "punctuation.section.abl" }, "3": { "name": "punctuation.definition.preprocessor.abl" }, "4": { "name": "entity.name.function.preprocessor.abl" }, "5": { "name": "punctuation.section.abl" } } } ] }, "preprocessors": { "patterns": [ { "include": "#analyze-suspend-resume" }, { "include": "#global-scoped-define" }, { "include": "#preprocessor-directives" }, { "include": "#preprocessor-functions" }, { "include": "#preprocessor-reference" } ] }, "type-names": { "patterns": [ { "include": "#type-name-generic" }, { "include": "#type-name" } ] }, "type-reference": { "patterns": [ { "include": "#define-type" }, { "include": "#get-class" }, { "include": "#new-class" }, { "include": "#using" }, { "include": "#type-argument-function" } ] }, "using": { "name": "meta.using.abl", "begin": "\\s*([Uu][Ss][Ii][Nn][Gg])\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(\\.)", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "comment": "Captures USING foo.bar.* . Since package names are filesystem names, needs unicode", "match": "(?i)\\s*((([\\w#$%]+|progress)(\\.[\\w#$%]+)*)\\.\\*)\\s*", "captures": { "2": { "name": "entity.name.package.abl" } } }, { "match": "\\s*([Ff][Rr][Oo][Mm]|[Pp][Rr][Oo][Pp][Aa][Tt][Hh]|[Aa][Ss][Ss][Ee][Mm][Bb][Ll][Yy])\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#type-name" }, { "include": "#comment" } ] }, "define-type": { "patterns": [ { "include": "#define-class" }, { "include": "#define-interface" }, { "include": "#define-enum-type" } ] }, "type-name-generic": { "comment": "Scope names from https://www.sublimetext.com/docs/scope_naming.html . Types are files, so support unicode", "name": "meta.generic.abl", "begin": "(?i)\\s*(([\\w#$%\\-]+)(\\.[\\w#$%\\-]+)*\\s*)\\s*(<)", "beginCaptures": { "1": { "name": "entity.name.type.abl" }, "4": { "name": "punctuation.definition.generic.begin.abl" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.generic.end.abl" } }, "patterns": [ { "include": "#type-name-generic" }, { "include": "#punctuation-comma" }, { "include": "#type-name" } ] }, "type-name": { "comment": "Type names are files, so support unicode", "match": "(?i)\\b([\\w#$%\\-]+(\\.[\\w#$%\\-]+)*)\\b", "captures": { "1": { "name": "entity.name.type.abl" } } }, "define-class": { "comment": "Type names are files, so support unicode", "name": "meta.define.class.abl", "begin": "\\b(?<![#$\\-_%&])([Cc][Ll][Aa][Ss]{2})\\b(?![#$\\-_%&])", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "\\s*(:)\\s*", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "match": "(?i)\\b(serializable|abstract|final|use-widget-pool|inherits|implements)\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#type-names" }, { "include": "#punctuation-comma" }, { "include": "#comment" } ] }, "define-interface": { "comment": "Type names are files, so support unicode", "name": "meta.define.interface.abl", "begin": "(?i)\\b(interface)\\s+([\\w#$%]+[\\w#$%\\.]*(\\s*<\\s*[\\w#$%\\.]+\\s*\\>)?)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.type.abl" } }, "end": "\\s*(:)", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "match": "(?i)\\s*(inherits|implements)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#type-names" }, { "include": "#punctuation-comma" } ] }, "inherits-implements-type": { "comment": "Type names are files, so support unicode", "name": "meta.define-type.implements.abl", "begin": "(?i)\\s*(implements|inherits)\\s*(([\\w#$%]+|progress)(\\.[\\w#$%]+)*(?<!\\.))\\s*", "end": "(?i)\\s*(serializable|abstract|final|use-widget-pool|inherits|implements+?)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.type.abl" } }, "endCaptures": { "1": { "name": "keyword.other.abl" } }, "patterns": [ { "include": "#type-names" } ] }, "define-enum-type": { "patterns": [ { "name": "meta.define.enum.abl", "comment": "Type names are files, so support unicode", "match": "(?i)\\b(enum)\\s+([\\w#$%\\.]+)\\s*(flags)?\\s*(:)", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.type.abl" }, "3": { "name": "keyword.other.abl" }, "4": { "name": "punctuation.terminator.abl" } } } ] }, "define-enum-member": { "begin": "(?i)\\b(enum)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#comment" }, { "include": "#operator" }, { "include": "#numeric" }, { "match": "\\b([a-zA-Z][a-zA-Z0-9_#$%]*)\\b", "captures": { "1": { "name": "entity.name.function.abl" } } } ] }, "attribute-access": { "begin": ":", "end": "(?=:)|(?=\\s*)", "comment": "", "patterns": [] }, "parens": { "match": "\\(|\\)", "name": "meta.brace.round.js" }, "new-class": { "comment": "A dash/minus is not a word boundary, so we need to make sure we don't capture constructs like new-variable", "begin": "(?i)\\b(new)\\b(?!\\-)", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=\\()", "patterns": [ { "include": "#type-names" }, { "include": "#string" } ] }, "abl-function-variable-arg": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(set-size)\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#parens" }, { "include": "#type-member-call" }, { "include": "#variable-name" } ] }, "get-class": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(get-class)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.abl" }, "2": { "name": "meta.brace.round.js" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#string" }, { "include": "#type-names" } ] }, "find-record": { "match": "(?i)\\s*(find)\\s+(first|last|next|prev|current)?\\s*([a-zA-Z_][a-zA-Z0-9#$\\-_%&]+(\\.[a-zA-Z_][a-zA-Z0-9#$\\-_%&]*)?)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "storage.data.table.abl" } } }, "field-name": { "comment": "Just a field name", "patterns": [ { "match": "\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?\\s*(\\[\\d+\\]))\\s*", "captures": { "1": { "name": "storage.data.table.abl" } } }, { "match": "\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*", "captures": { "1": { "name": "storage.data.table.abl" } } } ] }, "db-dot-table-dot-field": { "match": "(?i)(?<=^|\\s|\\(|,)(([a-zA-Z][a-zA-Z0-9#$\\-_%&]*\\.)?([a-zA-Z_][a-zA-Z0-9#$\\-_%&]*\\.)([a-zA-Z_][a-zA-Z0-9#$\\-_%&]*)(\\[\\d+\\])?)", "comment": "Looks for format of 'table.field', with an optional preceding 'db.'. This pattern may conflict with type names", "captures": { "1": { "name": "storage.data.table.abl" } } }, "db-dot-table": { "match": "(?i)\\b([a-zA-Z_][a-zA-Z0-9#$\\-_%&]*(\\.[a-zA-Z_][a-zA-Z0-9#$\\-_%&]*)?)(?=[^a-zA-Z0-9#$\\-_%&])", "comment": "Looks for format of 'table', with an optional preceding 'db.'. This pattern may conflict with type names. The last option must not be a word boundary since that includes dashes", "captures": { "1": { "name": "storage.data.table.abl" } } }, "break-group": { "match": "(?i)\\s*(first-of|first|last-of|last)\\s*(\\()\\s*([a-zA-Z][a-zA-Z#$\\-_%&]*\\.[a-zA-Z_][a-zA-Z#$\\-_%&]*(\\.[a-zA-Z_][a-zA-Z#$\\-_%&]*)?)\\s*(\\))\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "meta.brace.round.js" }, "3": { "name": "storage.data.table.abl" }, "4": { "name": "meta.brace.round.js" } } }, "of-phrase": { "patterns": [ { "comment": " This matches OF <table>", "match": "\\s*([Oo][Ff])\\s+([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z_][a-zA-Z0-9_\\-#$%]*)?)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, { "comment": " This matches <table> OF <table>", "match": "(?i)\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z_][a-zA-Z0-9_\\-#$%]*)?)\\s+(of)\\s+([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z_][a-zA-Z0-9_\\-#$%]*)?)\\s*", "captures": { "1": { "name": "storage.data.table.abl" }, "3": { "name": "keyword.other.abl" }, "4": { "name": "storage.data.table.abl" } } } ] }, "for-join": { "comment": "Captures something like ', salesrep where' or 'salesrep where', when the latter is at the beginning of a line. 'OF' phrases handled by of-phrase", "match": "(?i)(?<=,|^)\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z_][a-zA-Z0-9_\\-#$%]*)?)\\s+(?=where|no-lock|(exclusive-l(?:ock|oc|o)?)|(share(?:-lock|-loc|-lo|-l|-)?)|tenant-where|use-index|table-scan|using|(no-prefe(?:tch|tc|t)?)|left|outer-join|break|by|(transact(?:ion|io|i)?))\\s*", "captures": { "1": { "name": "storage.data.table.abl" } } }, "for-each-join": { "begin": "(?i)\\b(each|first|last)\\b(?<!\\()", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "3": { "name": "storage.data.table.abl" } }, "end": "(?i)\\s*(?=where|no-lock|(exclusive-l(?:ock|oc|o)?)|(share(?:-lock|-loc|-lo|-l|-)?)|tenant-where|use-index|table-scan|using|(no-prefe(?:tch|tc|t)?)|left|outer-join|break|by|(transact(?:ion|io|i)?)|,|:)\\s*", "patterns": [ { "include": "#fields-except-list" }, { "include": "#of-phrase" }, { "comment": "Intended to catch joins like ', table of table2', since the first table name is matched by the begin", "match": "(?i)\\s*(of)\\s+([a-zA-Z][a-zA-Z_\\-#$%]*(\\.[a-zA-Z][a-zA-Z_\\-#$%]*)?)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, { "match": "\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*", "comment": "Matches the table name in the case of eg ',each table' ", "captures": { "1": { "name": "storage.data.table.abl" } } } ] }, "for-each-table": { "begin": "(?i)(?<=\\s|\\b|^)(for|(presel(?:ect|ec|e)?))[\\s+|$]", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?i)\\s*(?=where|no-lock|(exclusive-l(?:ock|oc|o)?)|(share(?:-lock|-loc|-lo|-l|-)?)|tenant-where|use-index|table-scan|using|(no-prefe(?:tch|tc|t)?)|left|outer-join|break|by|(transact(?:ion|io|i)?)|,|:|on)\\s*", "patterns": [ { "match": "(?i)\\s*(each|first|last|of)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#fields-except-list" }, { "include": "#of-phrase" }, { "include": "#field-name" }, { "include": "#db-dot-table" }, { "include": "#db-dot-table-dot-field" }, { "include": "#while-expression" }, { "include": "#comment" } ] }, "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" }, { "include": "#punctuation-comma" } ] }, "record-buffer-functions": { "comment": "this capture does not include the NOT function since it is impossible to determine whether this is a new class or a new record.", "match": "(?i)\\b((?:avail(?:able|abl|ab|a)?)|locked|ambiguous)\\s*(\\()?\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*(\\))?", "captures": { "1": { "name": "support.function.abl" }, "2": { "name": "meta.brace.round.js" }, "3": { "name": "storage.data.table.abl" }, "5": { "name": "meta.brace.round.js" } } }, "copy-lob": { "comment": "Has its own rule because of the 'FOR length' option, which is parsed as a 'FOR EACH' type statement", "begin": "(?i)\\b(copy-lob)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#code-block" } ] }, "type-argument-function": { "name": "meta.function-call.abl", "begin": "\\s*([Cc][Aa][Ss][Tt]|[Tt][Yy][Pp][Ee]-[Oo][Ff])\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(?<=\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "begin": "(?<=\\()", "end": "(,)", "endCaptures": { "1": { "name": "punctuation.separator.comma.abl" } }, "patterns": [ { "include": "#function-arguments-no-parens" }, { "include": "#parens" } ] }, { "include": "#type-names" }, { "include": "#comment" }, { "include": "#string" }, { "include": "#parens" }, { "include": "#punctuation-comma" }, { "include": "#preprocessors" } ] }, "code-block": { "patterns": [ { "include": "#create-statement" }, { "include": "#record-buffer-functions" }, { "include": "#can-find" }, { "include": "#comment" }, { "include": "#break-group" }, { "include": "#block-undo-leave-next-retry" }, { "include": "#operator" }, { "include": "#string" }, { "include": "#language-functions" }, { "include": "#numeric" }, { "include": "#constant" }, { "include": "#operator" }, { "include": "#include-file" }, { "include": "#run-statement" }, { "include": "#define" }, { "include": "#block-statement" }, { "include": "#end-block" }, { "include": "#property-call" }, { "include": "#new-record" }, { "include": "#type-reference" }, { "include": "#abl-functions" }, { "include": "#abl-system-handles" }, { "include": "#handle-methods" }, { "include": "#handle-attributes" }, { "include": "#keywords" }, { "include": "#variable-name" }, { "include": "#static-object-property-call" }, { "include": "#punctuation-period" }, { "include": "#punctuation-colon" } ] }, "property-accessor": { "patterns": [ { "include": "#property-get-set-super" }, { "include": "#property-get-set-empty" }, { "include": "#property-get-set-block" } ] }, "property-get-set-super": { "match": "(?i)\\b(get|set)\\s+(super)\\s*(?=\\.)", "comment": "This is a call to the parent class' property getter or setter", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "property-get-set-empty": { "comment": "This rule is needed since for 'plain' gets and sets, there's no END", "match": "\\b([Gg][Ee][Tt]|[Ss][Ee][Tt])\\s*(?=\\.)", "captures": { "1": { "name": "keyword.other.abl" } } }, "property-get-set-block": { "begin": "\\s*(?<!:)\\s*([Gg][Ee][Tt]|[Ss][Ee][Tt])\\b(?![#$\\-_%&])", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "\\s*([Ee][Nn][Dd])\\s*([Gg][Ee][Tt]|[Ss][Ee][Tt])?\\s*(?=\\.)\\s*", "comment": "The end capture does a lookahead on . so that the 'define' capture can end ", "endCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } }, "patterns": [ { "include": "#function-parameter-definition" }, { "include": "#code-block" }, { "include": "#punctuation-colon" } ] }, "parameter-as": { "begin": "\\s*([a-zA-Z0-9_\\-#$%]+)\\s+([Aa][Ss])\\s+", "beginCaptures": { "1": { "name": "variable.parameter.abl" }, "2": { "name": "keyword.other.abl" } }, "end": "(?=\\s|\\)|\\.|,)", "patterns": [ { "match": "\\s*([Cc][Ll][Aa][Ss]{2})\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#primitive-type" }, { "include": "#dll-type" }, { "include": "#type-names" }, { "include": "#parens" }, { "include": "#string" }, { "include": "#punctuation-period" }, { "include": "#punctuation-comma" } ] }, "input-output-from-to": { "begin": "(?i)\\b(input|output)\\s+((stream|stream-handle)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s+)?(from|to)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "3": { "name": "keyword.other.abl" }, "4": { "patterns": [ { "include": "#variable-name" } ] }, "5": { "name": "keyword.other.abl" } }, "end": "(?i)(?=\\.|target|source)", "comment": "End with TARGET or SOURCE since these are the only options that take variables as arguments, and they must be the last options", "patterns": [ { "include": "#type-member-call" }, { "include": "#abl-functions" }, { "include": "#abl-system-handles" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#array-literal" }, { "include": "#preprocessors" }, { "include": "#opsys-device-name" }, { "include": "#expression" } ] }, "opsys-device-name": { "match": "([_\\w\\/\\-\\\\$:\\.]+)(?<!\\.)", "comment": "For this regex to work, a device name may have periods in its name, but cannot end in one. File names support unicode", "captures": { "1": { "name": "storage.other.opsys-device.abl" } } }, "define-variable-name": { "match": "(?i)(var(?:iable|iabl|iab|ia|i)?)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } } }, "variable-as": { "match": "\\s*([a-zA-Z0-9_\\-#$%\\-]+)\\s+([Aa][Ss])\\b", "captures": { "1": { "name": "variable.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "variable-like": { "match": "(?i)\\s*([a-zA-Z0-9_\\-#$%\\-]+)\\s+(?=like)\\s*", "captures": { "1": { "name": "variable.other.abl" } } }, "property-as": { "match": "\\s*([a-zA-Z0-9_\\-#$%]+)\\s+([Aa][Ss])\\s*", "captures": { "1": { "name": "entity.name.function.abl" }, "2": { "name": "keyword.other.abl" } } }, "field-as-object": { "comment": "This is to capture 'FIELD x AS Object'. As of OE 12.7 only Progress.Lang.Object is allowed as a type name. If/when this changes, this regex becomes trickier", "match": "(?i)\\s*((progress\\.lang\\.)?object)\\s*", "captures": { "1": { "name": "entity.name.type.abl" } } }, "annotation": { "patterns": [ { "include": "#annotation-attributes" }, { "include": "#annotation-simple" } ] }, "annotation-simple": { "name": "meta.declaration.annotation.abl", "match": "(^|\\s*)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]+)\\s*(?=\\.)", "captures": { "2": { "name": "entity.name.tag.abl" } } }, "annotation-attributes": { "name": "meta.declaration.annotation.abl", "begin": "(^|\\s+)(\\@[a-zA-Z_][a-zA-Z0-9_#$\\-%&\\.]*)\\s*(?=\\()", "beginCaptures": { "2": { "name": "entity.name.tag.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#parens" }, { "match": "\\s*([a-zA-Z_][a-zA-Z0-9_#$\\-%&]+)(?=[\\=\\s$])", "captures": { "1": { "name": "entity.other.attribute-name.abl" } } }, { "include": "#string" }, { "include": "#operator-no-space" }, { "include": "#punctuation-comma" } ] }, "define": { "name": "meta.define.abl", "begin": "(?i)\\s*(def(?:ine|in|i)?)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(\\.)(?!\\w)", "endCaptures": { "1": { "name": "punctuation.terminator.abl" } }, "patterns": [ { "match": "(?i)\\s*(new|(glob(?:al|a|)?)|shared)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#serializable" }, { "include": "#access-modifier" }, { "include": "#define-enum-member" }, { "include": "#define-variable" }, { "include": "#define-parameter" }, { "include": "#define-button" }, { "include": "#define-dataset" }, { "include": "#define-query" }, { "include": "#define-browse" }, { "include": "#fields-except-list" }, { "include": "#define-event" }, { "include": "#define-property" }, { "include": "#property-accessor" }, { "include": "#array-literal" }, { "include": "#define-field" }, { "include": "#parameter-as" }, { "include": "#define-stream" }, { "include": "#define-buffer" }, { "include": "#define-frame" }, { "include": "#for-table" }, { "include": "#buffer-for-table" }, { "include": "#define-table" }, { "include": "#define-index" }, { "include": "#define-like" }, { "include": "#field-as-object" }, { "include": "#preprocessors" }, { "include": "#extent" }, { "include": "#decimals" }, { "include": "#format-constant" }, { "include": "#timestamp-constant" }, { "include": "#constant" }, { "include": "#numeric" }, { "include": "#string" }, { "include": "#primitive-type" }, { "include": "#dll-type" }, { "include": "#abl-system-handles" }, { "include": "#property-call" }, { "include": "#handle-attributes" }, { "include": "#handle-methods" }, { "include": "#abl-functions" }, { "include": "#function-parameter-definition" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#label-variable" }, { "include": "#type-names" } ] }, "define-field": { "match": "(?i)\\s*(field)\\s+([a-zA-Z][a-zA-Z0-9_\\-#$%]*)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, "cache-value": { "match": "\\b([Cc][Aa][Cc][Hh][Ee])\\s+(0[xX]\\h+)?|(\\-?[0-9]+(\\.[0-9]+)?)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "3": { "name": "constant.numeric.source.abl" } } }, "define-query": { "begin": "(?i)\\b(query)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } }, "end": "(?i)(?=\\.\\s*)", "patterns": [ { "match": "(?i)\\b(for|scrolling|(rcode-info(?:rmation|rmatio|rmati|rmat|rma|rm|r)?))\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#cache-value" }, { "include": "#db-dot-table" }, { "include": "#fields-except-list" }, { "include": "#punctuation-comma" }, { "include": "#expression" }, { "include": "#keywords" } ] }, "define-browse": { "begin": "(?i)\\b(browse)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } }, "end": "(?i)\\b(?=\\.)", "patterns": [ { "match": "\\b([Qq][Uu][Ee][Rr][Yy])\\s+([a-zA-Z][a-zA-Z0-9\\-_#$%\\&]+)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } } }, { "match": "(?i)\\b((share(?:-lock|-loc|-lo|-l|-)?)|(exclusive-l(?:ock|oc|o)?)|no-lock|no-wait|(disp(?:lay|la|l)?))\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#comment" }, { "include": "#db-dot-table-dot-field" }, { "include": "#keywords" }, { "include": "#expression" } ] }, "define-parameter": { "begin": "(?i)\\b(param(?:eter|ete|et|e)?)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?i)(?=\\.)|\\b(?=(bgc(?:olor|olo|ol|o)?)|(column-lab(?:el|e)?)|context-help-id|dcolor|decimals|drop-target|extent|font|(fgc(?:olor|olo|ol|o)?)|(form(?:at|a)?)|initial|label|(mouse-p(?:ointer|ointe|oint|oin|oi|o)?)|no-undo|not|(case-sen(?:sitive|sitiv|siti|sit|si|s)?)|(pfc(?:olor|olo|ol|o)?)|view-as|triggers)\\b", "comment": "The end capture does a lookahead on . so that the 'define' capture can end ", "patterns": [ { "match": "(?i)\\b(table)\\s+(for)\\s+([a-zA-Z][a-zA-Z_\\-#$%]*(\\.[a-zA-Z][a-zA-Z_\\-#$%]*)?)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "storage.data.table.abl" } } }, { "match": "(?i)\\b(table-handle|dataset-handle)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } } }, { "match": "(?i)\\b(dataset)\\s+(for)\\s+([a-zA-Z_\\-#$%]+(\\.[a-zA-Z_\\-#$%]+)?)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "storage.data.dataset.abl" } } }, { "include": "#parameter-as" }, { "include": "#keywords" }, { "include": "#expression" } ] }, "define-property": { "begin": "(?i)\\b(property)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "comment": "This match just gets the definition of the property; the getter and setter are handled separately", "end": "\\s*(?=[Gg][Ee][Tt]|[Ss][Ee][Tt])", "patterns": [ { "include": "#property-as" }, { "include": "#comment" }, { "include": "#primitive-type" }, { "include": "#extent" }, { "include": "#decimals" }, { "include": "#array-literal" }, { "include": "#timestamp-constant" }, { "include": "#numeric" }, { "include": "#keywords" }, { "include": "#string" }, { "include": "#type-names" } ] }, "dataset-name": { "match": "(?i)\\s*(dataset)\\s+([a-zA-Z][a-zA-Z0-9_\\-]*)", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.dataset.abl" } } }, "buffer-name": { "match": "(?i)\\b(buffer)\\s+([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, "temp-table-name": { "match": "(?i)\\b(temp-table)\\s+([a-zA-Z][a-zA-Z0-9_\\-#$%]*)", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, "create-widget": { "match": "(?i)\\s*(create)\\s+(button|combo-box|(?:control-fram(?:e)?)|dialog-box|editor|fill-in|(?:fram(?:e)?)|image|menu|menu-item|radio-set|(?:rect(?:angle|angl|ang|an|a)?)|selection-list|slider|sub-menu|text|toggle-box|window)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "variable.other.abl" } } }, "create-statement": { "patterns": [ { "include": "#create-buffer" }, { "include": "#create-alias" }, { "include": "#create-widget" }, { "include": "#create-with-expression" }, { "include": "#create-record" } ] }, "create-record": { "match": "(?i)\\s*(create)\\s+([a-zA-Z][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*((for)\\s+(tenant))?\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" }, "5": { "name": "keyword.other.abl" }, "6": { "name": "keyword.other.abl" } } }, "create-alias": { "begin": "(?i)\\s*(create)\\s+(alias)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#abl-functions" }, { "include": "#keywords" }, { "match": "\\b([a-zA-Z0-9][a-zA-Z0-9_\\-]*)\\b", "captures": { "1": { "name": "storage.data.database.abl" } } }, { "include": "#expression" } ] }, "create-with-expression": { "comment": "The variable, temp-table field, etc used to store the created expression, will be dealt with by other scopes", "match": "(?i)\\s*(create)\\s+(browse|call|client-principal|database|dataset|data-source|query|sax-attributes|sax-reader|sax-writer|server|server-socket|soap-header|soap-header-entryref|socket|temp-table|widget-pool|x-document|x-noderef)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "create-buffer": { "comment": "https://docs.progress.com/bundle/abl-reference/page/CREATE-BUFFER-statement.html", "begin": "\\s*([Cc][Rr][Ee][Aa][Tt][Ee])\\s+([Bb][Uu][Ff][Ff][Ee][Rr])\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } }, "end": "(?i)(((buffer-n(?:ame|am|a)?)|in)\\b)|(?=\\.)", "endCaptures": { "1": { "name": "keyword.other.abl" } }, "patterns": [ { "match": "(?i)\\s*(for|table|no-error)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#define-table" }, { "include": "#buffer-name" }, { "include": "#temp-table-name" }, { "include": "#expression" }, { "include": "#string" }, { "include": "#comment" }, { "include": "#preprocessor-reference" }, { "include": "#handle-attributes" }, { "include": "#variable-name" } ] }, "define-index": { "begin": "(?i)\\s*(index)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } }, "end": "(?i)(?=\\bindex\\b|\\.)", "patterns": [ { "match": "(?i)\\b(AS|IS|UNIQUE|PRIMARY|WORD-INDEX|(asc(?:ending|endin|endi|end|en|e)?)|(desc(?:ending|endin|endi|end|en|e)?))\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b", "captures": { "1": { "name": "storage.data.table.abl" } } }, { "include": "#comment" } ] }, "define-dataset": { "begin": "(?i)\\b(dataset)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.dataset.abl" } }, "end": "(?=\\.)", "comment": "The end capture does a lookahead on . so that the 'define' capture can end ", "patterns": [ { "include": "#parens" }, { "include": "#punctuation-comma" }, { "match": "(?i)\\b((?:data-rel(?:ation|atio|ati|at|a)?)|parent-id-relation)\\s*([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)", "comment": "Manually capture these so that we can name the relation name properly", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.dataset.abl" } } }, { "match": "(?i)\\b(relation-fi(?:elds|eld|el|e)?)\\b", "comment": "This ABL function is handled manually, because we know that the arguments are only table.field names, and the standard abl-function scopes assign these values to variable scopes", "captures": { "1": { "name": "support.function.abl" } } }, { "include": "#keywords" }, { "include": "#preprocessors" }, { "include": "#db-dot-table" }, { "include": "#comment" }, { "include": "#string" } ] }, "define-event": { "match": "(?i)\\b(event)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.function.abl" } } }, "define-button": { "begin": "(?i)\\s*(button)\\s+([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#from-x-and-y" }, { "include": "#numeric" }, { "include": "#keywords" }, { "include": "#expression" } ] }, "from-x-and-y": { "match": "(?i)\\b(from)\\s+(X)\\s+((0(x)[\\h]+)|(\\-?[[0-9]]+(\\.[[0-9]]+)?))\\s+(y)\\s+((0(x)[\\h]+)|(\\-?[[0-9]]+(\\.[[0-9]]+)?))\\s+ ", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "6": { "name": "constant.numeric.source.abl" }, "8": { "name": "keyword.other.abl" }, "12": { "name": "constant.numeric.source.abl" } } }, "define-buffer": { "begin": "(?i)\\s*(buffer)\\b(?![#$\\-_%&])", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#for-table" }, { "include": "#buffer-for-table" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#string" } ] }, "define-frame": { "begin": "(?i)\\s*((?:fram(?:e)?))\\s*([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } }, "end": "(?=[Ww][Ii][Tt][Hh]|\\.(?!\\w))", "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#numeric" }, { "include": "#preprocessors" }, { "include": "#abl-functions" }, { "include": "#keywords" }, { "include": "#db-dot-table-dot-field" }, { "include": "#constant" }, { "include": "#variable-name" } ] }, "define-variable": { "comment": "This rule captures just the variable name and the data type. Based on https://docs.progress.com/bundle/abl-reference/page/DEFINE-VARIABLE-statement.html", "begin": "(?i)\\s*(var(?:iable|iabl|iab|ia|i)?)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?i)(?=\\.)|\\b(?=(bgc(?:olor|olo|ol|o)?)|(column-lab(?:el|e)?)|context-help-id|dcolor|decimals|drop-target|extent|font|(fgc(?:olor|olo|ol|o)?)|(form(?:at|a)?)|(init(?:ial|ia|i)?)|label|(mouse-p(?:ointer|ointe|oint|oin|oi|o)?)|no-undo|not|(case-sen(?:sitive|sitiv|siti|sit|si|s)?)|(pfc(?:olor|olo|ol|o)?)|view-as|triggers)\\b", "patterns": [ { "match": "\\b([Cc][Ll][Aa][Ss][Ss])\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#variable-as" }, { "include": "#variable-like" }, { "include": "#primitive-type" }, { "include": "#define-like" }, { "comment": "needs to be before the #keywords include", "include": "#type-names" }, { "include": "#string" } ] }, "label-variable": { "match": "(?i)\\s*([a-zA-Z0-9_\\-#$%]+)\\s+(label)\\s*", "captures": { "1": { "name": "variable.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "format-constant": { "comment": "DATE/TIME/TZ fields can have an unquoted format if it's something like 99/99/9999", "match": "(?i)\\b((?:form(?:at|a)?))\\s+(9+/9+/9+)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "constant.language.source.abl" } } }, "define-table": { "match": "(?i)(?<=\\b)(temp-table|before-table)\\s*([a-zA-Z_][a-zA-Z0-9_\\-#$%]*)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, "buffer-for-table": { "comment": "1 to 32 characters; can consist of any combination of letters (a-z or A-Z), numbers (0-9), and these special characters: # $ - _ % & Names must begin with a letter.", "match": "(?i)\\s*(?!do|repeat|for)([a-zA-Z][a-zA-Z_0-9\\-#$%]*)\\s+(for)\\s+((temp-table)\\s+)?([a-zA-Z][a-zA-Z0-9_\\-#$%]*)\\s*", "captures": { "1": { "name": "storage.data.table.abl" }, "2": { "name": "keyword.other.abl" }, "4": { "name": "keyword.other.abl" }, "5": { "name": "storage.data.table.abl" } } }, "double-colon-field-name": { "match": "\\s*::([a-zA-Z_\\-#$%]+)\\s*", "captures": { "1": { "name": "storage.data.table.abl" } } }, "for-table": { "match": "(?i)\\s*(for)\\s+((temp-table)\\s+)?([a-zA-Z_\\-#$%]+)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "3": { "name": "keyword.other.abl" }, "4": { "name": "storage.data.table.abl" } } }, "can-find": { "comment": "This captures CAN-FIND( until either the closing brace, or a keyword like WHERE or a lock status. Based on the doc at https://docs.progress.com/bundle/abl-reference/page/CAN-FIND-function.html", "begin": "(?i)\\s*(can-find)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.abl" }, "2": { "name": "meta.brace.round.js" } }, "end": "(?i)\\b(?=\\)|where|no-lock|(share(?:-lock|-loc|-lo|-l|-)?)|using|(no-prefe(?:tch|tc|t)?)|no-wait)\\s*", "patterns": [ { "include": "#parens" }, { "include": "#comment" }, { "include": "#string" }, { "include": "#numeric" }, { "match": "(?i)\\b(first|last)\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#use-index" }, { "include": "#of-phrase" }, { "include": "#db-dot-table" }, { "include": "#db-dot-table-dot-field" } ] }, "use-index": { "match": "(?i)\\b(use-index)\\s+([a-zA-Z_][a-zA-Z0-9_\\-$]*)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, "access-modifier": { "match": "(?i)\\s*(package-private|private|package-protected|protected|public|static|override|abstract|final)\\s+", "captures": { "1": { "name": "keyword.other.abl" } } }, "serializable": { "match": "(?i)\\b(non-serializable|serializable)\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, "var-statement": { "name": "meta.define.abl", "begin": "^\\s*(var)\\s+", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(\\s([a-zA-Z][a-zA-Z0-9_\\-#$%]*))", "endCaptures": { "2": { "name": "variable.other.abl" } }, "patterns": [ { "include": "#access-modifier" }, { "include": "#serializable" }, { "comment": "This capture must use spaces and not word boundaries because the 'end' is on a space. This also captures class names that are ABL primitive type names, for example OpenEdge.Core.Memptr in its short form", "match": "(?i)\\s*(class)\\s*(blob|character|char|clob|com-handle|date|datetime|datetime-tz|decimal|handle|int64|integer|int|logical|longchar|memptr|raw|recid|rowid|widget-handle)?", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.type.abl" } } }, { "include": "#primitive-type" }, { "include": "#type-names" }, { "include": "#array-literal" }, { "include": "#string" }, { "include": "#comment" }, { "include": "#preprocessors" } ] }, "define-stream": { "name": "meta.define.stream.abl", "match": "(?i)\\s*(stream)\\s*([a-zA-Z][a-zA-Z0-9_\\-#$%\\-]*)", "comment": "https://docs.progress.com/bundle/abl-reference/page/DEFINE-STREAM-statement.html", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "patterns": [ { "include": "#variable-name" } ] } } }, "define-like": { "match": "(?i)\\s*(like|like-sequential)\\s+(([a-zA-Z][a-zA-Z_\\-#$%]*\\.)?([a-zA-Z][a-zA-Z0-9_\\-#$%]*\\.)?([a-zA-Z][a-zA-Z0-9_\\-#$%]*))", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, "block-label": { "match": "(?i)^\\s*(?!((?:transact(?:ion|io|i)?)|no-lock|(?:exclusive-l(?:ock|oc|o)?)|(?:share(?:-lock|-loc|-lo|-l|-)?)):)([a-zA-Z][a-zA-Z0-9_\\-#$%\\-$#]*)(:)\\s", "comment": "A colon followed by a space is only legal is for block labels. Block labels must also be at the beginning of a line. Scope name is per https://www.sublimetext.com/docs/scope_naming.html", "captures": { "2": { "name": "entity.name.label.abl" }, "3": { "name": "punctuation.terminator.abl" } } }, "end-block": { "comment": "Certain blocks have the option of END <block name>", "match": "(?i)\\s*(end)\\s+(CASE|CATCH|CLASS|CONSTRUCTOR|DESTRUCTOR|ENUM|FINALLY|FUNCTION|GET|INTERFACE|METHOD|PROCEDURE|SET|TRIGGERS)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "block-statement": { "begin": "(?i)(?<!end)\\s*(do|repeat|finally)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "comment": "The end condition is look forward AND backward for the colon, since contained conditions may terminate on a line-ending, which may contain the colon", "end": "\\s*(?=:)|(?<=:)|(?=\\.)|(?<=\\.)\\s*", "name": "meta.block.abl", "patterns": [ { "match": "(?i)\\b((transact(?:ion|io|i)?)|stop-after|and|or)\\b", "name": "keyword.other.abl" }, { "include": "#logical-expression" }, { "include": "#while-expression" }, { "include": "#for-record" }, { "match": "(?i)\\b((transact(?:ion|io|i)?)|stop-after)\\b", "name": "keyword.other.abl" }, { "include": "#numeric" }, { "include": "#type-member-call" }, { "include": "#language-functions" }, { "include": "#abl-functions" }, { "include": "#punctuation-comma" }, { "include": "#punctuation-colon" }, { "include": "#branch-options" } ] }, "from-to-by": { "begin": "\\s*([a-zA-Z0-9_\\-#$%$\\-_%&]+)\\s+(=)\\s*", "beginCaptures": { "1": { "name": "variable.other.abl" }, "2": { "name": "keyword.operator.source.abl" } }, "end": "(?i)(?=(transact(?:ion|io|i)?)|on|:|with|while)", "patterns": [ { "match": "(?i)\\s+(to|by)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#numeric" }, { "include": "#branch-options" }, { "include": "#abl-functions" }, { "include": "#db-dot-table-dot-field" }, { "include": "#expression" } ] }, "event-un-subscribe": { "begin": "(?i)((\\?:)|(:))(unsubscribe|subscribe)\\s*(\\()", "beginCaptures": { "2": { "name": "keyword.operator.source.abl" }, "3": { "name": "punctuation.separator.colon.abl" }, "4": { "name": "entity.name.function.abl" }, "5": { "name": "meta.brace.round.js" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "comment": "Captures the static class before the : of Subscribe ( [ subscriber : ] handler-method ). Type names are files, so support unicode", "match": "\\s*([\\w#$%\\-]+(\\.[\\w#$%\\-]+)+)\\s*(:)", "captures": { "1": { "name": "entity.name.type.abl" }, "3": { "name": "punctuation.separator.colon.abl" } } }, { "comment": "Captures the variable before the : or , of Subscribe( [ subscriber-handle , ] handler-procedure ) or Subscribe ( [ subscriber : ] handler-method )", "match": "\\s*([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*((,)|(:))\\s*", "captures": { "1": { "name": "variable.other.abl" }, "3": { "name": "punctuation.separator.comma.abl" }, "4": { "name": "punctuation.separator.colon.abl" } } }, { "comment": "Subscribe( handler-procedure or handler-method)", "match": "\\s*([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\s*", "captures": { "1": { "name": "entity.name.function.abl" } } }, { "include": "#string" } ] }, "release": { "begin": "(?i)\\s*(release)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=\\.)", "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "match": "(?i)\\s*(object)\\s+(.*)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "variable.other.abl" } } }, { "include": "#keywords" }, { "include": "#db-dot-table" } ] }, "for-record": { "comment": "this regex just tries to capture a bunch (6) of tables", "match": "(?i)\\s*(for)\\s+([a-zA-Z_\\-#$%]*)\\s*(,)?\\s*([a-zA-Z_\\-#$%]*)?\\s*(,)?\\s*([a-zA-Z_\\-#$%]*)?\\s*(,)?\\s*([a-zA-Z_\\-#$%]*)?\\s*(,)?\\s*([a-zA-Z_\\-#$%]*)?\\s*(,)?\\s*([a-zA-Z_\\-#$%]*)?", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" }, "3": { "name": "punctuation.separator.comma.abl" }, "4": { "name": "storage.data.table.abl" }, "5": { "name": "punctuation.separator.comma.abl" }, "6": { "name": "storage.data.table.abl" }, "7": { "name": "punctuation.separator.comma.abl" }, "8": { "name": "storage.data.table.abl" }, "9": { "name": "punctuation.separator.comma.abl" }, "10": { "name": "storage.data.table.abl" }, "11": { "name": "punctuation.separator.comma.abl" }, "12": { "name": "storage.data.table.abl" } } }, "on-error-endkey-stop": { "match": "(?i)\\s*(on)\\s+(endkey|error|stop|quit)\\s+(undo)\\s*(?!leave|next|retry|return|throw)([a-zA-Z0-9_\\-#$%\\-$]*)?\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "keyword.other.abl" }, "4": { "name": "entity.name.label.abl" } } }, "block-undo-leave-next-retry": { "comment": "Covers NEXT, LEAVE, RETRY and UNDO with block labels that are not preceded by UNDO, ", "match": "(?i)\\s*(?<!,)\\s*(leave|next|retry|undo)\\b(?!on)(\\s+([a-zA-Z0-9_\\-#$%\\-$]*))?\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "3": { "name": "entity.name.label.abl" } } }, "branch-leave-next-retry-throw": { "match": "(?i)\\s*(?<=,)\\s*(leave|next|retry|throw)\\s*(?!on)([a-zA-Z0-9_\\-#$%\\-$]*)?\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.label.abl" } } }, "branch-return-value-single": { "comment": "RETURN 'return-value'", "begin": "(?i)\\s*(return)(\\s+(error))?\\s+(')", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "punctuation.definition.string.begin.abl" } }, "name": "string.quoted.single.abl", "end": "(')", "endCaptures": { "1": { "name": "punctuation.definition.string.end.abl" } }, "patterns": [ { "include": "#escape-char" } ] }, "escape-char": { "match": "~.", "name": "constant.character.escape.abl" }, "escape-endline": { "match": "(~)\\s*$", "captures": { "1": { "name": "punctuation.separator.continuation" } } }, "branch-return-value-double": { "comment": "RETURN \"return-value\"", "begin": "(?i)\\s*(return)(\\s+(error))?\\s+(\")", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" }, "3": { "name": "punctuation.definition.string.begin.abl" } }, "end": "(\")", "endCaptures": { "1": { "name": "punctuation.definition.string.end.abl" } }, "patterns": [ { "include": "#escape-char" } ] }, "branch-return-no-apply": { "comment": "RETURN NO-APPLY", "match": "(?i)\\s*(return)\\s+(no-apply)\\s*", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } } }, "branch-return-error-expression": { "begin": "(?i)\\s*(return)\\s+(error)\\s*", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "keyword.other.abl" } }, "comment": " This regex captures to the end of the line, or the colon, whichever comes first", "end": "(?=:|$)", "patterns": [ { "include": "#new-class" }, { "include": "#function-arguments" }, { "include": "#parens" }, { "include": "#property-call" }, { "include": "#preprocessors" }, { "include": "#expression" } ] }, "undo-statement": { "comment": "https://docs.progress.com/bundle/abl-reference/page/UNDO-statement.html", "begin": "(?i)\\s*(undo)\\s*([a-zA-Z0-9_\\-#$%\\-$]*)?\\s*(,)", "beginCaptures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.label.abl" }, "3": { "name": "punctuation.separator.comma.abl" } }, "end": "(?=[\\.:](?![a-zA-Z0-9_\\-#$%]))", "patterns": [ { "include": "#string" }, { "match": "(?i)\\s*(leave|next|retry)\\s([a-zA-Z0-9_\\-#$%\\-$]*)?", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "entity.name.label.abl" } } }, { "include": "#new-class" }, { "include": "#keywords" }, { "include": "#code-block" }, { "include": "#property-call" }, { "include": "#function-arguments" }, { "include": "#function-arguments-no-parens" }, { "include": "#parens" }, { "include": "#expression" }, { "include": "#punctuation-colon" } ] }, "branch-options": { "patterns": [ { "include": "#on-error-endkey-stop" }, { "include": "#branch-leave-next-retry-throw" }, { "include": "#branch-return-value-double" }, { "include": "#branch-return-value-single" }, { "include": "#branch-return-no-apply" }, { "include": "#branch-return-error-expression" }, { "include": "#punctuation-comma" } ] }, "while-expression": { "begin": "(?i)\\s*(while)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?i)(?=(transact(?:ion|io|i)?)|on|:|with)", "patterns": [ { "include": "#logical-expression" }, { "include": "#branch-options" } ] }, "analyze-suspend-resume": { "begin": "(?i)(&analyze-suspend|&analyze-resume)\\s*", "end": "(?=(?://|/\\*))|$", "name": "comment.preprocessor.analyze-suspend.abl" }, "global-scoped-define": { "patterns": [ { "begin": "(?i)^\\s*((&)(scop(?:ed-define|ed-defin|ed-defi|ed-def|ed-de|ed-d|ed-|ed|e)?))\\s*", "name": "meta.preprocessor.abl", "beginCaptures": { "2": { "name": "punctuation.definition.preprocessor.abl" }, "3": { "name": "keyword.control.directive.define.abl" }, "4": { "name": "entity.name.function.preprocessor.abl" } }, "end": "([\\.a-zA-Z0-9_\\-#$%\\/]+)\\s*", "endCaptures": { "1": { "name": "entity.name.function.preprocessor.abl" } }, "patterns": [ { "include": "#escape-endline" } ] }, { "begin": "(?i)^\\s*((&)(glob(?:al-define|al-defin|al-defi|al-def|al-de|al-d|al-|al|a)?))\\s*", "name": "meta.preprocessor.abl", "beginCaptures": { "2": { "name": "punctuation.definition.preprocessor.abl" }, "3": { "name": "keyword.control.directive.define.abl" }, "4": { "name": "entity.name.function.preprocessor.abl" } }, "end": "([\\.a-zA-Z0-9_\\-#$%\\/]+)\\s*", "endCaptures": { "1": { "name": "entity.name.function.preprocessor.abl" } }, "patterns": [ { "include": "#escape-endline" } ] }, { "begin": "(?i)((&)(undef(?:ine|in|i)?))\\s*([\\.a-zA-Z0-9_\\-#$%\\/]*)\\s*", "name": "meta.preprocessor.abl", "beginCaptures": { "2": { "name": "punctuation.definition.preprocessor.abl" }, "3": { "name": "keyword.control.directive.define.abl" }, "4": { "name": "entity.name.function.preprocessor.abl" } }, "end": "([\\.a-zA-Z0-9_\\-#$%\\/]+)\\s*", "endCaptures": { "1": { "name": "entity.name.function.preprocessor.abl" } }, "patterns": [ { "include": "#escape-char" } ] } ] }, "preprocessor-functions": { "begin": "\\s*([Dd][Ee][Ff][Ii][Nn][Ee][Dd])\\b", "beginCaptures": { "1": { "name": "storage.type.function.abl" } }, "patterns": [ { "include": "#parens" }, { "include": "#comment" }, { "match": "([a-zA-Z0-9_\\-#$%]+)", "captures": { "1": { "name": "entity.name.function.preprocessor.abl" } } } ], "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } } }, "if-then": { "begin": "\\b([Ii][Ff])\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "patterns": [ { "include": "#logical-expression" } ], "end": "\\b(?=[Tt][Hh][Ee][Nn])\\b" }, "logical-expression": { "patterns": [ { "match": "\\b([Aa][Nn][Dd]|[Oo][Rr])\\b", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#parens" }, { "include": "#function-arguments" }, { "include": "#type-member-call" }, { "include": "#db-dot-table-dot-field" }, { "include": "#comment" }, { "include": "#operator" }, { "include": "#code-block" }, { "include": "#handle-attributes" }, { "include": "#preprocessors" }, { "include": "#language-functions" }, { "include": "#abl-functions" }, { "include": "#abl-system-handles" }, { "include": "#keywords" } ] }, "function-arguments": { "name": "meta.function.arguments.abl", "comment": "Captures what's between ( and ) when calling a function, excluding the braces ", "begin": "(?=\\()", "beginCaptures": { "1": { "name": "meta.brace.round.js" } }, "end": "(?=\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#parens" }, { "include": "#function-arguments-no-parens" } ] }, "function-arguments-no-parens": { "name": "meta.function.arguments.abl", "patterns": [ { "match": "(?i)\\s*((input-o(?:utput|utpu|utp|u)?)|output|input|table-handle|dataset-handle|append|by-value|by-reference|bind)\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, { "match": "(?i)\\b(dataset)\\s+([a-zA-Z_\\-#$%]+(\\.[a-zA-Z_\\-#$%]+)?)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.dataset.abl" } } }, { "match": "(?i)\\b(temp-table|table|buffer)\\s+([a-zA-Z_\\-#$%]+(\\.[a-zA-Z_\\-#$%]+)?)\\b", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "storage.data.table.abl" } } }, { "include": "#function-arguments" }, { "include": "#comment" }, { "include": "#operator" }, { "include": "#array-literal" }, { "include": "#constant" }, { "include": "#timestamp-constant" }, { "include": "#type-reference" }, { "include": "#abl-system-handles" }, { "include": "#can-find" }, { "include": "#language-functions" }, { "include": "#abl-functions" }, { "include": "#type-member-call" }, { "include": "#db-dot-table-dot-field" }, { "include": "#handle-attributes" }, { "include": "#handle-methods" }, { "include": "#keywords" }, { "include": "#expression" }, { "include": "#punctuation-comma" }, { "include": "#preprocessors" } ] }, "static-object-property-call": { "comment": "This rule only captures dotted type name and not single class names. Type names are files, so support unicode.", "match": "(?i)\\s*(([\\w#$%\\-]+|progress)(\\.[\\w#$%\\-]+)+)\\s*((\\?:)|(:))([\\w\\-]+)\\s*", "captures": { "1": { "name": "entity.name.type.abl" }, "4": { "name": "punctuation.separator.colon.abl" }, "7": { "name": "entity.name.function.abl" } } }, "unqualified-method-call": { "match": "\\b([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b(?=\\()", "captures": { "1": { "name": "entity.name.function.abl" } } }, "property-call": { "match": "((\\?:)|(:))([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b", "captures": { "2": { "name": "keyword.operator.source.abl" }, "3": { "name": "punctuation.separator.colon.abl" }, "4": { "name": "entity.name.function.abl" } } }, "type-member-call": { "patterns": [ { "include": "#property-call" }, { "include": "#unqualified-method-call" }, { "include": "#static-object-property-call" } ] }, "variable-name": { "comment": "1 to 128 characters; can consist of any combination of letters (a-z or A-Z), numbers (0-9), and these special characters: #$-_%& Names must begin with a letter (from https://docs.progress.com/bundle/openedge-abl-manage-applications/page/Name-limits.html)", "match": "(?<=^|\\s|\\[|\\(|,)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)(?=\\.\\s|\\.$|,|:|\\?:|\\s|\\)|\\]|\\[|$)", "name": "variable.other.abl" }, "extent": { "match": "(?i)\\s*(extent)\\s*((0x)?\\h+\\b)?", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "constant.numeric.source.abl" } } }, "decimals": { "match": "(?i)\\s*(decimals)\\s((0x)?\\h+)?", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "constant.numeric.source.abl" } } }, "ordinal": { "match": "(?i)\\s*(ordinal)\\s((0x)?\\h+)?", "captures": { "1": { "name": "keyword.other.abl" }, "2": { "name": "constant.numeric.source.abl" } } }, "array-literal": { "name": "meta.array.literal.abl", "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.square.begin.abl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.bracket.square.end.abl" } }, "patterns": [ { "comment": "See https://docs.progress.com/bundle/abl-reference/page/Array-reference.html for array ranges", "match": "(?i)\\s+(for)\\s+", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#expression" }, { "include": "#preprocessors" }, { "include": "#comment" }, { "include": "#punctuation-comma" } ] }, "array-use": { "name": "meta.array.literal.abl", "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.square.begin.abl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.bracket.square.end.abl" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "expression": { "patterns": [ { "include": "#string" }, { "include": "#timestamp-constant" }, { "include": "#constant" }, { "include": "#numeric" }, { "include": "#variable-name" }, { "include": "#double-colon-field-name" } ] }, "parameter-name": { "match": "(?<=^|\\s)(a-zA-Z0-9_\\-#$%|-)+(?=\\s)", "name": "variable.parameter.abl" }, "run-statement": { "begin": "\\b([Rr][Uu][Nn])\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?i)(?=\\.|value|set|persistent|single-run|singleton|on|no-error|in|asynchronous|\\()", "patterns": [ { "include": "#string" }, { "include": "#preprocessor-reference" }, { "include": "#argument-reference" }, { "include": "#comment" }, { "include": "#procedure-name" } ] }, "procedure-name": { "comment": "(External) Program names are files, so need to support unicode.", "match": "([\\w\\-\\$\\@\\/\\\\\\.]{1,256})(?=\\b|\\.$)", "captures": { "1": { "name": "entity.name.procedure.abl" } } }, "include-file": { "name": "meta.include.abl", "comment": "https://docs.progress.com/bundle/abl-reference/page/Include-file-reference.html. Filesystem names can be unicode", "begin": "({)\\s*(?!&)(([\"]?)([\\\\\/\\w$\\-\\.]+)([\"]?))", "beginCaptures": { "1": { "name": "punctuation.section.abl" }, "3": { "name": "punctuation.definition.string.begin.abl" }, "4": { "name": "entity.name.include.abl" }, "5": { "name": "punctuation.definition.string.end.abl" } }, "end": "\\s*(\\s*})\\s*", "endCaptures": { "1": { "name": "punctuation.section.abl" } }, "patterns": [ { "include": "#preprocessor-reference" }, { "include": "#argument-reference" }, { "match": "(?<=\\s)(&[a-zA-Z0-9][a-zA-Z0-9_\\-#$%#$\\-%\\.]+)\\s*(=)?", "name": "meta.include.argument.abl", "comment": "This is intended to catch '&arg' and '&arg=' ", "captures": { "1": { "name": "support.other.argument.abl" }, "2": { "name": "keyword.operator.source.abl" } } }, { "include": "#string" }, { "match": "([a-zA-Z0-9][a-zA-Z0-9_\\-#$%#$\\-%\\.:]+)\\b", "comment": "non-string argument values", "captures": { "1": { "name": "support.other.argument.abl" } } }, { "match": "(?<=\\=)(/\\*+)|(\\*+/)|(//)", "comment": "Comment start/stop argument values", "captures": { "0": { "name": "support.other.argument.abl" } } }, { "include": "#preprocessor-reference" }, { "comment": "Argument references can be passed into includes as arguments", "include": "#argument-reference" }, { "include": "#comment" } ] }, "argument-reference": { "comment": "ONly unnamed arguments are captured here. Names arguments are treated as preprocessors, since its impossible to tell them apart https://docs.progress.com/bundle/abl-reference/page/Argument-reference.html", "match": "\\s*(({)([0-9]+|\\*\\s*)(}))\\s*", "captures": { "1": { "name": "meta.argument.abl" }, "2": { "name": "punctuation.section.abl" }, "3": { "name": "support.other.argument.abl" }, "4": { "name": "punctuation.section.abl" } } }, "comment": { "patterns": [ { "include": "#singlelinecomment" }, { "include": "#multilinecomment" } ] }, "singlelinecomment": { "match": "//.*$", "comment": "Was comment.source.abl but should be changed, per https://macromates.com/manual/en/language_grammars", "name": "comment.line.double-slash.abl" }, "multilinecomment": { "begin": "/\\*", "end": "\\*/", "contentName": "comment", "name": "comment.block.source.abl", "patterns": [ { "include": "#multilinecomment", "name": "comment.block.source.abl" } ] }, "string": { "patterns": [ { "include": "#singlequotedstring" }, { "include": "#doublequotedstring" }, { "include": "#translation-attribute" } ] }, "singlequotedstring": { "begin": "(')", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.abl" } }, "end": "(?i)(')(:[L|R|T|C|U]\\d*\\b)?", "endCaptures": { "1": { "name": "punctuation.definition.string.end.abl" }, "2": { "name": "support.other.abl" } }, "name": "string.quoted.single.abl", "patterns": [ { "include": "#escape-char" } ] }, "doublequotedstring": { "begin": "(\")", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.abl" } }, "end": "(?i)(\")(:[LlRrTtCcUu]\\d*\\b)?", "endCaptures": { "1": { "name": "punctuation.definition.string.end.abl" }, "2": { "name": "support.other.abl" } }, "name": "string.quoted.double.abl", "patterns": [ { "include": "#escape-char" } ] }, "dll-type": { "match": "(?i)\\b(byte|unsigned-short|short|unsigned-long|long|int64|float)\\b", "captures": { "1": { "name": "storage.type.abl" } }, "comment": "https://docs.progress.com/bundle/abl-reference/page/Data-types.html" }, "primitive-type": { "match": "(?i)(?<=^|\\s)(blob|(ch(?:aracter|aracte|aract|arac|ara|ar|a)?)|c|clob|com-handle|(da(?:tetime-tz|tetime|te|t)?)|(de(?:cimal|cima|cim|ci|c)?)|handle|int64|(int(?:eger|ege|eg|e)?)|in|i|(log(?:ical|ica|ic|i)?)|lo|l|(longch(?:ar|a)?)|memptr|raw|recid|rowid|widget-handle)(?![=a-zA-Z0-9_\\-#$%\\-])", "captures": { "1": { "name": "storage.type.abl" } }, "comment": "https://docs.progress.com/bundle/abl-reference/page/Data-types.html" }, "numeric": { "match": "(?<![a-zA-Z0-9_\\-#$%-])(0[xX]\\h+)|([+\\-]?\\.?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+\\-]?[0-9]+)?)", "name": "constant.numeric.source.abl" }, "abl-system-handles": { "match": "(?i)\\b(active-window|audit-control|audit-policy|clipboard|codebase-locator|color-table|compiler|current-window|debugger|default-window|dslog-manager|(error-stat(?:us|u)?)|(file-info(?:rmation|rmatio|rmati|rmat|rma|rm|r)?)|font-table|(last-even(?:t)?)|log-manager|profiler|(rcode-info(?:rmation|rmatio|rmati|rmat|rma|rm|r)?)|security-policy|self|session|source-procedure|super|target-procedure|this-object|this-procedure|web-context)\\b(?![#$\\-_%&])", "captures": { "1": { "name": "variable.language.abl" }, "2": { "name": "punctuation.separator.colon.abl" } } }, "timestamp-constant": { "match": "(?i)(?<=^|\\s|\\b)(today|now)(?!a-zA-Z0-9_\\-#$%|-)", "comment": "These are constants that can be used in initial values. This excludes MTIME and ETIME", "name": "constant.language.abl" }, "constant": { "match": "(?i)(?<=^|\\b|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%:])", "name": "constant.language.abl" }, "punctuation-colon": { "match": ":", "name": "punctuation.terminator.abl" }, "punctuation-separator": { "name": "punctuation.separator.abl", "patterns": [ { "include": "#punctuation-comma" }, { "match": "(:)", "captures": { "1": { "name": "punctuation.separator.colon.abl" } } }, { "match": "(\\.)", "captures": { "1": { "name": "punctuation.separator.period.abl" } } } ] }, "punctuation-comma": { "captures": { "1": { "name": "punctuation.separator.comma.abl" } }, "match": "(,)" }, "punctuation-semicolon": { "captures": { "1": { "name": "punctuation.terminator.abl" } }, "match": "(;)" }, "punctuation-period": { "captures": { "1": { "name": "punctuation.terminator.abl" } }, "match": "(\\.)" }, "operator": { "patterns": [ { "include": "#operator-no-space" }, { "include": "#operator-with-space" }, { "include": "#operator-with-trailing-space" } ] }, "operator-no-space": { "match": "(\\+=|-=|\\\\=|\\*=|<=|<>|>=|=|<|>)", "captures": { "1": { "name": "keyword.operator.source.abl" } } }, "operator-with-space": { "match": "(?i)(?<=\\s)(contains|begins|matches|eq|le|lt|ge|gt|ne|\\+|-|\\*|/)(?=\\s|\\()", "comment": "Lookahead and -behind for the spaces", "captures": { "1": { "name": "keyword.operator.source.abl" } } }, "operator-with-trailing-space": { "match": "\\b([Nn][Oo][Tt])(?=\\s|\\()", "comment": "Lookahead only for the spaces, so that in particular the NOT is captured properly", "captures": { "1": { "name": "keyword.operator.source.abl" } } }, "rowid-function": { "match": "(?i)\\s*(rowid)\\s*(\\()\\s*([a-zA-Z_][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*(\\))", "captures": { "1": { "name": "support.function.abl" }, "2": { "name": "meta.brace.round.js" }, "3": { "name": "storage.data.table.abl" }, "5": { "name": "meta.brace.round.js" } } }, "new-record": { "comment": "This scope MUST be called after before type-reference (especially new-class) to avoid types being captured as tables", "patterns": [ { "comment": " NEW\\s+( <buffer> )", "match": "(?i)\\s*(new)\\s+(\\()\\s*([a-zA-Z_][a-zA-Z0-9_\\-#$%]*(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)\\s*(\\))", "captures": { "1": { "name": "support.function.abl" }, "2": { "name": "meta.brace.round.js" }, "3": { "name": "storage.data.table.abl" }, "5": { "name": "meta.brace.round.js" } } }, { "comment": " NEW <buffer>. The position of the negative lookahead (?!...) is very important", "match": "(?i)\\s*((new)\\s+(?!.*\\()([a-zA-Z_{][a-zA-Z0-9_\\-#$%\\.{&}]*))", "captures": { "2": { "name": "support.function.abl" }, "3": { "name": "storage.data.table.abl" } } } ] }, "assign-statment": { "patterns": [ { "include": "#abl-functions" }, { "include": "#language-functions" }, { "include": "#string" }, { "include": "#expression" }, { "include": "#argument-reference" }, { "include": "#preprocessors" }, { "include": "#attribute-access" }, { "include": "#buffer-name" }, { "include": "#can-find" }, { "include": "#abl-system-handles" }, { "include": "#db-dot-table-dot-field" }, { "include": "#extent" }, { "include": "#function-arguments" }, { "include": "#get-class" }, { "include": "#handle-attributes" }, { "include": "#handle-methods" }, { "include": "#if-then" }, { "include": "#operator" }, { "include": "#type-member-call" }, { "include": "#include-file" }, { "include": "#new-record" }, { "include": "#new-class" }, { "include": "#record-buffer-functions" }, { "include": "#rowid-function" }, { "include": "#type-names" } ] }, "buffer-copy": { "begin": "(?i)\\s*(buffer-copy)\\s*(?!\\()", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?=\\s*[Aa][Ss][Ss][Ii][Gg][Nn]|\\.)", "patterns": [ { "include": "#comment" }, { "include": "#preprocessors" }, { "match": "(?i)\\s*(using|except|to|no-lobs|no-error)\\s*", "captures": { "1": { "name": "keyword.other.abl" } } }, { "include": "#db-dot-table-dot-field" }, { "include": "#db-dot-table" }, { "include": "#field-name" } ] }, "using-except": { "begin": "(?i)\\b(using|except)\\b", "beginCaptures": { "1": { "name": "keyword.other.abl" } }, "end": "(?i)\\s*(?=to|using|except)\\b", "patterns": [ { "include": "#field-name" }, { "include": "#comment" }, { "include": "#preprocessors" } ] }, "keywords": { "comment": "These scopes contain statements, not all the keywords. Methods, attributes and functions have their own scopes.", "patterns": [ { "include": "#keywords-A" }, { "include": "#keywords-B" }, { "include": "#keywords-C" }, { "include": "#keywords-D" }, { "include": "#keywords-E" }, { "include": "#keywords-F" }, { "include": "#keywords-G" }, { "include": "#keywords-H" }, { "include": "#keywords-I" }, { "include": "#keywords-J" }, { "include": "#keywords-K" }, { "include": "#keywords-L" }, { "include": "#keywords-M" }, { "include": "#keywords-N" }, { "include": "#keywords-O" }, { "include": "#keywords-P" }, { "include": "#keywords-Q" }, { "include": "#keywords-R" }, { "include": "#keywords-S" }, { "include": "#keywords-T" }, { "include": "#keywords-U" }, { "include": "#keywords-V" }, { "include": "#keywords-W" }, { "include": "#keywords-X" }, { "include": "#keywords-Y" } ] }, "keywords-A": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(a(?:bort|bstract|ccumulate?|ccumula?|ccumu?|cross|ctive-form|ctive-window|dd|dvise|ggregate|lert-box|ll|llow-replication|lter|lternate-key|mbiguous?|mbiguo?|mbig|nd|nsi-only|ny|ny-key|ny-printable|nywhere|ppend|ppend-line|pplication|pply|rray-message?|rray-messa?|rray-mes?|rray-m|s|s-cursor|scending?|scendi?|scen?|sc|sk-overwrite|ssembly|ssign|t|ttach|ttachment|ttribute-type|udit-control|udit-policy|uthorization|uto-endkey|uto-go|utomatic|vailable?|vailab?|vail|verage?|vera?|ve|vg))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-B": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(b(?:ack-tab|ackspace|ackwards?|ase-key|ase64|atch|efore-hide?|efore-hi?|egins|ell|etween|gcolor?|gcol?|gc|ig-endian|inary|ind|ind-where|lob|lock|lock-level?|lock-lev|order-bottom?|order-bott?|order-bo?|order-left?|order-le?|order-right?|order-rig?|order-r|order-top?|order-t|oth|ottom|ottom-column|reak|reak-line|rowse|rowse-column-data-types|rowse-column-formats|rowse-column-labels|rowse-header|tos|uffer|uffer-compare?|uffer-compa?|uffer-copy|uttons?|uttons?|y|y-pointer|y-reference|y-value|y-variant-pointer?|y-variant-point|yte))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-C": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(c(?:ache|ache-size|all|ancel-pick|ase|atch|decl|entered?|enter|hained|haracter_length|haracter?|haract?|hara?|heck|heck-mem-stomp|hoices|hoose|lass|lear|lient-principal|lipboard|lob|lose|odebase-locator|ol|ol-of|ollate|olon|olon-aligned?|olon-align|olor|olor-table|olumn-codepage|olumn-label-bgcolor?|olumn-label-bgcol?|olumn-label-bgc|olumn-label-dcolor|olumn-label-fgcolor?|olumn-label-fgcol?|olumn-label-fgc|olumn-label-font|olumn-label-height-chars?|olumn-label-height-cha?|olumn-label-height-c|olumn-label-height-pixels?|olumn-label-height-pixe?|olumn-label-height-pi?|olumn-label?|olumn-lab|olumn-of|olumns?|om-self|ombo-box|ommand|ompares?|ompiler??|omponent-handle|omponent-self|onnect|onstrained|onstructor|ontainer-event|ontains|ontents|ontext|ontext-help-id|ontext-popup?|ontext-pop|ontrol|ontrol-container?|ontrol-contain?|ontrol-conta?|ontrol-frame?|onvert|opy|opy-lob|ount|reate|reate-on-add|reate-test-file|tos|urrent|urrent-language?|urrent-langua?|urrent-lang|urrent-value|urrent_date|ursor-down|ursor-left|ursor-right|ursor-up|ursor?|urs|ut))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-D": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(d(?:ata-bind?|ata-bi?|ata-refresh-line|ata-refresh-page|ata-relation?|ata-relati?|ata-rela?|ata-source|atabase|ataset|ataset-handle|color|de|de-notify|ebug-list|ebug-set-tenant|ebugger|eclare|efault|efault-action|efault-button?|efault-butt?|efault-extension?|efault-extensi?|efault-exten?|efault-ext?|efault-pop-up|efault-untranslatable|efault-window|efer-lob-fetch|efine-user-event-manager|efine?|efi?|el|elegate|elete|elete-character|elete-column|elete-end-line|elete-field|elete-word|elimiter|escending?|escendi?|escen?|esc|eselect|eselect-extend|eselection|eselection-extend|estructor|etach|ialog-box|ialog-help|ictionary?|ictiona?|ictio?|ict|ir|isabled??|isconnect?|isconne?|iscon|ismiss-menu|isplay?|ispl?|istinct|ll-call-type|os??|os-end|otnet-clr-loaded|ouble|own|rop|rop-down|rop-down-list|rop-file-notify|rop-target|slog-manager|ump|ynamic-current-value|ynamic-new|ynamic-property))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-E": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(e(?:ach|cho|dge|dge-pixels?|dge-pixe?|dge-pi?|diting|ditor|ditor-backtab|ditor-tab|lse|mpty|mpty-selection|nable|nd|nd-box-selection|nd-error|nd-key|nd-move|nd-resize|nd-row-resize|nd-search|ndkey|nter-menubar|ntry|num|q|rror|rror-status?|rror-stat|scape|vent|vent-handler-context|vents|xcept|xclusive|xclusive-lock?|xclusive-lo?|xclusive-web-user?|xclusive-web-us?|xclusive-web-?|xecute|xists|xit|xpire|xplicit|xport|xtended|xtent|xternal|xtract))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-F": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(f(?:alse|alse-leaks|etch|gcolor?|gcol?|gc|ields?|ile|ile-access-date?|ile-access-da?|ile-access-time?|ile-access-ti?|ile-information?|ile-informati?|ile-informa?|ile-infor?|ilename|ill-in|ilters|inal|inally|ind|ind-case-sensitive|ind-global|ind-next|ind-next-occurrence|ind-prev-occurrence|ind-previous|ind-select|ind-wrap-around|inder|irehose-cursor|irst|ix-codepage|ixed-only|lags|lat-button|loat|ocus|ocus-in|ont|ont-table|or|orce-file|oreign-key-hidden|ormat?|orm|ormat?|orm|orwards?|rame-value?|rame-val|rame?|rom|rom-chars?|rom-cha?|rom-c|rom-current?|rom-curre?|rom-cur|rom-pixels?|rom-pixe?|rom-pi?|romnoreorder|ull-height|unction|unction-call-type))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-G": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(g(?:e|enerate-md5|et|et-attr-call-type|et-dir|et-file|et-key-value?|et-key-val|et-text-height|et-text-width|etbyte|lobal?|lob|o|o-on|oto|rant|rant-archive|raphic-edge?|raphic-ed?|rayed|rid-set|rid-unit-height|rid-unit-width|roup|t))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-H": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(h(?:aving|eader|eight|elp|elp-context?|elp-conte?|elp-con|elp-topic|elpfile-name?|elpfile-na?|idden|ide|int|ome|oriz-end|oriz-home|oriz-scroll-drag|ost-byte-order))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-I": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(i(?:f|mage|mage-down|mage-insensitive|mage-size|mage-size-chars?|mage-size-cha?|mage-size-c|mage-size-pixels?|mage-size-pixe?|mage-size-pi?|mage-up|mplements|mport|n|ndex-hint|ndexed-reposition|ndicator|nformation?|nformati?|nforma?|nfor?|nherit-color-mode|nherits|nit|nitial|nitial-dir|nitial-filter|nitiate|nner|nput|nput-output?|nput-outp?|nput-ou?|nsert|nsert-column|nsert-field|nsert-field-data|nsert-field-label|nsert-mode|nterface|nto|s|tem|teration-changed))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-J": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(join(?:|-by-sqldb|-on-select))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-K": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(ke(?:ep-frame-z-order?|ep-frame-z-ord?|ep-frame-z-o?|ep-frame-z|ep-messages|ep-tab-order|y-code|y-function?|y-functi?|y-func|y-label|ycache-join))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-L": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(l(?:abel|abel-pfcolor?|abel-pfcol?|abel-pfc|andscape|ast-event?|ast-key|e|eading|eak-detection|eave|eft|eft-aligned?|eft-align|eft-end|ength|ike|ike-sequential|ine-down|ine-left|ine-right|ine-up|isting?|isti|ittle-endian|oad|oad-from|oad-picture|oad-result-into|ob-dir|ocked|og-id|og-manager|ong|ongchar?|ongch|ookahead|ower|t))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-M": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(m(?:achine-class|ain-menu|ap|argin-extra|argin-height|argin-height-chars?|argin-height-cha?|argin-height-c|argin-height-pixels?|argin-height-pixe?|argin-height-pi?|argin-width|argin-width-chars?|argin-width-cha?|argin-width-c|argin-width-pixels?|argin-width-pixe?|argin-width-pi?|atches|ax|ax-button|ax-height|ax-rows|ax-size|ax-width|aximize|d5-value|emptr|enu|enu-drop|enu-item|enubar|essage|essage-area|essage-area-msg|essage-line|ethod|in-height|in-schema-marshall?|in-size|in-width|od|odulo|ouse|ouse-pointer?|ouse-point?|ouse-poi?|ouse-p|ove|pe|ultiple-key|ust-exist))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-N": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(n(?:amespace-prefix|amespace-uri|ative|e|ested|ew|ew-instance|ew-line|ext|ext-error|ext-frame|ext-prompt|ext-word|o|o-apply|o-array-message?|o-array-messa?|o-array-mes?|o-array-m|o-assign|o-attr|o-attr-list?|o-attr-li?|o-attr-space?|o-attr-spa?|o-attr-s|o-auto-trim?|o-auto-validate|o-bind-where|o-box|o-column-scrolling?|o-column-scrolli?|o-column-scrol?|o-column-scr?|o-console|o-convert|o-convert-3d-colors?|o-convert-3d-colo?|o-convert-3d-co?|o-convert-3d-?|o-debug|o-drag|o-echo|o-error|o-fill?|o-fi?|o-firehose-cursor|o-focus|o-help|o-hide|o-index-hint|o-inherit-bgcolor?|o-inherit-bgcol?|o-inherit-bgc|o-inherit-fgcolor?|o-inherit-fgcol?|o-inherit-fgc|o-join-by-sqldb|o-keycache-join|o-labels?|o-lobs|o-lock|o-lookahead|o-map|o-message?|o-messa?|o-mes|o-pause|o-prefetch?|o-prefet?|o-query-order-added?|o-query-order-add?|o-query-order-a?|o-query-order?|o-query-ord?|o-query-o|o-query-unique-added?|o-query-unique-add?|o-query-unique-a?|o-query-unique?|o-query-uniq?|o-query-un?|o-return-value?|o-return-val|o-row-markers|o-schema-marshall?|o-scrollbar-vertical?|o-scrollbar-vertic?|o-scrollbar-vert?|o-scrollbar-ve?|o-scrolling|o-separate-connection|o-separators|o-tab-stop?|o-tab-st?|o-tab-?|o-underline?|o-underli?|o-under?|o-undo??|o-wait|o-word-wrap|ode-type|on-serializable|one|ot-active|ull|um-copies|um-selected|umeric))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-O": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(o(?:bject|ctet_length|ff??|ff-end|ff-home|k|k-cancel|ld|le-invoke-locale?|le-invoke-loca|le-names-locale?|le-names-loca|n|pen|pen-line-above|ption|ptions-file|r|rdered-join|rientation|s-append|s-command|s-copy|s-create-dir|s-delete|s-dir|s-rename|s2|s400|therwise|ut-of-data|uter|uter-join|utput|verlay|verride))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-P": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(p(?:ackage-private|ackage-protected|age|age-bottom?|age-bott?|age-down|age-left|age-right|age-right-text|age-up|age-width?|age-wid|aged|arameter?|aramet?|aram|arent-id-field|arent-window-close|artial-key|ascal|aste|ause|erformance?|erforman?|erform?|erfo?|fcolor?|fcol?|fc|ick|ick-area|ick-both|ixels|ortrait|recision|reprocess?|reproce?|reselect?|resele?|rev|rev-frame|rev-word|rinter|rinter-setup|rivate|rivileges|rocedure-call-type|rocedure-complete|rocedure?|rocedu?|roce|rocess|rofile-file|rofiler|rompt|rompt-for?|rompt-f|romsgs|ropath|roperty|rotected|ublic|ublish|ut|ut-bits|ut-bytes??|ut-double|ut-float|ut-int64|ut-key-value?|ut-key-val|ut-long|ut-short|ut-string|ut-unsigned-long|ut-unsigned-short|utbyte))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-Q": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(qu(?:ery|ery-tuning|estion|it))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-R": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(r(?:adio-set|aw|aw-transfer|code-information?|code-informati?|code-informa?|code-infor?|ead-available|ead-exact-num|ead-response|eadkey|eal|ecall|ectangle?|ectang?|ecta?|ecursive|eference-only|einstate|elease|epeat|eplication-create|eplication-delete|eplication-write|eports|eposition|eposition-backwards?|eposition-backwar?|eposition-backw?|eposition-forwards?|eposition-forwar?|eposition-forw|eposition-parent-relation?|eposition-parent-relati?|eposition-parent-rela?|equest|esize|esult|esume-display|etain|etry-cancel|eturn|eturn-to-start-dir?|eturn-value?|eturn-val|eturns|everse-from|evert|evoke|ight|ight-aligned?|ight-align|ight-end|outine-level|ow|ow-created|ow-deleted|ow-display|ow-entry|ow-height|ow-leave|ow-modified|ow-of|ow-unmodified|ule|ule-row|ule-y|un|un-procedure?|un-procedu?|un-proce?))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-S": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(s(?:ave|ave-as|ax-attributes|ax-complete?|ax-comple|ax-parser-error|ax-reader|ax-running|ax-uninitialized|ax-write-begin|ax-write-complete|ax-write-content|ax-write-element|ax-write-error|ax-write-idle|ax-write-tag|ax-writer|ax-xml|chema|creen|creen-io|croll|croll-bars|croll-horizontal|croll-left|croll-mode|croll-notify|croll-right|croll-vertical|crollable|crollbar-drag|crolled-row-position?|crolled-row-positi?|crolled-row-posi?|crolling|earch-self|earch-target|ection|ecurity-policy|eek|elect|elect-extend|elect-on-join|elect-repositioned-row|elected-items|election|election-extend|election-list|elf|end|ensitive|eparate-connection|eparators|erializable|erialize-hidden|erialize-name|erver|erver-socket|ession|et|et-attr-call-type|et-byte-order|et-cell-focus|et-contents|et-db-logging|et-event-manager-option|et-option|et-pointer-value?|et-pointer-val|et-state|ettings|hare-lock?|hare-lo?|hare-?|hared|hort|how-in-taskbar?|how-in-taskb?|how-stats?|ide-labels?|ide-labe?|ignature|ilent|imple|ingle|ingle-character|ingle-run|ize|ize-chars?|ize-cha?|ize-c|ize-pixels?|ize-pixe?|ize-pi?|kip|kip-group-duplicates|kip-schema-check|lider|mallint|oap-fault|oap-header|oap-header-entryref|ocket|ome|ource|ource-procedure|pace|ql|tart|tart-box-selection|tart-extend-box-selection|tart-mem-check|tart-move|tart-resize|tart-row-resize|tart-search|tarting|tatic|tatus|tatus-area|tatus-area-msg|tdcall|tomp-detection|tomp-frequency|top|top-after|top-display|top-mem-check|tored-procedure?|tored-procedu?|tored-proce?|tream|tream-handle|tream-io|tring-xref|ub-average?|ub-avera?|ub-ave|ub-count|ub-maximum?|ub-maxim?|ub-max|ub-menu|ub-menu-help|ub-minimum?|ub-minim?|ub-min|ub-total|ubscribe|ubstring?|ubstri?|um|ummary|uper|uspend|ystem-dialog|ystem-help))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-T": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(t(?:ab|able-scan|arget|arget-procedure|emp-table|enant|enant-where|erm|erminal|erminate|ext|ext-cursor|ext-seg-growth?|ext-seg-grow?|ext-seg-gr?|ext-seg-?|hen|his-object|his-procedure|hree-d|hrough|hrow|hru|itle|o|ooltip|op|op-column|opic|otal|railing|rans|ransaction-mode|ransaction?|ransacti?|riggers??|rue|tcodepage))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-U": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(u(?:nbuffered?|nbuffer?|nbuff|nderline?|nderli?|ndo|nformatted?|nformatt?|nforma?|nion|nique|nix|nix-end|nless-hidden|nload|nsigned-byte|nsigned-int64|nsigned-integer|nsigned-long|nsigned-short|nsubscribe|p|pdate|pper|se|se-dict-exps?|se-dict-ex?|se-dict-?|se-dic|se-filename|se-index|se-revvideo|se-text|se-underline|se-widget-pool|ser|sing|tc-offset))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-V": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(v(?:6frame|alidate|alue|alue-changed|alues|ar|ariable?|ariab?|ari?|erbose?|erbo?|ertical?|ertic?|ert|iew|iew-as|irtual-height|irtual-width|ms|oid))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-W": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(w(?:ait|ait-for|arning|eb-context?|eb-conte?|eb-con|eb-notify|hen|here|hile|idget|idget-id|idget-pool|idth|indow-close|indow-delayed-minimize?|indow-delayed-minimi?|indow-delayed-mini?|indow-maximized?|indow-maximiz?|indow-maxim|indow-minimized?|indow-minimiz?|indow-minim|indow-name|indow-normal|indow-resized|indow-restored|ith|ord-index|ork-table?|ork-tab|orkfile|rite))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-X": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(x(?:-document|-noderef|-of|code|ml-data-type|ml-node-name|ml-node-type|or|ref|ref-xml))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "keywords-Y": { "comment": "The keyword must not have a trailing variable character (one of #$-_%&)", "match": "(?i)\\b(y(?:-of|ear|ear-offset|es|es-no|es-no-cancel))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "keyword.other.abl" } } }, "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": { "match": "(?i)(:)(a(?:ccelerator|ctive|ctor|dm-data|fter-buffer|fter-rowid|fter-table|llow-column-searching|llow-prev-deserialization|lways-on-top|mbiguous?|mbiguo?|mbig|ppl-alert-boxes?|ppl-alert-box?|ppl-alert-b?|ppl-alert|ppl-context-id|ppserver-info|ppserver-password|ppserver-userid|sync-request-count|sync-request-handle|synchronous|ttached-pairlist|ttr-space?|ttr-spa?|ttr-s?|ttr|ttribute-names|udit-event-context|uto-completion?|uto-completi?|uto-comple?|uto-comp|uto-delete|uto-delete-xml|uto-end-key|uto-go|uto-indent?|uto-inde?|uto-resize|uto-return?|uto-retu?|uto-synchronize|uto-validate?|uto-valida?|uto-vali?|uto-zap?|uto-z|vailable-formats|vailable?|vailab?|vail))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-B": { "match": "(?i)(:)(b(?:ackground?|ackgrou?|ackgr?|ack|ase-ade|asic-logging|atch-mode|atch-size|efore-buffer|efore-rowid|efore-table|gcolor?|gcol?|gc|lank|lock-iteration-display|order-bottom-chars?|order-bottom-cha?|order-bottom-c|order-bottom-pixels?|order-bottom-pixe?|order-bottom-pi?|order-left-chars?|order-left-cha?|order-left-c|order-left-pixels?|order-left-pixe?|order-left-pi?|order-right-chars?|order-right-cha?|order-right-c|order-right-pixels?|order-right-pixe?|order-right-pi?|order-top-chars?|order-top-cha?|order-top-c|order-top-pixels?|order-top-pixe?|order-top-pi?|ox|ox-selectable?|ox-selectab?|ox-select|uffer-chars|uffer-field|uffer-group-id|uffer-group-name|uffer-handle|uffer-lines|uffer-name?|uffer-na?|uffer-partition-id|uffer-tenant-id|uffer-tenant-name|ytes-read|ytes-written))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-C": { "match": "(?i)(:)(c(?:ache|all-name|all-type|an-create?|an-crea|an-delete?|an-dele|an-do-domain-support|an-read|an-write?|ancel-button|ancelled|areful-paint|ase-sensitive?|ase-sensiti?|ase-sensi?|ase-sen|entered?|enter|harset|hecked|hild-buffer|hild-num|lass-type|lient-connection-id|lient-tty|lient-type|lient-workstation|ode|odepage|olumn-bgcolor?|olumn-bgcol?|olumn-bgc|olumn-dcolor|olumn-fgcolor?|olumn-fgcol?|olumn-fgc|olumn-font|olumn-label?|olumn-lab|olumn-movable|olumn-pfcolor?|olumn-pfcol?|olumn-pfc|olumn-read-only|olumn-resizable|olumn-scrolling?|olumn-scrolli?|olumn-scrol?|olumn-scr?|olumns?|om-handle|omplete|onfig-name|ontext-help|ontext-help-file|ontext-help-id|ontrol-box|onvert-3d-colors?|onvert-3d-colo?|onvert-3d-co?|onvert-3d-?|overage|pcase|pcoll|pinternal?|pintern?|pinte?|plog|pprint|prcodein|prcodeout|pstream|pterm|rc-value?|rc-val|urrent-changed|urrent-column|urrent-environment?|urrent-environme?|urrent-environ?|urrent-envir?|urrent-env|urrent-iteration|urrent-request-info|urrent-response-info|urrent-result-row|urrent-row-modified|urrent-window|ursor-char|ursor-line|ursor-offset))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-D": { "match": "(?i)(:)(d(?:ata-entry-return?|ata-entry-retu?|ata-source|ata-source-complete-map|ata-source-modified|ata-source-rowid|ata-type?|ata-ty?|ataset|ate-format?|ate-form?|ate-fo?|b-context|b-list|b-references|bname|color|de-error|de-id?|de-item|de-name|de-topic|eblank|ebug-alert|ecimals|efault|efault-buffer-handle|efault-button?|efault-butt?|efault-commit|efault-string|efault-value|elimiter|escription?|escripti?|irectory|isable-auto-zap|isplay-timezone|isplay-type?|isplay-ty?|omain-description|omain-name|omain-type|own|rag-enabled|rop-target|ynamic))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-E": { "match": "(?i)(:)(e(?:dge-chars?|dge-cha?|dge-c|dge-pixels?|dge-pixe?|dge-pi?|dit-can-paste|dit-can-undo|mpty|nabled|ncoding|ncryption-salt|nd-user-prompt|ntity-expansion-limit|ntry-types-list|rror|rror-column?|rror-colu?|rror-object|rror-object-detail|rror-row|rror-stack-trace|rror-string|vent-group-id|vent-handler|vent-handler-object|vent-procedure|vent-procedure-context|vent-type?|vent-ty?|xclusive-id|xecution-log|xit-code|xpand|xpandable|xtent))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-F": { "match": "(?i)(:)(f(?:gcolor?|gcol?|gc|ile-create-date?|ile-create-da?|ile-create-time?|ile-create-ti?|ile-mod-date?|ile-mod-da?|ile-mod-time?|ile-mod-ti?|ile-name|ile-offset?|ile-offs?|ile-size|ile-type|ill-mode|ill-where-string|illed|irst-async-request?|irst-async-reque?|irst-async-req?|irst-async-r?|irst-async|irst-buffer|irst-child|irst-column|irst-data-source|irst-dataset|irst-form|irst-object|irst-procedure?|irst-procedu?|irst-proce?|irst-query|irst-server-socket|irst-server?|irst-serv|irst-socket|irst-tab-item?|irst-tab-it?|it-last-column|lat-button|ocused-row|ocused-row-selected|ont|oreground?|oregrou?|oregr?|ore|oreign-key-hidden|orm-input|orm-long-input|ormatted?|ormat?|orm|orward-only|ragment?|rame-col|rame-name|rame-row|rame-spacing?|rame-spaci?|rame-spa|rame-x|rame-y|rame?|requency|ull-height-chars?|ull-height-cha?|ull-height-c|ull-height-pixels?|ull-height-pixe?|ull-height-pi?|ull-pathname?|ull-pathna?|ull-width-chars?|ull-width-cha?|ull-width-c?|ull-width|ull-width-pixels?|ull-width-pixe?|ull-width-pi?|unction))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-G": { "match": "(?i)(:)(gr(?:aphic-edge?|aphic-ed?|id-factor-horizontal?|id-factor-horizont?|id-factor-horizo?|id-factor-hori?|id-factor-ho?|id-factor-vertical?|id-factor-vertic?|id-factor-vert?|id-factor-ve?|id-snap|id-unit-height-chars?|id-unit-height-cha?|id-unit-height-c|id-unit-height-pixels?|id-unit-height-pixe?|id-unit-height-pi?|id-unit-width-chars?|id-unit-width-cha?|id-unit-width-c|id-unit-width-pixels?|id-unit-width-pixe?|id-unit-width-pi?|id-visible|oup-box))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-H": { "match": "(?i)(:)(h(?:andler??|as-lobs|as-records|eight-chars?|eight-cha?|eight-c|eight-pixels?|eight-pixe?|eight-pi?|elp|idden|orizontal?|orizont?|orizo?|ori|tml-charset|tml-end-of-line|tml-end-of-page|tml-frame-begin|tml-frame-end|tml-header-begin|tml-header-end|tml-title-begin|tml-title-end|wnd))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-I": { "match": "(?i)(:)(i(?:cfparameter?|cfparamet?|cfparam|con|gnore-current-modified?|gnore-current-modifi?|gnore-current-modi?|mage|mage-down|mage-insensitive|mage-up|mmediate-display|n-handle|ndex|ndex-information?|ndex-informati?|ndex-informa?|ndex-infor?|nherit-bgcolor?|nherit-bgcol?|nherit-bgc|nherit-fgcolor?|nherit-fgcol?|nherit-fgc|nitial|nner-chars|nner-lines|nput-value|nstantiating-procedure|nternal-entries|s-class?|s-json|s-multi-tenant|s-open|s-parameter-set|s-partitioned?|s-xml|tems-per-row))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-K": { "match": "(?i)(:)(ke(?:ep-connection-open|ep-frame-z-order?|ep-frame-z-ord?|ep-frame-z-o?|ep-frame-z|ep-security-cache|ys??))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-L": { "match": "(?i)(:)(l(?:abel|abel-bgcolor?|abel-bgcol?|abel-bgc|abel-dcolor?|abel-dcol?|abel-dc|abel-fgcolor?|abel-fgcol?|abel-fgc|abel-font|abels|abels-have-colons|anguages?|arge|arge-to-small|ast-async-request?|ast-async-reque?|ast-async-req?|ast-async-r?|ast-async|ast-batch|ast-child|ast-form|ast-object|ast-procedure?|ast-procedu?|ast-proce|ast-server-socket|ast-server?|ast-serv|ast-socket|ast-tab-item?|ast-tab-it?|ength|ibrary|ibrary-calling-convention|ine|ist-item-pairs|ist-items|istings|iteral-question|ocal-host|ocal-name|ocal-port|ocal-version-info|ocator-column-number|ocator-line-number|ocator-public-id|ocator-system-id|ocator-type|ocked|og-entry-types|og-threshold|ogfile-name|ogging-level|ogin-expiration-timestamp|ogin-host|ogin-state))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-M": { "match": "(?i)(:)(m(?:andatory|anual-highlight|ax-button|ax-chars|ax-data-guess|ax-height-chars?|ax-height-cha?|ax-height-c|ax-height-pixels?|ax-height-pixe?|ax-height-pi?|ax-value?|ax-val|ax-width-chars?|ax-width-cha?|ax-width-c|ax-width-pixels?|ax-width-pixe?|ax-width-pi?|aximum-level|enu-bar|enu-key?|enu-k|enu-mouse?|enu-mou?|enu-m|erge-by-field|essage-area|essage-area-font|in-button|in-column-width-chars?|in-column-width-cha?|in-column-width-c|in-column-width-pixels?|in-column-width-pixe?|in-column-width-pi?|in-height-chars?|in-height-cha?|in-height-c|in-height-pixels?|in-height-pixe?|in-height-pi?|in-schema-marshall?|in-value?|in-val|in-width-chars?|in-width-cha?|in-width-c|in-width-pixels?|in-width-pixe?|in-width-pi?|odified|ouse-pointer?|ouse-point?|ouse-poi?|ouse-p|ovable|ulti-compile|ultiple|ultitasking-interval|ust-understand))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-N": { "match": "(?i)(:)(n(?:ame|amespace-prefix|amespace-uri|eeds-appserver-prompt|eeds-prompt|ested|ew|ew-row|ext-column?|ext-colu?|ext-rowid|ext-sibling|ext-tab-item?|o-current-value|o-empty-space|o-focus|o-schema-marshall?|o-validate?|o-valida?|o-vali?|ode-value|onamespace-schema-location|um-buffers|um-buttons?|um-butto?|um-but|um-child-relations|um-children|um-columns?|um-colum?|um-col|um-dropped-files|um-entries|um-fields|um-formats|um-header-entries|um-items|um-iterations|um-lines|um-locked-columns?|um-locked-colum?|um-locked-col|um-log-files|um-messages|um-parameters|um-references|um-relations|um-replaced?|um-replac?|um-repl|um-results|um-selected-rows|um-selected-widgets|um-source-buffers|um-tabs|um-to-retain|um-top-buffers|um-visible-columns?|um-visible-colum?|um-visible-col|umeric-decimal-point?|umeric-decimal-poi?|umeric-decimal-p?|umeric-decimal?|umeric-decim?|umeric-dec|umeric-format?|umeric-form?|umeric-fo?|umeric-separator?|umeric-separat?|umeric-separ?|umeric-sep))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-O": { "match": "(?i)(:)(o(?:n-frame-border?|n-frame-bord?|n-frame-bo?|n-frame-?|ptions|rdinal|rigin-handle|rigin-rowid|verlay|wner|wner-document))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-P": { "match": "(?i)(:)(p(?:age-bottom?|age-bott?|age-top|arameter?|aramet?|aram|arent|arent-buffer|arent-fields-after|arent-fields-before|arent-id-relation|arent-relation?|arent-relati?|arent-rela?|arse-status|assword-field|athname|be-hash-algorithm?|be-hash-algorit?|be-hash-algor?|be-hash-alg|be-key-rounds|ersistent-cache-disabled|ersistent-procedure|ersistent?|ersiste?|fcolor?|fcol?|fc|ixels-per-column?|ixels-per-colu?|ixels-per-row|opup-menu?|opup-me?|opup-only?|opup-on?|osition|refer-dataset|repare-string|repared|rev-column?|rev-colu?|rev-sibling|rev-tab-item?|rev-tab-it?|rimary|rimary-passphrase|rinter-control-handle|rinter-hdc|rinter-name|rinter-port|rivate-data?|rivate-da?|rocedure-name|rocedure-type|rofiling|rogress-source?|rogress-sour?|rogress-so?|roxy|roxy-password|roxy-userid|ublic-id|ublished-events))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-Q": { "match": "(?i)(:)(qu(?:alified-user-id|ery|ery-off-end|it))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-R": { "match": "(?i)(:)(r(?:adio-buttons|ead-only|ecid|ecord-length?|ecord-leng?|ecursive|efreshable|ejected|elation-fields?|elation-fiel?|elation-fi|elations-active|emote|emote-host|emote-port|eposition|equest-info|esizable?|esizab?|esize|esponse-info|estart-row|estart-rowid|etain-shape?|etain-sha?|etain-s|eturn-inserted?|eturn-insert?|eturn-inse?|eturn-value-data-type|eturn-value-dll-type|eturn-value?|eturn-val|oles??|ounded|ow|ow-height-chars?|ow-height-cha?|ow-height-c|ow-height-pixels?|ow-height-pixe?|ow-height-pi?|ow-markers?|ow-marke?|ow-mar?|ow-resizable|ow-state|owid))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-S": { "match": "(?i)(:)(s(?:ave-where-string|chema-change|chema-location|chema-marshal|chema-path|creen-lines|creen-value?|creen-val|croll-bars|crollable|crollbar-horizontal?|crollbar-horizont?|crollbar-horizo?|crollbar-hori?|crollbar-ho?|crollbar-vertical?|crollbar-vertic?|crollbar-vert?|crollbar-ve?|eal-timestamp|electable|elected|election-end|election-start|election-text|ensitive|eparator-fgcolor?|eparator-fgcol?|eparator-fgc|eparators|erialize-hidden|erialize-name|erver|erver-connection-bound-request?|erver-connection-bound-reque?|erver-connection-bound-req?|erver-connection-bound?|erver-connection-bou?|erver-connection-context?|erver-connection-conte?|erver-connection-con?|erver-connection-id|erver-operating-mode|ession-end|ession-id|how-in-taskbar?|how-in-taskb?|ide-label-handle?|ide-label-hand?|ide-label-ha?|ide-labels|ignature-value|ingle-run|ingleton|kip-deleted-record?|kip-deleted-reco?|mall-icon|mall-title|oap-fault-actor|oap-fault-code|oap-fault-detail|oap-fault-misunderstood-header|oap-fault-node|oap-fault-role|oap-fault-string|oap-fault-subcode|oap-version|ort|ort-ascending|ort-number|sl-server-name|tandalone|tartup-parameters|tate-detail|tatistics|tatus-area|tatus-area-font|top|top-object|topped?|tream|tretch-to-fit|trict|trict-entity-resolution|ubtype|uper-procedures?|uper-procedur?|uper-proced?|uper-proc|uppress-namespace-processing|uppress-warnings-list|uppress-warnings?|uppress-warnin?|uppress-warn?|uppress-wa?|ymmetric-encryption-aad|ymmetric-encryption-algorithm|ymmetric-encryption-iv|ymmetric-encryption-key|ymmetric-support|ystem-alert-boxes?|ystem-alert-box?|ystem-alert-b?|ystem-alert|ystem-id))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-T": { "match": "(?i)(:)(t(?:ab-position|ab-stop|able|able-crc-list|able-handle|able-list|able-number?|able-numb?|emp-directory?|emp-directo?|emp-direc?|emp-dir|ext-selected|hread-safe|hree-d|ic-marks|ime-source|imezone|itle|itle-bgcolor?|itle-bgcol?|itle-bgc|itle-dcolor?|itle-dcol?|itle-dc|itle-fgcolor?|itle-fgcol?|itle-fgc|itle-font?|itle-fo|oggle-box|ooltips??|op-nav-query|op-only|race-filter|racing|racking-changes|rans-init-procedure?|rans-init-procedu?|rans-init-proce?|ransaction?|ransacti?|ransparent?|ranspare?|ype))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-U": { "match": "(?i)(:)(u(?:ndo|ndo-throw-scope|nique-id|nique-match|rl|rl-password|rl-userid|ser-id))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-V": { "match": "(?i)(:)(v(?:6display|alidate-expression?|alidate-message|alidate-xml|alidation-enabled|alue|ersion|iew-as|iew-first-column-on-reopen|irtual-height-chars?|irtual-height-cha?|irtual-height-c|irtual-height-pixels?|irtual-height-pixe?|irtual-height-pi?|irtual-width-chars?|irtual-width-cha?|irtual-width-c|irtual-width-pixels?|irtual-width-pixe?|irtual-width-pi?|isible))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-W": { "match": "(?i)(:)(w(?:arning|c-admin-app|here-string|idget-enter?|idget-ent?|idget-e|idget-id|idget-leave?|idget-lea?|idget-l|idth-chars?|idth-cha?|idth-c|idth-pixels?|idth-pixe?|idth-pi?|indow|indow-state?|indow-sta|indow-system?|indow-syst?|ord-wrap|ork-area-height-pixels?|ork-area-height-pixe?|ork-area-height-pi?|ork-area-width-pixels?|ork-area-width-pixe?|ork-area-width-pi?|ork-area-x|ork-area-y|rite-status))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-X": { "match": "(?i)(:)(x(?:|-document|code-session-key|ml-data-type|ml-entity-expansion-limit|ml-node-name|ml-node-type|ml-schema-path?|ml-strict-entity-resolution|ml-suppress-namespace-processing))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-attributes-Y": { "match": "(?i)(:)(y(?:|ear-offset))\\b(?![#$\\-_%&])", "captures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "entity.name.function.abl" } } }, "handle-methods": { "patterns": [ { "include": "#handle-methods-A" }, { "include": "#handle-methods-B" }, { "include": "#handle-methods-C" }, { "include": "#handle-methods-D" }, { "include": "#handle-methods-E" }, { "include": "#handle-methods-F" }, { "include": "#handle-methods-G" }, { "include": "#handle-methods-I" }, { "include": "#handle-methods-L" }, { "include": "#handle-methods-M" }, { "include": "#handle-methods-N" }, { "include": "#handle-methods-Q" }, { "include": "#handle-methods-R" }, { "include": "#handle-methods-S" }, { "include": "#handle-methods-T" }, { "include": "#handle-methods-U" }, { "include": "#handle-methods-V" }, { "include": "#handle-methods-W" } ] }, "handle-methods-A": { "begin": "(?i)(:)(a(?:ccept-changes|ccept-row-changes|dd-buffer|dd-calc-column?|dd-calc-colu?|dd-columns-from|dd-events-procedure?|dd-events-procedu?|dd-events-proce?|dd-fields-from|dd-first|dd-header-entry|dd-index-field|dd-last|dd-like-column?|dd-like-colu?|dd-like-field|dd-like-index|dd-new-field|dd-new-index|dd-parent-id-relation|dd-relation?|dd-relati?|dd-rela?|dd-schema-location|dd-source-buffer|dd-super-procedure?|dd-super-procedu?|dd-super-proce?|ppend-child|pply-callback|ttach-data-source|uthentication-failed))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-B": { "begin": "(?i)(:)(b(?:egin-event-group|uffer-compare?|uffer-compa?|uffer-copy|uffer-create|uffer-delete|uffer-export|uffer-export-fields|uffer-field|uffer-import|uffer-import-fields|uffer-release?|uffer-validate|uffer-value))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-C": { "begin": "(?i)(:)(c(?:ancel-break|ancel-requests|ancel-requests-after|lear|lear-appl-context|lear-log|lear-selection?|lear-selecti?|lear-sort-arrows?|lone-node|lose-log|onnect|onnected|onvert-to-offset?|onvert-to-offs|opy-dataset|opy-sax-attributes|opy-temp-table|reate-like|reate-like-sequential|reate-node|reate-node-namespace|reate-result-list-entry|urrent-query))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-D": { "begin": "(?i)(:)(d(?:ebug?|eclare-namespace|elete|elete-char|elete-current-row|elete-header-entry|elete-line|elete-node|elete-result-list-entry|elete-selected-rows??|eselect-focused-row|eselect-rows|eselect-selected-row|etach-data-source|isable|isable-connections|isable-dump-triggers|isable-load-triggers|isconnect?|isconne?|iscon|isplay-message|ump-logging-now))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-E": { "begin": "(?i)(:)(e(?:dit-clear|dit-copy|dit-cut|dit-paste|dit-undo|mpty-dataset|mpty-temp-table|nable|nable-connections|ncode-domain-access-code|ncrypt-audit-mac-key|nd-document|nd-element|nd-event-group|nd-file-drop|ntry|xport|xport-principal))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-F": { "begin": "(?i)(:)(f(?:etch-selected-row|ill|ind-by-rowid|ind-current|ind-first|ind-last|ind-unique|irst-of))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-G": { "begin": "(?i)(:)(get-(?:attribute|attribute-node|binary-data|blue-value?|blue-val?|blue-v?|blue|browse-column?|browse-colu?|buffer-handle|bytes-available|callback-proc-context|callback-proc-name|cgi-list|cgi-long-value|cgi-value|changes|child|child-relation?|child-relati?|child-rela?|client|column|config-value|current?|curre?|dataset-buffer|document-element|dropped-file|dynamic|error-column|error-row|file-name|file-offset?|first?|green-value?|green-val?|green-v?|green|header-entry?|index-by-namespace-name|index-by-qname|iteration|last|localname-by-index|message|message-type|next|node|number|parent|prev|printers|property|qname-by-index|red-value?|red-val?|red-v?|red|relation?|relati?|rela?|repositioned-row|rgb-value?|rgb-val?|rgb-v?|rgb|row|safe-user|selected-widget?|selected-widg?|selected-wi?|selected-?|serialized|signature|socket-option|source-buffer|tab-item|text-height-chars?|text-height-cha?|text-height-c|text-height-pixels?|text-height-pixe?|text-height-pi?|text-width-chars?|text-width-cha?|text-width-c|text-width-pixels?|text-width-pixe?|text-width-pi?|top-buffer|type-by-index|type-by-namespace-name|type-by-qname|uri-by-index|value-by-index|value-by-namespace-name|value-by-qname|wait-state?|wait-sta?|wait-s?|wait))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-I": { "begin": "(?i)(:)(i(?:mport-node|mport-principal|ncrement-exclusive-id|ndex-information?|ndex-informati?|ndex-informa?|ndex-infor?|nitialize|nitialize-document-type|nitiate|nsert|nsert-attribute|nsert-backtab?|nsert-backt?|nsert-bac?|nsert-b|nsert-before|nsert-file|nsert-row|nsert-string|nsert-tab?|nsert-t|nvoke|s-row-selected|s-selected))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-L": { "begin": "(?i)(:)(l(?:ast-of|ist-property-names|oad|oad-domains|oad-icon|oad-image|oad-image-down|oad-image-insensitive|oad-image-up|oad-mouse-pointer?|oad-mouse-point?|oad-mouse-poi?|oad-mouse-p|oad-small-icon|ock-registration|og-audit-event|ogout|ongchar-to-node-value|ookup))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-M": { "begin": "(?i)(:)(m(?:ark-new|ark-row-state|emptr-to-node-value|erge-changes|erge-row-changes|ove-after-tab-item?|ove-after-tab-it?|ove-after-tab-?|ove-after-ta?|ove-after-?|ove-before-tab-item?|ove-before-tab-it?|ove-before-tab-?|ove-before-ta?|ove-before-?|ove-befor|ove-column?|ove-colu?|ove-to-bottom?|ove-to-bott?|ove-to-bo?|ove-to-eof|ove-to-top?|ove-to-t))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-N": { "begin": "(?i)(:)(no(?:de-value-to-longchar|de-value-to-memptr|rmalize))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-Q": { "begin": "(?i)(:)(query-(?:close|open|prepare))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-R": { "begin": "(?i)(:)(r(?:aw-transfer|ead|ead-file|ead-json|ead-xml|ead-xmlschema|efresh|efresh-audit-policy|egister-domain|eject-changes|eject-row-changes|emove-attribute|emove-child|emove-events-procedure?|emove-events-procedu?|emove-events-proce?|emove-super-procedure?|emove-super-procedu?|emove-super-proce?|eplace|eplace-child|eplace-selection-text|eposition-to-row|eposition-to-rowid|eset))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-S": { "begin": "(?i)(:)(s(?:ave|ave-file|ave-row-changes|ax-parse|ax-parse-first|ax-parse-next|croll-to-current-row|croll-to-item?|croll-to-it?|croll-to-selected-row|eal|earch|elect-all|elect-focused-row|elect-next-row|elect-prev-row|elect-row|erialize-row|et-actor|et-appl-context|et-attribute|et-attribute-node|et-blue-value?|et-blue-val?|et-blue-v?|et-blue|et-break|et-buffers|et-callback|et-callback-procedure|et-client|et-commit|et-connect-procedure|et-dynamic|et-green-value?|et-green-val?|et-green-v?|et-green|et-input-source|et-must-understand|et-node|et-numeric-format?|et-numeric-form|et-output-destination|et-parameter|et-property|et-read-response-procedure|et-red-value?|et-red-val?|et-red-v?|et-red|et-repositioned-row|et-rgb-value?|et-rgb-val?|et-rgb-v?|et-rgb|et-role|et-rollback|et-safe-user|et-selection|et-serialized|et-socket-option|et-sort-arrow|et-wait-state?|et-wait-sta?|et-wait-s?|et-wait|tart-document|tart-element|top-parsing|tring-value|ynchronize))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-T": { "begin": "(?i)(:)(te(?:mp-table-prepare?|nant-id|nant-name))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-U": { "begin": "(?i)(:)(u(?:pdate-attribute|rl-decode|rl-encode|ser-data))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-V": { "begin": "(?i)(:)(validate(?:|-domain-access-code|-seal))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "handle-methods-W": { "begin": "(?i)(:)(write(?:|-cdata|-characters|-comment|-data|-data-element|-empty-element|-entity-ref|-external-dtd|-fragment|-json|-message|-processing-instruction|-xml|-xmlschema))\\s*(?=\\()", "beginCaptures": { "1": { "name": "punctuation.separator.colon.abl" }, "2": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "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": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(a(?:bsolute?|bsolu?|bso?|ccumulate?|ccumula?|ccumu?|dd-interval|lias|mbiguous?|mbiguo?|mbig|scending?|scendi?|scen?|sc|udit-enabled|vailable?|vailab?|vail))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-B": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(b(?:ase64-decode|ase64-encode|ox|uffer-group-id|uffer-group-name|uffer-partition-id|uffer-tenant-id|uffer-tenant-name))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-C": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(c(?:an-do|an-find|an-query|an-set|aps|ast|hr|odepage-convert|ompares?|onnected|ount-of|urrent-changed|urrent-language?|urrent-langua?|urrent-lang|urrent-result-row|urrent-value))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-D": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(d(?:ata-source-modified|ataservers|ate|atetime|atetime-tz|ay|b-remote-host|bcodepage|bcollation|bname|bparam|brestrictions?|brestrictio?|brestrict?|brestri?|brest|btaskid|btype|bversion?|bversi?|ecimal?|ecim?|ec|ecrypt|efined|ynamic-cast|ynamic-current-value|ynamic-enum|ynamic-function?|ynamic-functi?|ynamic-func|ynamic-invoke|ynamic-next-value|ynamic-property))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-E": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(e(?:ncode|ncrypt|ntered|ntry|rror|time|xp|xtent))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-F": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(f(?:ill|irst|irst-of|rame-col|rame-db|rame-down|rame-field|rame-file|rame-index?|rame-line|rame-name|rame-row|rame-value?|rame-val))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-G": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(g(?:ateways?|enerate-pbe-key|enerate-pbe-salt|enerate-random-key|enerate-uuid|et-bits|et-byte|et-byte-order|et-bytes|et-class|et-codepages?|et-codepages?|et-collations??|et-collation?|et-collati?|et-colla?|et-db-client|et-double|et-effective-tenant-id|et-effective-tenant-name|et-float|et-int64|et-long|et-pointer-value|et-short|et-size|et-string|et-unsigned-long|et-unsigned-short|o-pending?|o-pendi?|uid))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-H": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(h(?:andle|ash-code|ex-decode|ex-encode))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-I": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(i(?:ndex|nput|nt64|nteger?|nteg?|nt|nterval|s-attr-space?|s-attr-spa?|s-attr-s?|s-attr|s-codepage-fixed|s-column-codepage|s-db-multi-tenant|s-lead-byte|so-date))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-K": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(k(?:blabel|eycode|eyfunction?|eyfuncti?|eyfunc|eylabel|eyword|eyword-all))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-L": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(l(?:ast|ast-of|astkey|c|dbname|eft-trim|ength|ibrary|ine-counter?|ine-count|ist-events|ist-query-attrs|ist-set-attrs|ist-widgets|ocked|og|ogical?|ogic?|og?|ookup|ower))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-M": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(m(?:aximum|d5-digest|ember|essage-digest|essage-lines|inimum?|inim?|in|onth|time))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-N": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(n(?:ew|ext-value|ormalize|ot|ow|um-aliases?|um-alias?|um-ali|um-dbs|um-entries|um-results))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-O": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(o(?:psys|s-dir|s-drives?|s-error|s-getenv))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-P": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(p(?:age-number?|age-numb?|age-size|dbname|roc-handle?|roc-hand?|roc-ha|roc-status?|roc-stat?|roc-st|rocess-architecture|rogram-name|rogress|romsgs|ropath|roversion?|roversi?))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-Q": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(qu(?:ery-off-end|oter))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-R": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(r(?:-index|andom|aw|ecid|ecord-length?|ecord-leng?|ejected|elation-fields?|elation-fiel?|elation-fi|eplace|etry|eturn|eturn-value?|eturn-val|gb-value?|gb-val?|gb-v|ight-trim|ound|ow-state|owid))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-S": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(s(?:creen-lines|dbname|earch|eek|et-db-client|et-effective-tenant|et-size|etuserid?|etuser|ha1-digest|kip|pace|qrt|sl-server-name|tring|ubstitute?|ubstitu?|ubsti?|ubstring?|ubstri?|uper))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-T": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(t(?:enant-id|enant-name|enant-name-to-id|erminal|his-object|ime|imezone|o-rowid|oday|ransaction?|ransacti?|rim|runcate?|runca?|ype-of))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-U": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(u(?:nbox|serid))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-V": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(val(?:id-event|id-handle|id-object|ue))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-W": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(w(?:eekday|idget-handle?|idget-hand?|idget-ha?))\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] }, "abl-functions-Y": { "name": "meta.function-call.abl", "begin": "(?i)\\s*(year)\\s*(?=\\()", "beginCaptures": { "1": { "name": "support.function.abl" } }, "end": "(\\))", "endCaptures": { "1": { "name": "meta.brace.round.js" } }, "patterns": [ { "include": "#function-arguments" } ] } }, "scopeName": "source.abl", "uuid": "075bb86e-03ea-4fea-bac0-e11b9dc73e03" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/pascal.tmLanguage.json ================================================ { "fileTypes": ["pas", "p", "pp", "dfm", "fmx", "dpr", "dpk", "lfm", "lpr"], "keyEquivalent": "^~P", "name": "pascal", "patterns": [ { "match": "\\b(?i:(absolute|abstract|all|and_then|array|as|asm|attribute|begin|bindable|case|class|const|contains|default|div|else|end|except|export|exports|external|far|file|finalization|finally|forward|generic|goto|if|implements|import|in|index|inherited|initialization|interrupt|is|label|library|mod|module|name|near|not|object|of|on|only|operator|or_else|otherwise|out|override|package|packed|pow|private|program|protected|public|published|interface|implementation|qualified|read|record|resident|requires|resourcestring|restricted|segment|set|shl|shr|specialize|stored|strict|then|threadvar|to|try|type|unit|uses|var|view|virtual|dynamic|overload|reintroduce|with|write|xor))\\b", "name": "keyword.pascal" }, { "captures": { "1": { "name": "storage.type.prototype.pascal" }, "2": { "name": "entity.name.function.prototype.pascal" } }, "match": "\\b(?i:(function|procedure|constructor|destructor))\\b\\s+(\\w+(\\.\\w+)?)(\\(.*?\\))?;\\s*(?=(?i:attribute|forward|external))", "name": "meta.function.prototype.pascal" }, { "captures": { "1": { "name": "storage.type.function.pascal" }, "2": { "name": "entity.name.function.pascal" } }, "match": "\\b(?i:(function|procedure|constructor|destructor|property|read|write))\\b\\s+(\\w+(\\.\\w+)?)", "name": "meta.function.pascal" }, { "match": "\\b(?i:(self|result))\\b", "name": "token.variable" }, { "match": "\\b(?i:(and|or))\\b", "name": "keyword.operator.pascal" }, { "match": "\\b(?i:(break|continue|exit|abort|while|do|downto|for|raise|repeat|until))\\b", "name": "keyword.control.pascal" }, { "begin": "\\{\\$", "captures": { "0": { "name": "string.regexp" } }, "end": "\\}", "name": "string.regexp" }, { "match": "\\b(?i:(ansichar|ansistring|boolean|byte|cardinal|char|comp|currency|double|dword|extended|file|integer|int64|longint|longword|nativeint|nativeuint|olevariant|pansichar|pchar|pwidechar|pointer|real|shortint|shortstring|single|smallint|string|uint64|variant|widechar|widestring|word|wordbool))\\b", "name": "storage.support.type.pascal" }, { "match": "\\b(\\d+)|(\\d*\\.\\d+([eE][\\-+]?\\d+)?)\\b", "name": "constant.numeric.pascal" }, { "match": "\\$[0-9a-fA-F]{1,16}\\b", "name": "constant.numeric.hex.pascal" }, { "match": "\\b(?i:(true|false|nil))\\b", "name": "constant.language.pascal" }, { "match": "\\b(?i:(Assert))\\b", "name": "keyword.control" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.pascal" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.pascal" } }, "end": "\\n", "name": "comment.line.double-slash.pascal.two" } ] }, { "begin": "\\(\\*", "captures": { "0": { "name": "punctuation.definition.comment.pascal" } }, "end": "\\*\\)", "name": "comment.block.pascal.one" }, { "begin": "\\{(?!\\$)", "captures": { "0": { "name": "punctuation.definition.comment.pascal" } }, "end": "\\}", "name": "comment.block.pascal.two" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.pascal" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.pascal" } }, "name": "string.quoted.single.pascal", "patterns": [ { "match": "''", "name": "constant.character.escape.apostrophe.pascal" } ] }, { "match": "\\#\\d+", "name": "string.other.pascal" } ], "scopeName": "source.pascal", "uuid": "F42FA544-6B1C-11D9-9517-000D93589AF6" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/perl.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/perl.tmbundle/commit/a85927a902d6e5d7805f56a653f324d34dfad53a", "name": "perl", "scopeName": "source.perl", "comment": "\n\tTODO:\tInclude RegExp syntax\n", "patterns": [ { "include": "#line_comment" }, { "begin": "^(?==[a-zA-Z]+)", "end": "^(=cut\\b.*$)", "endCaptures": { "1": { "patterns": [ { "include": "#pod" } ] } }, "name": "comment.block.documentation.perl", "patterns": [ { "include": "#pod" } ] }, { "include": "#variable" }, { "applyEndPatternLast": 1, "begin": "\\b(?=qr\\s*[^\\s\\w])", "comment": "string.regexp.compile.perl", "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", "endCaptures": { "1": { "name": "string.regexp.compile.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "patterns": [ { "begin": "(qr)\\s*\\{", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\}", "name": "string.regexp.compile.nested_braces.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ] }, { "begin": "(qr)\\s*\\[", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\]", "name": "string.regexp.compile.nested_brackets.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ] }, { "begin": "(qr)\\s*<", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": ">", "name": "string.regexp.compile.nested_ltgt.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ] }, { "begin": "(qr)\\s*\\(", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\)", "name": "string.regexp.compile.nested_parens.perl", "patterns": [ { "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", "match": "\\$(?=[^\\s\\w\\\\'\\{\\[\\(\\<])" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ] }, { "begin": "(qr)\\s*'", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "'", "name": "string.regexp.compile.single-quote.perl", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "(qr)\\s*([^\\s\\w'\\{\\[\\(\\<])", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\2", "name": "string.regexp.compile.simple-delimiter.perl", "patterns": [ { "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", "name": "keyword.control.anchor.perl" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ] } ] }, { "applyEndPatternLast": 1, "begin": "(?<!\\{|\\+|\\-)\\b(?=m\\s*[^\\sa-zA-Z0-9])", "comment": "string.regexp.find-m.perl", "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", "endCaptures": { "1": { "name": "string.regexp.find-m.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "patterns": [ { "begin": "(m)\\s*\\{", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\}", "name": "string.regexp.find-m.nested_braces.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ] }, { "begin": "(m)\\s*\\[", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\]", "name": "string.regexp.find-m.nested_brackets.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ] }, { "begin": "(m)\\s*<", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": ">", "name": "string.regexp.find-m.nested_ltgt.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ] }, { "begin": "(m)\\s*\\(", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\)", "name": "string.regexp.find-m.nested_parens.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ] }, { "begin": "(m)\\s*'", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "'", "name": "string.regexp.find-m.single-quote.perl", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "\\G(?<!\\{|\\+|\\-)(m)(?!_)\\s*([^\\sa-zA-Z0-9'\\{\\[\\(\\<])", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\2", "name": "string.regexp.find-m.simple-delimiter.perl", "patterns": [ { "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", "match": "\\$(?=[^\\sa-zA-Z0-9'\\{\\[\\(\\<])", "name": "keyword.control.anchor.perl" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "begin": "\\[", "beginCaptures": { "1": { "name": "punctuation.definition.character-class.begin.perl" } }, "end": "\\]", "endCaptures": { "1": { "name": "punctuation.definition.character-class.end.perl" } }, "name": "constant.other.character-class.set.perl", "patterns": [ { "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", "name": "keyword.control.anchor.perl" }, { "include": "#escaped_char" } ] }, { "include": "#nested_parens_interpolated" } ] } ] }, { "applyEndPatternLast": 1, "begin": "\\b(?=(?<!\\&)(s)(\\s+\\S|\\s*[;\\,\\{\\}\\(\\)\\[<]|$))", "comment": "string.regexp.replace.perl", "end": "((([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\{\\}\\)\\]>]|\\s*$))", "endCaptures": { "1": { "name": "string.regexp.replace.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "patterns": [ { "begin": "(s)\\s*\\{", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\}", "name": "string.regexp.nested_braces.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces" } ] }, { "begin": "(s)\\s*\\[", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\]", "name": "string.regexp.nested_brackets.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets" } ] }, { "begin": "(s)\\s*<", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": ">", "name": "string.regexp.nested_ltgt.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_ltgt" } ] }, { "begin": "(s)\\s*\\(", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "\\)", "name": "string.regexp.nested_parens.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens" } ] }, { "begin": "\\{", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "\\}", "name": "string.regexp.format.nested_braces.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ] }, { "begin": "\\[", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "\\]", "name": "string.regexp.format.nested_brackets.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ] }, { "begin": "<", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": ">", "name": "string.regexp.format.nested_ltgt.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ] }, { "begin": "\\(", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "\\)", "name": "string.regexp.format.nested_parens.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ] }, { "begin": "'", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "'", "name": "string.regexp.format.single_quote.perl", "patterns": [ { "match": "\\\\['\\\\]", "name": "constant.character.escape.perl" } ] }, { "begin": "([^\\s\\w\\[({<;])", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "\\1", "name": "string.regexp.format.simple_delimiter.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "match": "\\s+" } ] }, { "begin": "\\b(?=s([^\\sa-zA-Z0-9\\[({<]).*\\1([egimosxradlupcn]*)([\\}\\)\\;\\,]|\\s+))", "comment": "string.regexp.replaceXXX", "end": "((([egimosxradlupcn]*)))(?=([\\}\\)\\;\\,]|\\s+|\\s*$))", "endCaptures": { "1": { "name": "string.regexp.replace.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "patterns": [ { "begin": "(s\\s*)([^\\sa-zA-Z0-9\\[({<])", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "(?=\\2)", "name": "string.regexp.replaceXXX.simple_delimiter.perl", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "'", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "'", "name": "string.regexp.replaceXXX.format.single_quote.perl", "patterns": [ { "match": "\\\\['\\\\]", "name": "constant.character.escape.perl.perl" } ] }, { "begin": "([^\\sa-zA-Z0-9\\[({<])", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "\\1", "name": "string.regexp.replaceXXX.format.simple_delimiter.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] } ] }, { "begin": "\\b(?=(?<!\\\\)s\\s*([^\\s\\w\\[({<>]))", "comment": "string.regexp.replace.extended", "end": "((([egimosradlupc]*x[egimosradlupc]*)))\\b", "endCaptures": { "1": { "name": "string.regexp.replace.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "patterns": [ { "begin": "(s)\\s*(.)", "captures": { "0": { "name": "punctuation.definition.string.perl" }, "1": { "name": "support.function.perl" } }, "end": "(?=\\2)", "name": "string.regexp.replace.extended.simple_delimiter.perl", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "'", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "'(?=[egimosradlupc]*x[egimosradlupc]*)\\b", "name": "string.regexp.replace.extended.simple_delimiter.perl", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "(.)", "captures": { "0": { "name": "punctuation.definition.string.perl" } }, "end": "\\1(?=[egimosradlupc]*x[egimosradlupc]*)\\b", "name": "string.regexp.replace.extended.simple_delimiter.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] } ] }, { "begin": "(?<=\\(|\\{|~|&|\\||if|unless|^)\\s*((\\/))", "beginCaptures": { "1": { "name": "string.regexp.find.perl" }, "2": { "name": "punctuation.definition.string.perl" } }, "contentName": "string.regexp.find.perl", "end": "((\\1([egimosxradlupcn]*)))(?=(\\s+\\S|\\s*[;\\,\\#\\{\\}\\)]|\\s*$))", "endCaptures": { "1": { "name": "string.regexp.find.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "3": { "name": "keyword.control.regexp-option.perl" } }, "patterns": [ { "comment": "This is to prevent thinks like /foo$/ to treat $/ as a variable", "match": "\\$(?=\\/)", "name": "keyword.control.anchor.perl" }, { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "captures": { "1": { "name": "constant.other.key.perl" } }, "match": "\\b(\\w+)\\s*(?==>)" }, { "match": "(?<={)\\s*\\w+\\s*(?=})", "name": "constant.other.bareword.perl" }, { "captures": { "1": { "name": "keyword.control.perl" }, "2": { "name": "entity.name.type.class.perl" } }, "match": "^\\s*(package)\\s+([^\\s;]+)", "name": "meta.class.perl" }, { "captures": { "1": { "name": "storage.type.sub.perl" }, "2": { "name": "entity.name.function.perl" }, "3": { "name": "storage.type.method.perl" } }, "match": "\\b(sub)(?:\\s+([-a-zA-Z0-9_]+))?\\s*(?:\\([\\$\\@\\*;]*\\))?[^\\w\\{]", "name": "meta.function.perl" }, { "captures": { "1": { "name": "entity.name.function.perl" }, "2": { "name": "punctuation.definition.parameters.perl" }, "3": { "name": "variable.parameter.function.perl" } }, "match": "^\\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\\b", "name": "meta.function.perl" }, { "begin": "^(?=(\\t| {4}))", "end": "(?=[^\\t\\s])", "name": "meta.leading-tabs", "patterns": [ { "captures": { "1": { "name": "meta.odd-tab" }, "2": { "name": "meta.even-tab" } }, "match": "(\\t| {4})(\\t| {4})?" } ] }, { "captures": { "1": { "name": "support.function.perl" }, "2": { "name": "punctuation.definition.string.perl" }, "5": { "name": "punctuation.definition.string.perl" }, "8": { "name": "punctuation.definition.string.perl" } }, "match": "\\b(tr|y)\\s*([^A-Za-z0-9\\s])(.*?)(?<!\\\\)(\\\\{2})*(\\2)(.*?)(?<!\\\\)(\\\\{2})*(\\2)", "name": "string.regexp.replace.perl" }, { "match": "\\b(__FILE__|__LINE__|__PACKAGE__|__SUB__)\\b", "name": "constant.language.perl" }, { "begin": "\\b(__DATA__|__END__)\\n?", "beginCaptures": { "1": { "name": "constant.language.perl" } }, "contentName": "comment.block.documentation.perl", "end": "\\z", "patterns": [ { "include": "#pod" } ] }, { "match": "(?<!->)\\b(continue|default|die|do|else|elsif|exit|for|foreach|given|goto|if|last|next|redo|return|select|unless|until|wait|when|while|switch|case|require|use|eval)\\b", "name": "keyword.control.perl" }, { "match": "\\b(my|our|local)\\b", "name": "storage.modifier.perl" }, { "match": "(?<!\\w)\\-[rwxoRWXOezsfdlpSbctugkTBMAC]\\b", "name": "keyword.operator.filetest.perl" }, { "match": "\\b(and|or|xor|as|not)\\b", "name": "keyword.operator.logical.perl" }, { "match": "(<=>|=>|->)", "name": "keyword.operator.comparison.perl" }, { "include": "#heredoc" }, { "begin": "\\bqq\\s*([^\\(\\{\\[\\<\\w\\s])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\1", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.qq.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "begin": "\\bqx\\s*([^'\\(\\{\\[\\<\\w\\s])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\1", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.qx.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "begin": "\\bqx\\s*'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.qx.single-quote.perl", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.double.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "begin": "(?<!->)\\bqw?\\s*([^\\(\\{\\[\\<\\w\\s])", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\1", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.q.perl" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.single.perl", "patterns": [ { "match": "\\\\['\\\\]", "name": "constant.character.escape.perl" } ] }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "begin": "(?<!->)\\bqq\\s*\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.qq-paren.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens_interpolated" }, { "include": "#variable" } ] }, { "begin": "\\bqq\\s*\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.qq-brace.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces_interpolated" }, { "include": "#variable" } ] }, { "begin": "\\bqq\\s*\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.qq-bracket.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets_interpolated" }, { "include": "#variable" } ] }, { "begin": "\\bqq\\s*\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\>", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.qq-ltgt.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_ltgt_interpolated" }, { "include": "#variable" } ] }, { "begin": "(?<!->)\\bqx\\s*\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.qx-paren.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens_interpolated" }, { "include": "#variable" } ] }, { "begin": "\\bqx\\s*\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.qx-brace.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces_interpolated" }, { "include": "#variable" } ] }, { "begin": "\\bqx\\s*\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.qx-bracket.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets_interpolated" }, { "include": "#variable" } ] }, { "begin": "\\bqx\\s*\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\>", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.interpolated.qx-ltgt.perl", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_ltgt_interpolated" }, { "include": "#variable" } ] }, { "begin": "(?<!->)\\bqw?\\s*\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.q-paren.perl", "patterns": [ { "include": "#nested_parens" } ] }, { "begin": "\\bqw?\\s*\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.q-brace.perl", "patterns": [ { "include": "#nested_braces" } ] }, { "begin": "\\bqw?\\s*\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.q-bracket.perl", "patterns": [ { "include": "#nested_brackets" } ] }, { "begin": "\\bqw?\\s*\\<", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\\>", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.other.q-ltgt.perl", "patterns": [ { "include": "#nested_ltgt" } ] }, { "begin": "^__\\w+__", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.unquoted.program-block.perl" }, { "begin": "\\b(format)\\s+(\\w+)\\s*=", "beginCaptures": { "1": { "name": "support.function.perl" }, "2": { "name": "entity.name.function.format.perl" } }, "end": "^\\.\\s*$", "name": "meta.format.perl", "patterns": [ { "include": "#line_comment" }, { "include": "#variable" } ] }, { "captures": { "1": { "name": "support.function.perl" }, "2": { "name": "entity.name.function.perl" } }, "match": "\\b(x)\\s*(\\d+)\\b" }, { "match": "\\b(ARGV|DATA|ENV|SIG|STDERR|STDIN|STDOUT|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|cmp|connect|cos|crypt|dbmclose|dbmopen|defined|delete|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eq|eval|exec|exists|exp|fcntl|fileno|flock|fork|formline|ge|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|grep|gt|hex|import|index|int|ioctl|join|keys|kill|lc|lcfirst|le|length|link|listen|local|localtime|log|lstat|lt|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|ne|no|oct|open|opendir|ord|pack|pipe|pop|pos|print|printf|push|quotemeta|rand|read|readdir|readlink|recv|ref|rename|reset|reverse|rewinddir|rindex|rmdir|s|say|scalar|seek|seekdir|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|substr|symlink|syscall|sysopen|sysread|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|utime|values|vec|waitpid|wantarray|warn|write|y)\\b", "name": "support.function.perl" }, { "captures": { "1": { "name": "punctuation.section.scope.begin.perl" }, "2": { "name": "punctuation.section.scope.end.perl" } }, "comment": "Match empty brackets for ↩ snippet", "match": "(\\{)(\\})" }, { "captures": { "1": { "name": "punctuation.section.scope.begin.perl" }, "2": { "name": "punctuation.section.scope.end.perl" } }, "comment": "Match empty parenthesis for ↩ snippet", "match": "(\\()(\\))" } ], "repository": { "escaped_char": { "patterns": [ { "match": "\\\\\\d+", "name": "constant.character.escape.perl" }, { "match": "\\\\c[^\\s\\\\]", "name": "constant.character.escape.perl" }, { "match": "\\\\g(?:\\{(?:\\w*|-\\d+)\\}|\\d+)", "name": "constant.character.escape.perl" }, { "match": "\\\\k(?:\\{\\w*\\}|<\\w*>|'\\w*')", "name": "constant.character.escape.perl" }, { "match": "\\\\N\\{[^\\}]*\\}", "name": "constant.character.escape.perl" }, { "match": "\\\\o\\{\\d*\\}", "name": "constant.character.escape.perl" }, { "match": "\\\\(?:p|P)(?:\\{\\w*\\}|P)", "name": "constant.character.escape.perl" }, { "match": "\\\\x(?:[0-9a-zA-Z]{2}|\\{\\w*\\})?", "name": "constant.character.escape.perl" }, { "match": "\\\\.", "name": "constant.character.escape.perl" } ] }, "heredoc": { "patterns": [ { "begin": "((((<<(~)?) *')(HTML)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.html", "patterns": [ { "begin": "^", "end": "\\n", "name": "text.html.basic", "patterns": [ { "include": "text.html.basic" } ] } ] }, { "begin": "((((<<(~)?) *')(XML)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.xml", "patterns": [ { "begin": "^", "end": "\\n", "name": "text.xml", "patterns": [ { "include": "text.xml" } ] } ] }, { "begin": "((((<<(~)?) *')(CSS)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.css", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.css", "patterns": [ { "include": "source.css" } ] } ] }, { "begin": "((((<<(~)?) *')(JAVASCRIPT)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.js", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.js", "patterns": [ { "include": "source.js" } ] } ] }, { "begin": "((((<<(~)?) *')(SQL)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.sql", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.sql", "patterns": [ { "include": "source.sql" } ] } ] }, { "begin": "((((<<(~)?) *')(POSTSCRIPT)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.postscript", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.postscript", "patterns": [ { "include": "source.postscript" } ] } ] }, { "begin": "((((<<(~)?) *')([^']*)(')))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } } }, { "begin": "((((<<(~)?) *\\\\)((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.raw.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.raw.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.raw.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } } }, { "begin": "((((<<(~)?) *\")(HTML)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.html", "patterns": [ { "begin": "^", "end": "\\n", "name": "text.html.basic", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.html.basic" } ] } ] }, { "begin": "((((<<(~)?) *\")(XML)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.xml", "patterns": [ { "begin": "^", "end": "\\n", "name": "text.xml", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.xml" } ] } ] }, { "begin": "((((<<(~)?) *\")(CSS)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.css", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.css", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.css" } ] } ] }, { "begin": "((((<<(~)?) *\")(JAVASCRIPT)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.js", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.js", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.js" } ] } ] }, { "begin": "((((<<(~)?) *\")(SQL)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.sql", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.sql", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.sql" } ] } ] }, { "begin": "((((<<(~)?) *\")(POSTSCRIPT)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.postscript", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.postscript", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.postscript" } ] } ] }, { "begin": "((((<<(~)?) *\")([^\"]*)(\")))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "begin": "((((<<(~)?) *)(HTML)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.html", "patterns": [ { "begin": "^", "end": "\\n", "name": "text.html.basic", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.html.basic" } ] } ] }, { "begin": "((((<<(~)?) *)(XML)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.xml", "patterns": [ { "begin": "^", "end": "\\n", "name": "text.xml", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "text.xml" } ] } ] }, { "begin": "((((<<(~)?) *)(CSS)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.css", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.css", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.css" } ] } ] }, { "begin": "((((<<(~)?) *)(JAVASCRIPT)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.js", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.js", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.js" } ] } ] }, { "begin": "((((<<(~)?) *)(SQL)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.sql", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.sql", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.sql" } ] } ] }, { "begin": "((((<<(~)?) *)(POSTSCRIPT)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "name": "meta.embedded.block.postscript", "patterns": [ { "begin": "^", "end": "\\n", "name": "source.postscript", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "source.postscript" } ] } ] }, { "begin": "((((<<(~)?) *)((?![=\\d\\$\\( ])[^;,'\"`\\s\\)]*)()))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.interpolated.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] }, { "begin": "((((<<(~)?) *`)([^`]*)(`)))(.*)\\n?", "beginCaptures": { "1": { "name": "string.unquoted.heredoc.interpolated.perl" }, "2": { "name": "punctuation.definition.string.begin.perl" }, "3": { "name": "punctuation.definition.delimiter.begin.perl" }, "7": { "name": "punctuation.definition.delimiter.end.perl" }, "8": { "patterns": [ { "include": "$self" } ] } }, "contentName": "string.unquoted.heredoc.shell.perl", "end": "^((?!\\5)\\s+)?((\\6))$", "endCaptures": { "2": { "name": "string.unquoted.heredoc.interpolated.perl" }, "3": { "name": "punctuation.definition.string.end.perl" } }, "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" } ] } ] }, "line_comment": { "patterns": [ { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.perl" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.perl" } }, "end": "\\n", "name": "comment.line.number-sign.perl" } ] } ] }, "nested_braces": { "begin": "\\{", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces" } ] }, "nested_braces_interpolated": { "begin": "\\{", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ] }, "nested_brackets": { "begin": "\\[", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets" } ] }, "nested_brackets_interpolated": { "begin": "\\[", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ] }, "nested_ltgt": { "begin": "<", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": ">", "patterns": [ { "include": "#nested_ltgt" } ] }, "nested_ltgt_interpolated": { "begin": "<", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": ">", "patterns": [ { "include": "#variable" }, { "include": "#nested_ltgt_interpolated" } ] }, "nested_parens": { "begin": "\\(", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens" } ] }, "nested_parens_interpolated": { "begin": "\\(", "captures": { "1": { "name": "punctuation.section.scope.perl" } }, "end": "\\)", "patterns": [ { "comment": "This is to prevent thinks like qr/foo$/ to treat $/ as a variable", "match": "\\$(?=[^\\s\\w'\\{\\[\\(\\<])", "name": "keyword.control.anchor.perl" }, { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ] }, "pod": { "patterns": [ { "match": "^=(pod|back|cut)\\b", "name": "storage.type.class.pod.perl" }, { "begin": "^(=begin)\\s+(html)\\s*$", "beginCaptures": { "1": { "name": "storage.type.class.pod.perl" }, "2": { "name": "variable.other.pod.perl" } }, "contentName": "text.embedded.html.basic", "end": "^(=end)\\s+(html)|^(?==cut)", "endCaptures": { "1": { "name": "storage.type.class.pod.perl" }, "2": { "name": "variable.other.pod.perl" } }, "name": "meta.embedded.pod.perl", "patterns": [ { "include": "text.html.basic" } ] }, { "captures": { "1": { "name": "storage.type.class.pod.perl" }, "2": { "name": "variable.other.pod.perl", "patterns": [ { "include": "#pod-formatting" } ] } }, "match": "^(=(?:head[1-4]|item|over|encoding|begin|end|for))\\b\\s*(.*)" }, { "include": "#pod-formatting" } ] }, "pod-formatting": { "patterns": [ { "captures": { "1": { "name": "markup.italic.pod.perl" }, "2": { "name": "markup.italic.pod.perl" } }, "match": "I(?:<([^<>]+)>|<+(\\s+(?:(?<!\\s)>|[^>])+\\s+)>+)", "name": "entity.name.type.instance.pod.perl" }, { "captures": { "1": { "name": "markup.bold.pod.perl" }, "2": { "name": "markup.bold.pod.perl" } }, "match": "B(?:<([^<>]+)>|<+(\\s+(?:(?<!\\s)>|[^>])+\\s+)>+)", "name": "entity.name.type.instance.pod.perl" }, { "captures": { "1": { "name": "markup.raw.pod.perl" }, "2": { "name": "markup.raw.pod.perl" } }, "match": "C(?:<([^<>]+)>|<+(\\\\s+(?:(?<!\\\\s)>|[^>])+\\\\s+)>+)", "name": "entity.name.type.instance.pod.perl" }, { "captures": { "1": { "name": "markup.underline.link.hyperlink.pod.perl" } }, "match": "L<([^>]+)>", "name": "entity.name.type.instance.pod.perl" }, { "match": "[EFSXZ]<[^>]*>", "name": "entity.name.type.instance.pod.perl" } ] }, "variable": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)&(?![A-Za-z0-9_])", "name": "variable.other.regexp.match.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)`(?![A-Za-z0-9_])", "name": "variable.other.regexp.pre-match.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)'(?![A-Za-z0-9_])", "name": "variable.other.regexp.post-match.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)\\+(?![A-Za-z0-9_])", "name": "variable.other.regexp.last-paren-match.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)\"(?![A-Za-z0-9_])", "name": "variable.other.readwrite.list-separator.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)0(?![A-Za-z0-9_])", "name": "variable.other.predefined.program-name.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)[_ab\\*\\.\\/\\|,\\\\;#%=\\-~^:?!\\$<>\\(\\)\\[\\]@](?![A-Za-z0-9_])", "name": "variable.other.predefined.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$)[0-9]+(?![A-Za-z0-9_])", "name": "variable.other.subpattern.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "([\\$\\@\\%](#)?)([a-zA-Zx7f-xff\\$]|::)([a-zA-Z0-9_x7f-xff\\$]|::)*\\b", "name": "variable.other.readwrite.global.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" }, "2": { "name": "punctuation.definition.variable.perl" } }, "match": "(\\$\\{)(?:[a-zA-Zx7f-xff\\$]|::)(?:[a-zA-Z0-9_x7f-xff\\$]|::)*(\\})", "name": "variable.other.readwrite.global.perl" }, { "captures": { "1": { "name": "punctuation.definition.variable.perl" } }, "match": "([\\$\\@\\%](#)?)[0-9_]\\b", "name": "variable.other.readwrite.global.special.perl" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/pgsql.tmLanguage.json ================================================ { "foldingStopMarker": "^\\s*\\)", "foldingStartMarker": "\\s*\\(\\s*$", "repository": { "comments": { "patterns": [ { "match": "(--).*$\\n?", "name": "comment.line.double-dash.pgsql", "captures": { "1": { "name": "punctuation.definition.comment.pgsql" } } }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.c", "captures": { "0": { "name": "punctuation.definition.comment.pgsql" } } } ] }, "statement_create_other": { "begin": "(?i:^\\s*(create)\\s+(aggregate|collation|(?:default\\s+)?conversion|database|domain|extension(?:\\s+if\\s+not\\s+exists)?|foreign\\s+data\\s+wrapper|foreign\\s+table(?:\\s+if\\s+not\\s+exists)?|group|(?:unique\\s+)?index(?!\\s+on)(?:\\s+concurrently)?(?:\\s+if\\s+not\\s+exists)?|(?:or\\s+replace\\s+)?(?:trusted\\s+)?(?:procedural\\s+)?language|operator\\s+class|operator\\s+family|operator|policy|role|(?:or\\s+replace\\s+)?rule|schema(?:\\s+if\\s+not\\s+exists)?(?:\\s+authorization)?|(?:(?:temporary|temp)\\s+)?sequence(?:\\s+if\\s+not\\s+exists)?|server|(?:(?:global|local)\\s+)?(?:(?:temporary|temp)\\s+)?(?:unlogged\\s+)?table(?:\\s+if\\s+not\\s+exists)?|tablespace|text\\s+search\\s+configuration|text\\s+search\\s+dictionary|text\\s+search\\s+parser|text\\s+search\\s+template|(?:(?:constraint|event)\\s+)?trigger|type|user\\s+mapping\\s+for|user|materialized\\s+view(?:\\s+if\\s+not\\s+exists)?|(?:or\\s+replace\\s+)?(?:(?:temporary|temp)\\s+)?(?:recursive\\s+)?view)\\s+)(?:([\\w]+|\".+\")\\.)?([\\w]+|\".+\")(?=[\\(|\\s|\\;)])", "end": ";\\s*", "patterns": [ { "include": "#dollar_quotes" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#keywords" }, { "include": "#misc" } ], "name": "meta.statement.create.pgsql", "beginCaptures": { "3": { "name": "entity.other.inherited-class.pgsql" }, "1": { "name": "keyword.other.create.pgsql" }, "4": { "name": "entity.name.function.pgsql" }, "2": { "name": "keyword.other.pgsql" } } }, "statement_create_function_view": { "begin": "(?i)^\\s*(create)\\s+(or\\s+replace\\s+)?(function|view)\\s+(?:([\\w]+|\".+\")\\.)?([\\w]+|\".+\")(?:[\\(|\\s)])", "end": ";\\s*", "patterns": [ { "include": "#dollar_quotes" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#keywords" }, { "include": "#misc" }, { "include": "#vars" }, { "include": "#proc" } ], "name": "meta.statement.create.pgsql", "beginCaptures": { "3": { "name": "keyword.other.pgsql" }, "1": { "name": "keyword.other.create.pgsql" }, "4": { "name": "entity.other.inherited-class.pgsql" }, "2": { "name": "keyword.other.pgsql" }, "5": { "name": "entity.name.function.pgsql" } } }, "keywords": { "patterns": [ { "match": "(?xi)\\b(coalesce|nullif|greatest|least|abs|cbrt|ceil|ceiling|degrees|div|exp|floor|ln|log|mod|pi|power|radians|random|round|setseed|sign|sqrt|trunc|width_bucket|acos|asin|atan|atan2|cos|cot|sin|tan|bit_length|char_length|lower|octet_length|overlay|position|substring|trim|upper|ascii|btrim|chr|concat|concat_ws|convert|convert_from|convert_to|decode|encode|format|initcap|length|lpad|ltrim|md5|pg_client_encoding|quote_ident|quote_literal|quote_nullable|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|repeat|replace|reverse|rpad|rtrim|split_part|strpos|substr|to_ascii|to_hex|translate|get_bit|get_byte|set_bit|set_byte|to_char|to_date|to_number|to_timestamp|age|clock_timestamp|date_part|date_trunc|extract|isfinite|justify_days|justify_hours|justify_interval|make_date|make_interval|make_time|make_timestamp|make_timestamptz|now|statement_timestamp|timeofday|transaction_timestamp|enum_first|enum_last|enum_range|area|box|center|circle|diameter|height|isclosed|isopen|lseg|npoints|path|pclose|point|polygon|popen|radius|width|abbrev|abbrev|broadcast|family|host|hostmask|masklen|netmask|network|set_masklen|set_masklen|text|trunc|get_current_ts_config|numnode|plainto_tsquery|querytree|setweight|strip|to_tsquery|to_tsvector|ts_headline|ts_rank|ts_rank_cd|ts_rewrite|ts_rewrite|tsvector_update_trigger|tsvector_update_trigger_column|xmlattributes|xmlparse|xmlroot|xmlserialize|xmlcomment|xmlconcat|xmlelement|xmlforest|xmlpi|xmlexists|xml_is_well_formed|xml_is_well_formed_document|xml_is_well_formed_content|xpath|xpath_exists|table_to_xml|query_to_xml|cursor_to_xml|array_to_json|row_to_json|to_json|to_jsonb|json_array_length|jsonb_array_length|json_build_array|jsonb_build_array|json_build_object|jsonb_build_object|json_each|jsonb_each|json_each_text|jsonb_each_text|json_extract_path|jsonb_extract_path|json_extract_path_text|jsonb_extract_path_text|json_object|jsonb_object|json_object_keys|jsonb_object_keys|json_populate_record|jsonb_populate_record|json_populate_recordset|jsonb_populate_recordset|json_array_elements|jsonb_array_elements|json_array_elements_text|jsonb_array_elements_text|json_typeof|jsonb_typeof|json_to_record|jsonb_to_record|json_to_recordset|jsonb_to_recordset|json_strip_nulls|jsonb_strip_nulls|jsonb_pretty|jsonb_set|currval|lastval|nextval|setval|array_append|array_cat|array_ndims|array_dims|array_fill|array_length|array_lower|array_prepend|array_position|array_positions|array_remove|array_replace|array_to_string|array_upper|string_to_array|cardinality|unnest|isempty|lower_inc|upper_inc|lower_inf|upper_inf|generate_series|generate_subscripts|current_database|current_query|current_schema|current_schemas)\\b\\s*\\(", "captures": { "1": { "name": "support.function.pgsql" } } }, { "match": "(?xi)\\b(pg_sleep|pg_sleep_for|pg_sleep_until|inet_client_addr|inet_client_port|inet_server_addr|inet_server_port|pg_backend_pid|pg_conf_load_time|pg_is_other_temp_schema|pg_listening_channels|pg_my_temp_schema|pg_postmaster_start_time|pg_trigger_depth|version|txid_current|txid_current_snapshot|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|current_setting|set_config|pg_cancel_backend|pg_reload_conf|pg_replication_origin_create|pg_replication_origin_drop|pg_replication_origin_session_setup|pg_replication_origin_xact_setup|pg_replication_origin_progress|pg_replication_origin_session_progress|pg_rotate_logfile|pg_terminate_backend|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_start_backup|pg_stop_backup|pg_is_in_backup|pg_backup_start_time|pg_switch_xlog|pg_xact_commit_timestamp|pg_xlogfile_name|pg_xlogfile_name_offset|pg_xlog_location_diff|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|pg_has_role|pg_collation_is_visible|pg_conversion_is_visible|pg_function_is_visible|pg_opclass_is_visible|pg_operator_is_visible|pg_opfamily_is_visible|pg_table_is_visible|pg_ts_config_is_visible|pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|format_type|pg_describe_object|pg_identify_object|pg_identify_object_as_address|pg_get_constraintdef|pg_get_expr|pg_get_functiondef|pg_get_function_arguments|pg_get_function_identity_arguments|pg_get_function_result|pg_get_indexdef|pg_get_keywords|pg_get_object_address|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_options_to_table|pg_tablespace_databases|pg_tablespace_location|pg_typeof|to_regclass|to_regproc|to_regprocedure|to_regoper|to_regoperator|to_regtype|col_description|obj_description|shobj_description|pg_is_in_recovery|pg_last_committed_xact|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_last_xact_replay_timestamp|pg_is_xlog_replay_paused|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_export_snapshot|pg_column_size|pg_database_size|pg_indexes_size|pg_relation_size|pg_size_pretty|pg_table_size|pg_tablespace_size|pg_total_relation_size|pg_relation_filenode|pg_relation_filepath|pg_filenode_relation|pg_ls_dir|pg_read_file|pg_read_binary_file|pg_stat_file|pg_stat_get_snapshot_timestamp|pg_advisory_lock|pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|pg_try_advisory_lock|pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|suppress_redundant_updates_trigger|pg_event_trigger_ddl_commands|pg_event_trigger_dropped_objects)\\b\\s*\\(", "captures": { "1": { "name": "support.function.pgsql" } } }, { "match": "(?xi)\\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg|corr|covar_pop|covar_samp|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|stddev|stddev_pop|stddev_samp|variance|var_pop|var_samp|mode|percentile_cont|percentile_disc|row_number|rank|dense_rank|percent_rank|cume_dist|ntile|lag|lead|first_value|last_value|nth_value)\\b\\s*\\(", "captures": { "1": { "name": "support.function.pgsql" } } }, { "match": "(?i)\\b(current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|session_user|localtime|localtimestamp)\\b", "name": "support.function.pgsql" }, { "match": "(?i)\\b(aclitem|anyelement|anyarray|anynonarray|anyenum|anyrange|cstring|internal|language_handler|fdw_handler|void|opaque|smallint|integer|int|bigint|int2|int4|int8|numeric|decimal|dec|double(?:\\s+precision)?|real|float|float4|float8|smallserial|serial|bigserial|text|varchar|character\\s+varying|char|character|bpchar|name|bytea|bool|boolean|date|time|timestamp|with(out)?\\s+time\\s+zone|timetz|timestamptz|tinterval|interval|point|lseg|box|line|path|polygon|circle|cidr|inet|macaddr|bit|varbit|bit\\s+varying|tsvector|tsquery|uuid|xml|json|jsonb|txid_snapshot|money|oid|oidvector|int2range|int4range|int8range|numrange|tsrange|tstzrange|daterange|event_trigger|cid|xid|tid|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|reltime|abstime|record)\\b", "name": "storage.type.pgsql" }, { "match": "(?xi)\\b(abort|access\\s+share|access\\s+exclusive|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|array|as|as\\s+assignment|as\\s+implicit|asc|asymmetric|at|at\\s+time\\s+zone|attribute|authorization|before|begin|between|by|bypassrls|cache|called\\s+on\\s+null\\s+input|null\\s+on\\s+null\\s+input|strict|is\\s+null|not\\s+null|is\\s+true|is\\s+not\\s+true|is\\s+false|is\\s+not\\s+false|cascade|case|cast|characteristics|check|checkpoint|close|cluster|collate|collation|column|comment|comments|commit|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|createdb|createrole|createuser|cross\\s+join|csv|cube|current|cursor|cycle|data|database|day|ddl_command_start|ddl_command_end|deallocate|declare|default|defaults|deferrable|deferred|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|family|absolute|relative|prior|backward|forward|fetch|fillfactor|first|following|for|force|foreign|freeze|from|full|function|all\\s+functions|on\\s+functions|global|grant|group|grouping\\s+sets|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|in|including|increment|index|indexes|inherit|inherits|initially\\s+deferred|initially\\s+immediate|inline|inner|inout|input|insensitive|insert|instead|intersect|into|is|isnull|isolation\\s+level|join|key|label|language|last|lateral|lc_collate|lc_ctype|left|like|limit|listen|load|local|locale|location|lock|logged|login|mapping|match|materialized|maxvalue|minute|minvalue|mode|month|move|names|natural|next|no\\s+action|no|none|nobypassrls|nocreatedb|nocreaterole|nocreateuser|noinherit|nologin|noreplication|nosuperuser|not|nothing|notify|notnull|nowait|nullif|nulls|of|off|offset|oids|on\\s+conflict|on|only|operator\\s+class|operator|option|options|or|order|out|outer\\s+join|over|overlaps|owned|owner|parser|partial|partition|password|plans|plpgsql|policy|position|preceding|prepare|prepared|preserve\\s+rows|primary|privileges|procedural|procedure|program|quote|range|read\\s+committed|read\\s+uncommitted|read|reassign|recheck|recursive|refcursor|references|refresh|reindex|release|rename|repeatable|replace|replica|replication|reset|restart|restrict|returning|returns|revoke|right|role|rollback|rollup|row\\s+level|row|rows|rule|savepoint|schema|scroll|search|second|security\\s+definer|security\\s+invoker|security|select|session_user|sequence|sequences|serializable|server|session|set|setof|share|show|similar|simple|skip\\s+locked|some|stable|start|statement|statistics|stdin|stdout|storage|symmetric|system|sql|sql_drop|superuser|table|tables|tablesample\\s+bernoulli|tablesample\\s+system|tablesample|tablespace|temp|template|temporary|then|to|trailing|transaction|transform|trigger|trim|truncate|trusted|type|unbounded\\s+preceding|unbounded\\s+following|unencrypted|union|unique|unknown|unlisten|unlogged|update|user|using|vacuum|valid\\s+until|valid|validate|validator|value|values|variadic|verbose|version|view|volatile|when\\s+tag|when|where|window|with\\s+cascaded|with\\s+ordinality|with|within|without|work|wrapper|write|year|yes|parallel\\s+(unsafe|restricted|safe)|leakproof|filter)\\b", "captures": { "1": { "name": "keyword.other.pgsql" } } } ] }, "statement_commands": { "begin": "(?i:^\\s*(abort|alter|analyze|begin|checkpoint|close|cluster|comment|commit|copy|create|deallocate|declare|delete|discard|do|drop|end|execute|explain|fetch|grant|import|insert|listen|load|lock|move|notify|prepare|reassign|refresh|reindex|release|reset|revoke|rollback|savepoint|security|select|set|show|start|table|truncate|unlisten|update|vacuum|values|with))", "end": ";\\s*", "patterns": [ { "include": "#dollar_quotes" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#keywords" }, { "include": "#misc" } ], "name": "meta.statement.pgsql", "beginCaptures": { "1": { "name": "keyword.other.pgsql" } } }, "dollar_quotes": { "patterns": [ { "end": "\\1", "begin": "(\\$[\\w_]*\\$)(?=\\s*[-\\/\\n\\r]+)", "beginCaptures": { "1": { "name": "punctuation.dollar-quote.begin.pgsql" } }, "contentName": "meta.dollar-quote.pgsql", "patterns": [ { "include": "#dollar_quotes" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#statement_create_function_view" }, { "include": "#statement_create_other" }, { "include": "#keywords" }, { "include": "#misc" }, { "include": "#vars" }, { "include": "#proc" } ], "comment": "Assume multiline dollar quote is SQL body! Start if double dollar quote is followed by comment (-- or /**/) or linebreak (\n or \n). See match for dollar quotes as string: string.unquoted.dollar.pgsql. This could easily support other PL languages like PHP and Ruby -- see PHP heredoc as an example.", "endCaptures": { "0": { "name": "punctuation.dollar-quote.end.pgsql" } } } ] }, "misc": { "patterns": [ { "match": "\\b\\d+\\b", "name": "constant.numeric.pgsql" }, { "match": "->>|->|#>>|#>", "name": "keyword.operator.json.pgsql" }, { "match": "\\?&|\\?\\||\\?", "name": "keyword.operator.jsonb.pgsql" }, { "match": "~|~\\*!~|!~\\*", "name": "keyword.operator.regex.pgsql" }, { "match": "@@|&&|!!|@>|<@", "name": "keyword.operator.tsearch.pgsql" }, { "match": "\\*", "name": "keyword.operator.star.pgsql" }, { "match": "[!<>]?=|<>|<|>", "name": "keyword.operator.comparison.pgsql" }, { "match": "-|\\+|/|\\^", "name": "keyword.operator.math.pgsql" }, { "match": "\\|\\|", "name": "keyword.operator.concatenator.pgsql" }, { "match": "::", "name": "keyword.operator.cast.pgsql" }, { "match": "(?i)\\b(true|false|null)\\b", "name": "constant.language.pgsql" } ] }, "string_escape": { "match": "\\\\.", "name": "constant.character.escape.pgsql" }, "vars": { "patterns": [ { "match": "(?i)\\b(_[-a-z0-9_]+)\\b", "name": "variable.parameter.pgsql" }, { "match": "(?i)\\b(p(i|t|b|n|c|d|r|ia|iv(?:al)?)_[-a-z0-9_]+)\\b", "name": "variable.parameter.pgsql" }, { "match": "(?i)\\b(v(i|t|b|n|c|d|r|ia|iv(?:al)?)_[-a-z0-9_]+)\\b", "name": "variable.parameter.pgsql" } ] }, "strings": { "patterns": [ { "match": "(')[^'\\\\]*(')", "comment": "This is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "name": "string.quoted.single.pgsql", "captures": { "1": { "name": "punctuation.definition.string.begin.pgsql" }, "3": { "name": "punctuation.definition.string.end.pgsql" } } }, { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.pgsql" } }, "patterns": [{ "include": "#string_escape" }], "comment": "Need to implement escape rule with two single quotes in a row. Lots of other escaping issues with single quotes.", "endCaptures": { "0": { "name": "punctuation.definition.string.end.pgsql" } }, "name": "string.quoted.single.pgsql" }, { "comment": "Double quoting treated like strings, but they are really identifiers.", "match": "(\")[^\"#]*(\")", "name": "variable.other.pgsql" }, { "begin": "(\\$[\\w_]*\\$)", "end": "\\1", "comment": "Color double dollar quotes as a string Only if not followed by comment or linebreak, see meta.dollar-quote.pgsql.", "name": "string.unquoted.dollar.pgsql" } ] }, "proc": { "patterns": [ { "match": "(?xi)\\b(case|continue|else|elseif|elsif|exit|for|foreach|if|loop|return(?:(?:\\s+next)|(?:\\s+query))?|slice|then|when|while|reverse)\\b", "name": "keyword.control.proc.pgsql" }, { "match": "(?xi)\\b(alias|begin|constant|declare|end|exception|execute|get\\s+(?:stacked\\s+)?diagnostics|perform|raise|using|message|detail|hint|errcode|debug|log|info|notice|warning)\\b", "name": "keyword.other.proc.pgsql" }, { "match": "(?xi)\\b(found|sqlerrm|sqlstate|new|old|tg_name|tg_when|tg_level|tg_op|tg_relid|tg_relname|tg_table_name|tg_table_schema|tg_nargs|tg_argv|tg_event|tg_tag)\\b", "name": "support.function.proc.pgsql" }, { "match": "(?i)\\b([-a-z0-9_.]+%(row)?type)\\b", "name": "storage.type.proc.pgsql" }, { "match": "\\$\\d+", "name": "variable.parameter.pgsql" } ] } }, "fileTypes": ["sql", "pgsql", "psql"], "uuid": "4D6B679D-111C-4529-B558-3F25487D9E27", "patterns": [ { "include": "#comments" }, { "include": "#statement_create_function_view" }, { "include": "#statement_create_other" }, { "include": "#statement_commands" }, { "begin": "^(\\\\[\\S]+)", "end": "\\n", "comment": "psql directives", "name": "meta.statement.pgsql.psql", "beginCaptures": { "0": { "name": "meta.preprocessor.pgsql" } } } ], "name": "SQL (PostgreSQL)", "scopeName": "source.pgsql" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/php-blade.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "scopeName": "text.html.php.blade", "name": "Blade", "fileTypes": ["blade.php"], "firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n php\\d?\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n php\n (?=[\\s;]|(?<![-*])-\\*-).*?-\\*-\n |\n # Vim\n (?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n (?:php|phtml)\n (?=\\s|:|$)\n)", "foldingStartMarker": "(/\\*|\\{\\s*$|<<<HTML)", "foldingStopMarker": "(\\*/|^\\s*\\}|^HTML;)", "injections": { "text.html.php.blade - (meta.embedded | meta.tag | comment.block.blade), L:(text.html.php.blade meta.tag - comment.block.blade), L:(source.js.embedded.html - comment.block.blade)": { "patterns": [ { "begin": "{{--", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.blade" } }, "end": "--}}", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.blade" } }, "name": "comment.block.blade", "patterns": [ { "name": "invalid.illegal.php-code-in-comment.blade", "begin": "(^\\s*)(?=<\\?(?![^?]*\\?>))", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.php" } }, "end": "(?!\\G)(\\s*$\\n)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.php" } }, "patterns": [ { "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "name": "meta.embedded.block.php", "patterns": [ { "include": "#language" } ] } ] }, { "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.block.php", "patterns": [ { "include": "#language" } ] }, { "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" } }, "name": "invalid.illegal.php-code-in-comment.blade.meta.embedded.line.php", "patterns": [ { "captures": { "1": { "name": "source.php" }, "2": { "name": "punctuation.section.embedded.end.php" }, "3": { "name": "source.php" } }, "match": "\\G(\\s*)((\\?))(?=>)", "name": "meta.special.empty-tag.php" }, { "begin": "\\G", "contentName": "source.php", "end": "(\\?)(?=>)", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "patterns": [ { "include": "#language" } ] } ] } ] }, { "begin": "(?<!@){{{", "beginCaptures": { "0": { "name": "support.function.construct.begin.blade" } }, "contentName": "source.php", "end": "(})}}", "endCaptures": { "0": { "name": "support.function.construct.end.blade" }, "1": { "name": "source.php" } }, "name": "meta.function.echo.blade", "patterns": [ { "include": "#language" } ] }, { "begin": "(?<![@{]){{", "beginCaptures": { "0": { "name": "support.function.construct.begin.blade" } }, "contentName": "source.php", "end": "(})}", "endCaptures": { "0": { "name": "support.function.construct.end.blade" }, "1": { "name": "source.php" } }, "name": "meta.function.echo.blade", "patterns": [ { "include": "#language" } ] }, { "begin": "(?<!@){!!", "beginCaptures": { "0": { "name": "support.function.construct.begin.blade" } }, "contentName": "source.php", "end": "(!)!}", "endCaptures": { "0": { "name": "support.function.construct.end.blade" }, "1": { "name": "source.php" } }, "name": "meta.function.echo.blade", "patterns": [ { "include": "#language" } ] }, { "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n auth\n |break\n |can\n |cannot\n |case\n |choice\n |component\n |continue\n |each\n |elsecan\n |elsecannot\n |elseif\n |empty\n |extends\n |for\n |foreach\n |forelse\n |guest\n |hassection\n |if\n |include\n |includefirst\n |includeif\n |includewhen\n |inject\n |isset\n |json\n |lang\n |php\n |prepend\n |push\n |section\n |slot\n |stack\n |switch\n |unless\n |unset\n |while\n |yield\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses", "beginCaptures": { "1": { "name": "keyword.blade" }, "2": { "name": "begin.bracket.round.blade.php" } }, "contentName": "source.php", "end": "\\)", "endCaptures": { "0": { "name": "end.bracket.round.blade.php" } }, "name": "meta.directive.blade", "patterns": [ { "include": "#language" } ] }, { "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i: # Ordering not important as we everything will be matched up to opening parentheses\n append\n |default\n |else\n |endauth\n |endcan\n |endcannot\n |endcomponent\n |endempty\n |endfor\n |endforeach\n |endforelse\n |endguest\n |endif\n |endisset\n |endlang\n |endprepend\n |endpush\n |endsection\n |endslot\n |endswitch\n |endunless\n |endwhile\n |overwrite\n |parent\n |show\n |stop\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses", "beginCaptures": { "1": { "name": "keyword.blade" }, "2": { "name": "begin.bracket.round.blade.php" } }, "contentName": "comment.blade", "end": "\\)", "endCaptures": { "0": { "name": "end.bracket.round.blade.php" } }, "name": "meta.directive.blade", "patterns": [ { "include": "#balance_brackets" } ] }, { "match": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)append\n|(?i)auth\n|(?i)break\n|(?i)continue\n|(?i)default\n|(?i)else\n|(?i)empty\n|(?i)endauth\n|(?i)endcan\n|(?i)endcannot\n|(?i)endcomponent\n|(?i)endempty\n|(?i)endfor\n|(?i)endforeach\n|(?i)endforelse\n|(?i)endguest\n|(?i)endif\n|(?i)endisset\n|(?i)endlang\n|(?i)endprepend\n|(?i)endpush\n|(?i)endsection\n|(?i)endslot\n|(?i)endswitch\n|(?i)endunless\n|endverbatim\n|(?i)endwhile\n|(?i)guest\n|(?i)lang\n|(?i)overwrite\n|(?i)parent\n|(?i)show\n|(?i)stop\n|verbatim\n)\n\\b", "name": "keyword.blade" }, { "begin": "(?<![A-Za-z0-9_@])@(?i:php)\\b", "end": "(?<![A-Za-z0-9_@])(?=@(?i:endphp)\\b)", "beginCaptures": { "0": { "name": "keyword.begin.blade" } }, "endCaptures": { "0": { "name": "keyword.end.blade" } }, "contentName": "source.php", "name": "meta.embedded.block.blade", "patterns": [ { "include": "#language" } ] }, { "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n (?i:\n endphp\n )\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses", "beginCaptures": { "1": { "name": "keyword.end.blade" }, "2": { "name": "begin.bracket.round.blade.php" } }, "contentName": "comment.blade", "end": "\\)", "endCaptures": { "0": { "name": "end.bracket.round.blade.php" } }, "name": "meta.directive.blade", "patterns": [ { "include": "#balance_brackets" } ] }, { "match": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n(?: # Ordering not important as we everything will be matched up to word boundary\n (?i)endphp\n)\n\\b", "name": "keyword.end.blade" }, { "begin": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n(\n @\n \\w+(?:::w+)? # Any number/letter sequence, can also be postfixed by ::someOtherString\n [\\t ]* # Whitespace between name and parentheses\n)\n(\\() # Followed by opening parentheses", "beginCaptures": { "1": { "name": "entity.name.function.blade" }, "2": { "name": "begin.bracket.round.blade.php" } }, "contentName": "source.php", "end": "\\)", "endCaptures": { "0": { "name": "end.bracket.round.blade.php" } }, "name": "meta.directive.custom.blade", "patterns": [ { "include": "#language" } ] }, { "match": "(?x)\n(?<![A-Za-z0-9_@]) # Prepended @ or literal character escapes the sequence\n@\n\\w+(?:::w+)? # Any number/letter sequence, can also be postfixed by ::someOtherString\n\\b # Bounded by word boundary", "name": "entity.name.function.blade" }, { "begin": "(^\\s*)(?=<\\?(?![^?]*\\?>))", "beginCaptures": { "0": { "name": "punctuation.whitespace.embedded.leading.php" } }, "end": "(?!\\G)(\\s*$\\n)?", "endCaptures": { "0": { "name": "punctuation.whitespace.embedded.trailing.php" } }, "patterns": [ { "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "name": "meta.embedded.block.php", "patterns": [ { "include": "#language" } ] } ] }, { "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "name": "meta.embedded.block.php", "patterns": [ { "include": "#language" } ] }, { "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" } }, "name": "meta.embedded.line.php", "patterns": [ { "captures": { "1": { "name": "source.php" }, "2": { "name": "punctuation.section.embedded.end.php" }, "3": { "name": "source.php" } }, "match": "\\G(\\s*)((\\?))(?=>)", "name": "meta.special.empty-tag.php" }, { "begin": "\\G", "contentName": "source.php", "end": "(\\?)(?=>)", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "patterns": [ { "include": "#language" } ] } ] } ] } }, "patterns": [ { "include": "text.html.basic" } ], "repository": { "balance_brackets": { "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#balance_brackets" } ] }, { "match": "[^()]+" } ] }, "class-builtin": { "patterns": [ { "match": "(?xi)\n(\\\\)?\\b\n((APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b", "name": "support.class.builtin.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } } ] }, "class-name": { "patterns": [ { "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)", "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", "endCaptures": { "1": { "name": "support.class.php" } }, "patterns": [ { "include": "#namespace" } ] }, { "include": "#class-builtin" }, { "begin": "(?=[\\\\a-zA-Z_])", "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])", "endCaptures": { "1": { "name": "support.class.php" } }, "patterns": [ { "include": "#namespace" } ] } ] }, "comments": { "patterns": [ { "begin": "/\\*\\*(?=\\s)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "name": "comment.block.documentation.phpdoc.php", "patterns": [ { "include": "#php_doc" } ] }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\*/", "name": "comment.block.php" }, { "begin": "(^\\s+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\n|(?=\\?>)", "name": "comment.line.double-slash.php" } ] }, { "begin": "(^\\s+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\n|(?=\\?>)", "name": "comment.line.number-sign.php" } ] } ] }, "constants": { "patterns": [ { "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", "name": "constant.language.php" }, { "match": "(?x)\n(\\\\)?\\b\n(DEFAULT_INCLUDE_PATH\n|EAR_(INSTALL|EXTENSION)_DIR\n|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|DEPRECATED|ERROR|NOTICE\n |PARSE|RECOVERABLE_ERROR|STRICT|USER_(DEPRECATED|ERROR|NOTICE|WARNING)|WARNING)\n|PHP_(ROUND_HALF_(DOWN|EVEN|ODD|UP)|(MAJOR|MINOR|RELEASE)_VERSION|MAXPATHLEN\n |BINDIR|SHLIB_SUFFIX|SYSCONFDIR|SAPI|CONFIG_FILE_(PATH|SCAN_DIR)\n |INT_(MAX|SIZE)|ZTS|OS|OUTPUT_HANDLER_(START|CONT|END)|DEBUG|DATADIR\n |URL_(SCHEME|HOST|USER|PORT|PASS|PATH|QUERY|FRAGMENT)|PREFIX\n |EXTRA_VERSION|EXTENSION_DIR|EOL|VERSION(_ID)?\n |WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)\n |VERSION_(MAJOR|MINOR)|BUILD|SUITEMASK|SP_(MAJOR|MINOR)\n |PRODUCTTYPE|PLATFORM)\n |LIBDIR|LOCALSTATEDIR)\n|STD(ERR|IN|OUT)|ZEND_(DEBUG_BUILD|THREAD_SAFE))\n\\b", "name": "support.constant.core.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?x)\n(\\\\)?\\b\n(__COMPILER_HALT_OFFSET__|AB(MON_(1|2|3|4|5|6|7|8|9|10|11|12)|DAY[1-7])\n|AM_STR|ASSERT_(ACTIVE|BAIL|CALLBACK_QUIET_EVAL|WARNING)|ALT_DIGITS\n|CASE_(UPPER|LOWER)|CHAR_MAX|CONNECTION_(ABORTED|NORMAL|TIMEOUT)|CODESET|COUNT_(NORMAL|RECURSIVE)\n|CREDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)\n|CRYPT_(BLOWFISH|EXT_DES|MD5|SHA(256|512)|SALT_LENGTH|STD_DES)|CURRENCY_SYMBOL\n|D_(T_)?FMT|DATE_(ATOM|COOKIE|ISO8601|RFC(822|850|1036|1123|2822|3339)|RSS|W3C)\n|DAY_[1-7]|DECIMAL_POINT|DIRECTORY_SEPARATOR\n|ENT_(COMPAT|IGNORE|(NO)?QUOTES)|EXTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|REFS|SKIP)\n|ERA(_(D_(T_)?FMT)|T_FMT|YEAR)?|FRAC_DIGITS|GROUPING|HASH_HMAC|HTML_(ENTITIES|SPECIALCHARS)\n|INF|INFO_(ALL|CREDITS|CONFIGURATION|ENVIRONMENT|GENERAL|LICENSEMODULES|VARIABLES)\n|INI_(ALL|CANNER_(NORMAL|RAW)|PERDIR|SYSTEM|USER)|INT_(CURR_SYMBOL|FRAC_DIGITS)\n|LC_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|LOCK_(EX|NB|SH|UN)\n|LOG_(ALERT|AUTH(PRIV)?|CRIT|CRON|CONS|DAEMON|DEBUG|EMERG|ERR|INFO|LOCAL[1-7]|LPR|KERN|MAIL\n |NEWS|NODELAY|NOTICE|NOWAIT|ODELAY|PID|PERROR|WARNING|SYSLOG|UCP|USER)\n|M_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRT)?PI|PI(_(2|4))?|E(ULER)?|LN(10|2|PI)|LOG(10|2)E)\n|MON_(1|2|3|4|5|6|7|8|9|10|11|12|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)\n|N_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|NAN|NEGATIVE_SIGN|NO(EXPR|STR)\n|P_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|PM_STR|POSITIVE_SIGN\n|PATH(_SEPARATOR|INFO_(EXTENSION|(BASE|DIR|FILE)NAME))|RADIXCHAR\n|SEEK_(CUR|END|SET)|SORT_(ASC|DESC|LOCALE_STRING|REGULAR|STRING)|STR_PAD_(BOTH|LEFT|RIGHT)\n|T_FMT(_AMPM)?|THOUSEP|THOUSANDS_SEP\n|UPLOAD_ERR_(CANT_WRITE|EXTENSION|(FORM|INI)_SIZE|NO_(FILE|TMP_DIR)|OK|PARTIAL)\n|YES(EXPR|STR))\n\\b", "name": "support.constant.std.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?x)\n(\\\\)?\\b\n(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)\n|XML_(SAX_IMPL|(DTD|DOCUMENT(_(FRAG|TYPE))?|HTML_DOCUMENT|NOTATION|NAMESPACE_DECL|PI|COMMENT|DATA_SECTION|TEXT)_NODE\n |OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)\n |ERROR_((BAD_CHAR|(ATTRIBUTE_EXTERNAL|BINARY|PARAM|RECURSIVE)_ENTITY)_REF|MISPLACED_XML_PI|SYNTAX|NONE\n |NO_(MEMORY|ELEMENTS)|TAG_MISMATCH|INCORRECT_ENCODING|INVALID_TOKEN|DUPLICATE_ATTRIBUTE\n |UNCLOSED_(CDATA_SECTION|TOKEN)|UNDEFINED_ENTITY|UNKNOWN_ENCODING|JUNK_AFTER_DOC_ELEMENT\n |PARTIAL_CHAR|EXTERNAL_ENTITY_HANDLING|ASYNC_ENTITY)\n |ENTITY_(((REF|DECL)_)?NODE)|ELEMENT(_DECL)?_NODE|LOCAL_NAMESPACE|ATTRIBUTE_(NMTOKEN(S)?|NOTATION|NODE)\n |CDATA|ID(REF(S)?)?|DECL_NODE|ENTITY|ENUMERATION)\n|MHASH_(RIPEMD(128|160|256|320)|GOST|MD(2|4|5)|SHA(1|224|256|384|512)|SNEFRU256|HAVAL(128|160|192|224|256)\n |CRC23(B)?|TIGER(128|160)?|WHIRLPOOL|ADLER32)\n|MYSQL_(BOTH|NUM|CLIENT_(SSL|COMPRESS|IGNORE_SPACE|INTERACTIVE|ASSOC))\n|MYSQLI_(REPORT_(STRICT|INDEX|OFF|ERROR|ALL)|REFRESH_(GRANT|MASTER|BACKUP_LOG|STATUS|SLAVE|HOSTS|THREADS|TABLES|LOG)\n |READ_DEFAULT_(FILE|GROUP)|(GROUP|MULTIPLE_KEY|BINARY|BLOB)_FLAG|BOTH\n |STMT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|STORE_RESULT\n |SERVER_QUERY_(NO_((GOOD_)?INDEX_USED)|WAS_SLOW)|SET_(CHARSET_NAME|FLAG)\n |NO_(DEFAULT_VALUE_FLAG|DATA)|NOT_NULL_FLAG|NUM(_FLAG)?\n |CURSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)\n |CLIENT_(SSL|NO_SCHEMA|COMPRESS|IGNORE_SPACE|INTERACTIVE|FOUND_ROWS)\n |TYPE_(GEOMETRY|((MEDIUM|LONG|TINY)_)?BLOB|BIT|SHORT|STRING|SET|YEAR|NULL|NEWDECIMAL|NEWDATE|CHAR\n |TIME(STAMP)?|TINY|INT24|INTERVAL|DOUBLE|DECIMAL|DATE(TIME)?|ENUM|VAR_STRING|FLOAT|LONG(LONG)?)\n |TIME_STAMP_FLAG|INIT_COMMAND|ZEROFILL_FLAG|ON_UPDATE_NOW_FLAG\n |OPT_(NET_((CMD|READ)_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE)\n |DEBUG_TRACE_ENABLED|DATA_TRUNCATED|USE_RESULT|(ENUM|(PART|PRI|UNIQUE)_KEY|UNSIGNED)_FLAG\n |ASSOC|ASYNC|AUTO_INCREMENT_FLAG)\n|MCRYPT_(RC(2|6)|RIJNDAEL_(128|192|256)|RAND|GOST|XTEA|MODE_(STREAM|NOFB|CBC|CFB|OFB|ECB)|MARS\n |BLOWFISH(_COMPAT)?|SERPENT|SKIPJACK|SAFER(64|128|PLUS)|CRYPT|CAST_(128|256)|TRIPLEDES|THREEWAY\n |TWOFISH|IDEA|(3)?DES|DECRYPT|DEV_(U)?RANDOM|PANAMA|ENCRYPT|ENIGNA|WAKE|LOKI97|ARCFOUR(_IV)?)\n|STREAM_(REPORT_ERRORS|MUST_SEEK|MKDIR_RECURSIVE|BUFFER_(NONE|FULL|LINE)|SHUT_(RD)?WR\n |SOCK_(RDM|RAW|STREAM|SEQPACKET|DGRAM)|SERVER_(BIND|LISTEN)\n |NOTIFY_(REDIRECTED|RESOLVE|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|COMPLETED|CONNECT|PROGRESS\n |FILE_SIZE_IS|FAILURE|AUTH_(REQUIRED|RESULT))\n |CRYPTO_METHOD_((SSLv2(3)?|SSLv3|TLS)_(CLIENT|SERVER))|CLIENT_((ASYNC_)?CONNECT|PERSISTENT)\n |CAST_(AS_STREAM|FOR_SELECT)|(IGNORE|IS)_URL|IPPROTO_(RAW|TCP|ICMP|IP|UDP)|OOB\n |OPTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER)|URL_STAT_(LINK|QUIET)|USE_PATH\n |PEEK|PF_(INET(6)?|UNIX)|ENFORCE_SAFE_MODE|FILTER_(ALL|READ|WRITE))\n|SUNFUNCS_RET_(DOUBLE|STRING|TIMESTAMP)\n|SQLITE_(READONLY|ROW|MISMATCH|MISUSE|BOTH|BUSY|SCHEMA|NOMEM|NOTFOUND|NOTADB|NOLFS|NUM|CORRUPT\n |CONSTRAINT|CANTOPEN|TOOBIG|INTERRUPT|INTERNAL|IOERR|OK|DONE|PROTOCOL|PERM|ERROR|EMPTY\n |FORMAT|FULL|LOCKED|ABORT|ASSOC|AUTH)\n|SQLITE3_(BOTH|BLOB|NUM|NULL|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT_ASSOC)\n|CURL(M_(BAD_((EASY)?HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|OUT_OF_MEMORY|OK)\n |MSG_DONE|SSH_AUTH_(HOST|NONE|DEFAULT|PUBLICKEY|PASSWORD|KEYBOARD)\n |CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC)\n |INFO_(REDIRECT_(COUNT|TIME)|REQUEST_SIZE|SSL_VERIFYRESULT|STARTTRANSFER_TIME\n |(SIZE|SPEED)_(DOWNLOAD|UPLOAD)|HTTP_CODE|HEADER_(OUT|SIZE)|NAMELOOKUP_TIME\n |CONNECT_TIME|CONTENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD))|CERTINFO|TOTAL_TIME\n |PRIVATE|PRETRANSFER_TIME|EFFECTIVE_URL|FILETIME)\n |OPT_(RESUME_FROM|RETURNTRANSFER|REDIR_PROTOCOLS|REFERER|READ(DATA|FUNCTION)|RANGE|RANDOM_FILE\n |MAX(CONNECTS|REDIRS)|BINARYTRANSFER|BUFFERSIZE\n |SSH_(HOST_PUBLIC_KEY_MD5|(PRIVATE|PUBLIC)_KEYFILE)|AUTH_TYPES)\n |SSL(CERT(TYPE|PASSWD)?|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?)\n |SSL_(CIPHER_LIST|VERIFY(HOST|PEER))\n |STDERR|HTTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)\n |HEADER(FUNCTION)?|NO(BODY|SIGNAL|PROGRESS)|NETRC|CRLF|CONNECTTIMEOUT(_MS)?\n |COOKIE(SESSION|JAR|FILE)?|CUSTOMREQUEST|CERTINFO|CLOSEPOLICY|CA(INFO|PATH)|TRANSFERTEXT\n |TCP_NODELAY|TIME(CONDITION|OUT(_MS)?|VALUE)|INTERFACE|INFILE(SIZE)?|IPRESOLVE\n |DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|URL|USER(AGENT|PWD)|UNRESTRICTED_AUTH|UPLOAD\n |PRIVATE|PROGRESSFUNCTION|PROXY(TYPE|USERPWD|PORT|AUTH)?|PROTOCOLS|PORT\n |POST(REDIR|QUOTE|FIELDS)?|PUT|EGDSOCKET|ENCODING|VERBOSE|KRB4LEVEL|KEYPASSWD|QUOTE|FRESH_CONNECT\n |FTP(APPEND|LISTONLY|PORT|SSLAUTH)\n |FTP_(SSL|SKIP_PASV_IP|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)\n |FILE(TIME)?|FORBID_REUSE|FOLLOWLOCATION|FAILONERROR|WRITE(FUNCTION|HEADER)|LOW_SPEED_(LIMIT|TIME)\n |AUTOREFERER)\n |PROXY_(HTTP|SOCKS(4|5))|PROTO_(SCP|SFTP|HTTP(S)?|TELNET|TFTP|DICT|FTP(S)?|FILE|LDAP(S)?|ALL)\n |E_((RECV|READ)_ERROR|GOT_NOTHING|MALFORMAT_USER\n |BAD_(CONTENT_ENCODING|CALLING_ORDER|PASSWORD_ENTERED|FUNCTION_ARGUMENT)\n |SSH|SSL_(CIPHER|CONNECT_ERROR|CERTPROBLEM|CACERT|PEER_CERTIFICATE|ENGINE_(NOTFOUND|SETFAILED))\n |SHARE_IN_USE|SEND_ERROR|HTTP_(RANGE_ERROR|NOT_FOUND|PORT_FAILED|POST_ERROR)\n |COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|TOO_MANY_REDIRECTS|TELNET_OPTION_SYNTAX|OBSOLETE\n |OUT_OF_MEMORY|OPERATION|TIMEOUTED|OK|URL_MALFORMAT(_USER)?|UNSUPPORTED_PROTOCOL\n |UNKNOWN_TELNET_OPTION|PARTIAL_FILE\n |FTP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|COULDNT_(RETR_FILE|GET_SIZE|STOR_FILE|SET_(BINARY|ASCII)|USE_REST)\n |CANT_(GET_HOST|RECONNECT)|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|WRITE_ERROR\n |WEIRD_((PASS|PASV|SERVER|USER)_REPLY|227_FORMAT)|ACCESS_DENIED)\n |FILESIZE_EXCEEDED|FILE_COULDNT_READ_FILE|FUNCTION_NOT_FOUND|FAILED_INIT|WRITE_ERROR|LIBRARY_NOT_FOUND\n |LDAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL)|ABORTED_BY_CALLBACK)\n |VERSION_NOW\n |FTP(METHOD_(MULTI|SINGLE|NO)CWD|SSL_(ALL|NONE|CONTROL|TRY)|AUTH_(DEFAULT|SSL|TLS))\n |AUTH_(ANY(SAFE)?|BASIC|DIGEST|GSSNEGOTIATE|NTLM))\n|CURL_(HTTP_VERSION_(1_(0|1)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(UN)?MODSINCE|LASTMOD)\n |IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))\n|IMAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|ICO|IFF|UNKNOWN|JB2|JPX|JP2|JPC|JPEG(2000)?|PSD|PNG|WBMP)\n|INPUT_(REQUEST|GET|SERVER|SESSION|COOKIE|POST|ENV)|ICONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION)\n|DNS_(MX|SRV|SOA|HINFO|NS|NAPTR|CNAME|TXT|PTR|ANY|ALL|AAAA|A(6)?)\n|DOM(STRING_SIZE_ERR)\n|DOM_((SYNTAX|HIERARCHY_REQUEST|NO_(MODIFICATION_ALLOWED|DATA_ALLOWED)|NOT_(FOUND|SUPPORTED)|NAMESPACE\n |INDEX_SIZE|USE_ATTRIBUTE|VALID_(MODIFICATION|STATE|CHARACTER|ACCESS)|PHP|VALIDATION|WRONG_DOCUMENT)_ERR)\n|JSON_(HEX_(TAG|QUOT|AMP|APOS)|NUMERIC_CHECK|ERROR_(SYNTAX|STATE_MISMATCH|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)\n|PREG_((D_UTF8(_OFFSET)?|NO|INTERNAL|(BACKTRACK|RECURSION)_LIMIT)_ERROR|GREP_INVERT\n |SPLIT_(NO_EMPTY|(DELIM|OFFSET)_CAPTURE)|SET_ORDER|OFFSET_CAPTURE|PATTERN_ORDER)\n|PSFS_(PASS_ON|ERR_FATAL|FEED_ME|FLAG_(NORMAL|FLUSH_(CLOSE|INC)))\n|PCRE_VERSION|POSIX_((F|R|W|X)_OK|S_IF(REG|BLK|SOCK|CHR|IFO))\n|FNM_(NOESCAPE|CASEFOLD|PERIOD|PATHNAME)\n|FILTER_(REQUIRE_(SCALAR|ARRAY)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW\n |SANITIZE_(MAGIC_QUOTES|STRING|STRIPPED|SPECIAL_CHARS|NUMBER_(INT|FLOAT)|URL\n |EMAIL|ENCODED|FULL_SPCIAL_CHARS)\n |VALIDATE_(REGEXP|BOOLEAN|INT|IP|URL|EMAIL|FLOAT)\n |FORCE_ARRAY\n |FLAG_(SCHEME_REQUIRED|STRIP_(BACKTICK|HIGH|LOW)|HOST_REQUIRED|NONE|NO_(RES|PRIV)_RANGE|ENCODE_QUOTES\n |IPV(4|6)|PATH_REQUIRED|EMPTY_STRING_NULL|ENCODE_(HIGH|LOW|AMP)|QUERY_REQUIRED\n |ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION)))\n|FILE_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)\n|FILEINFO_(RAW|MIME(_(ENCODING|TYPE))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)\n|FORCE_(DEFLATE|GZIP)\n|LIBXML_(XINCLUDE|NSCLEAN|NO(XMLDECL|BLANKS|NET|CDATA|ERROR|EMPTYTAG|ENT|WARNING)\n |COMPACT|DTD(VALID|LOAD|ATTR)|((DOTTED|LOADED)_)?VERSION|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)))\n\\b", "name": "support.constant.ext.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?x)\n(\\\\)?\\b\n(T_(RETURN|REQUIRE(_ONCE)?|GOTO|GLOBAL|(MINUS|MOD|MUL|XOR)_EQUAL|METHOD_C|ML_COMMENT|BREAK\n |BOOL_CAST|BOOLEAN_(AND|OR)|BAD_CHARACTER|SR(_EQUAL)?|STRING(_CAST|VARNAME)?|START_HEREDOC|STATIC\n |SWITCH|SL(_EQUAL)?|HALT_COMPILER|NS_(C|SEPARATOR)|NUM_STRING|NEW|NAMESPACE|CHARACTER|COMMENT\n |CONSTANT(_ENCAPSED_STRING)?|CONCAT_EQUAL|CONTINUE|CURLY_OPEN|CLOSE_TAG|CLONE|CLASS(_C)?\n |CASE|CATCH|TRY|THROW|IMPLEMENTS|ISSET|IS_((GREATER|SMALLER)_OR_EQUAL|(NOT_)?(IDENTICAL|EQUAL))\n |INSTANCEOF|INCLUDE(_ONCE)?|INC|INT_CAST|INTERFACE|INLINE_HTML|IF|OR_EQUAL|OBJECT_(CAST|OPERATOR)\n |OPEN_TAG(_WITH_ECHO)?|OLD_FUNCTION|DNUMBER|DIR|DIV_EQUAL|DOC_COMMENT|DOUBLE_(ARROW|CAST|COLON)\n |DOLLAR_OPEN_CURLY_BRACES|DO|DEC|DECLARE|DEFAULT|USE|UNSET(_CAST)?|PRINT|PRIVATE|PROTECTED|PUBLIC\n |PLUS_EQUAL|PAAMAYIM_NEKUDOTAYIM|EXTENDS|EXIT|EMPTY|ENCAPSED_AND_WHITESPACE\n |END(SWITCH|IF|DECLARE|FOR(EACH)?|WHILE)|END_HEREDOC|ECHO|EVAL|ELSE(IF)?|VAR(IABLE)?|FINAL|FILE\n |FOR(EACH)?|FUNC_C|FUNCTION|WHITESPACE|WHILE|LNUMBER|LIST|LINE|LOGICAL_(AND|OR|XOR)\n |ARRAY_(CAST)?|ABSTRACT|AS|AND_EQUAL))\n\\b", "name": "support.constant.parser-token.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "constant.other.php" } ] }, "function-parameters": { "patterns": [ { "include": "#comments" }, { "match": ",", "name": "punctuation.separator.delimiter.php" }, { "begin": "(?xi)\n(array) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*(array)\\s*(\\() # Default value", "beginCaptures": { "1": { "name": "storage.type.php" }, "2": { "name": "variable.other.php" }, "3": { "name": "storage.modifier.reference.php" }, "4": { "name": "punctuation.definition.variable.php" }, "5": { "name": "keyword.operator.assignment.php" }, "6": { "name": "support.function.construct.php" }, "7": { "name": "punctuation.definition.array.begin.bracket.round.php" } }, "contentName": "meta.array.php", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.function.parameter.array.php", "patterns": [ { "include": "#comments" }, { "include": "#strings" }, { "include": "#numbers" } ] }, { "match": "(?xi)\n(array|callable) # Typehint\n\\s+((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n(?: # Optional default value\n \\s*(=)\\s*\n (?:\n (null)\n |\n (\\[)((?>[^\\[\\]]+|\\[\\g<8>\\])*)(\\])\n |((?:\\S*?\\(\\))|(?:\\S*?))\n )\n)?\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", "name": "meta.function.parameter.array.php", "captures": { "1": { "name": "storage.type.php" }, "2": { "name": "variable.other.php" }, "3": { "name": "storage.modifier.reference.php" }, "4": { "name": "punctuation.definition.variable.php" }, "5": { "name": "keyword.operator.assignment.php" }, "6": { "name": "constant.language.php" }, "7": { "name": "punctuation.section.array.begin.php" }, "8": { "patterns": [ { "include": "#parameter-default-types" } ] }, "9": { "name": "punctuation.section.array.end.php" }, "10": { "name": "invalid.illegal.non-null-typehinted.php" } } }, { "begin": "(?xi)\n(\\\\?(?:[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)*) # Optional namespace\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Typehinted class name\n\\s+((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference", "beginCaptures": { "1": { "name": "support.other.namespace.php", "patterns": [ { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "storage.type.php" }, { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] }, "2": { "name": "storage.type.php" }, "3": { "name": "variable.other.php" }, "4": { "name": "storage.modifier.reference.php" }, "5": { "name": "keyword.operator.variadic.php" }, "6": { "name": "punctuation.definition.variable.php" } }, "end": "(?=,|\\)|/[/*]|\\#)", "name": "meta.function.parameter.typehinted.php", "patterns": [ { "begin": "=", "beginCaptures": { "0": { "name": "keyword.operator.assignment.php" } }, "end": "(?=,|\\)|/[/*]|\\#)", "patterns": [ { "include": "#language" } ] } ] }, { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "keyword.operator.variadic.php" }, "4": { "name": "punctuation.definition.variable.php" } }, "match": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(?=,|\\)|/[/*]|\\#|$) # A closing parentheses (end of argument list) or a comma or a comment", "name": "meta.function.parameter.no-default.php" }, { "begin": "(?xi)\n((&)?\\s*(\\.\\.\\.)?(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable name with possible reference\n\\s*(=)\\s*\n(?:(\\[)((?>[^\\[\\]]+|\\[\\g<6>\\])*)(\\]))? # Optional default type", "beginCaptures": { "1": { "name": "variable.other.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "keyword.operator.variadic.php" }, "4": { "name": "punctuation.definition.variable.php" }, "5": { "name": "keyword.operator.assignment.php" }, "6": { "name": "punctuation.section.array.begin.php" }, "7": { "patterns": [ { "include": "#parameter-default-types" } ] }, "8": { "name": "punctuation.section.array.end.php" } }, "end": "(?=,|\\)|/[/*]|\\#)", "name": "meta.function.parameter.default.php", "patterns": [ { "include": "#parameter-default-types" } ] } ] }, "function-call": { "patterns": [ { "begin": "(?xi)\n(\n \\\\?\\b # Optional root namespace\n [a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]* # First namespace\n (?:\\\\[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)+ # Additional namespaces\n)\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#namespace" }, { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.name.function.php" } ] }, "2": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.function-call.php", "patterns": [ { "include": "#language" } ] }, { "begin": "(?i)(\\\\)?\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#namespace" } ] }, "2": { "patterns": [ { "include": "#support" }, { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.name.function.php" } ] }, "3": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.function-call.php", "patterns": [ { "include": "#language" } ] }, { "match": "(?i)\\b(print|echo)\\b", "name": "support.function.construct.output.php" } ] }, "heredoc": { "patterns": [ { "begin": "(?i)(?=<<<\\s*(\"?)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(\\1)\\s*$)", "end": "(?!\\G)", "name": "string.unquoted.heredoc.php", "patterns": [ { "include": "#heredoc_interior" } ] }, { "begin": "(?=<<<\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'\\s*$)", "end": "(?!\\G)", "name": "string.unquoted.nowdoc.php", "patterns": [ { "include": "#nowdoc_interior" } ] } ] }, "heredoc_interior": { "patterns": [ { "begin": "(<<<)\\s*(\"?)(HTML)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.html", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.html", "patterns": [ { "include": "#interpolation" }, { "include": "text.html.basic" } ] }, { "begin": "(<<<)\\s*(\"?)(XML)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.xml", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.xml", "patterns": [ { "include": "#interpolation" }, { "include": "text.xml" } ] }, { "begin": "(<<<)\\s*(\"?)(SQL)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.sql", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.sql", "patterns": [ { "include": "#interpolation" }, { "include": "source.sql" } ] }, { "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.js", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.js", "patterns": [ { "include": "#interpolation" }, { "include": "source.js" } ] }, { "begin": "(<<<)\\s*(\"?)(JSON)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.json", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.json", "patterns": [ { "include": "#interpolation" }, { "include": "source.json" } ] }, { "begin": "(<<<)\\s*(\"?)(CSS)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.css", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.css", "patterns": [ { "include": "#interpolation" }, { "include": "source.css" } ] }, { "begin": "(<<<)\\s*(\"?)(REGEXP?)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "string.regexp.heredoc.php", "end": "^(\\3)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "patterns": [ { "include": "#interpolation" }, { "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { "name": "punctuation.definition.arbitrary-repitition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repitition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php", "patterns": [ { "match": "\\\\[\\\\'\\[\\]]", "name": "constant.character.escape.php" } ] }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" }, { "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{ff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.php" } }, "end": "$", "endCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "name": "comment.line.number-sign.php" } ] }, { "begin": "(?i)(<<<)\\s*(\"?)([a-z_\\x{7f}-\\x{ff}]+[a-z0-9_\\x{7f}-\\x{ff}]*)(\\2)(\\s*)", "beginCaptures": { "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "end": "^(\\3)\\b", "endCaptures": { "1": { "name": "keyword.operator.heredoc.php" } }, "patterns": [ { "include": "#interpolation" } ] } ] }, "nowdoc_interior": { "patterns": [ { "begin": "(<<<)\\s*'(HTML)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.html", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.html", "patterns": [ { "include": "text.html.basic" } ] }, { "begin": "(<<<)\\s*'(XML)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.xml", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.xml", "patterns": [ { "include": "text.xml" } ] }, { "begin": "(<<<)\\s*'(SQL)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.sql", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.sql", "patterns": [ { "include": "source.sql" } ] }, { "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.js", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.js", "patterns": [ { "include": "source.js" } ] }, { "begin": "(<<<)\\s*'(JSON)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.json", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.json", "patterns": [ { "include": "source.json" } ] }, { "begin": "(<<<)\\s*'(CSS)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.css", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.css", "patterns": [ { "include": "source.css" } ] }, { "begin": "(<<<)\\s*'(REGEXP?)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "string.regexp.nowdoc.php", "end": "^(\\2)\\b", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "patterns": [ { "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { "name": "punctuation.definition.arbitrary-repitition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repitition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php", "patterns": [ { "match": "\\\\[\\\\'\\[\\]]", "name": "constant.character.escape.php" } ] }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" }, { "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{ff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.php" } }, "end": "$", "endCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "name": "comment.line.number-sign.php" } ] }, { "begin": "(?i)(<<<)\\s*'([a-z_\\x{7f}-\\x{ff}]+[a-z0-9_\\x{7f}-\\x{ff}]*)'(\\s*)", "beginCaptures": { "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "end": "^(\\2)\\b", "endCaptures": { "1": { "name": "keyword.operator.nowdoc.php" } } } ] }, "instantiation": { "begin": "(?i)(new)\\s+", "beginCaptures": { "1": { "name": "keyword.other.new.php" } }, "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "patterns": [ { "match": "(?i)(parent|static|self)(?![a-z0-9_\\x{7f}-\\x{ff}])", "name": "storage.type.php" }, { "include": "#class-name" }, { "include": "#variable-name" } ] }, "interpolation": { "patterns": [ { "match": "\\\\[0-7]{1,3}", "name": "constant.character.escape.octal.php" }, { "match": "\\\\x[0-9A-Fa-f]{1,2}", "name": "constant.character.escape.hex.php" }, { "match": "\\\\u{[0-9A-Fa-f]+}", "name": "constant.character.escape.unicode.php" }, { "match": "\\\\[nrtvef$\"\\\\]", "name": "constant.character.escape.php" }, { "begin": "{(?=\\$.*?})", "beginCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "patterns": [ { "include": "#language" } ] }, { "include": "#variable-name" } ] }, "invoke-call": { "captures": { "1": { "name": "punctuation.definition.variable.php" }, "2": { "name": "variable.other.php" } }, "match": "(?i)(\\$+)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(?=\\s*\\()", "name": "meta.function-call.invoke.php" }, "language": { "patterns": [ { "include": "#comments" }, { "begin": "(?i)^\\s*(interface)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(extends)?\\s*", "beginCaptures": { "1": { "name": "storage.type.interface.php" }, "2": { "name": "entity.name.type.interface.php" }, "3": { "name": "storage.modifier.extends.php" } }, "end": "(?i)((?:[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\s*,\\s*)*)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\\s*(?:(?={)|$)", "endCaptures": { "1": { "patterns": [ { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.other.inherited-class.php" }, { "match": ",", "name": "punctuation.separator.classes.php" } ] }, "2": { "name": "entity.other.inherited-class.php" } }, "name": "meta.interface.php", "patterns": [ { "include": "#namespace" } ] }, { "begin": "(?i)^\\s*(trait)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", "beginCaptures": { "1": { "name": "storage.type.trait.php" }, "2": { "name": "entity.name.type.trait.php" } }, "end": "(?={)", "name": "meta.trait.php", "patterns": [ { "include": "#comments" } ] }, { "match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{ff}\\\\]+)(?=\\s*;)", "name": "meta.namespace.php", "captures": { "1": { "name": "keyword.other.namespace.php" }, "2": { "name": "entity.name.type.namespace.php", "patterns": [ { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] } } }, { "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+", "beginCaptures": { "1": { "name": "keyword.other.namespace.php" } }, "end": "(?<=})|(?=\\?>)", "name": "meta.namespace.php", "patterns": [ { "include": "#comments" }, { "match": "(?i)[a-z0-9_\\x{7f}-\\x{ff}\\\\]+", "name": "entity.name.type.namespace.php", "captures": { "0": { "patterns": [ { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] } } }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.namespace.begin.bracket.curly.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.namespace.end.bracket.curly.php" } }, "patterns": [ { "include": "#language" } ] }, { "match": "[^\\s]+", "name": "invalid.illegal.identifier.php" } ] }, { "match": "\\s+(?=use\\b)" }, { "begin": "(?i)\\buse\\b", "beginCaptures": { "0": { "name": "keyword.other.use.php" } }, "end": "(?<=})|(?=;)", "name": "meta.use.php", "patterns": [ { "match": "\\b(const|function)\\b", "name": "storage.type.${1:/downcase}.php" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.use.begin.bracket.curly.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.use.end.bracket.curly.php" } }, "patterns": [ { "include": "#scope-resolution" }, { "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b", "captures": { "1": { "name": "keyword.other.use-as.php" }, "2": { "name": "storage.modifier.php" }, "3": { "name": "entity.other.alias.php" } } }, { "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\n\\b", "captures": { "1": { "name": "keyword.other.use-as.php" }, "2": { "patterns": [ { "match": "^(?:final|abstract|public|private|protected|static)$", "name": "storage.modifier.php" }, { "match": ".+", "name": "entity.other.alias.php" } ] } } }, { "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", "captures": { "1": { "name": "keyword.other.use-insteadof.php" }, "2": { "name": "support.class.php" } } }, { "match": ";", "name": "punctuation.terminator.expression.php" }, { "include": "#use-inner" } ] }, { "include": "#use-inner" } ] }, { "begin": "(?i)^\\s*(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)", "beginCaptures": { "1": { "name": "storage.modifier.${1:/downcase}.php" }, "2": { "name": "storage.type.class.php" }, "3": { "name": "entity.name.type.class.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.class.end.bracket.curly.php" } }, "name": "meta.class.php", "patterns": [ { "include": "#comments" }, { "begin": "(?i)(extends)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.extends.php" } }, "contentName": "meta.other.inherited-class.php", "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "patterns": [ { "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "endCaptures": { "1": { "name": "entity.other.inherited-class.php" } }, "patterns": [ { "include": "#namespace" } ] }, { "include": "#class-builtin" }, { "include": "#namespace" }, { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.other.inherited-class.php" } ] }, { "begin": "(?i)(implements)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.implements.php" } }, "end": "(?i)(?=[;{])", "patterns": [ { "include": "#comments" }, { "begin": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+)", "contentName": "meta.other.inherited-class.php", "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\\\s]))\\s*)", "patterns": [ { "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\\\)", "end": "(?i)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "endCaptures": { "1": { "name": "entity.other.inherited-class.php" } }, "patterns": [ { "include": "#namespace" } ] }, { "include": "#class-builtin" }, { "include": "#namespace" }, { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "entity.other.inherited-class.php" } ] } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.class.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "contentName": "meta.class.body.php", "patterns": [ { "include": "#language" } ] } ] }, { "include": "#switch_statement" }, { "match": "(?x)\n\\s*\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", "captures": { "1": { "name": "keyword.control.${1:/downcase}.php" } } }, { "begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+", "beginCaptures": { "1": { "name": "keyword.control.import.include.php" } }, "end": "(?=\\s|;|$|\\?>)", "name": "meta.include.php", "patterns": [ { "include": "#language" } ] }, { "begin": "\\b(catch)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.exception.catch.php" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "name": "meta.catch.php", "patterns": [ { "include": "#namespace" }, { "match": "(?xi)\n([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable", "captures": { "1": { "name": "support.class.exception.php" }, "2": { "patterns": [ { "match": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "name": "support.class.exception.php" }, { "match": "\\|", "name": "punctuation.separator.delimiter.php" } ] }, "3": { "name": "variable.other.php" }, "4": { "name": "punctuation.definition.variable.php" } } } ] }, { "match": "\\b(catch|try|throw|exception|finally)\\b", "name": "keyword.control.exception.php" }, { "begin": "(?i)\\b(function)\\s*(?=\\()", "beginCaptures": { "1": { "name": "storage.type.function.php" } }, "end": "(?={)", "name": "meta.function.closure.php", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "contentName": "meta.function.parameters.php", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "patterns": [ { "include": "#function-parameters" } ] }, { "begin": "(?i)(use)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.function.use.php" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "patterns": [ { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)((&)?\\s*(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", "name": "meta.function.closure.use.php" } ] } ] }, { "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n |([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n)\n\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "match": "final|abstract|public|private|protected|static", "name": "storage.modifier.php" } ] }, "2": { "name": "storage.type.function.php" }, "3": { "name": "support.function.magic.php" }, "4": { "name": "entity.name.function.php" }, "5": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "contentName": "meta.function.parameters.php", "end": "(\\))(?:\\s*(:)\\s*([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*))?", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.bracket.round.php" }, "2": { "name": "keyword.operator.return-value.php" }, "3": { "name": "storage.type.php" } }, "name": "meta.function.php", "patterns": [ { "include": "#function-parameters" } ] }, { "include": "#invoke-call" }, { "include": "#scope-resolution" }, { "include": "#variables" }, { "include": "#strings" }, { "captures": { "1": { "name": "support.function.construct.php" }, "2": { "name": "punctuation.definition.array.begin.bracket.round.php" }, "3": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "match": "(array)(\\()(\\))", "name": "meta.array.empty.php" }, { "begin": "(array)(\\()", "beginCaptures": { "1": { "name": "support.function.construct.php" }, "2": { "name": "punctuation.definition.array.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.array.php", "patterns": [ { "include": "#language" } ] }, { "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", "captures": { "1": { "name": "punctuation.definition.storage-type.begin.bracket.round.php" }, "2": { "name": "storage.type.php" }, "3": { "name": "punctuation.definition.storage-type.end.bracket.round.php" } } }, { "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object)\\b", "name": "storage.type.php" }, { "match": "(?i)\\b(global|abstract|const|extends|implements|final|private|protected|public|static)\\b", "name": "storage.modifier.php" }, { "include": "#object" }, { "match": ";", "name": "punctuation.terminator.expression.php" }, { "match": ":", "name": "punctuation.terminator.statement.php" }, { "include": "#heredoc" }, { "include": "#numbers" }, { "match": "(?i)\\bclone\\b", "name": "keyword.other.clone.php" }, { "match": "\\.=?", "name": "keyword.operator.string.php" }, { "match": "=>", "name": "keyword.operator.key.php" }, { "captures": { "1": { "name": "keyword.operator.assignment.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "storage.modifier.reference.php" } }, "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" }, { "match": "@", "name": "keyword.operator.error-control.php" }, { "match": "===|==|!==|!=|<>", "name": "keyword.operator.comparison.php" }, { "match": "=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=", "name": "keyword.operator.assignment.php" }, { "match": "<=>|<=|>=|<|>", "name": "keyword.operator.comparison.php" }, { "match": "\\-\\-|\\+\\+", "name": "keyword.operator.increment-decrement.php" }, { "match": "\\-|\\+|\\*|/|%", "name": "keyword.operator.arithmetic.php" }, { "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", "name": "keyword.operator.logical.php" }, { "include": "#function-call" }, { "match": "<<|>>|~|\\^|&|\\|", "name": "keyword.operator.bitwise.php" }, { "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", "beginCaptures": { "1": { "name": "keyword.operator.type.php" } }, "end": "(?=[^\\\\$a-z0-9_\\x{7f}-\\x{ff}])", "patterns": [ { "include": "#class-name" }, { "include": "#variable-name" } ] }, { "include": "#instantiation" }, { "captures": { "1": { "name": "keyword.control.goto.php" }, "2": { "name": "support.other.php" } }, "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)" }, { "captures": { "1": { "name": "entity.name.goto-label.php" } }, "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*:(?!:)" }, { "include": "#string-backtick" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.curly.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.curly.php" } }, "patterns": [ { "include": "#language" } ] }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.php" } }, "end": "\\]|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.section.array.end.php" } }, "patterns": [ { "include": "#language" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.php" } }, "patterns": [ { "include": "#language" } ] }, { "include": "#constants" }, { "match": ",", "name": "punctuation.separator.delimiter.php" } ] }, "namespace": { "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?(\\\\)(?=.*?[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "beginCaptures": { "1": { "name": "variable.language.namespace.php" }, "2": { "name": "punctuation.separator.inheritance.php" } }, "end": "(?i)(?=[a-z0-9_\\x{7f}-\\x{ff}]*[^a-z0-9_\\x{7f}-\\x{ff}\\\\])", "name": "support.other.namespace.php", "patterns": [ { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] }, "numbers": { "patterns": [ { "match": "0[xX][0-9a-fA-F]+", "name": "constant.numeric.hex.php" }, { "match": "0[bB][01]+", "name": "constant.numeric.binary.php" }, { "match": "0[0-7]+", "name": "constant.numeric.octal.php" }, { "match": "(?x)\n(?:\n [0-9]*(\\.)[0-9]+(?:[eE][+-]?[0-9]+)?|\n [0-9]+(\\.)[0-9]*(?:[eE][+-]?[0-9]+)?|\n [0-9]+[eE][+-]?[0-9]+\n)", "name": "constant.numeric.decimal.php", "captures": { "1": { "name": "punctuation.separator.decimal.period.php" }, "2": { "name": "punctuation.separator.decimal.period.php" } } }, { "match": "0|[1-9][0-9]*", "name": "constant.numeric.decimal.php" } ] }, "object": { "patterns": [ { "begin": "(->)(\\$?{)", "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "punctuation.definition.variable.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "patterns": [ { "include": "#language" } ] }, { "begin": "(?i)(->)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "entity.name.function.php" }, "3": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.method-call.php", "patterns": [ { "include": "#language" } ] }, { "captures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "variable.other.property.php" }, "3": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)(->)((\\$+)?[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?" } ] }, "parameter-default-types": { "patterns": [ { "include": "#strings" }, { "include": "#numbers" }, { "include": "#string-backtick" }, { "include": "#variables" }, { "match": "=>", "name": "keyword.operator.key.php" }, { "match": "=", "name": "keyword.operator.assignment.php" }, { "match": "&(?=\\s*\\$)", "name": "storage.modifier.reference.php" }, { "begin": "(array)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.construct.php" }, "2": { "name": "punctuation.definition.array.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.array.php", "patterns": [ { "include": "#parameter-default-types" } ] }, { "include": "#instantiation" }, { "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{ff}\\\\]+(::)\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?\n)", "end": "(?i)(::)([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)?", "endCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "constant.other.class.php" } }, "patterns": [ { "include": "#class-name" } ] }, { "include": "#constants" } ] }, "php_doc": { "patterns": [ { "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", "name": "invalid.illegal.missing-asterisk.phpdoc.php" }, { "captures": { "1": { "name": "keyword.other.phpdoc.php" }, "3": { "name": "storage.modifier.php" }, "4": { "name": "invalid.illegal.wrong-access-type.phpdoc.php" } }, "match": "^\\s*\\*\\s*(@access)\\s+((public|private|protected)|(.+))\\s*$" }, { "captures": { "1": { "name": "keyword.other.phpdoc.php" }, "2": { "name": "markup.underline.link.php" } }, "match": "(@xlink)\\s+(.+)\\s*$" }, { "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[A-Za-z_\\x{7f}-\\x{ff}\\\\]|\\()", "beginCaptures": { "1": { "name": "keyword.other.phpdoc.php" } }, "end": "(?=\\s|\\*/)", "contentName": "meta.other.type.phpdoc.php", "patterns": [ { "include": "#php_doc_types_array_multiple" }, { "include": "#php_doc_types_array_single" }, { "include": "#php_doc_types" } ] }, { "match": "(?x)\n@\n(\n api|abstract|author|category|copyright|example|global|inherit[Dd]oc|internal|\n license|link|method|property(-(read|write))?|package|param|return|see|since|source|\n static|subpackage|throws|todo|var|version|uses|deprecated|final|ignore\n)\\b", "name": "keyword.other.phpdoc.php" }, { "captures": { "1": { "name": "keyword.other.phpdoc.php" } }, "match": "{(@(link|inherit[Dd]oc)).+?}", "name": "meta.tag.inline.phpdoc.php" } ] }, "php_doc_types": { "match": "(?i)[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*(\\|[a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)*", "captures": { "0": { "patterns": [ { "match": "(?x)\\b\n(string|integer|int|boolean|bool|float|double|object|mixed\n|array|resource|void|null|callback|false|true|self)\\b", "name": "keyword.other.type.php" }, { "include": "#class-name" }, { "match": "\\|", "name": "punctuation.separator.delimiter.php" } ] } } }, "php_doc_types_array_multiple": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.bracket.round.phpdoc.php" } }, "end": "(\\))(\\[\\])|(?=\\*/)", "endCaptures": { "1": { "name": "punctuation.definition.type.end.bracket.round.phpdoc.php" }, "2": { "name": "keyword.other.array.phpdoc.php" } }, "patterns": [ { "include": "#php_doc_types_array_multiple" }, { "include": "#php_doc_types_array_single" }, { "include": "#php_doc_types" }, { "match": "\\|", "name": "punctuation.separator.delimiter.php" } ] }, "php_doc_types_array_single": { "match": "(?i)([a-z_\\x{7f}-\\x{ff}\\\\][a-z0-9_\\x{7f}-\\x{ff}\\\\]*)(\\[\\])", "captures": { "1": { "patterns": [ { "include": "#php_doc_types" } ] }, "2": { "name": "keyword.other.array.phpdoc.php" } } }, "regex-double-quoted": { "begin": "\"/(?=(\\\\.|[^\"/])++/[imsxeADSUXu]*\")", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "(/)([imsxeADSUXu]*)(\")", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.regexp.double-quoted.php", "patterns": [ { "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, { "include": "#interpolation" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repetition.php" }, "3": { "name": "punctuation.definition.arbitrary-repetition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repetition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php", "patterns": [ { "include": "#interpolation" } ] }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" } ] }, "regex-single-quoted": { "begin": "'/(?=(\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)|[^'/])++/[imsxeADSUXu]*')", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "(/)([imsxeADSUXu]*)(')", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.regexp.single-quoted.php", "patterns": [ { "include": "#single_quote_regex_escape" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repetition.php" }, "3": { "name": "punctuation.definition.arbitrary-repetition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repetition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php" }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" } ] }, "scope-resolution": { "patterns": [ { "match": "(?i)\\b([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(?=\\s*::)", "captures": { "1": { "patterns": [ { "match": "\\b(self|static|parent)\\b", "name": "storage.type.php" }, { "include": "#class-name" }, { "include": "#variable-name" } ] } } }, { "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "entity.name.function.php" }, "3": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.method-call.static.php", "patterns": [ { "include": "#language" } ] }, { "match": "(?i)(::)\\s*(class)\\b", "captures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "keyword.other.class.php" } } }, { "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*) # Constant\n)?", "captures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "variable.other.class.php" }, "3": { "name": "punctuation.definition.variable.php" }, "4": { "name": "constant.other.class.php" } } } ] }, "single_quote_regex_escape": { "match": "\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)", "name": "constant.character.escape.php" }, "sql-string-double-quoted": { "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "contentName": "source.sql.embedded.php", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.double.sql.php", "patterns": [ { "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", "name": "comment.line.number-sign.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", "name": "comment.line.double-dash.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "\\\\[\\\\\"`']", "name": "constant.character.escape.php" }, { "match": "'(?=((\\\\')|[^'\"])*(\"|$))", "name": "string.quoted.single.unclosed.sql" }, { "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", "name": "string.quoted.other.backtick.unclosed.sql" }, { "begin": "'", "end": "'", "name": "string.quoted.single.sql", "patterns": [ { "include": "#interpolation" } ] }, { "begin": "`", "end": "`", "name": "string.quoted.other.backtick.sql", "patterns": [ { "include": "#interpolation" } ] }, { "include": "#interpolation" }, { "include": "source.sql" } ] }, "sql-string-single-quoted": { "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "contentName": "source.sql.embedded.php", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.single.sql.php", "patterns": [ { "match": "(#)(\\\\'|[^'])*(?='|$)", "name": "comment.line.number-sign.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "(--)(\\\\'|[^'])*(?='|$)", "name": "comment.line.double-dash.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "\\\\[\\\\'`\"]", "name": "constant.character.escape.php" }, { "match": "`(?=((\\\\`)|[^`'])*('|$))", "name": "string.quoted.other.backtick.unclosed.sql" }, { "match": "\"(?=((\\\\\")|[^\"'])*('|$))", "name": "string.quoted.double.unclosed.sql" }, { "include": "source.sql" } ] }, "string-backtick": { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.interpolated.php", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.php" }, { "include": "#interpolation" } ] }, "string-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.double.php", "patterns": [ { "include": "#interpolation" } ] }, "string-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.single.php", "patterns": [ { "match": "\\\\[\\\\']", "name": "constant.character.escape.php" } ] }, "strings": { "patterns": [ { "include": "#regex-double-quoted" }, { "include": "#sql-string-double-quoted" }, { "include": "#string-double-quoted" }, { "include": "#regex-single-quoted" }, { "include": "#sql-string-single-quoted" }, { "include": "#string-single-quoted" } ] }, "support": { "patterns": [ { "match": "(?xi)\n\\b\napc_(\n store|sma_info|compile_file|clear_cache|cas|cache_info|inc|dec|define_constants|delete(_file)?|\n exists|fetch|load_constants|add|bin_(dump|load)(file)?\n)\\b", "name": "support.function.apc.php" }, { "match": "(?xi)\\b\n(\n shuffle|sizeof|sort|next|nat(case)?sort|count|compact|current|in_array|usort|uksort|uasort|\n pos|prev|end|each|extract|ksort|key(_exists)?|krsort|list|asort|arsort|rsort|reset|range|\n array(_(shift|sum|splice|search|slice|chunk|change_key_case|count_values|column|combine|\n (diff|intersect)(_(u)?(key|assoc))?|u(diff|intersect)(_(u)?assoc)?|unshift|unique|\n pop|push|pad|product|values|keys|key_exists|filter|fill(_keys)?|flip|walk(_recursive)?|\n reduce|replace(_recursive)?|reverse|rand|multisort|merge(_recursive)?|map)?)\n)\\b", "name": "support.function.array.php" }, { "match": "(?xi)\\b\n(\n show_source|sys_getloadavg|sleep|highlight_(file|string)|constant|connection_(aborted|status)|\n time_(nanosleep|sleep_until)|ignore_user_abort|die|define(d)?|usleep|uniqid|unpack|__halt_compiler|\n php_(check_syntax|strip_whitespace)|pack|eval|exit|get_browser\n)\\b", "name": "support.function.basic_functions.php" }, { "match": "(?i)\\bbc(scale|sub|sqrt|comp|div|pow(mod)?|add|mod|mul)\\b", "name": "support.function.bcmath.php" }, { "match": "(?i)\\bblenc_encrypt\\b", "name": "support.function.blenc.php" }, { "match": "(?i)\\bbz(compress|close|open|decompress|errstr|errno|error|flush|write|read)\\b", "name": "support.function.bz2.php" }, { "match": "(?xi)\\b\n(\n (French|Gregorian|Jewish|Julian)ToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|\n jdto(unix|jewish)|easter_(date|days)|JD(MonthName|To(Gregorian|Julian|French)|DayOfWeek)\n)\\b", "name": "support.function.calendar.php" }, { "match": "(?xi)\\b\n(\n class_alias|all_user_method(_array)?|is_(a|subclass_of)|__autoload|(class|interface|method|property|trait)_exists|\n get_(class(_(vars|methods))?|(called|parent)_class|object_vars|declared_(classes|interfaces|traits))\n)\\b", "name": "support.function.classobj.php" }, { "match": "(?xi)\\b\n(\n com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|\n variant_(sub|set(_type)?|not|neg|cast|cat|cmp|int|idiv|imp|or|div|date_(from|to)_timestamp|\n pow|eqv|fix|and|add|abs|round|get_type|xor|mod|mul)\n)\\b", "name": "support.function.com.php" }, { "begin": "(?i)\\b(isset|unset|eval|empty|list)\\b", "name": "support.function.construct.php" }, { "match": "(?i)\\b(print|echo)\\b", "name": "support.function.construct.output.php" }, { "match": "(?i)\\bctype_(space|cntrl|digit|upper|punct|print|lower|alnum|alpha|graph|xdigit)\\b", "name": "support.function.ctype.php" }, { "match": "(?xi)\\b\ncurl_(\n share_(close|init|setopt)|strerror|setopt(_array)?|copy_handle|close|init|unescape|pause|escape|\n errno|error|exec|version|file_create|reset|getinfo|\n multi_(strerror|setopt|select|close|init|info_read|(add|remove)_handle|getcontent|exec)\n)\\b", "name": "support.function.curl.php" }, { "match": "(?xi)\\b\n(\n strtotime|str[fp]time|checkdate|time|timezone_name_(from_abbr|get)|idate|\n timezone_((location|offset|transitions|version)_get|(abbreviations|identifiers)_list|open)|\n date(_(sun(rise|set)|sun_info|sub|create(_(immutable_)?from_format)?|timestamp_(get|set)|timezone_(get|set)|time_set|\n isodate_set|interval_(create_from_date_string|format)|offset_get|diff|default_timezone_(get|set)|date_set|\n parse(_from_format)?|format|add|get_last_errors|modify))?|\n localtime|get(date|timeofday)|gm(strftime|date|mktime)|microtime|mktime\n)\\b", "name": "support.function.datetime.php" }, { "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|optimize|open|delete|popen|exists|key_split|firstkey|fetch|list|replace)\\b", "name": "support.function.dba.php" }, { "match": "(?i)\\bdbx_(sort|connect|compare|close|escape_string|error|query|fetch_row)\\b", "name": "support.function.dbx.php" }, { "match": "(?i)\\b(scandir|chdir|chroot|closedir|opendir|dir|rewinddir|readdir|getcwd)\\b", "name": "support.function.dir.php" }, { "match": "(?xi)\\b\neio_(\n sync(fs)?|sync_file_range|symlink|stat(vfs)?|sendfile|set_min_parallel|set_max_(idle|poll_(reqs|time)|parallel)|\n seek|n(threads|op|pending|reqs|ready)|chown|chmod|custom|close|cancel|truncate|init|open|dup2|unlink|utime|poll|\n event_loop|f(sync|stat(vfs)?|chown|chmod|truncate|datasync|utime|allocate)|write|lstat|link|rename|realpath|\n read(ahead|dir|link)?|rmdir|get_(event_stream|last_error)|grp(_(add|cancel|limit))?|mknod|mkdir|busy\n)\\b", "name": "support.function.eio.php" }, { "match": "(?xi)\\b\nenchant_(\n dict_(store_replacement|suggest|check|is_in_session|describe|quick_check|add_to_(personal|session)|get_error)|\n broker_(set_ordering|init|dict_exists|describe|free(_dict)?|list_dicts|request_(pwl_)?dict|get_error)\n)\\b", "name": "support.function.enchant.php" }, { "match": "(?i)\\bsplit(i)?|sql_regcase|ereg(i)?(_replace)?\\b", "name": "support.function.ereg.php" }, { "match": "(?i)\\b((restore|set)_(error_handler|exception_handler)|trigger_error|debug_(print_)?backtrace|user_error|error_(log|reporting|get_last))\\b", "name": "support.function.errorfunc.php" }, { "match": "(?i)\\bshell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec\\b", "name": "support.function.exec.php" }, { "match": "(?i)\\b(exif_(thumbnail|tagname|imagetype|read_data)|read_exif_data)\\b", "name": "support.function.exif.php" }, { "match": "(?xi)\\b\nfann_(\n (duplicate|length|merge|shuffle|subset)_train_data|scale_(train(_data)?|(input|output)(_train_data)?)|\n set_(scaling_params|sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|\n cascade_(num_candidate_groups|candidate_(change_fraction|limit|stagnation_epochs)|\n output_(change_fraction|stagnation_epochs)|weight_multiplier|activation_(functions|steepnesses)|\n (max|min)_(cand|out)_epochs)|\n callback|training_algorithm|train_(error|stop)_function|(input|output)_scaling_params|error_log|\n quickprop_(decay|mu)|weight(_array)?|learning_(momentum|rate)|bit_fail_limit|\n activation_(function|steepness)(_(hidden|layer|output))?|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))|\n save(_train)?|num_(input|output)_train_data|copy|clear_scaling_params|cascadetrain_on_(file|data)|\n create_((sparse|shortcut|standard)(_array)?|train(_from_callback)?|from_file)|\n test(_data)?|train(_(on_(file|data)|epoch))?|init_weights|descale_(input|output|train)|destroy(_train)?|\n print_error|run|reset_(MSE|err(no|str))|read_train_from_file|randomize_weights|\n get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|num_(input|output|layers)|\n network_type|MSE|connection_(array|rate)|bias_array|bit_fail(_limit)?|\n cascade_(num_(candidates|candidate_groups)|(candidate|output)_(change_fraction|limit|stagnation_epochs)|\n weight_multiplier|activation_(functions|steepnesses)(_count)?|(max|min)_(cand|out)_epochs)|\n total_(connections|neurons)|training_algorithm|train_(error|stop)_function|err(no|str)|\n quickprop_(decay|mu)|learning_(momentum|rate)|layer_array|activation_(function|steepness)|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))\n)\\b", "name": "support.function.fann.php" }, { "match": "(?xi)\\b\n(\n symlink|stat|set_file_buffer|chown|chgrp|chmod|copy|clearstatcache|touch|tempnam|tmpfile|\n is_(dir|(uploaded_)?file|executable|link|readable|writ(e)?able)|disk_(free|total)_space|diskfreespace|\n dirname|delete|unlink|umask|pclose|popen|pathinfo|parse_ini_(file|string)|fscanf|fstat|fseek|fnmatch|\n fclose|ftell|ftruncate|file(size|[acm]time|type|inode|owner|perms|group)?|file_(exists|(get|put)_contents)|\n f(open|puts|putcsv|passthru|eof|flush|write|lock|read|gets(s)?|getc(sv)?)|lstat|lchown|lchgrp|link(info)?|\n rename|rewind|read(file|link)|realpath(_cache_(get|size))?|rmdir|glob|move_uploaded_file|mkdir|basename\n)\\b", "name": "support.function.file.php" }, { "match": "(?i)\\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\\b", "name": "support.function.fileinfo.php" }, { "match": "(?i)\\bfilter_(has_var|input(_array)?|id|var(_array)?|list)\\b", "name": "support.function.filter.php" }, { "match": "(?i)\\bfastcgi_finish_request\\b", "name": "support.function.fpm.php" }, { "match": "(?i)\\b(call_user_(func|method)(_array)?|create_function|unregister_tick_function|forward_static_call(_array)?|function_exists|func_(num_args|get_arg(s)?)|register_(shutdown|tick)_function|get_defined_functions)\\b", "name": "support.function.funchand.php" }, { "match": "(?i)\\b((n)?gettext|textdomain|d((n)?gettext|c(n)?gettext)|bind(textdomain|_textdomain_codeset))\\b", "name": "support.function.gettext.php" }, { "match": "(?xi)\\b\ngmp_(\n scan[01]|strval|sign|sub|setbit|sqrt(rem)?|hamdist|neg|nextprime|com|clrbit|cmp|testbit|\n intval|init|invert|import|or|div(exact)?|div_(q|qr|r)|jacobi|popcount|pow(m)?|perfect_square|\n prob_prime|export|fact|legendre|and|add|abs|root(rem)?|random(_(bits|range))?|gcd(ext)?|xor|mod|mul\n)\\b", "name": "support.function.gmp.php" }, { "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(file|stream))?|pbkdf2|equals|file|final|algos))?\\b", "name": "support.function.hash.php" }, { "match": "(?xi)\\b\n(\n http_(support|send_(status|stream|content_(disposition|type)|data|file|last_modified)|head|\n negotiate_(charset|content_type|language)|chunked_decode|cache_(etag|last_modified)|throttle|\n inflate|deflate|date|post_(data|fields)|put_(data|file|stream)|persistent_handles_(count|clean|ident)|\n parse_(cookie|headers|message|params)|redirect|request(_(method_(exists|name|(un)?register)|body_encode))?|\n get(_request_(headers|body(_stream)?))?|match_(etag|modified|request_header)|build_(cookie|str|url))|\n ob_(etag|deflate|inflate)handler\n)\\b", "name": "support.function.http.php" }, { "match": "(?i)\\b(iconv(_(str(pos|len|rpos)|substr|(get|set)_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", "name": "support.function.iconv.php" }, { "match": "(?i)\\biis_((start|stop)_(service|server)|set_(script_map|server_rights|dir_security|app_settings)|(add|remove)_server|get_(script_map|service_state|server_(rights|by_(comment|path))|dir_security))\\b", "name": "support.function.iisfunc.php" }, { "match": "(?xi)\\b\n(\n iptc(embed|parse)|(jpeg|png)2wbmp|gd_info|getimagesize(fromstring)?|\n image(s[xy]|scale|(char|string)(up)?|set(style|thickness|tile|interpolation|pixel|brush)|savealpha|\n convolution|copy(resampled|resized|merge(gray)?)?|colors(forindex|total)|\n color(set|closest(alpha|hwb)?|transparent|deallocate|(allocate|exact|resolve)(alpha)?|at|match)|\n crop(auto)?|create(truecolor|from(string|jpeg|png|wbmp|webp|gif|gd(2(part)?)?|xpm|xbm))?|\n types|ttf(bbox|text)|truecolortopalette|istruecolor|interlace|2wbmp|destroy|dashedline|jpeg|\n _type_to_(extension|mime_type)|ps(slantfont|text|(encode|extend|free|load)font|bbox)|png|polygon|\n palette(copy|totruecolor)|ellipse|ft(text|bbox)|filter|fill|filltoborder|\n filled(arc|ellipse|polygon|rectangle)|font(height|width)|flip|webp|wbmp|line|loadfont|layereffect|\n antialias|affine(matrix(concat|get))?|alphablending|arc|rotate|rectangle|gif|gd(2)?|gammacorrect|\n grab(screen|window)|xbm)\n)\\b", "name": "support.function.image.php" }, { "match": "(?xi)\\b\n(\n sys_get_temp_dir|set_(time_limit|include_path|magic_quotes_runtime)|cli_(get|set)_process_title|\n ini_(alter|get(_all)?|restore|set)|zend_(thread_id|version|logo_guid)|dl|php(credits|info|version)|\n php_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|putenv|extension_loaded|version_compare|\n assert(_options)?|restore_include_path|gc_(collect_cycles|disable|enable(d)?)|getopt|\n get_(cfg_var|current_user|defined_constants|extension_funcs|include_path|included_files|loaded_extensions|\n magic_quotes_(gpc|runtime)|required_files|resources)|\n get(env|lastmod|rusage|my(inode|[gup]id))|\n memory_get_(peak_)?usage|main|magic_quotes_runtime\n)\\b", "name": "support.function.info.php" }, { "match": "(?xi)\\b\nibase_(\n set_event_handler|service_(attach|detach)|server_info|num_(fields|params)|name_result|connect|\n commit(_ret)?|close|trans|delete_user|drop_db|db_info|pconnect|param_info|prepare|err(code|msg)|\n execute|query|field_info|fetch_(assoc|object|row)|free_(event_handler|query|result)|wait_event|\n add_user|affected_rows|rollback(_ret)?|restore|gen_id|modify_user|maintain_db|backup|\n blob_(cancel|close|create|import|info|open|echo|add|get)\n)\\b", "name": "support.function.interbase.php" }, { "match": "(?xi)\\b\n(\n normalizer_(normalize|is_normalized)|idn_to_(unicode|utf8|ascii)|\n numfmt_(set_(symbol|(text_)?attribute|pattern)|create|(parse|format)(_currency)?|\n get_(symbol|(text_)?attribute|pattern|error_(code|message)|locale))|\n collator_(sort(_with_sort_keys)?|set_(attribute|strength)|compare|create|asort|\n get_(strength|sort_key|error_(code|message)|locale|attribute))|\n transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|\n intl(cal|tz)_get_error_(code|message)|intl_(is_failure|error_name|get_error_(code|message))|\n datefmt_(set_(calendar|lenient|pattern|timezone(_id)?)|create|is_lenient|parse|format(_object)?|localtime|\n get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|\n locale_(set_default|compose|canonicalize|parse|filter_matches|lookup|accept_from_http|\n get_(script|display_(script|name|variant|language|region)|default|primary_language|keywords|all_variants|region))|\n resourcebundle_(create|count|locales|get(_(error_(code|message)))?)|\n grapheme_(str(i?str|r?i?pos|len)|substr|extract)|\n msgfmt_(set_pattern|create|(format|parse)(_message)?|get_(pattern|error_(code|message)|locale))\n)\\b", "name": "support.function.intl.php" }, { "match": "(?i)\\bjson_(decode|encode|last_error(_msg)?)\\b", "name": "support.function.json.php" }, { "match": "(?xi)\\b\nldap_(\n start|tls|sort|search|sasl_bind|set_(option|rebind_proc)|(first|next)_(attribute|entry|reference)|\n connect|control_paged_result(_response)?|count_entries|compare|close|t61_to_8859|8859_to_t61|\n dn2ufn|delete|unbind|parse_(reference|result)|escape|errno|err2str|error|explode_dn|bind|\n free_result|list|add|rename|read|get_(option|dn|entries|values(_len)?|attributes)|modify(_batch)?|\n mod_(add|del|replace)\n)\\b", "name": "support.function.ldap.php" }, { "match": "(?i)\\blibxml_(set_(streams_context|external_entity_loader)|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\\b", "name": "support.function.libxml.php" }, { "match": "(?i)\\b(ezmlm_hash|mail)\\b", "name": "support.function.mail.php" }, { "match": "(?xi)\\b\n(\n (a)?(cos|sin|tan)(h)?|sqrt|srand|hypot|hexdec|ceil|is_(nan|(in)?finite)|octdec|dec(hex|oct|bin)|deg2rad|\n pi|pow|exp(m1)?|floor|fmod|lcg_value|log(1(p|0))?|atan2|abs|round|rand|rad2deg|getrandmax|\n mt_(srand|rand|getrandmax)|max|min|bindec|base_convert\n)\\b", "name": "support.function.math.php" }, { "match": "(?xi)\\b\nmb_(\n str(cut|str|to(lower|upper)|istr|ipos|imwidth|pos|width|len|rchr|richr|ripos|rpos)|\n substitute_character|substr(_count)?|split|send_mail|http_(input|output)|check_encoding|\n convert_(case|encoding|kana|variables)|internal_encoding|output_handler|decode_(numericentity|mimeheader)|\n detect_(encoding|order)|parse_str|preferred_mime_name|encoding_aliases|encode_(numericentity|mimeheader)|\n ereg(i(_replace)?)?|ereg_(search(_(get(pos|regs)|init|regs|(set)?pos))?|replace(_callback)?|match)|\n list_encodings|language|regex_(set_options|encoding)|get_info\n)\\b", "name": "support.function.mbstring.php" }, { "match": "(?xi)\\b\n(\n mcrypt_(\n cfb|create_iv|cbc|ofb|decrypt|encrypt|ecb|list_(algorithms|modes)|generic(_((de)?init|end))?|\n enc_(self_test|is_block_(algorithm|algorithm_mode|mode)|\n get_(supported_key_sizes|(block|iv|key)_size|(algorithms|modes)_name))|\n get_(cipher_name|(block|iv|key)_size)|\n module_(close|self_test|is_block_(algorithm|algorithm_mode|mode)|open|\n get_(supported_key_sizes|algo_(block|key)_size)))|\n mdecrypt_generic\n)\\b", "name": "support.function.mcrypt.php" }, { "match": "(?i)\\bmemcache_debug\\b", "name": "support.function.memcache.php" }, { "match": "(?i)\\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\\b", "name": "support.function.mhash.php" }, { "match": "(?i)\\b(log_(cmd_(insert|delete|update)|killcursor|write_batch|reply|getmore)|bson_(decode|encode))\\b", "name": "support.function.mongo.php" }, { "match": "(?xi)\\b\nmysql_(\n stat|set_charset|select_db|num_(fields|rows)|connect|client_encoding|close|create_db|escape_string|\n thread_id|tablename|insert_id|info|data_seek|drop_db|db_(name|query)|unbuffered_query|pconnect|ping|\n errno|error|query|field_(seek|name|type|table|flags|len)|fetch_(object|field|lengths|assoc|array|row)|\n free_result|list_(tables|dbs|processes|fields)|affected_rows|result|real_escape_string|\n get_(client|host|proto|server)_info\n)\\b", "name": "support.function.mysql.php" }, { "match": "(?xi)\\b\nmysqli_(\n ssl_set|store_result|stat|send_(query|long_data)|set_(charset|opt|local_infile_(default|handler))|\n stmt_(store_result|send_long_data|next_result|close|init|data_seek|prepare|execute|fetch|free_result|\n attr_(get|set)|result_metadata|reset|get_(result|warnings)|more_results|bind_(param|result))|\n select_db|slave_query|savepoint|next_result|change_user|character_set_name|connect|commit|\n client_encoding|close|thread_safe|init|options|(enable|disable)_(reads_from_master|rpl_parse)|\n dump_debug_info|debug|data_seek|use_result|ping|poll|param_count|prepare|escape_string|execute|\n embedded_server_(start|end)|kill|query|field_seek|free_result|autocommit|rollback|report|refresh|\n fetch(_(object|fields|field(_direct)?|assoc|all|array|row))?|rpl_(parse_enabled|probe|query_type)|\n release_savepoint|reap_async_query|real_(connect|escape_string|query)|more_results|multi_query|\n get_(charset|connection_stats|client_(stats|info|version)|cache_stats|warnings|links_stats|metadata)|\n master_query|bind_(param|result)|begin_transaction\n)\\b", "name": "support.function.mysqli.php" }, { "match": "(?i)\\bmysqlnd_memcache_(set|get_config)\\b", "name": "support.function.mysqlnd-memcache.php" }, { "match": "(?i)\\bmysqlnd_ms_(set_(user_pick_server|qos)|dump_servers|query_is_select|fabric_select_(shard|global)|get_(stats|last_(used_connection|gtid))|xa_(commit|rollback|gc|begin)|match_wild)\\b", "name": "support.function.mysqlnd-ms.php" }, { "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|core_stats|cache_info|query_trace_log|available_handlers))\\b", "name": "support.function.mysqlnd-qc.php" }, { "match": "(?i)\\bmysqlnd_uh_(set_(statement|connection)_proxy|convert_to_mysqlnd)\\b", "name": "support.function.mysqlnd-uh.php" }, { "match": "(?xi)\\b\n(\n syslog|socket_(set_(blocking|timeout)|get_status)|set(raw)?cookie|http_response_code|openlog|\n headers_(list|sent)|header(_(register_callback|remove))?|checkdnsrr|closelog|inet_(ntop|pton)|ip2long|\n openlog|dns_(check_record|get_(record|mx))|define_syslog_variables|(p)?fsockopen|long2ip|\n get(servby(name|port)|host(name|by(name(l)?|addr))|protoby(name|number)|mxrr)\n)\\b", "name": "support.function.network.php" }, { "match": "(?i)\\bnsapi_(virtual|response_headers|request_headers)\\b", "name": "support.function.nsapi.php" }, { "match": "(?xi)\\b\n(\n oci(statementtype|setprefetch|serverversion|savelob(file)?|numcols|new(collection|cursor|descriptor)|nlogon|\n column(scale|size|name|type(raw)?|isnull|precision)|coll(size|trim|assign(elem)?|append|getelem|max)|commit|\n closelob|cancel|internaldebug|definebyname|plogon|parse|error|execute|fetch(statement|into)?|\n free(statement|collection|cursor|desc)|write(temporarylob|lobtofile)|loadlob|log(on|off)|rowcount|rollback|\n result|bindbyname)|\n oci_(statement_type|set_(client_(info|identifier)|prefetch|edition|action|module_name)|server_version|\n num_(fields|rows)|new_(connect|collection|cursor|descriptor)|connect|commit|client_version|close|cancel|\n internal_debug|define_by_name|pconnect|password_change|parse|error|execute|bind_(array_)?by_name|\n field_(scale|size|name|type(_raw)?|is_null|precision)|fetch(_(object|assoc|all|array|row))?|\n free_(statement|descriptor)|lob_(copy|is_equal)|rollback|result|get_implicit_resultset)\n)\\b", "name": "support.function.oci8.php" }, { "match": "(?i)\\bopcache_(compile_file|invalidate|reset|get_(status|configuration))\\b", "name": "support.function.opcache.php" }, { "match": "(?xi)\\b\nopenssl_(\n sign|spki_(new|export(_challenge)?|verify)|seal|csr_(sign|new|export(_to_file)?|get_(subject|public_key))|\n cipher_iv_length|open|dh_compute_key|digest|decrypt|public_(decrypt|encrypt)|encrypt|error_string|\n pkcs12_(export(_to_file)?|read)|pkcs7_(sign|decrypt|encrypt|verify)|verify|free_key|random_pseudo_bytes|\n pkey_(new|export(_to_file)?|free|get_(details|public|private))|private_(decrypt|encrypt)|pbkdf2|\n get_((cipher|md)_methods|cert_locations|(public|private)key)|\n x509_(check_private_key|checkpurpose|parse|export(_to_file)?|fingerprint|free|read)\n)\\b", "name": "support.function.openssl.php" }, { "match": "(?xi)\\b\n(\n output_(add_rewrite_var|reset_rewrite_vars)|flush|\n ob_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|gzhandler|\n get_(status|contents|clean|flush|length|level))\n)\\b", "name": "support.function.output.php" }, { "match": "(?i)\\bpassword_(hash|needs_rehash|verify|get_info)\\b", "name": "support.function.password.php" }, { "match": "(?xi)\\b\npcntl_(\n strerror|signal(_dispatch)?|sig(timedwait|procmask|waitinfo)|setpriority|errno|exec|fork|\n w(stopsig|termsig|if(stopped|signaled|exited))|wait(pid)?|alarm|getpriority|get_last_error\n)\\b", "name": "support.function.pcntl.php" }, { "match": "(?xi)\\b\npg_(\n socket|send_(prepare|execute|query(_params)?)|set_(client_encoding|error_verbosity)|select|host|\n num_(fields|rows)|consume_input|connection_(status|reset|busy)|connect(_poll)?|convert|copy_(from|to)|\n client_encoding|close|cancel_query|tty|transaction_status|trace|insert|options|delete|dbname|untrace|\n unescape_bytea|update|pconnect|ping|port|put_line|parameter_status|prepare|version|query(_params)?|\n escape_(string|identifier|literal|bytea)|end_copy|execute|flush|free_result|last_(notice|error|oid)|\n field_(size|num|name|type(_oid)?|table|is_null|prtlen)|affected_rows|result_(status|seek|error(_field)?)|\n fetch_(object|assoc|all(_columns)?|array|row|result)|get_(notify|pid|result)|meta_data|\n lo_(seek|close|create|tell|truncate|import|open|unlink|export|write|read(_all)?)|\n)\\b", "name": "support.function.pgsql.php" }, { "match": "(?i)\\b(virtual|getallheaders|apache_((get|set)env|note|child_terminate|lookup_uri|response_headers|reset_timeout|request_headers|get_(version|modules)))\\b", "name": "support.function.php_apache.php" }, { "match": "(?i)\\bdom_import_simplexml\\b", "name": "support.function.php_dom.php" }, { "match": "(?xi)\\b\nftp_(\n ssl_connect|systype|site|size|set_option|nlist|nb_(continue|f?(put|get))|ch(dir|mod)|connect|cdup|close|\n delete|put|pwd|pasv|exec|quit|f(put|get)|login|alloc|rename|raw(list)?|rmdir|get(_option)?|mdtm|mkdir\n)\\b", "name": "support.function.php_ftp.php" }, { "match": "(?xi)\\b\nimap_(\n (create|delete|list|rename|scan)(mailbox)?|status|sort|subscribe|set_quota|set(flag_full|acl)|search|savebody|\n num_(recent|msg)|check|close|clearflag_full|thread|timeout|open|header(info)?|headers|append|alerts|reopen|\n 8bit|unsubscribe|undelete|utf7_(decode|encode)|utf8|uid|ping|errors|expunge|qprint|gc|\n fetch(structure|header|text|mime|body)|fetch_overview|lsub|list(scan|subscribed)|last_error|\n rfc822_(parse_(headers|adrlist)|write_address)|get(subscribed|acl|mailboxes)|get_quota(root)?|\n msgno|mime_header_decode|mail_(copy|compose|move)|mail|mailboxmsginfo|binary|body(struct)?|base64\n)\\b", "name": "support.function.php_imap.php" }, { "match": "(?xi)\\b\nmssql_(\n select_db|num_(fields|rows)|next_result|connect|close|init|data_seek|pconnect|execute|query|\n field_(seek|name|type|length)|fetch_(object|field|assoc|array|row|batch)|free_(statement|result)|\n rows_affected|result|guid_string|get_last_message|min_(error|message)_severity|bind\n)\\b", "name": "support.function.php_mssql.php" }, { "match": "(?xi)\\b\nodbc_(\n statistics|specialcolumns|setoption|num_(fields|rows)|next_result|connect|columns|columnprivileges|commit|\n cursor|close(_all)?|tables|tableprivileges|do|data_source|pconnect|primarykeys|procedures|procedurecolumns|\n prepare|error(msg)?|exec(ute)?|field_(scale|num|name|type|precision|len)|foreignkeys|free_result|\n fetch_(into|object|array|row)|longreadlen|autocommit|rollback|result(_all)?|gettypeinfo|binmode\n)\\b", "name": "support.function.php_odbc.php" }, { "match": "(?i)\\bpreg_(split|quote|filter|last_error|replace(_callback)?|grep|match(_all)?)\\b", "name": "support.function.php_pcre.php" }, { "match": "(?i)\\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|uses|parents)|iterator_(count|to_array|apply))\\b", "name": "support.function.php_spl.php" }, { "match": "(?i)\\bzip_(close|open|entry_(name|compressionmethod|compressedsize|close|open|filesize|read)|read)\\b", "name": "support.function.php_zip.php" }, { "match": "(?xi)\\b\nposix_(\n strerror|set(s|e?u|[ep]?g)id|ctermid|ttyname|times|isatty|initgroups|uname|errno|kill|access|\n get(sid|cwd|uid|pid|ppid|pwnam|pwuid|pgid|pgrp|euid|egid|login|rlimit|gid|grnam|groups|grgid)|\n get_last_error|mknod|mkfifo\n)\\b", "name": "support.function.posix.php" }, { "match": "(?i)\\bset(thread|proc)title\\b", "name": "support.function.proctitle.php" }, { "match": "(?xi)\\b\npspell_(\n store_replacement|suggest|save_wordlist|new(_(config|personal))?|check|clear_session|\n config_(save_repl|create|ignore|(data|dict)_dir|personal|runtogether|repl|mode)|add_to_(session|personal)\n)\\b", "name": "support.function.pspell.php" }, { "match": "(?i)\\breadline(_(completion_function|clear_history|callback_(handler_(install|remove)|read_char)|info|on_new_line|write_history|list_history|add_history|redisplay|read_history))?\\b", "name": "support.function.readline.php" }, { "match": "(?i)\\brecode(_(string|file))?\\b", "name": "support.function.recode.php" }, { "match": "(?i)\\brrd(c_disconnect|_(create|tune|info|update|error|version|first|fetch|last(update)?|restore|graph|xport))\\b", "name": "support.function.rrd.php" }, { "match": "(?xi)\\b\n(\n shm_((get|has|remove|put)_var|detach|attach|remove)|sem_(acquire|release|remove|get)|ftok|\n msg_((get|remove|set|stat)_queue|send|queue_exists|receive)\n)\\b", "name": "support.function.sem.php" }, { "match": "(?xi)\\b\nsession_(\n status|start|set_(save_handler|cookie_params)|save_path|name|commit|cache_(expire|limiter)|\n is_registered|id|destroy|decode|unset|unregister|encode|write_close|abort|reset|register(_shutdown)?|\n regenerate_id|get_cookie_params|module_name\n)\\b", "name": "support.function.session.php" }, { "match": "(?i)\\bshmop_(size|close|open|delete|write|read)\\b", "name": "support.function.shmop.php" }, { "match": "(?i)\\bsimplexml_(import_dom|load_(string|file))\\b", "name": "support.function.simplexml.php" }, { "match": "(?xi)\\b\n(\n snmp(walk(oid)?|realwalk|get(next)?|set)|\n snmp_(set_(valueretrieval|quick_print|enum_print|oid_(numeric_print|output_format))|read_mib|\n get_(valueretrieval|quick_print))|\n snmp[23]_(set|walk|real_walk|get(next)?)\n)\\b", "name": "support.function.snmp.php" }, { "match": "(?i)\\b(is_soap_fault|use_soap_error_handler)\\b", "name": "support.function.soap.php" }, { "match": "(?xi)\\b\nsocket_(\n shutdown|strerror|send(to|msg)?|set_((non)?block|option)|select|connect|close|clear_error|bind|\n create(_(pair|listen))?|cmsg_space|import_stream|write|listen|last_error|accept|recv(from|msg)?|\n read|get(peer|sock)name|get_option\n)\\b", "name": "support.function.sockets.php" }, { "match": "(?xi)\\b\nsqlite_(\n single_query|seek|has_(more|prev)|num_(fields|rows)|next|changes|column|current|close|\n create_(aggregate|function)|open|unbuffered_query|udf_(decode|encode)_binary|popen|prev|\n escape_string|error_string|exec|valid|key|query|field_name|factory|\n fetch_(string|single|column_types|object|all|array)|lib(encoding|version)|\n last_(insert_rowid|error)|array_query|rewind|busy_timeout\n)\\b", "name": "support.function.sqlite.php" }, { "match": "(?xi)\\b\nsqlsrv_(\n send_stream_data|server_info|has_rows|num_(fields|rows)|next_result|connect|configure|commit|\n client_info|close|cancel|prepare|errors|execute|query|field_metadata|fetch(_(array|object))?|\n free_stmt|rows_affected|rollback|get_(config|field)|begin_transaction\n)\\b", "name": "support.function.sqlsrv.php" }, { "match": "(?xi)\\b\nstats_(\n harmonic_mean|covariance|standard_deviation|skew|\n cdf_(noncentral_(chisquare|f)|negative_binomial|chisquare|cauchy|t|uniform|poisson|exponential|f|weibull|\n logistic|laplace|gamma|binomial|beta)|\n stat_(noncentral_t|correlation|innerproduct|independent_t|powersum|percentile|paired_t|gennch|binomial_coef)|\n dens_(normal|negative_binomial|chisquare|cauchy|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|\n weibull|logistic|laplace|gamma|beta)|\n den_uniform|variance|kurtosis|absolute_deviation|\n rand_(setall|phrase_to_seeds|ranf|get_seeds|\n gen_(noncentral_[ft]|noncenral_chisquare|normal|chisquare|t|int|\n i(uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta))\n)\\b", "name": "support.function.stats.php" }, { "match": "(?xi)\\b\n(\n set_socket_blocking|\n stream_(socket_(shutdown|sendto|server|client|pair|enable_crypto|accept|recvfrom|get_name)|\n set_(chunk_size|timeout|(read|write)_buffer|blocking)|select|notification_callback|supports_lock|\n context_(set_(option|default|params)|create|get_(options|default|params))|copy_to_stream|is_local|\n encoding|filter_(append|prepend|register|remove)|wrapper_((un)?register|restore)|\n resolve_include_path|register_wrapper|get_(contents|transports|filters|wrappers|line|meta_data)|\n bucket_(new|prepend|append|make_writeable)\n )\n)\\b", "name": "support.function.streamsfuncs.php" }, { "match": "(?xi)\\b\n(\n money_format|md5(_file)?|metaphone|bin2hex|sscanf|sha1(_file)?|\n str(str|c?spn|n(at)?(case)?cmp|chr|coll|(case)?cmp|to(upper|lower)|tok|tr|istr|pos|pbrk|len|rchr|ri?pos|rev)|\n str_(getcsv|ireplace|pad|repeat|replace|rot13|shuffle|split|word_count)|\n strip(c?slashes|os)|strip_tags|similar_text|soundex|substr(_(count|compare|replace))?|setlocale|\n html(specialchars(_decode)?|entities)|html_entity_decode|hex2bin|hebrev(c)?|number_format|nl2br|nl_langinfo|\n chop|chunk_split|chr|convert_(cyr_string|uu(decode|encode))|count_chars|crypt|crc32|trim|implode|ord|\n uc(first|words)|join|parse_str|print(f)?|echo|explode|v?[fs]?printf|quoted_printable_(decode|encode)|\n quotemeta|wordwrap|lcfirst|[lr]trim|localeconv|levenshtein|addc?slashes|get_html_translation_table\n)\\b", "name": "support.function.string.php" }, { "match": "(?xi)\\b\nsybase_(\n set_message_handler|select_db|num_(fields|rows)|connect|close|deadlock_retry_count|data_seek|\n unbuffered_query|pconnect|query|field_seek|fetch_(object|field|assoc|array|row)|free_result|\n affected_rows|result|get_last_message|min_(client|error|message|server)_severity\n)\\b", "name": "support.function.sybase.php" }, { "match": "(?i)\\b(taint|is_tainted|untaint)\\b", "name": "support.function.taint.php" }, { "match": "(?xi)\\b\n(\n tidy_((get|set)opt|set_encoding|save_config|config_count|clean_repair|is_(xhtml|xml)|diagnose|\n (access|error|warning)_count|load_config|reset_config|(parse|repair)_(string|file)|\n get_(status|html(_ver)?|head|config|output|opt_doc|root|release|body))|\n ob_tidyhandler\n)\\b", "name": "support.function.tidy.php" }, { "match": "(?i)\\btoken_(name|get_all)\\b", "name": "support.function.tokenizer.php" }, { "match": "(?xi)\\b\ntrader_(\n stoch(f|r|rsi)?|stddev|sin(h)?|sum|sub|set_(compat|unstable_period)|sqrt|sar(ext)?|sma|\n ht_(sine|trend(line|mode)|dc(period|phase)|phasor)|natr|cci|cos(h)?|correl|\n cdl(shootingstar|shortline|sticksandwich|stalledpattern|spinningtop|separatinglines|\n hikkake(mod)?|highwave|homingpigeon|hangingman|harami(cross)?|hammer|concealbabyswall|\n counterattack|closingmarubozu|thrusting|tasukigap|takuri|tristar|inneck|invertedhammer|\n identical3crows|2crows|onneck|doji(star)?|darkcloudcover|dragonflydoji|unique3river|\n upsidegap2crows|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|\n piercing|engulfing|evening(doji)?star|kicking(bylength)?|longline|longleggeddoji|\n ladderbottom|advanceblock|abandonedbaby|risefall3methods|rickshawman|gapsidesidewhite|\n gravestonedoji|xsidegap3methods|morning(doji)?star|mathold|matchinglow|marubozu|\n belthold|breakaway)|\n ceil|cmo|tsf|typprice|t3|tema|tan(h)?|trix|trima|trange|obv|div|dema|dx|ultosc|ppo|\n plus_d[im]|errno|exp|ema|var|kama|floor|wclprice|willr|wma|ln|log10|bop|beta|bbands|\n linearreg(_(slope|intercept|angle))?|asin|acos|atan|atr|adosc|ad|add|adx(r)?|apo|avgprice|\n aroon(osc)?|rsi|roc|rocp|rocr(100)?|get_(compat|unstable_period)|min(index)?|minus_d[im]|\n minmax(index)?|mid(point|price)|mom|mult|medprice|mfi|macd(ext|fix)?|mavp|max(index)?|ma(ma)?\n)\\b", "name": "support.function.trader.php" }, { "match": "(?i)\\buopz_(copy|compose|implement|overload|delete|undefine|extend|function|flags|restore|rename|redefine|backup)\\b", "name": "support.function.uopz.php" }, { "match": "(?i)\\b(http_build_query|(raw)?url(decode|encode)|parse_url|get_(headers|meta_tags)|base64_(decode|encode))\\b", "name": "support.function.url.php" }, { "match": "(?xi)\\b\n(\n strval|settype|serialize|(bool|double|float)val|debug_zval_dump|intval|import_request_variables|isset|\n is_(scalar|string|null|numeric|callable|int(eger)?|object|double|float|long|array|resource|real|bool)|\n unset|unserialize|print_r|empty|var_(dump|export)|gettype|get_(defined_vars|resource_type)\n)\\b", "name": "support.function.var.php" }, { "match": "(?i)\\bwddx_(serialize_(value|vars)|deserialize|packet_(start|end)|add_vars)\\b", "name": "support.function.wddx.php" }, { "match": "(?i)\\bxhprof_(sample_)?(disable|enable)\\b", "name": "support.function.xhprof.php" }, { "match": "(?xi)\n\\b\n(\n utf8_(decode|encode)|\n xml_(set_((notation|(end|start)_namespace|unparsed_entity)_decl_handler|\n (character_data|default|element|external_entity_ref|processing_instruction)_handler|object)|\n parse(_into_struct)?|parser_((get|set)_option|create(_ns)?|free)|error_string|\n get_(current_((column|line)_number|byte_index)|error_code))\n)\\b", "name": "support.function.xml.php" }, { "match": "(?xi)\\b\nxmlrpc_(\n server_(call_method|create|destroy|add_introspection_data|register_(introspection_callback|method))|\n is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|(get|set)_type\n)\\b", "name": "support.function.xmlrpc.php" }, { "match": "(?xi)\\b\nxmlwriter_(\n (end|start|write)_(comment|cdata|dtd(_(attlist|entity|element))?|document|pi|attribute|element)|\n (start|write)_(attribute|element)_ns|write_raw|set_indent(_string)?|text|output_memory|open_(memory|uri)|\n full_end_element|flush|\n)\\b", "name": "support.function.xmlwriter.php" }, { "match": "(?xi)\\b\n(\n zlib_(decode|encode|get_coding_type)|readgzfile|\n gz(seek|compress|close|tell|inflate|open|decode|deflate|uncompress|puts|passthru|encode|eof|file|\n write|rewind|read|getc|getss?)\n)\\b", "name": "support.function.zlib.php" }, { "match": "(?i)\\bis_int(eger)?\\b", "name": "support.function.alias.php" } ] }, "switch_statement": { "patterns": [ { "match": "\\s+(?=switch\\b)" }, { "begin": "\\bswitch\\b(?!\\s*\\(.*\\)\\s*:)", "beginCaptures": { "0": { "name": "keyword.control.switch.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.section.switch-block.end.bracket.curly.php" } }, "name": "meta.switch-statement.php", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.switch-expression.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.switch-expression.end.bracket.round.php" } }, "patterns": [ { "include": "#language" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "patterns": [ { "include": "#language" } ] } ] } ] }, "use-inner": { "patterns": [ { "include": "#comments" }, { "begin": "(?i)\\b(as)\\s+", "beginCaptures": { "1": { "name": "keyword.other.use-as.php" } }, "end": "(?i)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*", "endCaptures": { "0": { "name": "entity.other.alias.php" } } }, { "include": "#class-name" }, { "match": ",", "name": "punctuation.separator.delimiter.php" } ] }, "var_basic": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*\\b", "name": "variable.other.php" } ] }, "var_global": { "captures": { "1": { "name": "punctuation.definition.variable.php" } }, "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b", "name": "variable.other.global.php" }, "var_global_safer": { "captures": { "1": { "name": "punctuation.definition.variable.php" } }, "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))", "name": "variable.other.global.safer.php" }, "var_language": { "match": "(\\$)this\\b", "name": "variable.language.this.php", "captures": { "1": { "name": "punctuation.definition.variable.php" } } }, "variable-name": { "patterns": [ { "include": "#var_global" }, { "include": "#var_global_safer" }, { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "punctuation.definition.variable.php" }, "4": { "name": "keyword.operator.class.php" }, "5": { "name": "variable.other.property.php" }, "6": { "name": "punctuation.section.array.begin.php" }, "7": { "name": "constant.numeric.index.php" }, "8": { "name": "variable.other.index.php" }, "9": { "name": "punctuation.definition.variable.php" }, "10": { "name": "string.unquoted.index.php" }, "11": { "name": "punctuation.section.array.end.php" } }, "match": "(?xi)\n((\\$)(?<name>[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))\n(?:\n (->)(\\g<name>)\n |\n (\\[)(?:(\\d+)|((\\$)\\g<name>)|([a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*))(\\])\n)?" }, { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "punctuation.definition.variable.php" }, "4": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)((\\${)(?<name>[a-z_\\x{7f}-\\x{ff}][a-z0-9_\\x{7f}-\\x{ff}]*)(}))" } ] }, "variables": { "patterns": [ { "include": "#var_language" }, { "include": "#var_global" }, { "include": "#var_global_safer" }, { "include": "#var_basic" }, { "begin": "\\${(?=.*?})", "beginCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "patterns": [ { "include": "#language" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/php-html.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/html.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-php/commit/ff64523c94c014d68f5dec189b05557649c5872a", "name": "php-html", "scopeName": "text.html.php", "injections": { "L:meta.embedded.php.blade": { "patterns": [ { "include": "text.html.basic" }, { "include": "text.html.php.blade#blade" } ] }, "text.html.php - (meta.embedded | meta.tag), L:((text.html.php meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))": { "patterns": [ { "include": "#php-tag" } ] } }, "patterns": [ { "begin": "\\A#!", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "$", "name": "comment.line.shebang.php" }, { "include": "text.html.derivative" } ], "repository": { "php-tag": { "patterns": [ { "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "end": "(\\?)>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "name": "meta.embedded.block.php", "contentName": "source.php", "patterns": [ { "include": "source.php" } ] }, { "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" } }, "end": "(\\?)>", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" } }, "name": "meta.embedded.line.php", "contentName": "source.php", "patterns": [ { "include": "source.php" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/php.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/php.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-php/commit/eb28b8aea1214dcbc732f3d9b9ed20c089c648bd", "scopeName": "source.php", "patterns": [ { "include": "#attribute" }, { "include": "#comments" }, { "match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)(?=\\s*;)", "name": "meta.namespace.php", "captures": { "1": { "name": "keyword.other.namespace.php" }, "2": { "name": "entity.name.type.namespace.php", "patterns": [ { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] } } }, { "begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+", "beginCaptures": { "1": { "name": "keyword.other.namespace.php" } }, "end": "(?<=})|(?=\\?>)", "name": "meta.namespace.php", "patterns": [ { "include": "#comments" }, { "match": "(?i)[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+", "name": "entity.name.type.namespace.php", "captures": { "0": { "patterns": [ { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] } } }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.namespace.begin.bracket.curly.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.namespace.end.bracket.curly.php" } }, "patterns": [ { "include": "$self" } ] }, { "match": "[^\\s]+", "name": "invalid.illegal.identifier.php" } ] }, { "match": "\\s+(?=use\\b)" }, { "begin": "(?i)\\buse\\b", "beginCaptures": { "0": { "name": "keyword.other.use.php" } }, "end": "(?<=})|(?=;)|(?=\\?>)", "name": "meta.use.php", "patterns": [ { "match": "\\b(const|function)\\b", "name": "storage.type.${1:/downcase}.php" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.use.begin.bracket.curly.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.use.end.bracket.curly.php" } }, "patterns": [ { "include": "#scope-resolution" }, { "match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "captures": { "1": { "name": "keyword.other.use-as.php" }, "2": { "name": "storage.modifier.php" }, "3": { "name": "entity.other.alias.php" } } }, { "match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "captures": { "1": { "name": "keyword.other.use-as.php" }, "2": { "patterns": [ { "match": "^(?:final|abstract|public|private|protected|static)$", "name": "storage.modifier.php" }, { "match": ".+", "name": "entity.other.alias.php" } ] } } }, { "match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "captures": { "1": { "name": "keyword.other.use-insteadof.php" }, "2": { "name": "support.class.php" } } }, { "match": ";", "name": "punctuation.terminator.expression.php" }, { "include": "#use-inner" } ] }, { "include": "#use-inner" } ] }, { "begin": "(?ix)\n\\b(trait)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "beginCaptures": { "1": { "name": "storage.type.trait.php" }, "2": { "name": "entity.name.type.trait.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.trait.end.bracket.curly.php" } }, "name": "meta.trait.php", "patterns": [ { "include": "#comments" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.trait.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "contentName": "meta.trait.body.php", "patterns": [ { "include": "$self" } ] } ] }, { "begin": "(?ix)\n\\b(interface)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "beginCaptures": { "1": { "name": "storage.type.interface.php" }, "2": { "name": "entity.name.type.interface.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.interface.end.bracket.curly.php" } }, "name": "meta.interface.php", "patterns": [ { "include": "#comments" }, { "include": "#interface-extends" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.interface.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "contentName": "meta.interface.body.php", "patterns": [ { "include": "#class-constant" }, { "include": "$self" } ] } ] }, { "begin": "(?ix)\n\\b(enum)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\n(?: \\s* (:) \\s* (int | string) \\b )?", "beginCaptures": { "1": { "name": "storage.type.enum.php" }, "2": { "name": "entity.name.type.enum.php" }, "3": { "name": "keyword.operator.return-value.php" }, "4": { "name": "keyword.other.type.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.enum.end.bracket.curly.php" } }, "name": "meta.enum.php", "patterns": [ { "include": "#comments" }, { "include": "#class-implements" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.enum.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "contentName": "meta.enum.body.php", "patterns": [ { "match": "(?i)\\b(case)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "captures": { "1": { "name": "storage.modifier.php" }, "2": { "name": "constant.enum.php" } } }, { "include": "#class-constant" }, { "include": "$self" } ] } ] }, { "begin": "(?ix)\n(?:\n \\b(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\n |\\b(new)\\b\\s*(\\#\\[.*\\])?\\s*\\b(class)\\b # anonymous class\n)", "beginCaptures": { "1": { "name": "storage.modifier.${1:/downcase}.php" }, "2": { "name": "storage.type.class.php" }, "3": { "name": "entity.name.type.class.php" }, "4": { "name": "keyword.other.new.php" }, "5": { "patterns": [ { "include": "#attribute" } ] }, "6": { "name": "storage.type.class.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.class.end.bracket.curly.php" } }, "name": "meta.class.php", "patterns": [ { "begin": "(?<=class)\\s*(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.function-call.php", "patterns": [ { "include": "#named-arguments" }, { "include": "$self" } ] }, { "include": "#comments" }, { "include": "#class-extends" }, { "include": "#class-implements" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.class.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "contentName": "meta.class.body.php", "patterns": [ { "include": "#class-constant" }, { "include": "$self" } ] } ] }, { "include": "#match_statement" }, { "include": "#switch_statement" }, { "match": "\\s*\\b(yield\\s+from)\\b", "captures": { "1": { "name": "keyword.control.yield-from.php" } } }, { "match": "(?x)\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b", "captures": { "1": { "name": "keyword.control.${1:/downcase}.php" } } }, { "begin": "(?i)\\b((?:require|include)(?:_once)?)(\\s+|(?=\\())", "beginCaptures": { "1": { "name": "keyword.control.import.include.php" } }, "end": "(?=\\s|;|$|\\?>)", "name": "meta.include.php", "patterns": [ { "include": "$self" } ] }, { "begin": "\\b(catch)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.exception.catch.php" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "name": "meta.catch.php", "patterns": [ { "match": "(?xi)\n([a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)*) # union or single exception class\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)? # Variable", "captures": { "1": { "patterns": [ { "match": "\\|", "name": "punctuation.separator.delimiter.php" }, { "begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{10ffff}])", "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "endCaptures": { "1": { "name": "support.class.exception.php" } }, "patterns": [ { "include": "#namespace" } ] } ] }, "2": { "name": "variable.other.php" }, "3": { "name": "punctuation.definition.variable.php" } } } ] }, { "match": "\\b(catch|try|throw|exception|finally)\\b", "name": "keyword.control.exception.php" }, { "begin": "(?i)\\b(function)\\s*(?=&?\\s*\\()", "beginCaptures": { "1": { "name": "storage.type.function.php" } }, "end": "(?=\\s*{)", "name": "meta.function.closure.php", "patterns": [ { "include": "#comments" }, { "begin": "(&)?\\s*(\\()", "beginCaptures": { "1": { "name": "storage.modifier.reference.php" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "contentName": "meta.function.parameters.php", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "patterns": [ { "include": "#function-parameters" } ] }, { "begin": "(?i)(use)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.function.use.php" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "name": "meta.function.closure.use.php", "patterns": [ { "match": ",", "name": "punctuation.separator.delimiter.php" }, { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)((?:(&)\\s*)?(\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(?=,|\\))" } ] }, { "match": "(?xi)\n(:)\\s*\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n)\n(?=\\s*(?:{|/[/*]|\\#|$))", "captures": { "1": { "name": "keyword.operator.return-value.php" }, "2": { "patterns": [ { "include": "#php-types" } ] } } } ] }, { "begin": "(?i)\\b(fn)\\s*(?=&?\\s*\\()", "beginCaptures": { "1": { "name": "storage.type.function.php" } }, "end": "=>", "endCaptures": { "0": { "name": "punctuation.definition.arrow.php" } }, "name": "meta.function.closure.php", "patterns": [ { "begin": "(?:(&)\\s*)?(\\()", "beginCaptures": { "1": { "name": "storage.modifier.reference.php" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "contentName": "meta.function.parameters.php", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.php" } }, "patterns": [ { "include": "#function-parameters" } ] }, { "match": "(?xi)\n(:)\\s*\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n)\n(?=\\s*(?:=>|/[/*]|\\#|$))", "captures": { "1": { "name": "keyword.operator.return-value.php" }, "2": { "patterns": [ { "include": "#php-types" } ] } } } ] }, { "begin": "(?x)\n((?:(?:final|abstract|public|private|protected)\\s+)*)\n(function)\\s+(__construct)\n\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "match": "final|abstract|public|private|protected", "name": "storage.modifier.php" } ] }, "2": { "name": "storage.type.function.php" }, "3": { "name": "support.function.constructor.php" }, "4": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "contentName": "meta.function.parameters.php", "end": "(?xi)\n(\\)) \\s* ( : \\s*\n (?:\\?\\s*)? (?!\\s) [a-z0-9_\\x{7f}-\\x{10ffff}\\\\\\s\\|&]+ (?<!\\s)\n)?\n(?=\\s*(?:{|/[/*]|\\#|$|;))", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.bracket.round.php" }, "2": { "name": "invalid.illegal.return-type.php" } }, "name": "meta.function.php", "patterns": [ { "include": "#comments" }, { "match": ",", "name": "punctuation.separator.delimiter.php" }, { "begin": "(?xi)\n((?:(?:public|private|protected|readonly)(?:\\s+|(?=\\?)))++)\n(?: (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n) \\s+ )?\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference", "beginCaptures": { "1": { "patterns": [ { "match": "public|private|protected|readonly", "name": "storage.modifier.php" } ] }, "2": { "patterns": [ { "include": "#php-types" } ] }, "3": { "name": "variable.other.php" }, "4": { "name": "storage.modifier.reference.php" }, "5": { "name": "punctuation.definition.variable.php" } }, "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", "name": "meta.function.parameter.promoted-property.php", "patterns": [ { "begin": "=", "beginCaptures": { "0": { "name": "keyword.operator.assignment.php" } }, "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", "patterns": [ { "include": "#parameter-default-types" } ] } ] }, { "include": "#function-parameters" } ] }, { "begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic|serialize|unserialize))\n |(?:(&)?\\s*([a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]*))\n)\n\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "match": "final|abstract|public|private|protected|static", "name": "storage.modifier.php" } ] }, "2": { "name": "storage.type.function.php" }, "3": { "name": "support.function.magic.php" }, "4": { "name": "storage.modifier.reference.php" }, "5": { "name": "entity.name.function.php" }, "6": { "name": "punctuation.definition.parameters.begin.bracket.round.php" } }, "contentName": "meta.function.parameters.php", "end": "(?xi)\n(\\)) (?: \\s* (:) \\s* (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n) )?\n(?=\\s*(?:{|/[/*]|\\#|$|;))", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.bracket.round.php" }, "2": { "name": "keyword.operator.return-value.php" }, "3": { "patterns": [ { "match": "\\b(static)\\b", "name": "storage.type.php" }, { "match": "\\b(never)\\b", "name": "keyword.other.type.never.php" }, { "include": "#php-types" } ] } }, "name": "meta.function.php", "patterns": [ { "include": "#function-parameters" } ] }, { "match": "(?xi)\n((?:(?:public|private|protected|static|readonly)(?:\\s+|(?=\\?)))++) # At least one modifier\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n)?\n\\s+ ((\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name", "captures": { "1": { "patterns": [ { "match": "public|private|protected|static|readonly", "name": "storage.modifier.php" } ] }, "2": { "patterns": [ { "include": "#php-types" } ] }, "3": { "name": "variable.other.php" }, "4": { "name": "punctuation.definition.variable.php" } } }, { "include": "#invoke-call" }, { "include": "#scope-resolution" }, { "include": "#variables" }, { "include": "#strings" }, { "captures": { "1": { "name": "support.function.construct.php" }, "2": { "name": "punctuation.definition.array.begin.bracket.round.php" }, "3": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "match": "(array)(\\()(\\))", "name": "meta.array.empty.php" }, { "begin": "(array)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.construct.php" }, "2": { "name": "punctuation.definition.array.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.array.php", "patterns": [ { "include": "$self" } ] }, { "match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))", "captures": { "1": { "name": "punctuation.definition.storage-type.begin.bracket.round.php" }, "2": { "name": "storage.type.php" }, "3": { "name": "punctuation.definition.storage-type.end.bracket.round.php" } } }, { "match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object|mixed)\\b", "name": "storage.type.php" }, { "match": "(?i)\\b(global|abstract|const|final|private|protected|public|static)\\b", "name": "storage.modifier.php" }, { "include": "#object" }, { "match": ";", "name": "punctuation.terminator.expression.php" }, { "match": ":", "name": "punctuation.terminator.statement.php" }, { "include": "#heredoc" }, { "include": "#numbers" }, { "match": "(?i)\\bclone\\b", "name": "keyword.other.clone.php" }, { "match": "\\.\\.\\.", "name": "keyword.operator.spread.php" }, { "match": "\\.=?", "name": "keyword.operator.string.php" }, { "match": "=>", "name": "keyword.operator.key.php" }, { "captures": { "1": { "name": "keyword.operator.assignment.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "storage.modifier.reference.php" } }, "match": "(?i)(\\=)(&)|(&)(?=[$a-z_])" }, { "match": "@", "name": "keyword.operator.error-control.php" }, { "match": "===|==|!==|!=|<>", "name": "keyword.operator.comparison.php" }, { "match": "=|\\+=|\\-=|\\*\\*?=|/=|%=|&=|\\|=|\\^=|<<=|>>=|\\?\\?=", "name": "keyword.operator.assignment.php" }, { "match": "<=>|<=|>=|<|>", "name": "keyword.operator.comparison.php" }, { "match": "\\-\\-|\\+\\+", "name": "keyword.operator.increment-decrement.php" }, { "match": "\\-|\\+|\\*\\*?|/|%", "name": "keyword.operator.arithmetic.php" }, { "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", "name": "keyword.operator.logical.php" }, { "include": "#function-call" }, { "match": "<<|>>|~|\\^|&|\\|", "name": "keyword.operator.bitwise.php" }, { "begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])", "beginCaptures": { "1": { "name": "keyword.operator.type.php" } }, "end": "(?i)(?=[^\\\\$a-z0-9_\\x{7f}-\\x{10ffff}])", "patterns": [ { "include": "#class-name" }, { "include": "#variable-name" } ] }, { "include": "#instantiation" }, { "captures": { "1": { "name": "keyword.control.goto.php" }, "2": { "name": "support.other.php" } }, "match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)" }, { "captures": { "1": { "name": "entity.name.goto-label.php" } }, "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*(?<!default))\\s*:(?!:)" }, { "include": "#string-backtick" }, { "include": "#ternary_shorthand" }, { "include": "#null_coalescing" }, { "include": "#ternary_expression" }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.curly.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.curly.php" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.php" } }, "end": "\\]|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.section.array.end.php" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.php" } }, "patterns": [ { "include": "$self" } ] }, { "include": "#constants" }, { "match": ",", "name": "punctuation.separator.delimiter.php" } ], "repository": { "attribute-name": { "patterns": [ { "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "endCaptures": { "1": { "name": "support.attribute.php" } }, "patterns": [ { "include": "#namespace" } ] }, { "match": "(?xi)\n(\\\\)?\\b(Attribute)\\b", "name": "support.attribute.builtin.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{10ffff}])", "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "endCaptures": { "1": { "name": "support.attribute.php" } }, "patterns": [ { "include": "#namespace" } ] } ] }, "attribute": { "begin": "\\#\\[", "end": "\\]", "name": "meta.attribute.php", "patterns": [ { "match": ",", "name": "punctuation.separator.delimiter.php" }, { "begin": "([a-zA-Z0-9_\\x{7f}-\\x{10ffff}\\\\]+)\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#attribute-name" } ] }, "2": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "patterns": [ { "include": "#named-arguments" }, { "include": "$self" } ] }, { "include": "#attribute-name" } ] }, "class-builtin": { "patterns": [ { "match": "(?xi)\n(\\\\)?\\b\n(Attribute|(APC|Append)Iterator|Array(Access|Iterator|Object)\n|Bad(Function|Method)CallException\n|(Caching|CallbackFilter)Iterator|Collator|Collectable|Cond|Countable|CURLFile\n|Date(Interval|Period|Time(Interface|Immutable|Zone)?)?|Directory(Iterator)?|DomainException\n|DOM(Attr|CdataSection|CharacterData|Comment|Document(Fragment)?|Element|EntityReference\n |Implementation|NamedNodeMap|Node(list)?|ProcessingInstruction|Text|XPath)\n|(Error)?Exception|EmptyIterator\n|finfo\n|Ev(Check|Child|Embed|Fork|Idle|Io|Loop|Periodic|Prepare|Signal|Stat|Timer|Watcher)?\n|Event(Base|Buffer(Event)?|SslContext|Http(Request|Connection)?|Config|DnsBase|Util|Listener)?\n|FANNConnection|(Filter|Filesystem)Iterator\n|Gender\\\\Gender|GlobIterator|Gmagick(Draw|Pixel)?\n|Haru(Annotation|Destination|Doc|Encoder|Font|Image|Outline|Page)\n|Http((Inflate|Deflate)?Stream|Message|Request(Pool)?|Response|QueryString)\n|HRTime\\\\(PerformanceCounter|StopWatch)\n|Intl(Calendar|((CodePoint|RuleBased)?Break|Parts)?Iterator|DateFormatter|TimeZone)\n|Imagick(Draw|Pixel(Iterator)?)?\n|InfiniteIterator|InvalidArgumentException|Iterator(Aggregate|Iterator)?\n|JsonSerializable\n|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|(AttachedPicture)?Frame))\n|Lapack|(Length|Locale|Logic)Exception|LimitIterator|Lua(Closure)?\n|Mongo(BinData|Client|Code|Collection|CommandCursor|Cursor(Exception)?|Date|DB(Ref)?|DeleteBatch\n |Grid(FS(Cursor|File)?)|Id|InsertBatch|Int(32|64)|Log|Pool|Regex|ResultException|Timestamp\n |UpdateBatch|Write(Batch|ConcernException))?\n|Memcache(d)?|MessageFormatter|MultipleIterator|Mutex\n|mysqli(_(driver|stmt|warning|result))?\n|MysqlndUh(Connection|PreparedStatement)\n|NoRewindIterator|Normalizer|NumberFormatter\n|OCI-(Collection|Lob)|OuterIterator|(OutOf(Bounds|Range)|Overflow)Exception\n|ParentIterator|PDO(Statement)?|Phar(Data|FileInfo)?|php_user_filter|Pool\n|QuickHash(Int(Set|StringHash)|StringIntHash)\n|Recursive(Array|Caching|Directory|Fallback|Filter|Iterator|Regex|Tree)?Iterator\n|Reflection(Class|Function(Abstract)?|Method|Object|Parameter|Property|(Zend)?Extension)?\n|RangeException|Reflector|RegexIterator|ResourceBundle|RuntimeException|RRD(Creator|Graph|Updater)\n|SAM(Connection|Message)|SCA(_(SoapProxy|LocalProxy))?\n|SDO_(DAS_(ChangeSummary|Data(Factory|Object)|Relational|Setting|XML(_Document)?)\n |Data(Factory|Object)|Exception|List|Model_(Property|ReflectionDataObject|Type)|Sequence)\n|SeekableIterator|Serializable|SessionHandler(Interface)?|SimpleXML(Iterator|Element)|SNMP\n|Soap(Client|Fault|Header|Param|Server|Var)\n|SphinxClient|Spoofchecker\n|Spl(DoublyLinkedList|Enum|File(Info|Object)|FixedArray|(Max|Min)?Heap|Observer|ObjectStorage\n |(Priority)?Queue|Stack|Subject|Type|TempFileObject)\n|SQLite(3(Result|Stmt)?|Database|Result|Unbuffered)\n|stdClass|streamWrapper|SVM(Model)?|Swish(Result(s)?|Search)?|Sync(Event|Mutex|ReaderWriter|Semaphore)\n|Thread(ed)?|tidy(Node)?|TokyoTyrant(Table|Iterator|Query)?|Transliterator|Traversable\n|UConverter|(Underflow|UnexpectedValue)Exception\n|V8Js(Exception)?|Varnish(Admin|Log|Stat)\n|Worker|Weak(Map|Ref)\n|XML(Diff\\\\(Base|DOM|File|Memory)|Reader|Writer)|XsltProcessor\n|Yaf_(Route_(Interface|Map|Regex|Rewrite|Simple|Supervar)\n |Action_Abstract|Application|Config_(Simple|Ini|Abstract)|Controller_Abstract\n |Dispatcher|Exception|Loader|Plugin_Abstract|Registry|Request_(Abstract|Simple|Http)\n |Response_Abstract|Router|Session|View_(Simple|Interface))\n|Yar_(Client(_Exception)?|Concurrent_Client|Server(_Exception)?)\n|ZipArchive|ZMQ(Context|Device|Poll|Socket)?)\n\\b", "name": "support.class.builtin.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } } ] }, "class-name": { "patterns": [ { "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "endCaptures": { "1": { "name": "support.class.php" } }, "patterns": [ { "include": "#namespace" } ] }, { "include": "#class-builtin" }, { "begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{10ffff}])", "end": "(?xi)\n( [a-z_\\x{7f}-\\x{10ffff}] [a-z0-9_\\x{7f}-\\x{10ffff}]* )?\n(?![a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "endCaptures": { "1": { "name": "support.class.php" } }, "patterns": [ { "include": "#namespace" } ] } ] }, "inheritance-single": { "patterns": [ { "begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", "end": "(?i)([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "endCaptures": { "1": { "name": "entity.other.inherited-class.php" } }, "patterns": [ { "include": "#namespace" } ] }, { "include": "#class-builtin" }, { "include": "#namespace" }, { "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", "name": "entity.other.inherited-class.php" } ] }, "class-extends": { "patterns": [ { "begin": "(?i)(extends)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.extends.php" } }, "end": "(?i)(?=[^A-Za-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "patterns": [ { "include": "#comments" }, { "include": "#inheritance-single" } ] } ] }, "interface-extends": { "patterns": [ { "begin": "(?i)(extends)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.extends.php" } }, "end": "(?i)(?={)", "patterns": [ { "include": "#comments" }, { "match": ",", "name": "punctuation.separator.classes.php" }, { "include": "#inheritance-single" } ] } ] }, "class-implements": { "patterns": [ { "begin": "(?i)(implements)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.implements.php" } }, "end": "(?i)(?={)", "patterns": [ { "include": "#comments" }, { "match": ",", "name": "punctuation.separator.classes.php" }, { "include": "#inheritance-single" } ] } ] }, "class-constant": { "patterns": [ { "match": "(?i)\\b(const)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)", "captures": { "1": { "name": "storage.modifier.php" }, "2": { "name": "constant.other.php" } } } ] }, "comments": { "patterns": [ { "begin": "/\\*\\*(?=\\s)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "name": "comment.block.documentation.phpdoc.php", "patterns": [ { "include": "#php_doc" } ] }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\*/", "name": "comment.block.php" }, { "begin": "(^\\s+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\n|(?=\\?>)", "name": "comment.line.double-slash.php" } ] }, { "begin": "(^\\s+)?(?=#)(?!#\\[)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "end": "\\n|(?=\\?>)", "name": "comment.line.number-sign.php" } ] } ] }, "constants": { "patterns": [ { "match": "(?i)\\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", "name": "constant.language.php" }, { "match": "(?x)\n(\\\\)?\\b\n(DEFAULT_INCLUDE_PATH\n|EAR_(INSTALL|EXTENSION)_DIR\n|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|DEPRECATED|ERROR|NOTICE\n |PARSE|RECOVERABLE_ERROR|STRICT|USER_(DEPRECATED|ERROR|NOTICE|WARNING)|WARNING)\n|PHP_(ROUND_HALF_(DOWN|EVEN|ODD|UP)|(MAJOR|MINOR|RELEASE)_VERSION|MAXPATHLEN\n |BINDIR|SHLIB_SUFFIX|SYSCONFDIR|SAPI|CONFIG_FILE_(PATH|SCAN_DIR)\n |INT_(MAX|SIZE)|ZTS|OS|OUTPUT_HANDLER_(START|CONT|END)|DEBUG|DATADIR\n |URL_(SCHEME|HOST|USER|PORT|PASS|PATH|QUERY|FRAGMENT)|PREFIX\n |EXTRA_VERSION|EXTENSION_DIR|EOL|VERSION(_ID)?\n |WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)\n |VERSION_(MAJOR|MINOR)|BUILD|SUITEMASK|SP_(MAJOR|MINOR)\n |PRODUCTTYPE|PLATFORM)\n |LIBDIR|LOCALSTATEDIR)\n|STD(ERR|IN|OUT)|ZEND_(DEBUG_BUILD|THREAD_SAFE))\n\\b", "name": "support.constant.core.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?x)\n(\\\\)?\\b\n(__COMPILER_HALT_OFFSET__|AB(MON_(1|2|3|4|5|6|7|8|9|10|11|12)|DAY[1-7])\n|AM_STR|ASSERT_(ACTIVE|BAIL|CALLBACK_QUIET_EVAL|WARNING)|ALT_DIGITS\n|CASE_(UPPER|LOWER)|CHAR_MAX|CONNECTION_(ABORTED|NORMAL|TIMEOUT)|CODESET|COUNT_(NORMAL|RECURSIVE)\n|CREDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)\n|CRYPT_(BLOWFISH|EXT_DES|MD5|SHA(256|512)|SALT_LENGTH|STD_DES)|CURRENCY_SYMBOL\n|D_(T_)?FMT|DATE_(ATOM|COOKIE|ISO8601|RFC(822|850|1036|1123|2822|3339)|RSS|W3C)\n|DAY_[1-7]|DECIMAL_POINT|DIRECTORY_SEPARATOR\n|ENT_(COMPAT|IGNORE|(NO)?QUOTES)|EXTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|REFS|SKIP)\n|ERA(_(D_(T_)?FMT)|T_FMT|YEAR)?|FRAC_DIGITS|GROUPING|HASH_HMAC|HTML_(ENTITIES|SPECIALCHARS)\n|INF|INFO_(ALL|CREDITS|CONFIGURATION|ENVIRONMENT|GENERAL|LICENSEMODULES|VARIABLES)\n|INI_(ALL|CANNER_(NORMAL|RAW)|PERDIR|SYSTEM|USER)|INT_(CURR_SYMBOL|FRAC_DIGITS)\n|LC_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|LOCK_(EX|NB|SH|UN)\n|LOG_(ALERT|AUTH(PRIV)?|CRIT|CRON|CONS|DAEMON|DEBUG|EMERG|ERR|INFO|LOCAL[1-7]|LPR|KERN|MAIL\n |NEWS|NODELAY|NOTICE|NOWAIT|ODELAY|PID|PERROR|WARNING|SYSLOG|UCP|USER)\n|M_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRT)?PI|PI(_(2|4))?|E(ULER)?|LN(10|2|PI)|LOG(10|2)E)\n|MON_(1|2|3|4|5|6|7|8|9|10|11|12|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)\n|N_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|NAN|NEGATIVE_SIGN|NO(EXPR|STR)\n|P_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN)|PM_STR|POSITIVE_SIGN\n|PATH(_SEPARATOR|INFO_(EXTENSION|(BASE|DIR|FILE)NAME))|RADIXCHAR\n|SEEK_(CUR|END|SET)|SORT_(ASC|DESC|LOCALE_STRING|REGULAR|STRING)|STR_PAD_(BOTH|LEFT|RIGHT)\n|T_FMT(_AMPM)?|THOUSEP|THOUSANDS_SEP\n|UPLOAD_ERR_(CANT_WRITE|EXTENSION|(FORM|INI)_SIZE|NO_(FILE|TMP_DIR)|OK|PARTIAL)\n|YES(EXPR|STR))\n\\b", "name": "support.constant.std.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?x)\n(\\\\)?\\b\n(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)\n|XML_(SAX_IMPL|(DTD|DOCUMENT(_(FRAG|TYPE))?|HTML_DOCUMENT|NOTATION|NAMESPACE_DECL|PI|COMMENT|DATA_SECTION|TEXT)_NODE\n |OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)\n |ERROR_((BAD_CHAR|(ATTRIBUTE_EXTERNAL|BINARY|PARAM|RECURSIVE)_ENTITY)_REF|MISPLACED_XML_PI|SYNTAX|NONE\n |NO_(MEMORY|ELEMENTS)|TAG_MISMATCH|INCORRECT_ENCODING|INVALID_TOKEN|DUPLICATE_ATTRIBUTE\n |UNCLOSED_(CDATA_SECTION|TOKEN)|UNDEFINED_ENTITY|UNKNOWN_ENCODING|JUNK_AFTER_DOC_ELEMENT\n |PARTIAL_CHAR|EXTERNAL_ENTITY_HANDLING|ASYNC_ENTITY)\n |ENTITY_(((REF|DECL)_)?NODE)|ELEMENT(_DECL)?_NODE|LOCAL_NAMESPACE|ATTRIBUTE_(NMTOKEN(S)?|NOTATION|NODE)\n |CDATA|ID(REF(S)?)?|DECL_NODE|ENTITY|ENUMERATION)\n|MHASH_(RIPEMD(128|160|256|320)|GOST|MD(2|4|5)|SHA(1|224|256|384|512)|SNEFRU256|HAVAL(128|160|192|224|256)\n |CRC23(B)?|TIGER(128|160)?|WHIRLPOOL|ADLER32)\n|MYSQL_(BOTH|NUM|CLIENT_(SSL|COMPRESS|IGNORE_SPACE|INTERACTIVE|ASSOC))\n|MYSQLI_(REPORT_(STRICT|INDEX|OFF|ERROR|ALL)|REFRESH_(GRANT|MASTER|BACKUP_LOG|STATUS|SLAVE|HOSTS|THREADS|TABLES|LOG)\n |READ_DEFAULT_(FILE|GROUP)|(GROUP|MULTIPLE_KEY|BINARY|BLOB)_FLAG|BOTH\n |STMT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|STORE_RESULT\n |SERVER_QUERY_(NO_((GOOD_)?INDEX_USED)|WAS_SLOW)|SET_(CHARSET_NAME|FLAG)\n |NO_(DEFAULT_VALUE_FLAG|DATA)|NOT_NULL_FLAG|NUM(_FLAG)?\n |CURSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)\n |CLIENT_(SSL|NO_SCHEMA|COMPRESS|IGNORE_SPACE|INTERACTIVE|FOUND_ROWS)\n |TYPE_(GEOMETRY|((MEDIUM|LONG|TINY)_)?BLOB|BIT|SHORT|STRING|SET|YEAR|NULL|NEWDECIMAL|NEWDATE|CHAR\n |TIME(STAMP)?|TINY|INT24|INTERVAL|DOUBLE|DECIMAL|DATE(TIME)?|ENUM|VAR_STRING|FLOAT|LONG(LONG)?)\n |TIME_STAMP_FLAG|INIT_COMMAND|ZEROFILL_FLAG|ON_UPDATE_NOW_FLAG\n |OPT_(NET_((CMD|READ)_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE)\n |DEBUG_TRACE_ENABLED|DATA_TRUNCATED|USE_RESULT|(ENUM|(PART|PRI|UNIQUE)_KEY|UNSIGNED)_FLAG\n |ASSOC|ASYNC|AUTO_INCREMENT_FLAG)\n|MCRYPT_(RC(2|6)|RIJNDAEL_(128|192|256)|RAND|GOST|XTEA|MODE_(STREAM|NOFB|CBC|CFB|OFB|ECB)|MARS\n |BLOWFISH(_COMPAT)?|SERPENT|SKIPJACK|SAFER(64|128|PLUS)|CRYPT|CAST_(128|256)|TRIPLEDES|THREEWAY\n |TWOFISH|IDEA|(3)?DES|DECRYPT|DEV_(U)?RANDOM|PANAMA|ENCRYPT|ENIGNA|WAKE|LOKI97|ARCFOUR(_IV)?)\n|STREAM_(REPORT_ERRORS|MUST_SEEK|MKDIR_RECURSIVE|BUFFER_(NONE|FULL|LINE)|SHUT_(RD)?WR\n |SOCK_(RDM|RAW|STREAM|SEQPACKET|DGRAM)|SERVER_(BIND|LISTEN)\n |NOTIFY_(REDIRECTED|RESOLVE|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|COMPLETED|CONNECT|PROGRESS\n |FILE_SIZE_IS|FAILURE|AUTH_(REQUIRED|RESULT))\n |CRYPTO_METHOD_((SSLv2(3)?|SSLv3|TLS)_(CLIENT|SERVER))|CLIENT_((ASYNC_)?CONNECT|PERSISTENT)\n |CAST_(AS_STREAM|FOR_SELECT)|(IGNORE|IS)_URL|IPPROTO_(RAW|TCP|ICMP|IP|UDP)|OOB\n |OPTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER)|URL_STAT_(LINK|QUIET)|USE_PATH\n |PEEK|PF_(INET(6)?|UNIX)|ENFORCE_SAFE_MODE|FILTER_(ALL|READ|WRITE))\n|SUNFUNCS_RET_(DOUBLE|STRING|TIMESTAMP)\n|SQLITE_(READONLY|ROW|MISMATCH|MISUSE|BOTH|BUSY|SCHEMA|NOMEM|NOTFOUND|NOTADB|NOLFS|NUM|CORRUPT\n |CONSTRAINT|CANTOPEN|TOOBIG|INTERRUPT|INTERNAL|IOERR|OK|DONE|PROTOCOL|PERM|ERROR|EMPTY\n |FORMAT|FULL|LOCKED|ABORT|ASSOC|AUTH)\n|SQLITE3_(BOTH|BLOB|NUM|NULL|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT_ASSOC)\n|CURL(M_(BAD_((EASY)?HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|OUT_OF_MEMORY|OK)\n |MSG_DONE|SSH_AUTH_(HOST|NONE|DEFAULT|PUBLICKEY|PASSWORD|KEYBOARD)\n |CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC)\n |INFO_(REDIRECT_(COUNT|TIME)|REQUEST_SIZE|SSL_VERIFYRESULT|STARTTRANSFER_TIME\n |(SIZE|SPEED)_(DOWNLOAD|UPLOAD)|HTTP_CODE|HEADER_(OUT|SIZE)|NAMELOOKUP_TIME\n |CONNECT_TIME|CONTENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD))|CERTINFO|TOTAL_TIME\n |PRIVATE|PRETRANSFER_TIME|EFFECTIVE_URL|FILETIME)\n |OPT_(RESUME_FROM|RETURNTRANSFER|REDIR_PROTOCOLS|REFERER|READ(DATA|FUNCTION)|RANGE|RANDOM_FILE\n |MAX(CONNECTS|REDIRS)|BINARYTRANSFER|BUFFERSIZE\n |SSH_(HOST_PUBLIC_KEY_MD5|(PRIVATE|PUBLIC)_KEYFILE)|AUTH_TYPES)\n |SSL(CERT(TYPE|PASSWD)?|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?)\n |SSL_(CIPHER_LIST|VERIFY(HOST|PEER))\n |STDERR|HTTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)\n |HEADER(FUNCTION)?|NO(BODY|SIGNAL|PROGRESS)|NETRC|CRLF|CONNECTTIMEOUT(_MS)?\n |COOKIE(SESSION|JAR|FILE)?|CUSTOMREQUEST|CERTINFO|CLOSEPOLICY|CA(INFO|PATH)|TRANSFERTEXT\n |TCP_NODELAY|TIME(CONDITION|OUT(_MS)?|VALUE)|INTERFACE|INFILE(SIZE)?|IPRESOLVE\n |DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|URL|USER(AGENT|PWD)|UNRESTRICTED_AUTH|UPLOAD\n |PRIVATE|PROGRESSFUNCTION|PROXY(TYPE|USERPWD|PORT|AUTH)?|PROTOCOLS|PORT\n |POST(REDIR|QUOTE|FIELDS)?|PUT|EGDSOCKET|ENCODING|VERBOSE|KRB4LEVEL|KEYPASSWD|QUOTE|FRESH_CONNECT\n |FTP(APPEND|LISTONLY|PORT|SSLAUTH)\n |FTP_(SSL|SKIP_PASV_IP|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)\n |FILE(TIME)?|FORBID_REUSE|FOLLOWLOCATION|FAILONERROR|WRITE(FUNCTION|HEADER)|LOW_SPEED_(LIMIT|TIME)\n |AUTOREFERER)\n |PROXY_(HTTP|SOCKS(4|5))|PROTO_(SCP|SFTP|HTTP(S)?|TELNET|TFTP|DICT|FTP(S)?|FILE|LDAP(S)?|ALL)\n |E_((RECV|READ)_ERROR|GOT_NOTHING|MALFORMAT_USER\n |BAD_(CONTENT_ENCODING|CALLING_ORDER|PASSWORD_ENTERED|FUNCTION_ARGUMENT)\n |SSH|SSL_(CIPHER|CONNECT_ERROR|CERTPROBLEM|CACERT|PEER_CERTIFICATE|ENGINE_(NOTFOUND|SETFAILED))\n |SHARE_IN_USE|SEND_ERROR|HTTP_(RANGE_ERROR|NOT_FOUND|PORT_FAILED|POST_ERROR)\n |COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|TOO_MANY_REDIRECTS|TELNET_OPTION_SYNTAX|OBSOLETE\n |OUT_OF_MEMORY|OPERATION|TIMEOUTED|OK|URL_MALFORMAT(_USER)?|UNSUPPORTED_PROTOCOL\n |UNKNOWN_TELNET_OPTION|PARTIAL_FILE\n |FTP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|COULDNT_(RETR_FILE|GET_SIZE|STOR_FILE|SET_(BINARY|ASCII)|USE_REST)\n |CANT_(GET_HOST|RECONNECT)|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|WRITE_ERROR\n |WEIRD_((PASS|PASV|SERVER|USER)_REPLY|227_FORMAT)|ACCESS_DENIED)\n |FILESIZE_EXCEEDED|FILE_COULDNT_READ_FILE|FUNCTION_NOT_FOUND|FAILED_INIT|WRITE_ERROR|LIBRARY_NOT_FOUND\n |LDAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL)|ABORTED_BY_CALLBACK)\n |VERSION_NOW\n |FTP(METHOD_(MULTI|SINGLE|NO)CWD|SSL_(ALL|NONE|CONTROL|TRY)|AUTH_(DEFAULT|SSL|TLS))\n |AUTH_(ANY(SAFE)?|BASIC|DIGEST|GSSNEGOTIATE|NTLM))\n|CURL_(HTTP_VERSION_(1_(0|1)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(UN)?MODSINCE|LASTMOD)\n |IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))\n|IMAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|ICO|IFF|UNKNOWN|JB2|JPX|JP2|JPC|JPEG(2000)?|PSD|PNG|WBMP)\n|INPUT_(REQUEST|GET|SERVER|SESSION|COOKIE|POST|ENV)|ICONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION)\n|DNS_(MX|SRV|SOA|HINFO|NS|NAPTR|CNAME|TXT|PTR|ANY|ALL|AAAA|A(6)?)\n|DOM(STRING_SIZE_ERR)\n|DOM_((SYNTAX|HIERARCHY_REQUEST|NO_(MODIFICATION_ALLOWED|DATA_ALLOWED)|NOT_(FOUND|SUPPORTED)|NAMESPACE\n |INDEX_SIZE|USE_ATTRIBUTE|VALID_(MODIFICATION|STATE|CHARACTER|ACCESS)|PHP|VALIDATION|WRONG_DOCUMENT)_ERR)\n|JSON_(HEX_(TAG|QUOT|AMP|APOS)|NUMERIC_CHECK|ERROR_(SYNTAX|STATE_MISMATCH|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)\n|PREG_((D_UTF8(_OFFSET)?|NO|INTERNAL|(BACKTRACK|RECURSION)_LIMIT)_ERROR|GREP_INVERT\n |SPLIT_(NO_EMPTY|(DELIM|OFFSET)_CAPTURE)|SET_ORDER|OFFSET_CAPTURE|PATTERN_ORDER)\n|PSFS_(PASS_ON|ERR_FATAL|FEED_ME|FLAG_(NORMAL|FLUSH_(CLOSE|INC)))\n|PCRE_VERSION|POSIX_((F|R|W|X)_OK|S_IF(REG|BLK|SOCK|CHR|IFO))\n|FNM_(NOESCAPE|CASEFOLD|PERIOD|PATHNAME)\n|FILTER_(REQUIRE_(SCALAR|ARRAY)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW\n |SANITIZE_(MAGIC_QUOTES|STRING|STRIPPED|SPECIAL_CHARS|NUMBER_(INT|FLOAT)|URL\n |EMAIL|ENCODED|FULL_SPCIAL_CHARS)\n |VALIDATE_(REGEXP|BOOLEAN|INT|IP|URL|EMAIL|FLOAT)\n |FORCE_ARRAY\n |FLAG_(SCHEME_REQUIRED|STRIP_(BACKTICK|HIGH|LOW)|HOST_REQUIRED|NONE|NO_(RES|PRIV)_RANGE|ENCODE_QUOTES\n |IPV(4|6)|PATH_REQUIRED|EMPTY_STRING_NULL|ENCODE_(HIGH|LOW|AMP)|QUERY_REQUIRED\n |ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION)))\n|FILE_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)\n|FILEINFO_(RAW|MIME(_(ENCODING|TYPE))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)\n|FORCE_(DEFLATE|GZIP)\n|LIBXML_(XINCLUDE|NSCLEAN|NO(XMLDECL|BLANKS|NET|CDATA|ERROR|EMPTYTAG|ENT|WARNING)\n |COMPACT|DTD(VALID|LOAD|ATTR)|((DOTTED|LOADED)_)?VERSION|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)))\n\\b", "name": "support.constant.ext.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?x)\n(\\\\)?\\b\n(T_(RETURN|REQUIRE(_ONCE)?|GOTO|GLOBAL|(MINUS|MOD|MUL|XOR)_EQUAL|METHOD_C|ML_COMMENT|BREAK\n |BOOL_CAST|BOOLEAN_(AND|OR)|BAD_CHARACTER|SR(_EQUAL)?|STRING(_CAST|VARNAME)?|START_HEREDOC|STATIC\n |SWITCH|SL(_EQUAL)?|HALT_COMPILER|NS_(C|SEPARATOR)|NUM_STRING|NEW|NAMESPACE|CHARACTER|COMMENT\n |CONSTANT(_ENCAPSED_STRING)?|CONCAT_EQUAL|CONTINUE|CURLY_OPEN|CLOSE_TAG|CLONE|CLASS(_C)?\n |CASE|CATCH|TRY|THROW|IMPLEMENTS|ISSET|IS_((GREATER|SMALLER)_OR_EQUAL|(NOT_)?(IDENTICAL|EQUAL))\n |INSTANCEOF|INCLUDE(_ONCE)?|INC|INT_CAST|INTERFACE|INLINE_HTML|IF|OR_EQUAL|OBJECT_(CAST|OPERATOR)\n |OPEN_TAG(_WITH_ECHO)?|OLD_FUNCTION|DNUMBER|DIR|DIV_EQUAL|DOC_COMMENT|DOUBLE_(ARROW|CAST|COLON)\n |DOLLAR_OPEN_CURLY_BRACES|DO|DEC|DECLARE|DEFAULT|USE|UNSET(_CAST)?|PRINT|PRIVATE|PROTECTED|PUBLIC\n |PLUS_EQUAL|PAAMAYIM_NEKUDOTAYIM|EXTENDS|EXIT|EMPTY|ENCAPSED_AND_WHITESPACE\n |END(SWITCH|IF|DECLARE|FOR(EACH)?|WHILE)|END_HEREDOC|ECHO|EVAL|ELSE(IF)?|VAR(IABLE)?|FINAL|FILE\n |FOR(EACH)?|FUNC_C|FUNCTION|WHITESPACE|WHILE|LNUMBER|LIST|LINE|LOGICAL_(AND|OR|XOR)\n |ARRAY_(CAST)?|ABSTRACT|AS|AND_EQUAL))\n\\b", "name": "support.constant.parser-token.php", "captures": { "1": { "name": "punctuation.separator.inheritance.php" } } }, { "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", "name": "constant.other.php" } ] }, "function-parameters": { "patterns": [ { "include": "#attribute" }, { "include": "#comments" }, { "match": ",", "name": "punctuation.separator.delimiter.php" }, { "match": "(?xi)\n(?: (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n) \\s+ )?\n((?:(&)\\s*)?(\\.\\.\\.)(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference\n(?=\\s*(?:,|\\)|/[/*]|\\#|$)) # A closing parentheses (end of argument list) or a comma or a comment", "captures": { "1": { "patterns": [ { "include": "#php-types" } ] }, "2": { "name": "variable.other.php" }, "3": { "name": "storage.modifier.reference.php" }, "4": { "name": "keyword.operator.variadic.php" }, "5": { "name": "punctuation.definition.variable.php" } }, "name": "meta.function.parameter.variadic.php" }, { "begin": "(?xi)\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+ (?: \\s*[|&]\\s* [a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+)+ # union type\n)\n\\s+ ((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference", "beginCaptures": { "1": { "patterns": [ { "include": "#php-types" } ] }, "2": { "name": "variable.other.php" }, "3": { "name": "storage.modifier.reference.php" }, "4": { "name": "punctuation.definition.variable.php" } }, "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", "name": "meta.function.parameter.typehinted.php", "patterns": [ { "begin": "=", "beginCaptures": { "0": { "name": "keyword.operator.assignment.php" } }, "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", "patterns": [ { "include": "#parameter-default-types" } ] } ] }, { "match": "(?xi)\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference\n(?=\\s*(?:,|\\)|/[/*]|\\#|$)) # A closing parentheses (end of argument list) or a comma or a comment", "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "punctuation.definition.variable.php" } }, "name": "meta.function.parameter.no-default.php" }, { "begin": "(?xi)\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable name with possible reference\n\\s*(=)\\s*", "beginCaptures": { "1": { "name": "variable.other.php" }, "2": { "name": "storage.modifier.reference.php" }, "3": { "name": "punctuation.definition.variable.php" }, "4": { "name": "keyword.operator.assignment.php" } }, "end": "(?=\\s*(?:,|\\)|/[/*]|\\#))", "name": "meta.function.parameter.default.php", "patterns": [ { "include": "#parameter-default-types" } ] } ] }, "named-arguments": { "match": "(?i)(?<=^|\\(|,)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(:)(?!:)", "captures": { "1": { "name": "entity.name.variable.parameter.php" }, "2": { "name": "punctuation.separator.colon.php" } } }, "function-call": { "patterns": [ { "begin": "(?x)\n(\n \\\\?(?<![a-zA-Z0-9_\\x{7f}-\\x{10ffff}]) # Optional root namespace\n [a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]* # First namespace\n (?:\\\\[a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]*)+ # Additional namespaces\n)\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#namespace" }, { "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", "name": "entity.name.function.php" } ] }, "2": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.function-call.php", "patterns": [ { "include": "#named-arguments" }, { "include": "$self" } ] }, { "begin": "(\\\\)?(?<![a-zA-Z0-9_\\x{7f}-\\x{10ffff}])([a-zA-Z_\\x{7f}-\\x{10ffff}][a-zA-Z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#namespace" } ] }, "2": { "patterns": [ { "include": "#support" }, { "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", "name": "entity.name.function.php" } ] }, "3": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.function-call.php", "patterns": [ { "include": "#named-arguments" }, { "include": "$self" } ] }, { "match": "(?i)\\b(print|echo)\\b", "name": "support.function.construct.output.php" } ] }, "heredoc": { "patterns": [ { "begin": "(?i)(?=<<<\\s*(\"?)([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)(\\1)\\s*$)", "end": "(?!\\G)", "name": "string.unquoted.heredoc.php", "patterns": [ { "include": "#heredoc_interior" } ] }, { "begin": "(?=<<<\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'\\s*$)", "end": "(?!\\G)", "name": "string.unquoted.nowdoc.php", "patterns": [ { "include": "#nowdoc_interior" } ] } ] }, "heredoc_interior": { "patterns": [ { "begin": "(<<<)\\s*(\"?)(HTML)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.html", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.html", "patterns": [ { "include": "#interpolation" }, { "include": "text.html.basic" } ] }, { "begin": "(<<<)\\s*(\"?)(XML)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.xml", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.xml", "patterns": [ { "include": "#interpolation" }, { "include": "text.xml" } ] }, { "begin": "(<<<)\\s*(\"?)([DS]QL)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.sql", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.sql", "patterns": [ { "include": "#interpolation" }, { "include": "source.sql" } ] }, { "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.js", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.js", "patterns": [ { "include": "#interpolation" }, { "include": "source.js" } ] }, { "begin": "(<<<)\\s*(\"?)(JSON)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.json", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.json", "patterns": [ { "include": "#interpolation" }, { "include": "source.json" } ] }, { "begin": "(<<<)\\s*(\"?)(CSS)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.css", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.css", "patterns": [ { "include": "#interpolation" }, { "include": "source.css" } ] }, { "begin": "(<<<)\\s*(\"?)(REGEXP?)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "string.regexp.heredoc.php", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "patterns": [ { "include": "#interpolation" }, { "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { "name": "punctuation.definition.arbitrary-repitition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repitition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php", "patterns": [ { "match": "\\\\[\\\\'\\[\\]]", "name": "constant.character.escape.php" } ] }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" }, { "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{10ffff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.php" } }, "end": "$", "endCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "name": "comment.line.number-sign.php" } ] }, { "begin": "(<<<)\\s*(\"?)(BLADE)(\\2)(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.html.php.blade", "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.heredoc.php" } }, "name": "meta.embedded.php.blade", "patterns": [ { "include": "#interpolation" } ] }, { "begin": "(?i)(<<<)\\s*(\"?)([a-z_\\x{7f}-\\x{10ffff}]+[a-z0-9_\\x{7f}-\\x{10ffff}]*)(\\2)(\\s*)", "beginCaptures": { "1": { "name": "punctuation.definition.string.php" }, "3": { "name": "keyword.operator.heredoc.php" }, "5": { "name": "invalid.illegal.trailing-whitespace.php" } }, "end": "^\\s*(\\3)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "1": { "name": "keyword.operator.heredoc.php" } }, "patterns": [ { "include": "#interpolation" } ] } ] }, "nowdoc_interior": { "patterns": [ { "begin": "(<<<)\\s*'(HTML)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.html", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.html", "patterns": [ { "include": "text.html.basic" } ] }, { "begin": "(<<<)\\s*'(XML)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.xml", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.xml", "patterns": [ { "include": "text.xml" } ] }, { "begin": "(<<<)\\s*'([DS]QL)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.sql", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.sql", "patterns": [ { "include": "source.sql" } ] }, { "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.js", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.js", "patterns": [ { "include": "source.js" } ] }, { "begin": "(<<<)\\s*'(JSON)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.json", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.json", "patterns": [ { "include": "source.json" } ] }, { "begin": "(<<<)\\s*'(CSS)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "source.css", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.css", "patterns": [ { "include": "source.css" } ] }, { "begin": "(<<<)\\s*'(REGEXP?)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "string.regexp.nowdoc.php", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "patterns": [ { "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { "name": "punctuation.definition.arbitrary-repitition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repitition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php", "patterns": [ { "match": "\\\\[\\\\'\\[\\]]", "name": "constant.character.escape.php" } ] }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" }, { "begin": "(?i)(?<=^|\\s)(#)\\s(?=[[a-z0-9_\\x{7f}-\\x{10ffff},. \\t?!-][^\\x{00}-\\x{7f}]]*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.php" } }, "end": "$", "endCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, "name": "comment.line.number-sign.php" } ] }, { "begin": "(<<<)\\s*'(BLADE)'(\\s*)$", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.php" }, "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "contentName": "text.html.php.blade", "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.php" }, "1": { "name": "keyword.operator.nowdoc.php" } }, "name": "meta.embedded.php.blade" }, { "begin": "(?i)(<<<)\\s*'([a-z_\\x{7f}-\\x{10ffff}]+[a-z0-9_\\x{7f}-\\x{10ffff}]*)'(\\s*)", "beginCaptures": { "1": { "name": "punctuation.definition.string.php" }, "2": { "name": "keyword.operator.nowdoc.php" }, "3": { "name": "invalid.illegal.trailing-whitespace.php" } }, "end": "^\\s*(\\2)(?![A-Za-z0-9_\\x{7f}-\\x{10ffff}])", "endCaptures": { "1": { "name": "keyword.operator.nowdoc.php" } } } ] }, "instantiation": { "begin": "(?i)(new)\\s+(?!class\\b)", "beginCaptures": { "1": { "name": "keyword.other.new.php" } }, "end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{10ffff}\\\\])", "patterns": [ { "match": "(?i)(parent|static|self)(?![a-z0-9_\\x{7f}-\\x{10ffff}])", "name": "storage.type.php" }, { "include": "#class-name" }, { "include": "#variable-name" } ] }, "interpolation": { "patterns": [ { "match": "\\\\[0-7]{1,3}", "name": "constant.character.escape.octal.php" }, { "match": "\\\\x[0-9A-Fa-f]{1,2}", "name": "constant.character.escape.hex.php" }, { "match": "\\\\u{[0-9A-Fa-f]+}", "name": "constant.character.escape.unicode.php" }, { "match": "\\\\[nrtvef$\\\\]", "name": "constant.character.escape.php" }, { "begin": "{(?=\\$.*?})", "beginCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "patterns": [ { "include": "$self" } ] }, { "include": "#variable-name" } ] }, "interpolation_double_quoted": { "patterns": [ { "match": "\\\\\"", "name": "constant.character.escape.php" }, { "include": "#interpolation" } ] }, "invoke-call": { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)(?=\\s*\\()", "name": "meta.function-call.invoke.php" }, "namespace": { "begin": "(?i)(?:(namespace)|[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?(\\\\)", "beginCaptures": { "1": { "name": "variable.language.namespace.php" }, "2": { "name": "punctuation.separator.inheritance.php" } }, "end": "(?i)(?![a-z0-9_\\x{7f}-\\x{10ffff}]*\\\\)", "name": "support.other.namespace.php", "patterns": [ { "match": "\\\\", "name": "punctuation.separator.inheritance.php" } ] }, "numbers": { "patterns": [ { "match": "0[xX][0-9a-fA-F]+(?:_[0-9a-fA-F]+)*", "name": "constant.numeric.hex.php" }, { "match": "0[bB][01]+(?:_[01]+)*", "name": "constant.numeric.binary.php" }, { "match": "0[oO][0-7]+(?:_[0-7]+)*", "name": "constant.numeric.octal.php" }, { "match": "0(?:_?[0-7]+)+", "name": "constant.numeric.octal.php" }, { "match": "(?x)\n(?:\n (?:[0-9]+(?:_[0-9]+)*)?(\\.)[0-9]+(?:_[0-9]+)*(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # .3\n [0-9]+(?:_[0-9]+)*(\\.)(?:[0-9]+(?:_[0-9]+)*)?(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # 3.\n [0-9]+(?:_[0-9]+)*[eE][+-]?[0-9]+(?:_[0-9]+)* # 2e-3\n)", "name": "constant.numeric.decimal.php", "captures": { "1": { "name": "punctuation.separator.decimal.period.php" }, "2": { "name": "punctuation.separator.decimal.period.php" } } }, { "match": "0|[1-9](?:_?[0-9]+)*", "name": "constant.numeric.decimal.php" } ] }, "object": { "patterns": [ { "begin": "(\\??->)\\s*(\\$?{)", "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "punctuation.definition.variable.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "(?i)(\\??->)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "entity.name.function.php" }, "3": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.method-call.php", "patterns": [ { "include": "#named-arguments" }, { "include": "$self" } ] }, { "captures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "variable.other.property.php" }, "3": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)(\\??->)\\s*((\\$+)?[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?" } ] }, "php-types": { "patterns": [ { "match": "\\?", "name": "keyword.operator.nullable-type.php" }, { "match": "[|&]", "name": "punctuation.separator.delimiter.php" }, { "match": "(?i)\\b(null|int|float|bool|string|array|object|callable|iterable|false|mixed|void)\\b", "name": "keyword.other.type.php" }, { "match": "(?i)\\b(parent|self)\\b", "name": "storage.type.php" }, { "include": "#class-name" } ] }, "parameter-default-types": { "patterns": [ { "include": "#strings" }, { "include": "#numbers" }, { "include": "#string-backtick" }, { "include": "#variables" }, { "match": "=>", "name": "keyword.operator.key.php" }, { "match": "=", "name": "keyword.operator.assignment.php" }, { "match": "&(?=\\s*\\$)", "name": "storage.modifier.reference.php" }, { "begin": "(array)\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.construct.php" }, "2": { "name": "punctuation.definition.array.begin.bracket.round.php" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.round.php" } }, "name": "meta.array.php", "patterns": [ { "include": "#parameter-default-types" } ] }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.php" } }, "end": "\\]|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.section.array.end.php" } }, "patterns": [ { "include": "$self" } ] }, { "include": "#instantiation" }, { "begin": "(?xi)\n(?=[a-z0-9_\\x{7f}-\\x{10ffff}\\\\]+\n (::)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?\n)", "end": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)?", "endCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "constant.other.class.php" } }, "patterns": [ { "include": "#class-name" } ] }, { "include": "#constants" } ] }, "php_doc": { "patterns": [ { "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", "name": "invalid.illegal.missing-asterisk.phpdoc.php" }, { "captures": { "1": { "name": "keyword.other.phpdoc.php" }, "3": { "name": "storage.modifier.php" }, "4": { "name": "invalid.illegal.wrong-access-type.phpdoc.php" } }, "match": "^\\s*\\*\\s*(@access)\\s+((public|private|protected)|(.+))\\s*$" }, { "captures": { "1": { "name": "keyword.other.phpdoc.php" }, "2": { "name": "markup.underline.link.php" } }, "match": "(@xlink)\\s+(.+)\\s*$" }, { "begin": "(@(?:global|param|property(-(read|write))?|return|throws|var))\\s+(?=[?A-Za-z_\\x{7f}-\\x{10ffff}\\\\]|\\()", "beginCaptures": { "1": { "name": "keyword.other.phpdoc.php" } }, "end": "(?=\\s|\\*/)", "contentName": "meta.other.type.phpdoc.php", "patterns": [ { "include": "#php_doc_types_array_multiple" }, { "include": "#php_doc_types_array_single" }, { "include": "#php_doc_types" } ] }, { "match": "(?x)\n@\n(\n api|abstract|author|category|copyright|example|global|inherit[Dd]oc|internal|\n license|link|method|property(-(read|write))?|package|param|return|see|since|source|\n static|subpackage|throws|todo|var|version|uses|deprecated|final|ignore\n)\\b", "name": "keyword.other.phpdoc.php" }, { "captures": { "1": { "name": "keyword.other.phpdoc.php" } }, "match": "{(@(link|inherit[Dd]oc)).+?}", "name": "meta.tag.inline.phpdoc.php" } ] }, "php_doc_types": { "match": "(?i)\\??[a-z_\\x{7f}-\\x{10ffff}\\\\][a-z0-9_\\x{7f}-\\x{10ffff}\\\\]*([|&]\\??[a-z_\\x{7f}-\\x{10ffff}\\\\][a-z0-9_\\x{7f}-\\x{10ffff}\\\\]*)*", "captures": { "0": { "patterns": [ { "match": "\\?", "name": "keyword.operator.nullable-type.php" }, { "match": "(?x)\\b\n(string|integer|int|boolean|bool|float|double|object|mixed\n|array|resource|void|null|callback|false|true|self|static)\\b", "name": "keyword.other.type.php" }, { "include": "#class-name" }, { "match": "[|&]", "name": "punctuation.separator.delimiter.php" } ] } } }, "php_doc_types_array_multiple": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.bracket.round.phpdoc.php" } }, "end": "(\\))(\\[\\])|(?=\\*/)", "endCaptures": { "1": { "name": "punctuation.definition.type.end.bracket.round.phpdoc.php" }, "2": { "name": "keyword.other.array.phpdoc.php" } }, "patterns": [ { "include": "#php_doc_types_array_multiple" }, { "include": "#php_doc_types_array_single" }, { "include": "#php_doc_types" }, { "match": "[|&]", "name": "punctuation.separator.delimiter.php" } ] }, "php_doc_types_array_single": { "match": "(?i)([a-z_\\x{7f}-\\x{10ffff}\\\\][a-z0-9_\\x{7f}-\\x{10ffff}\\\\]*)(\\[\\])", "captures": { "1": { "patterns": [ { "include": "#php_doc_types" } ] }, "2": { "name": "keyword.other.array.phpdoc.php" } } }, "regex-double-quoted": { "begin": "\"/(?=(\\\\.|[^\"/])++/[imsxeADSUXu]*\")", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "(/)([imsxeADSUXu]*)(\")", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.regexp.double-quoted.php", "patterns": [ { "match": "(\\\\){1,2}[.$^\\[\\]{}]", "name": "constant.character.escape.regex.php" }, { "include": "#interpolation_double_quoted" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repetition.php" }, "3": { "name": "punctuation.definition.arbitrary-repetition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repetition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php", "patterns": [ { "include": "#interpolation_double_quoted" } ] }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" } ] }, "regex-single-quoted": { "begin": "'/(?=(\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)|[^'/])++/[imsxeADSUXu]*')", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "(/)([imsxeADSUXu]*)(')", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.regexp.single-quoted.php", "patterns": [ { "include": "#single_quote_regex_escape" }, { "captures": { "1": { "name": "punctuation.definition.arbitrary-repetition.php" }, "3": { "name": "punctuation.definition.arbitrary-repetition.php" } }, "match": "({)\\d+(,\\d+)?(})", "name": "string.regexp.arbitrary-repetition.php" }, { "begin": "\\[(?:\\^?\\])?", "captures": { "0": { "name": "punctuation.definition.character-class.php" } }, "end": "\\]", "name": "string.regexp.character-class.php" }, { "match": "[$^+*]", "name": "keyword.operator.regexp.php" } ] }, "scope-resolution": { "patterns": [ { "match": "([A-Za-z_\\x{7f}-\\x{10ffff}\\\\][A-Za-z0-9_\\x{7f}-\\x{10ffff}\\\\]*)(?=\\s*::)", "captures": { "1": { "patterns": [ { "match": "\\b(self|static|parent)\\b", "name": "storage.type.php" }, { "include": "#class-name" }, { "include": "#variable-name" } ] } } }, { "begin": "(?i)(::)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "entity.name.function.php" }, "3": { "name": "punctuation.definition.arguments.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.php" } }, "name": "meta.method-call.static.php", "patterns": [ { "include": "#named-arguments" }, { "include": "$self" } ] }, { "match": "(?i)(::)\\s*(class)\\b", "captures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "keyword.other.class.php" } } }, { "match": "(?xi)\n(::)\\s*\n(?:\n ((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable\n |\n ([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Constant\n)?", "captures": { "1": { "name": "keyword.operator.class.php" }, "2": { "name": "variable.other.class.php" }, "3": { "name": "punctuation.definition.variable.php" }, "4": { "name": "constant.other.class.php" } } } ] }, "single_quote_regex_escape": { "match": "\\\\(?:\\\\(?:\\\\[\\\\']?|[^'])|.)", "name": "constant.character.escape.php" }, "sql-string-double-quoted": { "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND|WITH)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "contentName": "source.sql.embedded.php", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.double.sql.php", "patterns": [ { "match": "(#)(\\\\\"|[^\"])*(?=\"|$)", "name": "comment.line.number-sign.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "(--)(\\\\\"|[^\"])*(?=\"|$)", "name": "comment.line.double-dash.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "\\\\[\\\\\"`']", "name": "constant.character.escape.php" }, { "match": "'(?=((\\\\')|[^'\"])*(\"|$))", "name": "string.quoted.single.unclosed.sql" }, { "match": "`(?=((\\\\`)|[^`\"])*(\"|$))", "name": "string.quoted.other.backtick.unclosed.sql" }, { "begin": "'", "end": "'", "name": "string.quoted.single.sql", "patterns": [ { "include": "#interpolation_double_quoted" } ] }, { "begin": "`", "end": "`", "name": "string.quoted.other.backtick.sql", "patterns": [ { "include": "#interpolation_double_quoted" } ] }, { "include": "#interpolation_double_quoted" }, { "include": "source.sql" } ] }, "sql-string-single-quoted": { "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|AND|WITH)\\b)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "contentName": "source.sql.embedded.php", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.single.sql.php", "patterns": [ { "match": "(#)(\\\\'|[^'])*(?='|$)", "name": "comment.line.number-sign.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "(--)(\\\\'|[^'])*(?='|$)", "name": "comment.line.double-dash.sql", "captures": { "1": { "name": "punctuation.definition.comment.sql" } } }, { "match": "\\\\[\\\\'`\"]", "name": "constant.character.escape.php" }, { "match": "`(?=((\\\\`)|[^`'])*('|$))", "name": "string.quoted.other.backtick.unclosed.sql" }, { "match": "\"(?=((\\\\\")|[^\"'])*('|$))", "name": "string.quoted.double.unclosed.sql" }, { "include": "source.sql" } ] }, "string-backtick": { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.interpolated.php", "patterns": [ { "match": "\\\\`", "name": "constant.character.escape.php" }, { "include": "#interpolation" } ] }, "string-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.double.php", "patterns": [ { "include": "#interpolation_double_quoted" } ] }, "string-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.single.php", "patterns": [ { "match": "\\\\[\\\\']", "name": "constant.character.escape.php" } ] }, "strings": { "patterns": [ { "include": "#regex-double-quoted" }, { "include": "#sql-string-double-quoted" }, { "include": "#string-double-quoted" }, { "include": "#regex-single-quoted" }, { "include": "#sql-string-single-quoted" }, { "include": "#string-single-quoted" } ] }, "support": { "patterns": [ { "match": "(?xi)\n\\b\napc_(\n store|sma_info|compile_file|clear_cache|cas|cache_info|inc|dec|define_constants|delete(_file)?|\n exists|fetch|load_constants|add|bin_(dump|load)(file)?\n)\\b", "name": "support.function.apc.php" }, { "match": "(?xi)\\b\n(\n shuffle|sizeof|sort|next|nat(case)?sort|count|compact|current|in_array|usort|uksort|uasort|\n pos|prev|end|each|extract|ksort|key(_exists)?|krsort|list|asort|arsort|rsort|reset|range|\n array(_(shift|sum|splice|search|slice|chunk|change_key_case|count_values|column|combine|\n (diff|intersect)(_(u)?(key|assoc))?|u(diff|intersect)(_(u)?assoc)?|unshift|unique|\n pop|push|pad|product|values|keys|key_exists|filter|fill(_keys)?|flip|walk(_recursive)?|\n reduce|replace(_recursive)?|reverse|rand|multisort|merge(_recursive)?|map)?)\n)\\b", "name": "support.function.array.php" }, { "match": "(?xi)\\b\n(\n show_source|sys_getloadavg|sleep|highlight_(file|string)|constant|connection_(aborted|status)|\n time_(nanosleep|sleep_until)|ignore_user_abort|die|define(d)?|usleep|uniqid|unpack|__halt_compiler|\n php_(check_syntax|strip_whitespace)|pack|eval|exit|get_browser\n)\\b", "name": "support.function.basic_functions.php" }, { "match": "(?i)\\bbc(scale|sub|sqrt|comp|div|pow(mod)?|add|mod|mul)\\b", "name": "support.function.bcmath.php" }, { "match": "(?i)\\bblenc_encrypt\\b", "name": "support.function.blenc.php" }, { "match": "(?i)\\bbz(compress|close|open|decompress|errstr|errno|error|flush|write|read)\\b", "name": "support.function.bz2.php" }, { "match": "(?xi)\\b\n(\n (French|Gregorian|Jewish|Julian)ToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|\n jdto(unix|jewish)|easter_(date|days)|JD(MonthName|To(Gregorian|Julian|French)|DayOfWeek)\n)\\b", "name": "support.function.calendar.php" }, { "match": "(?xi)\\b\n(\n class_alias|all_user_method(_array)?|is_(a|subclass_of)|__autoload|(class|interface|method|property|trait)_exists|\n get_(class(_(vars|methods))?|(called|parent)_class|object_vars|declared_(classes|interfaces|traits))\n)\\b", "name": "support.function.classobj.php" }, { "match": "(?xi)\\b\n(\n com_(create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)|\n variant_(sub|set(_type)?|not|neg|cast|cat|cmp|int|idiv|imp|or|div|date_(from|to)_timestamp|\n pow|eqv|fix|and|add|abs|round|get_type|xor|mod|mul)\n)\\b", "name": "support.function.com.php" }, { "match": "(?i)\\b(isset|unset|eval|empty|list)\\b", "name": "support.function.construct.php" }, { "match": "(?i)\\b(print|echo)\\b", "name": "support.function.construct.output.php" }, { "match": "(?i)\\bctype_(space|cntrl|digit|upper|punct|print|lower|alnum|alpha|graph|xdigit)\\b", "name": "support.function.ctype.php" }, { "match": "(?xi)\\b\ncurl_(\n share_(close|init|setopt)|strerror|setopt(_array)?|copy_handle|close|init|unescape|pause|escape|\n errno|error|exec|version|file_create|reset|getinfo|\n multi_(strerror|setopt|select|close|init|info_read|(add|remove)_handle|getcontent|exec)\n)\\b", "name": "support.function.curl.php" }, { "match": "(?xi)\\b\n(\n strtotime|str[fp]time|checkdate|time|timezone_name_(from_abbr|get)|idate|\n timezone_((location|offset|transitions|version)_get|(abbreviations|identifiers)_list|open)|\n date(_(sun(rise|set)|sun_info|sub|create(_(immutable_)?from_format)?|timestamp_(get|set)|timezone_(get|set)|time_set|\n isodate_set|interval_(create_from_date_string|format)|offset_get|diff|default_timezone_(get|set)|date_set|\n parse(_from_format)?|format|add|get_last_errors|modify))?|\n localtime|get(date|timeofday)|gm(strftime|date|mktime)|microtime|mktime\n)\\b", "name": "support.function.datetime.php" }, { "match": "(?i)\\bdba_(sync|handlers|nextkey|close|insert|optimize|open|delete|popen|exists|key_split|firstkey|fetch|list|replace)\\b", "name": "support.function.dba.php" }, { "match": "(?i)\\bdbx_(sort|connect|compare|close|escape_string|error|query|fetch_row)\\b", "name": "support.function.dbx.php" }, { "match": "(?i)\\b(scandir|chdir|chroot|closedir|opendir|dir|rewinddir|readdir|getcwd)\\b", "name": "support.function.dir.php" }, { "match": "(?xi)\\b\neio_(\n sync(fs)?|sync_file_range|symlink|stat(vfs)?|sendfile|set_min_parallel|set_max_(idle|poll_(reqs|time)|parallel)|\n seek|n(threads|op|pending|reqs|ready)|chown|chmod|custom|close|cancel|truncate|init|open|dup2|unlink|utime|poll|\n event_loop|f(sync|stat(vfs)?|chown|chmod|truncate|datasync|utime|allocate)|write|lstat|link|rename|realpath|\n read(ahead|dir|link)?|rmdir|get_(event_stream|last_error)|grp(_(add|cancel|limit))?|mknod|mkdir|busy\n)\\b", "name": "support.function.eio.php" }, { "match": "(?xi)\\b\nenchant_(\n dict_(store_replacement|suggest|check|is_in_session|describe|quick_check|add_to_(personal|session)|get_error)|\n broker_(set_ordering|init|dict_exists|describe|free(_dict)?|list_dicts|request_(pwl_)?dict|get_error)\n)\\b", "name": "support.function.enchant.php" }, { "match": "(?i)\\b(split(i)?|sql_regcase|ereg(i)?(_replace)?)\\b", "name": "support.function.ereg.php" }, { "match": "(?i)\\b((restore|set)_(error_handler|exception_handler)|trigger_error|debug_(print_)?backtrace|user_error|error_(log|reporting|get_last))\\b", "name": "support.function.errorfunc.php" }, { "match": "(?i)\\b(shell_exec|system|passthru|proc_(nice|close|terminate|open|get_status)|escapeshell(arg|cmd)|exec)\\b", "name": "support.function.exec.php" }, { "match": "(?i)\\b(exif_(thumbnail|tagname|imagetype|read_data)|read_exif_data)\\b", "name": "support.function.exif.php" }, { "match": "(?xi)\\b\nfann_(\n (duplicate|length|merge|shuffle|subset)_train_data|scale_(train(_data)?|(input|output)(_train_data)?)|\n set_(scaling_params|sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|\n cascade_(num_candidate_groups|candidate_(change_fraction|limit|stagnation_epochs)|\n output_(change_fraction|stagnation_epochs)|weight_multiplier|activation_(functions|steepnesses)|\n (max|min)_(cand|out)_epochs)|\n callback|training_algorithm|train_(error|stop)_function|(input|output)_scaling_params|error_log|\n quickprop_(decay|mu)|weight(_array)?|learning_(momentum|rate)|bit_fail_limit|\n activation_(function|steepness)(_(hidden|layer|output))?|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))|\n save(_train)?|num_(input|output)_train_data|copy|clear_scaling_params|cascadetrain_on_(file|data)|\n create_((sparse|shortcut|standard)(_array)?|train(_from_callback)?|from_file)|\n test(_data)?|train(_(on_(file|data)|epoch))?|init_weights|descale_(input|output|train)|destroy(_train)?|\n print_error|run|reset_(MSE|err(no|str))|read_train_from_file|randomize_weights|\n get_(sarprop_(step_error_(shift|threshold_factor)|temperature|weight_decay_shift)|num_(input|output|layers)|\n network_type|MSE|connection_(array|rate)|bias_array|bit_fail(_limit)?|\n cascade_(num_(candidates|candidate_groups)|(candidate|output)_(change_fraction|limit|stagnation_epochs)|\n weight_multiplier|activation_(functions|steepnesses)(_count)?|(max|min)_(cand|out)_epochs)|\n total_(connections|neurons)|training_algorithm|train_(error|stop)_function|err(no|str)|\n quickprop_(decay|mu)|learning_(momentum|rate)|layer_array|activation_(function|steepness)|\n rprop_((decrease|increase)_factor|delta_(max|min|zero)))\n)\\b", "name": "support.function.fann.php" }, { "match": "(?xi)\\b\n(\n symlink|stat|set_file_buffer|chown|chgrp|chmod|copy|clearstatcache|touch|tempnam|tmpfile|\n is_(dir|(uploaded_)?file|executable|link|readable|writ(e)?able)|disk_(free|total)_space|diskfreespace|\n dirname|delete|unlink|umask|pclose|popen|pathinfo|parse_ini_(file|string)|fscanf|fstat|fseek|fnmatch|\n fclose|ftell|ftruncate|file(size|[acm]time|type|inode|owner|perms|group)?|file_(exists|(get|put)_contents)|\n f(open|puts|putcsv|passthru|eof|flush|write|lock|read|gets(s)?|getc(sv)?)|lstat|lchown|lchgrp|link(info)?|\n rename|rewind|read(file|link)|realpath(_cache_(get|size))?|rmdir|glob|move_uploaded_file|mkdir|basename\n)\\b", "name": "support.function.file.php" }, { "match": "(?i)\\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\\b", "name": "support.function.fileinfo.php" }, { "match": "(?i)\\bfilter_(has_var|input(_array)?|id|var(_array)?|list)\\b", "name": "support.function.filter.php" }, { "match": "(?i)\\bfastcgi_finish_request\\b", "name": "support.function.fpm.php" }, { "match": "(?i)\\b(call_user_(func|method)(_array)?|create_function|unregister_tick_function|forward_static_call(_array)?|function_exists|func_(num_args|get_arg(s)?)|register_(shutdown|tick)_function|get_defined_functions)\\b", "name": "support.function.funchand.php" }, { "match": "(?i)\\b((n)?gettext|textdomain|d((n)?gettext|c(n)?gettext)|bind(textdomain|_textdomain_codeset))\\b", "name": "support.function.gettext.php" }, { "match": "(?xi)\\b\ngmp_(\n scan[01]|strval|sign|sub|setbit|sqrt(rem)?|hamdist|neg|nextprime|com|clrbit|cmp|testbit|\n intval|init|invert|import|or|div(exact)?|div_(q|qr|r)|jacobi|popcount|pow(m)?|perfect_square|\n prob_prime|export|fact|legendre|and|add|abs|root(rem)?|random(_(bits|range))?|gcd(ext)?|xor|mod|mul\n)\\b", "name": "support.function.gmp.php" }, { "match": "(?i)\\bhash(_(hmac(_file)?|copy|init|update(_(file|stream))?|pbkdf2|equals|file|final|algos))?\\b", "name": "support.function.hash.php" }, { "match": "(?xi)\\b\n(\n http_(support|send_(status|stream|content_(disposition|type)|data|file|last_modified)|head|\n negotiate_(charset|content_type|language)|chunked_decode|cache_(etag|last_modified)|throttle|\n inflate|deflate|date|post_(data|fields)|put_(data|file|stream)|persistent_handles_(count|clean|ident)|\n parse_(cookie|headers|message|params)|redirect|request(_(method_(exists|name|(un)?register)|body_encode))?|\n get(_request_(headers|body(_stream)?))?|match_(etag|modified|request_header)|build_(cookie|str|url))|\n ob_(etag|deflate|inflate)handler\n)\\b", "name": "support.function.http.php" }, { "match": "(?i)\\b(iconv(_(str(pos|len|rpos)|substr|(get|set)_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\\b", "name": "support.function.iconv.php" }, { "match": "(?i)\\biis_((start|stop)_(service|server)|set_(script_map|server_rights|dir_security|app_settings)|(add|remove)_server|get_(script_map|service_state|server_(rights|by_(comment|path))|dir_security))\\b", "name": "support.function.iisfunc.php" }, { "match": "(?xi)\\b\n(\n iptc(embed|parse)|(jpeg|png)2wbmp|gd_info|getimagesize(fromstring)?|\n image(s[xy]|scale|(char|string)(up)?|set(style|thickness|tile|interpolation|pixel|brush)|savealpha|\n convolution|copy(resampled|resized|merge(gray)?)?|colors(forindex|total)|\n color(set|closest(alpha|hwb)?|transparent|deallocate|(allocate|exact|resolve)(alpha)?|at|match)|\n crop(auto)?|create(truecolor|from(string|jpeg|png|wbmp|webp|gif|gd(2(part)?)?|xpm|xbm))?|\n types|ttf(bbox|text)|truecolortopalette|istruecolor|interlace|2wbmp|destroy|dashedline|jpeg|\n _type_to_(extension|mime_type)|ps(slantfont|text|(encode|extend|free|load)font|bbox)|png|polygon|\n palette(copy|totruecolor)|ellipse|ft(text|bbox)|filter|fill|filltoborder|\n filled(arc|ellipse|polygon|rectangle)|font(height|width)|flip|webp|wbmp|line|loadfont|layereffect|\n antialias|affine(matrix(concat|get))?|alphablending|arc|rotate|rectangle|gif|gd(2)?|gammacorrect|\n grab(screen|window)|xbm)\n)\\b", "name": "support.function.image.php" }, { "match": "(?xi)\\b\n(\n sys_get_temp_dir|set_(time_limit|include_path|magic_quotes_runtime)|cli_(get|set)_process_title|\n ini_(alter|get(_all)?|restore|set)|zend_(thread_id|version|logo_guid)|dl|php(credits|info|version)|\n php_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|putenv|extension_loaded|version_compare|\n assert(_options)?|restore_include_path|gc_(collect_cycles|disable|enable(d)?)|getopt|\n get_(cfg_var|current_user|defined_constants|extension_funcs|include_path|included_files|loaded_extensions|\n magic_quotes_(gpc|runtime)|required_files|resources)|\n get(env|lastmod|rusage|my(inode|[gup]id))|\n memory_get_(peak_)?usage|main|magic_quotes_runtime\n)\\b", "name": "support.function.info.php" }, { "match": "(?xi)\\b\nibase_(\n set_event_handler|service_(attach|detach)|server_info|num_(fields|params)|name_result|connect|\n commit(_ret)?|close|trans|delete_user|drop_db|db_info|pconnect|param_info|prepare|err(code|msg)|\n execute|query|field_info|fetch_(assoc|object|row)|free_(event_handler|query|result)|wait_event|\n add_user|affected_rows|rollback(_ret)?|restore|gen_id|modify_user|maintain_db|backup|\n blob_(cancel|close|create|import|info|open|echo|add|get)\n)\\b", "name": "support.function.interbase.php" }, { "match": "(?xi)\\b\n(\n normalizer_(normalize|is_normalized)|idn_to_(unicode|utf8|ascii)|\n numfmt_(set_(symbol|(text_)?attribute|pattern)|create|(parse|format)(_currency)?|\n get_(symbol|(text_)?attribute|pattern|error_(code|message)|locale))|\n collator_(sort(_with_sort_keys)?|set_(attribute|strength)|compare|create|asort|\n get_(strength|sort_key|error_(code|message)|locale|attribute))|\n transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|\n intl(cal|tz)_get_error_(code|message)|intl_(is_failure|error_name|get_error_(code|message))|\n datefmt_(set_(calendar|lenient|pattern|timezone(_id)?)|create|is_lenient|parse|format(_object)?|localtime|\n get_(calendar(_object)?|time(type|zone(_id)?)|datetype|pattern|error_(code|message)|locale))|\n locale_(set_default|compose|canonicalize|parse|filter_matches|lookup|accept_from_http|\n get_(script|display_(script|name|variant|language|region)|default|primary_language|keywords|all_variants|region))|\n resourcebundle_(create|count|locales|get(_(error_(code|message)))?)|\n grapheme_(str(i?str|r?i?pos|len)|substr|extract)|\n msgfmt_(set_pattern|create|(format|parse)(_message)?|get_(pattern|error_(code|message)|locale))\n)\\b", "name": "support.function.intl.php" }, { "match": "(?i)\\bjson_(decode|encode|last_error(_msg)?)\\b", "name": "support.function.json.php" }, { "match": "(?xi)\\b\nldap_(\n start|tls|sort|search|sasl_bind|set_(option|rebind_proc)|(first|next)_(attribute|entry|reference)|\n connect|control_paged_result(_response)?|count_entries|compare|close|t61_to_8859|8859_to_t61|\n dn2ufn|delete|unbind|parse_(reference|result)|escape|errno|err2str|error|explode_dn|bind|\n free_result|list|add|rename|read|get_(option|dn|entries|values(_len)?|attributes)|modify(_batch)?|\n mod_(add|del|replace)\n)\\b", "name": "support.function.ldap.php" }, { "match": "(?i)\\blibxml_(set_(streams_context|external_entity_loader)|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\\b", "name": "support.function.libxml.php" }, { "match": "(?i)\\b(ezmlm_hash|mail)\\b", "name": "support.function.mail.php" }, { "match": "(?xi)\\b\n(\n (a)?(cos|sin|tan)(h)?|sqrt|srand|hypot|hexdec|ceil|is_(nan|(in)?finite)|octdec|dec(hex|oct|bin)|deg2rad|\n pi|pow|exp(m1)?|floor|fmod|lcg_value|log(1(p|0))?|atan2|abs|round|rand|rad2deg|getrandmax|\n mt_(srand|rand|getrandmax)|max|min|bindec|base_convert\n)\\b", "name": "support.function.math.php" }, { "match": "(?xi)\\b\nmb_(\n str(cut|str|to(lower|upper)|istr|ipos|imwidth|pos|width|len|rchr|richr|ripos|rpos)|\n substitute_character|substr(_count)?|split|send_mail|http_(input|output)|check_encoding|\n convert_(case|encoding|kana|variables)|internal_encoding|output_handler|decode_(numericentity|mimeheader)|\n detect_(encoding|order)|parse_str|preferred_mime_name|encoding_aliases|encode_(numericentity|mimeheader)|\n ereg(i(_replace)?)?|ereg_(search(_(get(pos|regs)|init|regs|(set)?pos))?|replace(_callback)?|match)|\n list_encodings|language|regex_(set_options|encoding)|get_info\n)\\b", "name": "support.function.mbstring.php" }, { "match": "(?xi)\\b\n(\n mcrypt_(\n cfb|create_iv|cbc|ofb|decrypt|encrypt|ecb|list_(algorithms|modes)|generic(_((de)?init|end))?|\n enc_(self_test|is_block_(algorithm|algorithm_mode|mode)|\n get_(supported_key_sizes|(block|iv|key)_size|(algorithms|modes)_name))|\n get_(cipher_name|(block|iv|key)_size)|\n module_(close|self_test|is_block_(algorithm|algorithm_mode|mode)|open|\n get_(supported_key_sizes|algo_(block|key)_size)))|\n mdecrypt_generic\n)\\b", "name": "support.function.mcrypt.php" }, { "match": "(?i)\\bmemcache_debug\\b", "name": "support.function.memcache.php" }, { "match": "(?i)\\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\\b", "name": "support.function.mhash.php" }, { "match": "(?i)\\b(log_(cmd_(insert|delete|update)|killcursor|write_batch|reply|getmore)|bson_(decode|encode))\\b", "name": "support.function.mongo.php" }, { "match": "(?xi)\\b\nmysql_(\n stat|set_charset|select_db|num_(fields|rows)|connect|client_encoding|close|create_db|escape_string|\n thread_id|tablename|insert_id|info|data_seek|drop_db|db_(name|query)|unbuffered_query|pconnect|ping|\n errno|error|query|field_(seek|name|type|table|flags|len)|fetch_(object|field|lengths|assoc|array|row)|\n free_result|list_(tables|dbs|processes|fields)|affected_rows|result|real_escape_string|\n get_(client|host|proto|server)_info\n)\\b", "name": "support.function.mysql.php" }, { "match": "(?xi)\\b\nmysqli_(\n ssl_set|store_result|stat|send_(query|long_data)|set_(charset|opt|local_infile_(default|handler))|\n stmt_(store_result|send_long_data|next_result|close|init|data_seek|prepare|execute|fetch|free_result|\n attr_(get|set)|result_metadata|reset|get_(result|warnings)|more_results|bind_(param|result))|\n select_db|slave_query|savepoint|next_result|change_user|character_set_name|connect|commit|\n client_encoding|close|thread_safe|init|options|(enable|disable)_(reads_from_master|rpl_parse)|\n dump_debug_info|debug|data_seek|use_result|ping|poll|param_count|prepare|escape_string|execute|\n embedded_server_(start|end)|kill|query|field_seek|free_result|autocommit|rollback|report|refresh|\n fetch(_(object|fields|field(_direct)?|assoc|all|array|row))?|rpl_(parse_enabled|probe|query_type)|\n release_savepoint|reap_async_query|real_(connect|escape_string|query)|more_results|multi_query|\n get_(charset|connection_stats|client_(stats|info|version)|cache_stats|warnings|links_stats|metadata)|\n master_query|bind_(param|result)|begin_transaction\n)\\b", "name": "support.function.mysqli.php" }, { "match": "(?i)\\bmysqlnd_memcache_(set|get_config)\\b", "name": "support.function.mysqlnd-memcache.php" }, { "match": "(?i)\\bmysqlnd_ms_(set_(user_pick_server|qos)|dump_servers|query_is_select|fabric_select_(shard|global)|get_(stats|last_(used_connection|gtid))|xa_(commit|rollback|gc|begin)|match_wild)\\b", "name": "support.function.mysqlnd-ms.php" }, { "match": "(?i)\\bmysqlnd_qc_(set_(storage_handler|cache_condition|is_select|user_handlers)|clear_cache|get_(normalized_query_trace_log|core_stats|cache_info|query_trace_log|available_handlers))\\b", "name": "support.function.mysqlnd-qc.php" }, { "match": "(?i)\\bmysqlnd_uh_(set_(statement|connection)_proxy|convert_to_mysqlnd)\\b", "name": "support.function.mysqlnd-uh.php" }, { "match": "(?xi)\\b\n(\n syslog|socket_(set_(blocking|timeout)|get_status)|set(raw)?cookie|http_response_code|openlog|\n headers_(list|sent)|header(_(register_callback|remove))?|checkdnsrr|closelog|inet_(ntop|pton)|ip2long|\n openlog|dns_(check_record|get_(record|mx))|define_syslog_variables|(p)?fsockopen|long2ip|\n get(servby(name|port)|host(name|by(name(l)?|addr))|protoby(name|number)|mxrr)\n)\\b", "name": "support.function.network.php" }, { "match": "(?i)\\bnsapi_(virtual|response_headers|request_headers)\\b", "name": "support.function.nsapi.php" }, { "match": "(?xi)\\b\n(\n oci(statementtype|setprefetch|serverversion|savelob(file)?|numcols|new(collection|cursor|descriptor)|nlogon|\n column(scale|size|name|type(raw)?|isnull|precision)|coll(size|trim|assign(elem)?|append|getelem|max)|commit|\n closelob|cancel|internaldebug|definebyname|plogon|parse|error|execute|fetch(statement|into)?|\n free(statement|collection|cursor|desc)|write(temporarylob|lobtofile)|loadlob|log(on|off)|rowcount|rollback|\n result|bindbyname)|\n oci_(statement_type|set_(client_(info|identifier)|prefetch|edition|action|module_name)|server_version|\n num_(fields|rows)|new_(connect|collection|cursor|descriptor)|connect|commit|client_version|close|cancel|\n internal_debug|define_by_name|pconnect|password_change|parse|error|execute|bind_(array_)?by_name|\n field_(scale|size|name|type(_raw)?|is_null|precision)|fetch(_(object|assoc|all|array|row))?|\n free_(statement|descriptor)|lob_(copy|is_equal)|rollback|result|get_implicit_resultset)\n)\\b", "name": "support.function.oci8.php" }, { "match": "(?i)\\bopcache_(compile_file|invalidate|reset|get_(status|configuration))\\b", "name": "support.function.opcache.php" }, { "match": "(?xi)\\b\nopenssl_(\n sign|spki_(new|export(_challenge)?|verify)|seal|csr_(sign|new|export(_to_file)?|get_(subject|public_key))|\n cipher_iv_length|open|dh_compute_key|digest|decrypt|public_(decrypt|encrypt)|encrypt|error_string|\n pkcs12_(export(_to_file)?|read)|pkcs7_(sign|decrypt|encrypt|verify)|verify|free_key|random_pseudo_bytes|\n pkey_(new|export(_to_file)?|free|get_(details|public|private))|private_(decrypt|encrypt)|pbkdf2|\n get_((cipher|md)_methods|cert_locations|(public|private)key)|\n x509_(check_private_key|checkpurpose|parse|export(_to_file)?|fingerprint|free|read)\n)\\b", "name": "support.function.openssl.php" }, { "match": "(?xi)\\b\n(\n output_(add_rewrite_var|reset_rewrite_vars)|flush|\n ob_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|gzhandler|\n get_(status|contents|clean|flush|length|level))\n)\\b", "name": "support.function.output.php" }, { "match": "(?i)\\bpassword_(hash|needs_rehash|verify|get_info)\\b", "name": "support.function.password.php" }, { "match": "(?xi)\\b\npcntl_(\n strerror|signal(_dispatch)?|sig(timedwait|procmask|waitinfo)|setpriority|errno|exec|fork|\n w(stopsig|termsig|if(stopped|signaled|exited))|wait(pid)?|alarm|getpriority|get_last_error\n)\\b", "name": "support.function.pcntl.php" }, { "match": "(?xi)\\b\npg_(\n socket|send_(prepare|execute|query(_params)?)|set_(client_encoding|error_verbosity)|select|host|\n num_(fields|rows)|consume_input|connection_(status|reset|busy)|connect(_poll)?|convert|copy_(from|to)|\n client_encoding|close|cancel_query|tty|transaction_status|trace|insert|options|delete|dbname|untrace|\n unescape_bytea|update|pconnect|ping|port|put_line|parameter_status|prepare|version|query(_params)?|\n escape_(string|identifier|literal|bytea)|end_copy|execute|flush|free_result|last_(notice|error|oid)|\n field_(size|num|name|type(_oid)?|table|is_null|prtlen)|affected_rows|result_(status|seek|error(_field)?)|\n fetch_(object|assoc|all(_columns)?|array|row|result)|get_(notify|pid|result)|meta_data|\n lo_(seek|close|create|tell|truncate|import|open|unlink|export|write|read(_all)?)|\n)\\b", "name": "support.function.pgsql.php" }, { "match": "(?i)\\b(virtual|getallheaders|apache_((get|set)env|note|child_terminate|lookup_uri|response_headers|reset_timeout|request_headers|get_(version|modules)))\\b", "name": "support.function.php_apache.php" }, { "match": "(?i)\\bdom_import_simplexml\\b", "name": "support.function.php_dom.php" }, { "match": "(?xi)\\b\nftp_(\n ssl_connect|systype|site|size|set_option|nlist|nb_(continue|f?(put|get))|ch(dir|mod)|connect|cdup|close|\n delete|put|pwd|pasv|exec|quit|f(put|get)|login|alloc|rename|raw(list)?|rmdir|get(_option)?|mdtm|mkdir\n)\\b", "name": "support.function.php_ftp.php" }, { "match": "(?xi)\\b\nimap_(\n (create|delete|list|rename|scan)(mailbox)?|status|sort|subscribe|set_quota|set(flag_full|acl)|search|savebody|\n num_(recent|msg)|check|close|clearflag_full|thread|timeout|open|header(info)?|headers|append|alerts|reopen|\n 8bit|unsubscribe|undelete|utf7_(decode|encode)|utf8|uid|ping|errors|expunge|qprint|gc|\n fetch(structure|header|text|mime|body)|fetch_overview|lsub|list(scan|subscribed)|last_error|\n rfc822_(parse_(headers|adrlist)|write_address)|get(subscribed|acl|mailboxes)|get_quota(root)?|\n msgno|mime_header_decode|mail_(copy|compose|move)|mail|mailboxmsginfo|binary|body(struct)?|base64\n)\\b", "name": "support.function.php_imap.php" }, { "match": "(?xi)\\b\nmssql_(\n select_db|num_(fields|rows)|next_result|connect|close|init|data_seek|pconnect|execute|query|\n field_(seek|name|type|length)|fetch_(object|field|assoc|array|row|batch)|free_(statement|result)|\n rows_affected|result|guid_string|get_last_message|min_(error|message)_severity|bind\n)\\b", "name": "support.function.php_mssql.php" }, { "match": "(?xi)\\b\nodbc_(\n statistics|specialcolumns|setoption|num_(fields|rows)|next_result|connect|columns|columnprivileges|commit|\n cursor|close(_all)?|tables|tableprivileges|do|data_source|pconnect|primarykeys|procedures|procedurecolumns|\n prepare|error(msg)?|exec(ute)?|field_(scale|num|name|type|precision|len)|foreignkeys|free_result|\n fetch_(into|object|array|row)|longreadlen|autocommit|rollback|result(_all)?|gettypeinfo|binmode\n)\\b", "name": "support.function.php_odbc.php" }, { "match": "(?i)\\bpreg_(split|quote|filter|last_error|replace(_callback)?|grep|match(_all)?)\\b", "name": "support.function.php_pcre.php" }, { "match": "(?i)\\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|uses|parents)|iterator_(count|to_array|apply))\\b", "name": "support.function.php_spl.php" }, { "match": "(?i)\\bzip_(close|open|entry_(name|compressionmethod|compressedsize|close|open|filesize|read)|read)\\b", "name": "support.function.php_zip.php" }, { "match": "(?xi)\\b\nposix_(\n strerror|set(s|e?u|[ep]?g)id|ctermid|ttyname|times|isatty|initgroups|uname|errno|kill|access|\n get(sid|cwd|uid|pid|ppid|pwnam|pwuid|pgid|pgrp|euid|egid|login|rlimit|gid|grnam|groups|grgid)|\n get_last_error|mknod|mkfifo\n)\\b", "name": "support.function.posix.php" }, { "match": "(?i)\\bset(thread|proc)title\\b", "name": "support.function.proctitle.php" }, { "match": "(?xi)\\b\npspell_(\n store_replacement|suggest|save_wordlist|new(_(config|personal))?|check|clear_session|\n config_(save_repl|create|ignore|(data|dict)_dir|personal|runtogether|repl|mode)|add_to_(session|personal)\n)\\b", "name": "support.function.pspell.php" }, { "match": "(?i)\\breadline(_(completion_function|clear_history|callback_(handler_(install|remove)|read_char)|info|on_new_line|write_history|list_history|add_history|redisplay|read_history))?\\b", "name": "support.function.readline.php" }, { "match": "(?i)\\brecode(_(string|file))?\\b", "name": "support.function.recode.php" }, { "match": "(?i)\\brrd(c_disconnect|_(create|tune|info|update|error|version|first|fetch|last(update)?|restore|graph|xport))\\b", "name": "support.function.rrd.php" }, { "match": "(?xi)\\b\n(\n shm_((get|has|remove|put)_var|detach|attach|remove)|sem_(acquire|release|remove|get)|ftok|\n msg_((get|remove|set|stat)_queue|send|queue_exists|receive)\n)\\b", "name": "support.function.sem.php" }, { "match": "(?xi)\\b\nsession_(\n status|start|set_(save_handler|cookie_params)|save_path|name|commit|cache_(expire|limiter)|\n is_registered|id|destroy|decode|unset|unregister|encode|write_close|abort|reset|register(_shutdown)?|\n regenerate_id|get_cookie_params|module_name\n)\\b", "name": "support.function.session.php" }, { "match": "(?i)\\bshmop_(size|close|open|delete|write|read)\\b", "name": "support.function.shmop.php" }, { "match": "(?i)\\bsimplexml_(import_dom|load_(string|file))\\b", "name": "support.function.simplexml.php" }, { "match": "(?xi)\\b\n(\n snmp(walk(oid)?|realwalk|get(next)?|set)|\n snmp_(set_(valueretrieval|quick_print|enum_print|oid_(numeric_print|output_format))|read_mib|\n get_(valueretrieval|quick_print))|\n snmp[23]_(set|walk|real_walk|get(next)?)\n)\\b", "name": "support.function.snmp.php" }, { "match": "(?i)\\b(is_soap_fault|use_soap_error_handler)\\b", "name": "support.function.soap.php" }, { "match": "(?xi)\\b\nsocket_(\n shutdown|strerror|send(to|msg)?|set_((non)?block|option)|select|connect|close|clear_error|bind|\n create(_(pair|listen))?|cmsg_space|import_stream|write|listen|last_error|accept|recv(from|msg)?|\n read|get(peer|sock)name|get_option\n)\\b", "name": "support.function.sockets.php" }, { "match": "(?xi)\\b\nsqlite_(\n single_query|seek|has_(more|prev)|num_(fields|rows)|next|changes|column|current|close|\n create_(aggregate|function)|open|unbuffered_query|udf_(decode|encode)_binary|popen|prev|\n escape_string|error_string|exec|valid|key|query|field_name|factory|\n fetch_(string|single|column_types|object|all|array)|lib(encoding|version)|\n last_(insert_rowid|error)|array_query|rewind|busy_timeout\n)\\b", "name": "support.function.sqlite.php" }, { "match": "(?xi)\\b\nsqlsrv_(\n send_stream_data|server_info|has_rows|num_(fields|rows)|next_result|connect|configure|commit|\n client_info|close|cancel|prepare|errors|execute|query|field_metadata|fetch(_(array|object))?|\n free_stmt|rows_affected|rollback|get_(config|field)|begin_transaction\n)\\b", "name": "support.function.sqlsrv.php" }, { "match": "(?xi)\\b\nstats_(\n harmonic_mean|covariance|standard_deviation|skew|\n cdf_(noncentral_(chisquare|f)|negative_binomial|chisquare|cauchy|t|uniform|poisson|exponential|f|weibull|\n logistic|laplace|gamma|binomial|beta)|\n stat_(noncentral_t|correlation|innerproduct|independent_t|powersum|percentile|paired_t|gennch|binomial_coef)|\n dens_(normal|negative_binomial|chisquare|cauchy|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|\n weibull|logistic|laplace|gamma|beta)|\n den_uniform|variance|kurtosis|absolute_deviation|\n rand_(setall|phrase_to_seeds|ranf|get_seeds|\n gen_(noncentral_[ft]|noncenral_chisquare|normal|chisquare|t|int|\n i(uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta))\n)\\b", "name": "support.function.stats.php" }, { "match": "(?xi)\\b\n(\n set_socket_blocking|\n stream_(socket_(shutdown|sendto|server|client|pair|enable_crypto|accept|recvfrom|get_name)|\n set_(chunk_size|timeout|(read|write)_buffer|blocking)|select|notification_callback|supports_lock|\n context_(set_(option|default|params)|create|get_(options|default|params))|copy_to_stream|is_local|\n encoding|filter_(append|prepend|register|remove)|wrapper_((un)?register|restore)|\n resolve_include_path|register_wrapper|get_(contents|transports|filters|wrappers|line|meta_data)|\n bucket_(new|prepend|append|make_writeable)\n )\n)\\b", "name": "support.function.streamsfuncs.php" }, { "match": "(?xi)\\b\n(\n money_format|md5(_file)?|metaphone|bin2hex|sscanf|sha1(_file)?|\n str(str|c?spn|n(at)?(case)?cmp|chr|coll|(case)?cmp|to(upper|lower)|tok|tr|istr|pos|pbrk|len|rchr|ri?pos|rev)|\n str_(getcsv|ireplace|pad|repeat|replace|rot13|shuffle|split|word_count)|\n strip(c?slashes|os)|strip_tags|similar_text|soundex|substr(_(count|compare|replace))?|setlocale|\n html(specialchars(_decode)?|entities)|html_entity_decode|hex2bin|hebrev(c)?|number_format|nl2br|nl_langinfo|\n chop|chunk_split|chr|convert_(cyr_string|uu(decode|encode))|count_chars|crypt|crc32|trim|implode|ord|\n uc(first|words)|join|parse_str|print(f)?|echo|explode|v?[fs]?printf|quoted_printable_(decode|encode)|\n quotemeta|wordwrap|lcfirst|[lr]trim|localeconv|levenshtein|addc?slashes|get_html_translation_table\n)\\b", "name": "support.function.string.php" }, { "match": "(?xi)\\b\nsybase_(\n set_message_handler|select_db|num_(fields|rows)|connect|close|deadlock_retry_count|data_seek|\n unbuffered_query|pconnect|query|field_seek|fetch_(object|field|assoc|array|row)|free_result|\n affected_rows|result|get_last_message|min_(client|error|message|server)_severity\n)\\b", "name": "support.function.sybase.php" }, { "match": "(?i)\\b(taint|is_tainted|untaint)\\b", "name": "support.function.taint.php" }, { "match": "(?xi)\\b\n(\n tidy_((get|set)opt|set_encoding|save_config|config_count|clean_repair|is_(xhtml|xml)|diagnose|\n (access|error|warning)_count|load_config|reset_config|(parse|repair)_(string|file)|\n get_(status|html(_ver)?|head|config|output|opt_doc|root|release|body))|\n ob_tidyhandler\n)\\b", "name": "support.function.tidy.php" }, { "match": "(?i)\\btoken_(name|get_all)\\b", "name": "support.function.tokenizer.php" }, { "match": "(?xi)\\b\ntrader_(\n stoch(f|r|rsi)?|stddev|sin(h)?|sum|sub|set_(compat|unstable_period)|sqrt|sar(ext)?|sma|\n ht_(sine|trend(line|mode)|dc(period|phase)|phasor)|natr|cci|cos(h)?|correl|\n cdl(shootingstar|shortline|sticksandwich|stalledpattern|spinningtop|separatinglines|\n hikkake(mod)?|highwave|homingpigeon|hangingman|harami(cross)?|hammer|concealbabyswall|\n counterattack|closingmarubozu|thrusting|tasukigap|takuri|tristar|inneck|invertedhammer|\n identical3crows|2crows|onneck|doji(star)?|darkcloudcover|dragonflydoji|unique3river|\n upsidegap2crows|3(starsinsouth|inside|outside|whitesoldiers|linestrike|blackcrows)|\n piercing|engulfing|evening(doji)?star|kicking(bylength)?|longline|longleggeddoji|\n ladderbottom|advanceblock|abandonedbaby|risefall3methods|rickshawman|gapsidesidewhite|\n gravestonedoji|xsidegap3methods|morning(doji)?star|mathold|matchinglow|marubozu|\n belthold|breakaway)|\n ceil|cmo|tsf|typprice|t3|tema|tan(h)?|trix|trima|trange|obv|div|dema|dx|ultosc|ppo|\n plus_d[im]|errno|exp|ema|var|kama|floor|wclprice|willr|wma|ln|log10|bop|beta|bbands|\n linearreg(_(slope|intercept|angle))?|asin|acos|atan|atr|adosc|ad|add|adx(r)?|apo|avgprice|\n aroon(osc)?|rsi|roc|rocp|rocr(100)?|get_(compat|unstable_period)|min(index)?|minus_d[im]|\n minmax(index)?|mid(point|price)|mom|mult|medprice|mfi|macd(ext|fix)?|mavp|max(index)?|ma(ma)?\n)\\b", "name": "support.function.trader.php" }, { "match": "(?i)\\buopz_(copy|compose|implement|overload|delete|undefine|extend|function|flags|restore|rename|redefine|backup)\\b", "name": "support.function.uopz.php" }, { "match": "(?i)\\b(http_build_query|(raw)?url(decode|encode)|parse_url|get_(headers|meta_tags)|base64_(decode|encode))\\b", "name": "support.function.url.php" }, { "match": "(?xi)\\b\n(\n strval|settype|serialize|(bool|double|float)val|debug_zval_dump|intval|import_request_variables|isset|\n is_(scalar|string|null|numeric|callable|int(eger)?|object|double|float|long|array|resource|real|bool)|\n unset|unserialize|print_r|empty|var_(dump|export)|gettype|get_(defined_vars|resource_type)\n)\\b", "name": "support.function.var.php" }, { "match": "(?i)\\bwddx_(serialize_(value|vars)|deserialize|packet_(start|end)|add_vars)\\b", "name": "support.function.wddx.php" }, { "match": "(?i)\\bxhprof_(sample_)?(disable|enable)\\b", "name": "support.function.xhprof.php" }, { "match": "(?xi)\n\\b\n(\n utf8_(decode|encode)|\n xml_(set_((notation|(end|start)_namespace|unparsed_entity)_decl_handler|\n (character_data|default|element|external_entity_ref|processing_instruction)_handler|object)|\n parse(_into_struct)?|parser_((get|set)_option|create(_ns)?|free)|error_string|\n get_(current_((column|line)_number|byte_index)|error_code))\n)\\b", "name": "support.function.xml.php" }, { "match": "(?xi)\\b\nxmlrpc_(\n server_(call_method|create|destroy|add_introspection_data|register_(introspection_callback|method))|\n is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|(get|set)_type\n)\\b", "name": "support.function.xmlrpc.php" }, { "match": "(?xi)\\b\nxmlwriter_(\n (end|start|write)_(comment|cdata|dtd(_(attlist|entity|element))?|document|pi|attribute|element)|\n (start|write)_(attribute|element)_ns|write_raw|set_indent(_string)?|text|output_memory|open_(memory|uri)|\n full_end_element|flush|\n)\\b", "name": "support.function.xmlwriter.php" }, { "match": "(?xi)\\b\n(\n zlib_(decode|encode|get_coding_type)|readgzfile|\n gz(seek|compress|close|tell|inflate|open|decode|deflate|uncompress|puts|passthru|encode|eof|file|\n write|rewind|read|getc|getss?)\n)\\b", "name": "support.function.zlib.php" }, { "match": "(?i)\\bis_int(eger)?\\b", "name": "support.function.alias.php" } ] }, "switch_statement": { "patterns": [ { "match": "\\s+(?=switch\\b)" }, { "begin": "\\bswitch\\b(?!\\s*\\(.*\\)\\s*:)", "beginCaptures": { "0": { "name": "keyword.control.switch.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.section.switch-block.end.bracket.curly.php" } }, "name": "meta.switch-statement.php", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.switch-expression.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.switch-expression.end.bracket.round.php" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.section.switch-block.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "patterns": [ { "include": "$self" } ] } ] } ] }, "match_statement": { "patterns": [ { "match": "\\s+(?=match\\b)" }, { "begin": "\\bmatch\\b", "beginCaptures": { "0": { "name": "keyword.control.match.php" } }, "end": "}|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.section.match-block.end.bracket.curly.php" } }, "name": "meta.match-statement.php", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.match-expression.begin.bracket.round.php" } }, "end": "\\)|(?=\\?>)", "endCaptures": { "0": { "name": "punctuation.definition.match-expression.end.bracket.round.php" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.section.match-block.begin.bracket.curly.php" } }, "end": "(?=}|\\?>)", "patterns": [ { "match": "=>", "name": "keyword.definition.arrow.php" }, { "include": "$self" } ] } ] } ] }, "use-inner": { "patterns": [ { "include": "#comments" }, { "begin": "(?i)\\b(as)\\s+", "beginCaptures": { "1": { "name": "keyword.other.use-as.php" } }, "end": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", "endCaptures": { "0": { "name": "entity.other.alias.php" } } }, { "include": "#class-name" }, { "match": ",", "name": "punctuation.separator.delimiter.php" } ] }, "var_basic": { "patterns": [ { "match": "(?i)(\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*", "name": "variable.other.php", "captures": { "1": { "name": "punctuation.definition.variable.php" } } } ] }, "var_global": { "captures": { "1": { "name": "punctuation.definition.variable.php" } }, "match": "(\\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\\b", "name": "variable.other.global.php" }, "var_global_safer": { "captures": { "1": { "name": "punctuation.definition.variable.php" } }, "match": "(\\$)((GLOBALS|_(ENV|SERVER|SESSION)))", "name": "variable.other.global.safer.php" }, "var_language": { "match": "(\\$)this\\b", "name": "variable.language.this.php", "captures": { "1": { "name": "punctuation.definition.variable.php" } } }, "variable-name": { "patterns": [ { "include": "#var_global" }, { "include": "#var_global_safer" }, { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "punctuation.definition.variable.php" }, "4": { "name": "keyword.operator.class.php" }, "5": { "name": "variable.other.property.php" }, "6": { "name": "punctuation.section.array.begin.php" }, "7": { "name": "constant.numeric.index.php" }, "8": { "name": "variable.other.index.php" }, "9": { "name": "punctuation.definition.variable.php" }, "10": { "name": "string.unquoted.index.php" }, "11": { "name": "punctuation.section.array.end.php" } }, "match": "(?xi)\n((\\$)(?<name>[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*))\\s*\n(?:\n (\\??->)\\s*(\\g<name>)\n |\n (\\[)(?:(\\d+)|((\\$)\\g<name>)|([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*))(\\])\n)?" }, { "captures": { "1": { "name": "variable.other.php" }, "2": { "name": "punctuation.definition.variable.php" }, "4": { "name": "punctuation.definition.variable.php" } }, "match": "(?i)((\\${)(?<name>[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)(}))" } ] }, "variables": { "patterns": [ { "include": "#var_language" }, { "include": "#var_global" }, { "include": "#var_global_safer" }, { "include": "#var_basic" }, { "begin": "\\${(?=.*?})", "beginCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.php" } }, "patterns": [ { "include": "$self" } ] } ] }, "ternary_shorthand": { "match": "\\?:", "name": "keyword.operator.ternary.php" }, "ternary_expression": { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.ternary.php" } }, "end": "(?<!:):(?!:)", "endCaptures": { "0": { "name": "keyword.operator.ternary.php" } }, "patterns": [ { "match": "(?i)^\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(?=:(?!:))", "captures": { "1": { "patterns": [ { "include": "$self" } ] } } }, { "include": "$self" } ] }, "null_coalescing": { "match": "\\?\\?", "name": "keyword.operator.null-coalescing.php" } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/pig.tmLanguage.json ================================================ { "name": "Pig", "scopeName": "source.pig", "fileTypes": ["pig", "piglet"], "patterns": [ { "begin": "/\\*", "end": "\\*/", "name": "comment.block.pig" }, { "match": "(--).*$\\n?", "name": "comment.line.double-dash.pig" }, { "begin": "\"", "end": "\"", "name": "string.quoted.double.pig", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.pig" } ] }, { "begin": "'", "end": "'", "name": "string.quoted.single.pig", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.pig" } ] }, { "match": "\\b(NULL|true|false|stdin|stdout|stderr)\\b", "name": "constant.language.pig" }, { "match": "\\b(DIFF|TOBAG|TOMAP|TOP|TOTUPLE|RANDOM|FLATTEN|flatten|CUBE|ROLLUP|IsEmpty|ARITY|PluckTuple|SUBTRACT|BagToString)\\b", "name": "entity.name.function.pig" }, { "match": "\\b(ABS|ACOS|ASIN|ATAN|CBRT|CEIL|COS|COSH|EXP|FLOOR|LOG|LOG10|ROUND|ROUND_TO|SIN|SINH|SQRT|TAN|TANH|AVG|COUNT|COUNT_STAR|MAX|MIN|SUM|COR|COV)\\b", "name": "entity.name.function.pig" }, { "match": "\\b(CONCAT|INDEXOF|LAST_INDEX_OF|LCFIRST|LOWER|REGEX_EXTRACT|REGEX_EXTRACT_ALL|REPLACE|SIZE|STRSPLIT|SUBSTRING|TOKENIZE|TRIM|UCFIRST|UPPER|LTRIM|RTRIM|ENDSWITH|STARTSWITH|TRIM)\\b", "name": "entity.name.function.pig" }, { "match": "\\b(CurrentTime|AddDuration|GetHour|DaysBetween|GetDay|GetMilliSecond|GetMinute|GetMonth|GetSecond|GetWeek|GetWeekYear|GetYear|HoursBetween|MilliSecondsBetween|MinutesBetween|MonthsBetween|SecondsBetween|SubtractDuration|ToDate|WeeksBetween|YearsBetween|ToMilliSeconds|ToString|ToUnixTime)\\b", "name": "entity.name.function.pig" }, { "match": "\\b(cat|cd|copyFromLocal|copyToLocal|cp|ls|mkdir|mv|pwd|rm)\\b", "name": "entity.name.function.pig" }, { "match": "\\b(PigStorage|BinStorage|BinaryStorage|PigDump|HBaseStorage|JsonLoader|JsonStorage|AvroStorage|TextLoader|PigStreaming|TrevniStorage|AccumuloStorage)\\b", "name": "entity.name.function.pig" }, { "match": "(?i)\\b(ASSERT|LOAD|STORE|DUMP|FILTER|DISTINCT|FOREACH|GENERATE|STREAM|JOIN|COGROUP|GROUP|CROSS|ORDER|LIMIT|UNION|SPLIT|DESCRIBE|EXPLAIN|ILLUSTRATE|AS|BY|INTO|USING|LIMIT|PARALLEL|OUTER|INNER|LEFT|SAMPLE|RANK|CUBE|ALL|KILL|QUIT|MAPREDUCE|ASC|DESC|THROUGH|SHIP|CACHE|CASE|WHEN|THEN|END|IN|PARTITION|FULL|SET|IF|ONSCHEMA|INPUT|OUTPUT)\\b", "name": "keyword.control.pig" }, { "match": "\\b(bytearray|boolean|chararray|datetime|double|float|int|long)\\b", "name": "storage.type.pig" }, { "match": "\\b(bag|map|tuple)\\b", "name": "support.type.pig" }, { "match": "\\b((([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|F|f)?\\b", "name": "constant.numeric.pig" }, { "match": "\\b(\\+|\\*|\\-|\\/|\\%|&|\\|\\^|~)\\b", "name": "keyword.operator.arithmetic.pig" }, { "match": "\\$[a_zA-Z0-9_]+", "name": "variable.language.pig" }, { "match": ";", "name": "punctuation.terminator.pig" }, { "begin": "(?i)^\\s*([a-z_][a-z0-9_]*)\\s*(?:=)", "end": "$", "beginCaptures": { "1": { "name": "storage.type.variable.pig" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "(?i)^\\s*(register|import)\\s+", "end": "$", "beginCaptures": { "1": { "name": "keyword.control.import.pig" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "(?i)^\\s*(%declare|%default)\\s*(\\S+)?\\s*", "end": "$", "beginCaptures": { "1": { "name": "keyword.control.import.pig" }, "2": { "name": "variable.other.pig" } }, "patterns": [ { "include": "$self" } ] }, { "begin": "(?i)^\\s*(define)\\s*(\\S+)?\\s*", "end": "$", "beginCaptures": { "1": { "name": "keyword.control.import.pig" }, "2": { "name": "variable.other.pig" } }, "patterns": [ { "include": "$self" } ] } ], "uuid": "54caed77-86b5-4b23-86db-7dd942cbde85" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/plain-text.tmLanguage.json ================================================ { "scopeName": "text.plain", "patterns": [], "name": "Plain Text", "fileTypes": ["txt"] } ================================================ FILE: src/renderer/components/editor/grammars/textmate/plsql.tmLanguage.json ================================================ { "fileTypes": ["sql", "ddl", "dml", "pkh", "pks", "pkb", "pck", "pls", "plb"], "foldingStartMarker": "(?i)^\\s*(begin|if|loop)\\b", "foldingStopMarker": "(?i)^\\s*(end)\\b", "keyEquivalent": "^~S", "name": "plsql", "patterns": [ { "begin": "/\\*", "end": "\\*/", "name": "comment.block.oracle" }, { "match": "--.*$", "name": "comment.line.double-dash.oracle" }, { "match": "(?i)(?:^\\s*)rem(?:\\s+.*$)", "name": "comment.line.sqlplus.oracle" }, { "match": "(?i)(?:^\\s*)prompt(?:\\s+.*$)", "name": "comment.line.sqlplus-prompt.oracle" }, { "captures": { "1": { "name": "keyword.other.oracle" }, "2": { "name": "keyword.other.oracle" } }, "match": "(?i)^\\s*(create)(\\s+or\\s+replace)?\\s+", "name": "meta.create.oracle" }, { "captures": { "1": { "name": "keyword.other.oracle" }, "2": { "name": "keyword.other.oracle" }, "3": { "name": "entity.name.type.oracle" } }, "match": "(?i)\\b(package)(\\s+body)?\\s+(\\S+)", "name": "meta.package.oracle" }, { "captures": { "1": { "name": "keyword.other.oracle" }, "2": { "name": "entity.name.type.oracle" } }, "match": "(?i)\\b(type)\\s+\"([^\"]+)\"", "name": "meta.type.oracle" }, { "captures": { "1": { "name": "keyword.other.oracle" }, "2": { "name": "entity.name.function.oracle" } }, "match": "(?i)^\\s*(function|procedure)\\s+\"?([-a-z0-9_]+)\"?", "name": "meta.procedure.oracle" }, { "match": "[!<>:]?=|<>|<|>|\\+|(?<!\\.)\\*|-|(?<!^)/|\\|\\|", "name": "keyword.operator.oracle" }, { "match": "(?i)\\b(true|false|null|is\\s+(not\\s+)?null)\\b", "name": "constant.language.oracle" }, { "match": "\\b\\d+(\\.\\d+)?\\b", "name": "constant.numeric.oracle" }, { "match": "(?i)\\b(if|elsif|else|end\\s+if|loop|end\\s+loop|for|while|case|end\\s+case|continue|return|goto)\\b", "name": "keyword.control.oracle" }, { "match": "(?i)\\b(or|and|not|like)\\b", "name": "keyword.other.oracle" }, { "match": "(?i)\\b(%(isopen|found|notfound|rowcount)|commit|rollback|sqlerrm)\\b", "name": "support.function.oracle" }, { "match": "(?i)\\b(sql|sqlcode)\\b", "name": "variable.language.oracle" }, { "match": "(?i)\\b(ascii|asciistr|chr|compose|concat|convert|decompose|dump|initcap|instr|instrb|instrc|instr2|instr4|unistr|length|lengthb|lengthc|length2|length4|lower|lpad|ltrim|nchr|replace|rpad|rtrim|soundex|substr|translate|trim|upper|vsize)\\b", "name": "support.function.builtin.char.oracle" }, { "match": "(?i)\\b(add_months|current_date|current_timestamp|dbtimezone|last_day|localtimestamp|months_between|new_time|next_day|round|sessiontimezone|sysdate|tz_offset|systimestamp)\\b", "name": "support.function.builtin.date.oracle" }, { "match": "(?i)\\b(avg|count|sum|max|min|median|corr|corr_\\w+|covar_(pop|samp)|cume_dist|dense_rank|first|group_id|grouping|grouping_id|last|percentile_cont|percentile_disc|percent_rank|rank|regr_\\w+|row_number|stats_binomial_test|stats_crosstab|stats_f_test|stats_ks_test|stats_mode|stats_mw_test|stats_one_way_anova|stats_t_test_\\w+|stats_wsr_test|stddev|stddev_pop|stddev_samp|var_pop|var_samp|variance)\\b", "name": "support.function.builtin.aggregate.oracle" }, { "match": "(?i)\\b(bfilename|cardinality|coalesce|decode|empty_(blob|clob)|lag|lead|listagg|lnnvl|nanvl|nullif|nvl|nvl2|sys_(context|guid|typeid|connect_by_path|extract_utc)|uid|(current\\s+)?user|userenv|cardinality|(bulk\\s+)?collect|powermultiset(_by_cardinality)?|ora_hash|standard_hash|execute\\s+immediate|alter\\s+session)\\b", "name": "support.function.builtin.advanced.oracle" }, { "match": "(?i)\\b(bin_to_num|cast|chartorowid|from_tz|hextoraw|numtodsinterval|numtoyminterval|rawtohex|rawtonhex|to_char|to_clob|to_date|to_dsinterval|to_lob|to_multi_byte|to_nclob|to_number|to_single_byte|to_timestamp|to_timestamp_tz|to_yminterval|scn_to_timestamp|timestamp_to_scn|rowidtochar|rowidtonchar|to_binary_double|to_binary_float|to_blob|to_nchar|con_dbid_to_id|con_guid_to_id|con_name_to_id|con_uid_to_id)\\b", "name": "support.function.builtin.convert.oracle" }, { "match": "(?i)\\b(abs|acos|asin|atan|atan2|bit_(and|or|xor)|ceil|cos|cosh|exp|extract|floor|greatest|least|ln|log|mod|power|remainder|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\b", "name": "support.function.builtin.math.oracle" }, { "match": "(?i)\\b(\\.(count|delete|exists|extend|first|last|limit|next|prior|trim|reverse))\\b", "name": "support.function.builtin.collection.oracle" }, { "match": "(?i)\\b(cluster_details|cluster_distance|cluster_id|cluster_probability|cluster_set|feature_details|feature_id|feature_set|feature_value|prediction|prediction_bounds|prediction_cost|prediction_details|prediction_probability|prediction_set)\\b", "name": "support.function.builtin.data_mining.oracle" }, { "match": "(?i)\\b(appendchildxml|deletexml|depth|extract|existsnode|extractvalue|insertchildxml|insertxmlbefore|xmlcast|xmldiff|xmlelement|xmlexists|xmlisvalid|insertchildxmlafter|insertchildxmlbefore|path|sys_dburigen|sys_xmlagg|sys_xmlgen|updatexml|xmlagg|xmlcdata|xmlcolattval|xmlcomment|xmlconcat|xmlforest|xmlparse|xmlpi|xmlquery|xmlroot|xmlsequence|xmlserialize|xmltable|xmltransform)\\b", "name": "support.function.builtin.xml.oracle" }, { "match": "(?i)\\b(pragma\\s+(autonomous_transaction|serially_reusable|restrict_references|exception_init|inline))\\b", "name": "keyword.other.pragma.oracle" }, { "match": "(?i)\\b(p(i|o|io)_[-a-z0-9_]+)\\b", "name": "variable.parameter.oracle" }, { "match": "(?i)\\b(l_[-a-z0-9_]+)\\b", "name": "variable.other.oracle" }, { "match": "(?i):\\b(new|old)\\b", "name": "variable.trigger.oracle" }, { "match": "(?i)\\b(connect\\s+by\\s+(nocycle\\s+)?(prior|level)|connect_by_(root|icycle)|level|start\\s+with)\\b", "name": "keyword.hierarchical.sql.oracle" }, { "match": "(?i)\\b(language|name|java|c)\\b", "name": "keyword.wrapper.oracle" }, { "match": "(?i)\\b(end|then|deterministic|exception|when|declare|begin|in|out|nocopy|is|as|exit|open|fetch|into|close|subtype|type|rowtype|default|exclusive|mode|lock|record|index\\s+by|result_cache|constant|comment|\\.(nextval|currval))\\b", "name": "keyword.other.oracle" }, { "match": "(?i)\\b(grant|revoke|alter|drop|force|add|check|constraint|primary\\s+key|foreign\\s+key|references|unique(\\s+index)?|column|sequence|increment\\s+by|cache|(materialized\\s+)?view|trigger|storage|tablespace|pct(free|used)|(init|max)trans|logging)\\b", "name": "keyword.other.ddl.oracle" }, { "match": "(?i)\\b(with|select|from|where|order\\s+(siblings\\s+)?by|group\\s+by|rollup|cube|((left|right|cross|natural)\\s+(outer\\s+)?)?join|on|asc|desc|update|set|insert|into|values|delete|distinct|union|minus|intersect|having|limit|table|between|like|of|row|(range|rows)\\s+between|nulls\\s+first|nulls\\s+last|before|after|all|any|exists|rownum|cursor|returning|over|partition\\s+by|merge|using|matched|pivot|unpivot)\\b", "name": "keyword.other.sql.oracle" }, { "match": "(?i)\\b(define|whenever\\s+sqlerror|exec|timing\\s+start|timing\\s+stop)\\b", "name": "keyword.other.sqlplus.oracle" }, { "match": "(?i)\\b(access_into_null|case_not_found|collection_is_null|cursor_already_open|dup_val_on_index|invalid_cursor|invalid_number|login_denied|no_data_found|not_logged_on|program_error|rowtype_mismatch|self_is_null|storage_error|subscript_beyond_count|subscript_outside_limit|sys_invalid_rowid|timeout_on_resource|too_many_rows|value_error|zero_divide|others)\\b", "name": "support.type.exception.oracle" }, { "captures": { "3": { "name": "support.class.oracle" } }, "match": "(?i)\\b((dbms|utl|owa|apex)_\\w+\\.(\\w+))\\b", "name": "support.function.oracle" }, { "captures": { "3": { "name": "support.class.oracle" } }, "match": "(?i)\\b((htf|htp)\\.(\\w+))\\b", "name": "support.function.oracle" }, { "captures": { "3": { "name": "support.class.user-defined.oracle" } }, "match": "(?i)\\b((\\w+_pkg|pkg_\\w+)\\.(\\w+))\\b", "name": "support.function.user-defined.oracle" }, { "match": "(?i)\\b(raise|raise_application_error)\\b", "name": "support.function.oracle" }, { "begin": "'", "end": "'", "name": "string.quoted.single.oracle" }, { "begin": "\"", "end": "\"", "name": "string.quoted.double.oracle" }, { "match": "(?i)\\b(char|varchar|varchar2|nchar|nvarchar2|boolean|date|timestamp(\\s+with(\\s+local)?\\s+time\\s+zone)?|interval\\s*day(\\(\\d*\\))?\\s*to\\s*month|interval\\s*year(\\(\\d*\\))?\\s*to\\s*second(\\(\\d*\\))?|xmltype|blob|clob|nclob|bfile|long|long\\s+raw|raw|number|integer|decimal|smallint|float|binary_(float|double|integer)|pls_(float|double|integer)|rowid|urowid|vararray|natural|naturaln|positive|positiven|signtype|simple_(float|double|integer))\\b", "name": "storage.type.oracle" } ], "scopeName": "source.plsql.oracle", "uuid": "28DCE4DD-F5E1-4ED3-8847-64DA6B1F9163" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/postcss.tmLanguage.json ================================================ { "foldingStopMarker": "\\*/|^\\s*$", "foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.", "repository": { "reserved-words": { "match": "\\b(false|from|in|not|null|through|to|true)\\b", "name": "support.type.property-name.css.postcss" }, "numeric": { "match": "(-|\\.)?[0-9]+(\\.[0-9]+)?", "name": "constant.numeric.css.postcss" }, "quoted-interpolation": { "begin": "#{", "end": "}", "patterns": [ { "include": "#variable" }, { "include": "#numeric" }, { "include": "#operator" }, { "include": "#unit" } ], "name": "support.function.interpolation.postcss" }, "operator": { "match": "\\+|\\s-\\s|\\s-(?=\\$)|(?<=\\()-(?=\\$)|\\s-(?=\\()|\\*|/|%|=|!|<|>|~", "name": "keyword.operator.postcss" }, "function-content": { "match": "(?<=url\\(|format\\(|attr\\().+?(?=\\))", "name": "string.quoted.double.css.postcss" }, "double-slash": { "begin": "//", "end": "$", "patterns": [{ "include": "#comment-tag" }], "name": "comment.line.postcss" }, "dotdotdot": { "match": "\\.{3}", "name": "variable.other" }, "single-quoted": { "begin": "'", "end": "'", "patterns": [{ "include": "#quoted-interpolation" }], "name": "string.quoted.single.css.postcss" }, "rgb-value": { "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", "name": "constant.other.color.rgb-value.css.postcss" }, "flag": { "match": "!(important|default|optional|global)", "name": "keyword.other.important.css.postcss" }, "variable-root-css": { "match": "(?<!&)--[\\w-]+", "name": "variable.parameter.postcss" }, "function-content-var": { "match": "(?<=var\\()[\\w-]+(?=\\))", "name": "variable.parameter.postcss" }, "comment-tag": { "begin": "{{", "end": "}}", "patterns": [{ "match": "[\\w-]+", "name": "comment.tag.postcss" }], "name": "comment.tags.postcss" }, "property-value": { "match": "[\\w-]+", "name": "meta.property-value.css.postcss, support.constant.property-value.css.postcss" }, "function": { "match": "(?<=[\\s|\\(|,|:])(?!url|format|attr)[\\w-][\\w-]*(?=\\()", "name": "support.function.name.postcss" }, "pseudo-class": { "match": ":[a-z:-]+", "name": "entity.other.attribute-name.pseudo-class.css.postcss" }, "interpolation": { "begin": "#{", "end": "}", "patterns": [ { "include": "#variable" }, { "include": "#numeric" }, { "include": "#operator" }, { "include": "#unit" }, { "include": "#double-quoted" }, { "include": "#single-quoted" } ], "name": "support.function.interpolation.postcss" }, "parent-selector": { "match": "&", "name": "entity.name.tag.css.postcss" }, "unit": { "match": "(?<=[\\d]|})(ch|cm|deg|dpcm|dpi|dppx|em|ex|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vw|%)", "name": "keyword.other.unit.css.postcss" }, "variable": { "match": "\\$[\\w-]+", "name": "variable.parameter.postcss" }, "placeholder-selector": { "begin": "(?<!\\d)%(?!\\d)", "end": "$\\n?|\\s|(?=;|{)", "name": "entity.other.attribute-name.placeholder-selector.postcss" }, "double-quoted": { "begin": "\"", "end": "\"", "patterns": [{ "include": "#quoted-interpolation" }], "name": "string.quoted.double.css.postcss" } }, "fileTypes": ["pcss", "postcss"], "uuid": "90DAEA60-88AA-11E2-9E96-0800200C9A66", "patterns": [ { "begin": "/\\*", "end": "\\*/", "patterns": [{ "include": "#comment-tag" }], "name": "comment.block.postcss" }, { "include": "#double-slash" }, { "include": "#double-quoted" }, { "include": "#single-quoted" }, { "include": "#interpolation" }, { "include": "#placeholder-selector" }, { "include": "#variable" }, { "include": "#variable-root-css" }, { "include": "#numeric" }, { "include": "#unit" }, { "include": "#flag" }, { "include": "#dotdotdot" }, { "begin": "@include", "end": "(?=\\n|\\(|{|;)", "name": "support.function.name.postcss.library", "captures": { "0": { "name": "keyword.control.at-rule.css.postcss" } } }, { "begin": "@mixin|@function", "end": "$\\n?|(?=\\(|{)", "patterns": [{ "match": "[\\w-]+", "name": "entity.name.function" }], "name": "support.function.name.postcss.no-completions", "captures": { "0": { "name": "keyword.control.at-rule.css.postcss" } } }, { "match": "(?<=@import)\\s[\\w/.*-]+", "name": "string.quoted.double.css.postcss" }, { "begin": "@", "end": "$\\n?|\\s(?!(all|braille|embossed|handheld|print|projection|screen|speech|tty|tv|if|only|not)(\\s|,))|(?=;)", "name": "keyword.control.at-rule.css.postcss" }, { "begin": "#", "end": "$\\n?|(?=\\s|,|;|\\(|\\)|\\.|\\[|{|>)", "patterns": [ { "include": "#interpolation" }, { "include": "#pseudo-class" } ], "name": "entity.other.attribute-name.id.css.postcss" }, { "begin": "\\.|(?<=&)(-|_)", "end": "$\\n?|(?=\\s|,|;|\\(|\\)|\\[|{|>)", "patterns": [ { "include": "#interpolation" }, { "include": "#pseudo-class" } ], "name": "entity.other.attribute-name.class.css.postcss" }, { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#double-quoted" }, { "include": "#single-quoted" }, { "match": "\\^|\\$|\\*|~", "name": "keyword.other.regex.postcss" } ], "name": "entity.other.attribute-selector.postcss" }, { "match": "(?<=\\]|\\)|not\\(|\\*|>|>\\s):[a-z:-]+|(::|:-)[a-z:-]+", "name": "entity.other.attribute-name.pseudo-class.css.postcss" }, { "begin": ":", "end": "$\\n?|(?=;|\\s\\(|and\\(|{|}|\\),)", "patterns": [ { "include": "#double-slash" }, { "include": "#double-quoted" }, { "include": "#single-quoted" }, { "include": "#interpolation" }, { "include": "#variable" }, { "include": "#rgb-value" }, { "include": "#numeric" }, { "include": "#unit" }, { "include": "#flag" }, { "include": "#function" }, { "include": "#function-content" }, { "include": "#function-content-var" }, { "include": "#operator" }, { "include": "#parent-selector" }, { "include": "#property-value" } ], "name": "meta.property-list.css.postcss" }, { "include": "#rgb-value" }, { "include": "#function" }, { "include": "#function-content" }, { "begin": "(?<!\\-|\\()\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|main|svg|rect|ruby|center|circle|ellipse|line|polyline|polygon|path|text|u|x)\\b(?!-|\\)|:\\s)|&", "end": "(?=\\s|,|;|\\(|\\)|\\.|\\[|{|>|-|_)", "patterns": [ { "include": "#interpolation" }, { "include": "#pseudo-class" } ], "name": "entity.name.tag.css.postcss.symbol" }, { "include": "#operator" }, { "match": "[a-z-]+((?=:|#{))", "name": "support.type.property-name.css.postcss" }, { "include": "#reserved-words" }, { "include": "#property-value" } ], "name": "PostCSS", "scopeName": "source.postcss" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/postscript.tmLanguage.json ================================================ { "fileTypes": ["ps", "eps"], "firstLineMatch": "^%!PS", "repository": { "string_content": { "patterns": [ { "match": "\\\\[0-7]{1,3}", "name": "constant.numeric.octal.postscript" }, { "match": "\\\\(\\\\|[nrtbf\\(\\)]|[0-7]{1,3}|\\r?\\n)", "name": "constant.character.escape.postscript" }, { "match": "\\\\", "name": "invalid.illegal.unknown-escape.postscript.ignored" }, { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#string_content" }] } ] } }, "keyEquivalent": "^~P", "uuid": "B89483CD-6AE0-4517-BE2C-82F8083B7359", "patterns": [ { "begin": "\\(", "endCaptures": { "0": { "name": "punctuation.definition.string.end.postscript" } }, "end": "\\)", "patterns": [{ "include": "#string_content" }], "name": "string.other.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.postscript" } } }, { "match": "^(%%(BeginBinary:|BeginCustomColor:|BeginData:|BeginDefaults|BeginDocument:|BeginEmulation:|BeginExitServer:|BeginFeature:|BeginFile:|BeginFont:|BeginObject:|BeginPageSetup:|BeginPaperSize:|BeginPreview:|BeginProcSet|BeginProcessColor:|BeginProlog|BeginResource:|BeginSetup|BoundingBox:|CMYKCustomColor:|ChangeFont:|Copyright:|CreationDate:|Creator:|DocumentCustomColors:|DocumentData:|DocumentFonts:|DocumentMedia:|DocumentNeededFiles:|DocumentNeededFonts:|DocumentNeededProcSets:|DocumentNeededResources:|DocumentPaperColors:|DocumentPaperForms:|DocumentPaperSizes:|DocumentPaperWeights:|DocumentPrinterRequired:|DocumentProcSets:|DocumentProcessColors:|DocumentSuppliedFiles:|DocumentSuppliedFonts:|DocumentSuppliedProcSets:|DocumentSuppliedResources:|EOF|Emulation:|EndBinary:|EndComments|EndCustomColor:|EndData:|EndDefaults|EndDocument:|EndEmulation:|EndExitServer:|EndFeature:|EndFile:|EndFont:|EndObject:|EndPageSetup:|EndPaperSize:|EndPreview:|EndProcSet|EndProcessColor:|EndProlog|EndResource:|EndSetup|ExecuteFile:|Extensions:|Feature:|For:|IncludeDocument:|IncludeFeature:|IncludeFile:|IncludeFont:|IncludeProcSet:|IncludeResource:|LanguageLevel:|OperatorIntervention:|OperatorMessage:|Orientation:|Page:|PageBoundingBox:|PageCustomColors|PageCustomColors:|PageFiles:|PageFonts:|PageMedia:|PageOrder:|PageOrientation:|PageProcessColors|PageProcessColors:|PageRequirements:|PageResources:|PageTrailer|Pages:|PaperColor:|PaperForm:|PaperSize:|PaperWeight:|ProofMode:|RGBCustomColor:|Requirements:|Routing:|Title:|Trailer|VMlocation:|VMusage:|Version|Version:|\\+|\\?BeginFeatureQuery:|\\?BeginFileQuery:|\\?BeginFontListQuery:|\\?BeginFontQuery:|\\?BeginPrinterQuery:|\\?BeginProcSetQuery:|\\?BeginQuery:|\\?BeginResourceListQuery:|\\?BeginResourceQuery:|\\?BeginVMStatus:|\\?EndFeatureQuery:|\\?EndFileQuery:|\\?EndFontListQuery:|\\?EndFontQuery:|\\?EndPrinterQuery:|\\?EndProcSetQuery:|\\?EndQuery:|\\?EndResourceListQuery:|\\?EndResourceQuery:|\\?EndVMStatus:))\\s*(.*)$\\n?", "name": "meta.Document-Structuring-Comment.postscript", "captures": { "1": { "name": "keyword.other.DSC.postscript" }, "3": { "name": "string.unquoted.DSC.postscript" } } }, { "begin": "(^[ \\t]+)?(?=%)", "end": "(?!\\G)", "patterns": [ { "begin": "%", "end": "\\n", "name": "comment.line.percentage.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.comment.postscript" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.postscript" } } }, { "begin": "\\<\\<", "endCaptures": { "0": { "name": "punctuation.definition.dictionary.end.postscript" } }, "end": "\\>\\>", "patterns": [{ "include": "$self" }], "name": "meta.dictionary.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.dictionary.begin.postscript" } } }, { "begin": "\\[", "endCaptures": { "0": { "name": "punctuation.definition.array.end.postscript" } }, "end": "\\]", "patterns": [{ "include": "$self" }], "name": "meta.array.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.postscript" } } }, { "begin": "{", "endCaptures": { "0": { "name": "punctuation.definition.procedure.end.postscript" } }, "end": "}", "patterns": [{ "include": "$self" }], "name": "meta.procedure.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.procedure.begin.postscript" } } }, { "begin": "\\<\\~", "endCaptures": { "0": { "name": "punctuation.definition.string.end.postscript" } }, "end": "\\~\\>", "patterns": [ { "match": "[!-z\\s]+" }, { "match": ".", "name": "invalid.illegal.base85.char.postscript" } ], "name": "string.other.base85.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.postscript" } } }, { "begin": "\\<", "endCaptures": { "0": { "name": "punctuation.definition.string.end.postscript" } }, "end": "\\>", "patterns": [ { "match": "[0-9A-Fa-f\\s]+" }, { "match": ".", "name": "invalid.illegal.hexadecimal.char.postscript" } ], "name": "string.other.hexadecimal.postscript", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.postscript" } } }, { "comment": "well, not really, but short of listing rules for all bases from 2-36 best we can do", "match": "[0-3]?[0-9]#[0-9a-zA-Z]+", "name": "constant.numeric.radix.postscript" }, { "match": "(\\-|\\+)?\\d+(\\.\\d*)?([eE](\\-|\\+)?\\d+)?", "name": "constant.numeric.postscript" }, { "match": "(\\-|\\+)?\\.\\d+([eE](\\-|\\+)?\\d+)?", "name": "constant.numeric.postscript" }, { "match": "\\b(abs|add|aload|anchorsearch|and|arc|arcn|arct|arcto|array|ashow|astore|atan|awidthshow|begin|bind|bitshift|bytesavailable|cachestatus|ceiling|charpath|clear|cleartomark|cleardictstack|clip|clippath|closefile|closepath|colorimage|concat|concatmatrix|condition|configurationerror|copy|copypage|cos|count|countdictstack|countexecstack|counttomark|cshow|currentblackgeneration|currentcacheparams|currentcmykcolor|currentcolor|currentcolorrendering|currentcolorscreen|currentcolorspace|currentcolortransfer|currentcontext|currentdash|currentdevparams|currentdict|currentfile|currentflat|currentfont|currentglobal|currentgray|currentgstate|currenthalftone|currenthalftonephase|currenthsbcolor|currentlinecap|currentlinejoin|currentlinewidth|currentmatrix|currentmiterlimit|currentobjectformat|currentpacking|currentpagedevice|currentpoint|currentrgbcolor|currentscreen|currentshared|currentstrokeadjust|currentsystemparams|currenttransfer|currentundercolorremoval|currentuserparams|curveto|cvi|cvlit|cvn|cvr|cvrs|cvs|cvx|def|defaultmatrix|definefont|defineresource|defineusername|defineuserobject|deletefile|detach|deviceinfo|dict|dictfull|dictstack|dictstackoverflow|dictstackunderflow|div|dtransform|dup|echo|eexec|end|eoclip|eofill|eoviewclip|eq|erasepage|errordict|exch|exec|execform|execstack|execstackoverflow|execuserobject|executeonly|executive|exit|exp|false|file|filenameforall|fileposition|fill|filter|findencoding|findfont|findresource|flattenpath|floor|flush|flushfile|FontDirectory|for|forall|fork|ge|get|getinterval|globaldict|GlobalFontDirectory|glyphshow|grestore|grestoreall|gsave|gstate|gt|handleerror|identmatrix|idiv|idtransform|if|ifelse|image|imagemask|index|ineofill|infill|initclip|initgraphics|initmatrix|initviewclip|instroke|internaldict|interrupt|inueofill|inufill|inustroke|invalidaccess|invalidcontext|invalidexit|invalidfileaccess|invalidfont|invalidid|invalidrestore|invertmatrix|ioerror|ISOLatin1Encoding|itransform|join|kshow|known|languagelevel|le|length|limitcheck|lineto|ln|load|lock|log|loop|lt|makefont|makepattern|mark|matrix|maxlength|mod|monitor|moveto|mul|ne|neg|newpath|noaccess|nocurrentpoint|not|notify|null|nulldevice|or|packedarray|pathbbox|pathforall|pop|print|printobject|product|prompt|pstack|put|putinterval|quit|rand|rangecheck|rcurveto|read|readhexstring|readline|readonly|readstring|realtime|rectclip|rectfill|rectstroke|rectviewclip|renamefile|repeat|resetfile|resourceforall|resourcestatus|restore|reversepath|revision|rlineto|rmoveto|roll|rootfont|rotate|round|rrand|run|save|scale|scalefont|scheck|search|selectfont|serialnumber|setbbox|setblackgeneration|setcachedevice|setcachedevice2|setcachelimit|setcacheparams|setcharwidth|setcmykcolor|setcolor|setcolorrendering|setcolorscreen|setcolorspace|setcolortransfer|setdash|setdevparams|setfileposition|setflat|setfont|setglobal|setgray|setgstate|sethalftone|sethalftonephase|sethsbcolor|setlinecap|setlinejoin|setlinewidth|setmatrix|setmiterlimit|setobjectformat|setoverprint|setpacking|setpagedevice|setpattern|setrgbcolor|setscreen|setshared|setstrokeadjust|setsystemparams|settransfer|setucacheparams|setundercolorremoval|setuserparams|setvmthreshold|shareddict|show|showpage|sin|sqrt|srand|stack|stackoverflow|stackunderflow|StandardEncoding|start|startjob|status|statusdict|stop|stopped|store|string|stringwidth|stroke|strokepath|sub|syntaxerror|systemdict|timeout|transform|translate|true|truncate|type|typecheck|token|uappend|ucache|ucachestatus|ueofill|ufill|undef|undefined|undefinedfilename|undefineresource|undefinedresult|undefinefont|undefineresource|undefinedresource|undefineuserobject|unmatchedmark|unregistered|upath|userdict|UserObjects|usertime|ustroke|ustrokepath|version|viewclip|viewclippath|VMerror|vmreclaim|vmstatus|wait|wcheck|where|widthshow|write|writehexstring|writeobject|writestring|wtranslation|xcheck|xor|xshow|xyshow|yield|yshow)\\b", "name": "keyword.operator.postscript" }, { "match": "//[^\\(\\)\\<\\>\\[\\]\\{\\}\\/\\%\\s]+", "name": "variable.other.immediately-evaluated.postscript" }, { "match": "/[^\\(\\)\\<\\>\\[\\]\\{\\}\\/\\%\\s]+", "name": "variable.other.literal.postscript" }, { "comment": "stuff like 22@ff will show as number 22 followed by name @ff, but should be name 22@ff!", "match": "[^\\(\\)\\<\\>\\[\\]\\{\\}\\/\\%\\s]+", "name": "variable.other.name.postscript" } ], "name": "Postscript", "scopeName": "source.postscript" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/powerquery.tmLanguage.json ================================================ { "name": "powerquery", "scopeName": "source.powerquery", "fileTypes": ["pq", "pqm"], "uuid": "41968B57-12E6-4AC5-92A4-A837010E8B0A", "patterns": [ { "include": "#Noise" }, { "include": "#LiteralExpression" }, { "include": "#Keywords" }, { "include": "#ImplicitVariable" }, { "include": "#IntrinsicVariable" }, { "include": "#Operators" }, { "include": "#DotOperators" }, { "include": "#TypeName" }, { "include": "#RecordExpression" }, { "include": "#Punctuation" }, { "include": "#QuotedIdentifier" }, { "include": "#Identifier" } ], "repository": { "Keywords": { "match": "\\b(?:(and|or|not)|(if|then|else)|(try|catch|otherwise)|(as|each|in|is|let|meta|type|error)|(section|shared))\\b", "captures": { "1": { "name": "keyword.operator.word.logical.powerquery" }, "2": { "name": "keyword.control.conditional.powerquery" }, "3": { "name": "keyword.control.exception.powerquery" }, "4": { "name": "keyword.other.powerquery" }, "5": { "name": "keyword.powerquery" } } }, "TypeName": { "match": "\\b(?:(optional|nullable)|(action|any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|null|number|record|table|text|time|type))\\b", "captures": { "1": { "name": "storage.modifier.powerquery" }, "2": { "name": "storage.type.powerquery" } } }, "LiteralExpression": { "patterns": [ { "include": "#String" }, { "include": "#NumericConstant" }, { "include": "#LogicalConstant" }, { "include": "#NullConstant" }, { "include": "#FloatNumber" }, { "include": "#DecimalNumber" }, { "include": "#HexNumber" }, { "include": "#IntNumber" } ] }, "Noise": { "patterns": [ { "include": "#BlockComment" }, { "include": "#LineComment" }, { "include": "#Whitespace" } ] }, "Whitespace": { "match": "\\s+" }, "BlockComment": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.powerquery" }, "LineComment": { "match": "//.*", "name": "comment.line.double-slash.powerquery" }, "String": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powerquery" } }, "end": "\"(?!\")", "endCaptures": { "0": { "name": "punctuation.definition.string.end.powerquery" } }, "patterns": [ { "match": "\"\"", "name": "constant.character.escape.quote.powerquery" }, { "include": "#EscapeSequence" } ], "name": "string.quoted.double.powerquery" }, "QuotedIdentifier": { "begin": "#\"", "beginCaptures": { "0": { "name": "punctuation.definition.quotedidentifier.begin.powerquery" } }, "end": "\"(?!\")", "endCaptures": { "0": { "name": "punctuation.definition.quotedidentifier.end.powerquery" } }, "patterns": [ { "match": "\"\"", "name": "constant.character.escape.quote.powerquery" }, { "include": "#EscapeSequence" } ], "name": "entity.name.powerquery" }, "EscapeSequence": { "begin": "#\\(", "beginCaptures": { "0": { "name": "punctuation.definition.escapesequence.begin.powerquery" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.escapesequence.end.powerquery" } }, "patterns": [ { "match": "(#|\\h{4}|\\h{8}|cr|lf|tab)(?:,(#|\\h{4}|\\h{8}|cr|lf|tab))*" }, { "match": "[^\\)]", "name": "invalid.illegal.escapesequence.powerquery" } ], "name": "constant.character.escapesequence.powerquery" }, "LogicalConstant": { "match": "\\b(true|false)\\b", "name": "constant.language.logical.powerquery" }, "NullConstant": { "match": "\\b(null)\\b", "name": "constant.language.null.powerquery" }, "NumericConstant": { "match": "(?<![\\d\\w])(#infinity|#nan)\\b", "captures": { "1": { "name": "constant.language.numeric.float.powerquery" } } }, "HexNumber": { "match": "0(x|X)\\h+", "name": "constant.numeric.integer.hexadecimal.powerquery" }, "IntNumber": { "match": "\\b(\\d+)\\b", "captures": { "1": { "name": "constant.numeric.integer.powerquery" } } }, "DecimalNumber": { "match": "(?<![\\d\\w])(\\d*\\.\\d+)\\b", "name": "constant.numeric.decimal.powerquery" }, "FloatNumber": { "match": "(\\d*\\.)?\\d+(e|E)(\\+|-)?\\d+", "name": "constant.numeric.float.powerquery" }, "InclusiveIdentifier": { "match": "@", "captures": { "0": { "name": "inclusiveidentifier.powerquery" } } }, "Identifier": { "match": "(?x:(?<![\\._\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])(@?)([_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}][_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}]*(?:\\.[_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}][_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Nd}\\p{Pc}\\p{Mn}\\p{Mc}\\p{Cf}])*)\\b)", "captures": { "1": { "name": "keyword.operator.inclusiveidentifier.powerquery" }, "2": { "name": "entity.name.powerquery" } } }, "Operators": { "match": "(=>)|(=)|(<>|<|>|<=|>=)|(&)|(\\+|-|\\*|\\/)|(!)|(\\?)", "captures": { "1": { "name": "keyword.operator.function.powerquery" }, "2": { "name": "keyword.operator.assignment-or-comparison.powerquery" }, "3": { "name": "keyword.operator.comparison.powerquery" }, "4": { "name": "keyword.operator.combination.powerquery" }, "5": { "name": "keyword.operator.arithmetic.powerquery" }, "6": { "name": "keyword.operator.sectionaccess.powerquery" }, "7": { "name": "keyword.operator.optional.powerquery" } } }, "DotOperators": { "match": "(?<!\\.)(?:(\\.\\.\\.)|(\\.\\.))(?!\\.)", "captures": { "1": { "name": "keyword.operator.ellipsis.powerquery" }, "2": { "name": "keyword.operator.list.powerquery" } } }, "RecordExpression": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.brackets.begin.powerquery" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.powerquery" } }, "patterns": [ { "include": "$self" } ], "contentName": "meta.recordexpression.powerquery" }, "Punctuation": { "match": "(,)|(\\()|(\\))|({)|(})", "captures": { "1": { "name": "punctuation.separator.powerquery" }, "2": { "name": "punctuation.section.parens.begin.powerquery" }, "3": { "name": "punctuation.section.parens.end.powerquery" }, "4": { "name": "punctuation.section.braces.begin.powerquery" }, "5": { "name": "punctuation.section.braces.end.powerquery" } } }, "ImplicitVariable": { "match": "\\b_\\b", "name": "keyword.operator.implicitvariable.powerquery" }, "IntrinsicVariable": { "match": "(?<![\\d\\w])(#sections|#shared)\\b", "captures": { "1": { "name": "constant.language.intrinsicvariable.powerquery" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/powershell.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/PowerShell/EditorSyntax/blob/master/PowerShellSyntax.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/PowerShell/EditorSyntax/commit/742f0b5d4b60f5930c0b47fcc1f646860521296e", "name": "powershell", "scopeName": "source.powershell", "patterns": [ { "begin": "<#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.block.begin.powershell" } }, "end": "#>", "endCaptures": { "0": { "name": "punctuation.definition.comment.block.end.powershell" } }, "name": "comment.block.powershell", "patterns": [ { "include": "#commentEmbeddedDocs" } ] }, { "match": "[2-6]>&1|>>|>|<<|<|>|>\\||[1-6]>|[1-6]>>", "name": "keyword.operator.redirection.powershell" }, { "include": "#commands" }, { "include": "#commentLine" }, { "include": "#variable" }, { "include": "#subexpression" }, { "include": "#function" }, { "include": "#attribute" }, { "include": "#UsingDirective" }, { "include": "#type" }, { "include": "#hashtable" }, { "include": "#doubleQuotedString" }, { "include": "#scriptblock" }, { "comment": "Needed to parse stuff correctly in 'argument mode'. (See about_parsing.)", "include": "#doubleQuotedStringEscapes" }, { "begin": "['\\x{2018}-\\x{201B}]", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "['\\x{2018}-\\x{201B}]", "applyEndPatternLast": true, "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.single.powershell", "patterns": [ { "match": "['\\x{2018}-\\x{201B}]{2}", "name": "constant.character.escape.powershell" } ] }, { "begin": "(@[\"\\x{201C}-\\x{201E}])\\s*$", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "^[\"\\x{201C}-\\x{201E}]@", "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.double.heredoc.powershell", "patterns": [ { "include": "#variableNoProperty" }, { "include": "#doubleQuotedStringEscapes" }, { "include": "#interpolation" } ] }, { "begin": "(@['\\x{2018}-\\x{201B}])\\s*$", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "^['\\x{2018}-\\x{201B}]@", "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.single.heredoc.powershell" }, { "include": "#numericConstant" }, { "begin": "(@)(\\()", "beginCaptures": { "1": { "name": "keyword.other.array.begin.powershell" }, "2": { "name": "punctuation.section.group.begin.powershell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "name": "meta.group.array-expression.powershell", "patterns": [ { "include": "$self" } ] }, { "begin": "((\\$))(\\()", "beginCaptures": { "1": { "name": "keyword.other.substatement.powershell" }, "2": { "name": "punctuation.definition.subexpression.powershell" }, "3": { "name": "punctuation.section.group.begin.powershell" } }, "comment": "TODO: move to repo; make recursive.", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "name": "meta.group.complex.subexpression.powershell", "patterns": [ { "include": "$self" } ] }, { "match": "(\\b(([A-Za-z0-9\\-_\\.]+)\\.(?i:exe|com|cmd|bat))\\b)", "name": "support.function.powershell" }, { "match": "(?<!\\w|-|\\.)((?i:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\\?)(?!\\w)", "name": "keyword.control.powershell" }, { "match": "(?<!\\w|-|[^\\)]\\.)((?i:(foreach|where)(?!-object))|%|\\?)(?!\\w)", "name": "keyword.control.powershell" }, { "begin": "(?<!\\w)(--%)(?!\\w)", "beginCaptures": { "1": { "name": "keyword.control.powershell" } }, "end": "$", "patterns": [ { "match": ".+", "name": "string.unquoted.powershell" } ], "comment": "This should be moved to the repository at some point." }, { "comment": "This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.", "match": "(?<!\\w)((?i:hidden|static))(?!\\w)", "name": "storage.modifier.powershell" }, { "captures": { "1": { "name": "storage.type.powershell" }, "2": { "name": "entity.name.function" } }, "comment": "capture should be entity.name.type, but it doesn't provide a good color in the default schema.", "match": "(?<!\\w|-)((?i:class)|%|\\?)(?:\\s)+((?:\\p{L}|\\d|_|-|)+)\\b" }, { "match": "(?<!\\w)-(?i:is(?:not)?|as)\\b", "name": "keyword.operator.comparison.powershell" }, { "match": "(?<!\\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\\p{L})", "name": "keyword.operator.comparison.powershell" }, { "match": "(?<!\\w)-(?i:join|split)(?!\\p{L})|!", "name": "keyword.operator.unary.powershell" }, { "match": "(?<!\\w)-(?i:and|or|not|xor)(?!\\p{L})|!", "name": "keyword.operator.logical.powershell" }, { "match": "(?<!\\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\\p{L})", "name": "keyword.operator.bitwise.powershell" }, { "match": "(?<!\\w)-(?i:f)(?!\\p{L})", "name": "keyword.operator.string-format.powershell" }, { "match": "[+%*/-]?=|[+/*%-]", "name": "keyword.operator.assignment.powershell" }, { "match": "\\|{2}|&{2}|;", "name": "punctuation.terminator.statement.powershell" }, { "match": "&|(?<!\\w)\\.(?= )|`|,|\\|", "name": "keyword.operator.other.powershell" }, { "comment": "This is very imprecise, is there a syntax for 'must come after...' ", "match": "(?<!\\s|^)\\.\\.(?=\\-?\\d|\\(|\\$)", "name": "keyword.operator.range.powershell" } ], "repository": { "commentLine": { "begin": "(?<![`\\\\-])(#)#*", "captures": { "1": { "name": "punctuation.definition.comment.powershell" } }, "end": "$\\n?", "name": "comment.line.powershell", "patterns": [ { "include": "#commentEmbeddedDocs" }, { "include": "#RequiresDirective" } ] }, "attribute": { "begin": "(\\[)\\s*\\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\\b", "beginCaptures": { "1": { "name": "punctuation.section.bracket.begin.powershell" }, "2": { "name": "support.function.attribute.powershell" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.section.bracket.end.powershell" } }, "name": "meta.attribute.powershell", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.powershell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "patterns": [ { "include": "$self" }, { "match": "(?i)\\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\\b(?:\\s+)?(=)?", "captures": { "1": { "name": "variable.parameter.attribute.powershell" }, "2": { "name": "keyword.operator.assignment.powershell" } } } ] } ] }, "commands": { "patterns": [ { "comment": "Verb-Noun pattern:", "match": "(?:(\\p{L}|\\d|_|-|\\\\|\\:)*\\\\)?\\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\\-.+?(?:\\.(?i:exe|cmd|bat|ps1))?\\b", "name": "support.function.powershell" }, { "comment": "Builtin cmdlets with reserved verbs", "match": "(?<!\\w)(?i:foreach-object)(?!\\w)", "name": "support.function.powershell" }, { "comment": "Builtin cmdlets with reserved verbs", "match": "(?<!\\w)(?i:where-object)(?!\\w)", "name": "support.function.powershell" }, { "comment": "Builtin cmdlets with reserved verbs", "match": "(?<!\\w)(?i:sort-object)(?!\\w)", "name": "support.function.powershell" }, { "comment": "Builtin cmdlets with reserved verbs", "match": "(?<!\\w)(?i:tee-object)(?!\\w)", "name": "support.function.powershell" } ] }, "commentEmbeddedDocs": { "patterns": [ { "captures": { "1": { "name": "constant.string.documentation.powershell" }, "2": { "name": "keyword.operator.documentation.powershell" } }, "comment": "these embedded doc keywords do not support arguments, must be the only thing on the line", "match": "(?:^|\\G)(?i:\\s*(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\\s*$", "name": "comment.documentation.embedded.powershell" }, { "captures": { "1": { "name": "constant.string.documentation.powershell" }, "2": { "name": "keyword.operator.documentation.powershell" }, "3": { "name": "keyword.operator.documentation.powershell" } }, "comment": "these embedded doc keywords require arguments though the type required may be inconsistent, they may not all be able to use the same argument match", "match": "(?:^|\\G)(?i:\\s*(\\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\\s+(.+?)\\s*$", "name": "comment.documentation.embedded.powershell" } ] }, "doubleQuotedStringEscapes": { "patterns": [ { "match": "`[`0abefnrtv'\"\\x{2018}-\\x{201E}$]", "name": "constant.character.escape.powershell" }, { "include": "#unicodeEscape" } ] }, "unicodeEscape": { "comment": "`u{xxxx} added in PowerShell 6.0", "patterns": [ { "match": "`u\\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?\\g<1>{1,5})}", "name": "constant.character.escape.powershell" }, { "match": "`u(?:\\{[0-9a-fA-F]{,6}.)?", "name": "invalid.character.escape.powershell" } ] }, "function": { "begin": "^(?:\\s*+)(?i)(function|filter|configuration|workflow)\\s+(?:(global|local|script|private):)?((?:\\p{L}|\\d|_|-|\\.)+)", "beginCaptures": { "0": { "name": "meta.function.powershell" }, "1": { "name": "storage.type.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "3": { "name": "entity.name.function.powershell" } }, "end": "(?=\\{|\\()", "patterns": [ { "include": "#commentLine" } ] }, "subexpression": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.group.begin.powershell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } }, "name": "meta.group.simple.subexpression.powershell", "patterns": [ { "include": "$self" } ] }, "interpolation": { "begin": "(((\\$)))((\\())", "beginCaptures": { "1": { "name": "keyword.other.substatement.powershell" }, "2": { "name": "punctuation.definition.substatement.powershell" }, "3": { "name": "punctuation.section.embedded.substatement.begin.powershell" }, "4": { "name": "punctuation.section.group.begin.powershell" }, "5": { "name": "punctuation.section.embedded.substatement.begin.powershell" } }, "contentName": "interpolated.complex.source.powershell", "end": "(\\))", "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" }, "1": { "name": "punctuation.section.embedded.substatement.end.powershell" } }, "name": "meta.embedded.substatement.powershell", "patterns": [ { "include": "$self" } ] }, "numericConstant": { "patterns": [ { "captures": { "1": { "name": "constant.numeric.hex.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b" }, { "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?(?:[0-9_]+)?\\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b" }, { "captures": { "1": { "name": "constant.numeric.octal.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b" }, { "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?[0-9_]+(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b" }, { "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?[0-9_]+\\.(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b" }, { "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?[0-9_]+[\\.]?(?:F|f|D|d|M|m))((?i:[kmgtp]b)?)\\b" }, { "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } }, "match": "(?<!\\w)([-+]?[0-9_]+[\\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b" } ] }, "scriptblock": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.powershell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.braces.end.powershell" } }, "name": "meta.scriptblock.powershell", "patterns": [ { "include": "$self" } ] }, "type": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.bracket.begin.powershell" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.bracket.end.powershell" } }, "patterns": [ { "match": "(?!\\d+|\\.)(?:\\p{L}|\\p{N}|\\.)+", "name": "storage.type.powershell" }, { "include": "$self" } ] }, "variable": { "patterns": [ { "captures": { "0": { "name": "constant.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" } }, "comment": "These are special constants.", "match": "(\\$)(?i:(False|Null|True))\\b" }, { "captures": { "0": { "name": "support.constant.variable.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } }, "comment": "These are the other built-in constants.", "match": "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b" }, { "captures": { "0": { "name": "support.variable.automatic.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } }, "comment": "Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.", "match": "(\\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\b)((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" }, { "captures": { "0": { "name": "variable.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } }, "comment": "Style preference variables as language variables so that they stand out.", "match": "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "4": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.braces.begin.powershell" }, "3": { "name": "storage.modifier.scope.powershell" }, "5": { "name": "punctuation.section.braces.end.powershell" }, "6": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "support.variable.drive.powershell" }, "4": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$|@)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.braces.begin.powershell" }, "3": { "name": "support.variable.drive.powershell" }, "5": { "name": "punctuation.section.braces.end.powershell" }, "6": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?" } ] }, "UsingDirective": { "match": "(?<!\\w)(?i:(using))\\s+(?i:(namespace|module))\\s+(?i:((?:\\w+(?:\\.)?)+))", "captures": { "1": { "name": "keyword.control.using.powershell" }, "2": { "name": "keyword.other.powershell" }, "3": { "name": "variable.parameter.powershell" } } }, "RequiresDirective": { "begin": "(?<=#)(?i:(requires))\\s", "beginCaptures": { "0": { "name": "keyword.control.requires.powershell" } }, "end": "$", "name": "meta.requires.powershell", "patterns": [ { "match": "\\-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)", "name": "keyword.other.powershell" }, { "match": "(?<!-)\\b\\p{L}+|\\d+(?:\\.\\d+)*", "name": "variable.parameter.powershell" }, { "include": "#hashtable" } ] }, "variableNoProperty": { "patterns": [ { "captures": { "0": { "name": "constant.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" } }, "comment": "These are special constants.", "match": "(\\$)(?i:(False|Null|True))\\b" }, { "captures": { "0": { "name": "support.constant.variable.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } }, "comment": "These are the other built-in constants.", "match": "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\\b" }, { "captures": { "0": { "name": "support.variable.automatic.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } }, "comment": "Automatic variables are not constants, but they are read-only...", "match": "(\\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\b)" }, { "captures": { "0": { "name": "variable.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } }, "comment": "Style preference variables as language variables so that they stand out.", "match": "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\\b" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "4": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "4": { "name": "keyword.other.powershell" }, "5": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "support.variable.drive.powershell" }, "4": { "name": "variable.other.member.powershell" } }, "match": "(?i:(\\$)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))" }, { "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.braces.begin" }, "3": { "name": "support.variable.drive.powershell" }, "5": { "name": "punctuation.section.braces.end" } }, "match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))" } ] }, "hashtable": { "begin": "(@)(\\{)", "beginCaptures": { "1": { "name": "keyword.other.hashtable.begin.powershell" }, "2": { "name": "punctuation.section.braces.begin.powershell" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.braces.end.powershell" } }, "name": "meta.hashtable.powershell", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.string.begin.powershell" }, "2": { "name": "variable.other.readwrite.powershell" }, "3": { "name": "punctuation.definition.string.end.powershell" }, "4": { "name": "keyword.operator.assignment.powershell" } }, "match": "\\b((?:\\'|\\\")?)(\\w+)((?:\\'|\\\")?)(?:\\s+)?(=)(?:\\s+)?", "name": "meta.hashtable.assignment.powershell" }, { "include": "#scriptblock" }, { "include": "$self" } ] }, "doubleQuotedString": { "begin": "[\"\\x{201C}-\\x{201E}]", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "end": "[\"\\x{201C}-\\x{201E}]", "applyEndPatternLast": true, "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } }, "name": "string.quoted.double.powershell", "patterns": [ { "match": "(?i)\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,64}\\b" }, { "include": "#variableNoProperty" }, { "include": "#doubleQuotedStringEscapes" }, { "match": "[\"\\x{201C}-\\x{201E}]{2}", "name": "constant.character.escape.powershell" }, { "include": "#interpolation" }, { "match": "`\\s*$", "name": "keyword.other.powershell" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/praat.tmLanguage.json ================================================ { "foldingStartMarker": "^\\s*(editor|for|if|form|procedure|proc|repeat|while)(?=\\s)", "foldingStopMarker": "^\\s*(endeditor|endfor|elsif|else|endif|endform|endproc|endwhile|until)(?=\\s*)", "fileTypes": [ "praat", "script", "psc", "praat_script", "praatscript", "praat-script", "praat-batch", "proc" ], "uuid": "ca03e751-04ef-4330-9a6b-9b99aae1c418", "patterns": [ { "match": "(^|\\s)(#|;)(.*)$", "name": "comment.line.number-sign.praat" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.praat" } }, "end": "\"", "name": "string.quoted.double.praat", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.praat" } } }, { "begin": "(\\:|\\s|\\(|\\.)'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.praat" } }, "end": "'", "name": "string.quoted.single.praat", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.praat" } } }, { "match": "\\b(([0-9]+(\\.[0-9]+)?e[0-9]+(\\.[0-9]+)?(?=($|\\s+|\\b|;|,|\\)){1,1})|[0-9]+(\\.[0-9]+)?%?(?=($|\\s+|;|,|\\)){1,1})))", "name": "constant.numeric.praat" }, { "begin": "^\\s*(procedure|proc)\\s+(?=[a-zA-Z][A-Za-z0-9_]*(\\s*:|\\s*\\(|$))", "end": "($|\\))", "patterns": [ { "begin": "(?=[a-zA-Z][a-zA-z_])", "end": "(?![A-Za-z0-9_])", "patterns": [{ "include": "#entity_name_function" }], "contentName": "entity.name.function.praat" }, { "begin": "(:|\\()", "end": "($|\\))", "patterns": [ { "match": "\\b([a-z][a-zA-Z0-9_\\$]*)\\s*((?=,)|(?=$)|(?=\\)))", "captures": { "1": { "name": "variable.parameter.function.praat" } } } ], "contentName": "meta.function.parameters.praat", "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.praat" } } } ], "name": "meta.function.praat", "beginCaptures": { "1": { "name": "keyword.control.praat" } } }, { "match": "(^\\s*call)|(^\\s*@[a-zA-Z0-9_]*(?![a-zA-Z0-9_]))", "name": "entity.name.function.praat" }, { "match": "(^|\\s+)(assert|editor|elif|else|elsif|endeditor|endfor|endform|endif|endproc|endwhile|form|for|goto|if|label|nocheck|noprogress|nowarn|proc|procedure|repeat|then(?=.*fi)|until|warn|while)(?=\\s|$|:)", "name": "keyword.control.praat" }, { "match": "(\\s+)(from(?=.*to)(?=\\s)|to(?=\\s)|fi($|\\s+))", "name": "keyword.control.praat" }, { "match": "^\\s*(boolean|button|choice|comment|demo|integer|natural|option|optionmenu|positive|real|sentence|text|word)(?=\\s)", "name": "support.class.praat" }, { "match": "\\s+(Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|BarkFilter|Categories|CCA|Cepstrum|Cepstrumc|ChebyshevSeries|ClassificationTable|Cochleagram|Collection|Configuration|Confusion|ContingencyTable|Corpus|Correlation|Covariance|CrossCorrelationTable|CrossCorrelationTables|Diagonalizer|Discriminant|Dissimilarity|Distance|Distributions|DTW|DurationTier|EEG|Eigen|ERP|ERPTier|Excitation|Excitations|ExperimentMFC|FeatureWeights|FFNet|Formant|FormantFilter|FormantGrid|FormantPoint|FormantTier|GaussianMixture|Harmonicity|HMM|HMM_Observation|HMM_ObservationSequence|HMM_State|HMM_StateSequence|Index|Intensity|IntensityTier|IntervalTier|ISpline|KlattGrid|KlattTable|KNN|Label|LegendreSeries|LFCC|LinearRegression|LogisticRegression|LongSound|LPC|Ltas|Manipulation|ManPages|Matrix|MelFilter|MFCC|MixingMatrix|Movie|MSpline|Network|OTGrammar|OTHistory|OTMulti|PairDistribution|ParamCurve|Pattern|PCA|Permutation|Photo|Pitch|PitchTier|PointProcess|Polygon|Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|Salience|ScalarProduct|Similarity|SimpleString|SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|SpeechSynthesizer|SpellingChecker|SPINET|SSCP|Strings|StringsIndex|SVD|Table|TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|Transition|VocalTract|Weight|WordList)(?=\\s+)", "name": "constant.other.placeholder.praat" }, { "match": "^\\s*(minus|plus|(select all|select)|editor)(?=\\s|$)", "name": "support.function.builtin.praat" }, { "match": "^\\s*(sendsocket|system|system_nocheck)(?=\\s)", "name": "support.function.builtin.praat" }, { "match": "^\\s*(fileappend|fileappendinfo|filedelete|include)(?=\\s)", "name": "support.function.builtin.praat" }, { "match": "^\\s*(clearinfo|echo|execute|exitScript|exit|pauseScript|pause|printline|print|sendpraat|stopwatch)(?=\\s|$|:)", "name": "support.function.builtin.praat" }, { "match": "(\\s|^\\s*)(Add|Append|Arrow|Autocorrelate|Axes|Change|Close|Colour|Combine|Compute|Concatenate|Convert|Convolve|Copy|Count|Courier|Create|Cross|Dashed|De|Deepen|Dotted|Down|Draw|Duplicate|Edit|Erase|Extend|Extract|Fade|Filter|Filtering|Font|Formula|Get|Helvetica|Horizontal|Hum|Info|Insert|Inspect|Interpolate|Is|Kill|Lengthen|Line|List|Logarithmic|Marks|Merge|Move|Multiply|New|One|Open|Override|Paint|Palatino|Picture|Pitch|Plain|Play|PostScript|Pre|Randomize|Read|Record|Remove|Rename|Replace|Resample|Reverse|Save|Scale|Scatter|Select|Set|Shift|Show|Smooth|Solid|Sort|Speckle|Subtract|Text|Times|To|Vertical|View & Edit|View|Write|Zoom)(\\s*.*(?=:\\s+)|\\s*.*(?=\\.{3}\\s+)|(\\s*)([a-zA-Z ]*)(?!'))", "name": "support.class.praat" }, { "match": "\\s*(Black|black|Blue|blue|Cyan|cyan|Green|green|Grey|grey|Lime|lime|Magenta|magenta|Maroon|maroon|Navy|navy|Olive|olive|Pink|pink|Purple|purple|Red|red|Silver|silver|Teal|teal|White|white|Yellow|yellow)(?=\\s*$)", "name": "constant.other.placeholder.praat" }, { "match": "(!=|&|>|><|>=|<|<=|\\*|\\*=|\\+|\\+=|-|-=|\\/|\\/=|=|==|\\^|\\|)(?=.)", "name": "keyword.operator.praat" }, { "match": "\\s+(and|or|not)(?=.*(!|!=|>|><|>=|<|<=|==))", "name": "keyword.operator.praat" }, { "match": "\\s+(div|mod)\\s+", "name": "keyword.operator.praat" }, { "match": "(^|\\s+)(abs|actanh|appendFileLine|appendFile|appendInfoLine|appendInfo|arccosh|arccos|arcsinh|arcsin|arctan2|arctan|barkToHerz|beginPause|besselI|besselK|beta|binomialP|binomialQ|ceiling|chiSquareP|chiSquareQ|chooseDirectory\\$|chooseReadFile\\$|chooseWriteFile\\$|cosh|cos|createDirectory|date\\$|deleteFile|demoClickedIn|demoClicked|demoCommandKeyPressed|demoExtraControlKeyPressed|demoInput|demoKey\\$|demoKeyPressed|demoOptionKeyPressed|demoShiftKeyPressed|demoShow|demoWaitForInput|demoWindowTitle|demoX|demoY|differenceLimensToPhon|endPause|endsWith|environment\\$|erbToHertz|erb|erfc|erf|exp|extractLine\\$|extractNumber|extractWord\\$|fisherP|fisherQ|fixed\\$|floor|gaussP|gaussQ|hertzToBark|hertzToErb|hertzToMel|hertzToSemitones|imax|imin|index_regex|index|invBinomialP|invBinomialQ|invChiSquareQ|invFisherQ|invGaussQ|invSigmoid|invStudentQ|left\\$|length|ln|lnGamma|log10|log2|max|melToHertz|mid\\$|min|numberOfSelected|number|percent\\$|phonToDifferenceLimens|randomGauss|randomInteger|randomPoisson|randomUniform|replace\\$|replace_regex\\$|right\\$|rindex_regex|rindex|round|selected\\$|selected|semitonesToHerz|sigmoid|sinc|sin|sincpi|sinh|sqrt|startsWith|string\\$|studentP|studentQ|tanh|tan|variableExists|writeFileLine|writeFile|writeInfoLine|writeInfo)((?=\\s*:)|(?=\\s*\\())", "name": "support.function.builtin.praat" }, { "match": "(Bark|Bars|Bartlett|Bottom|bottom|Centre|centre|Courier|Cubic|dB|energy|Gaussian|Half|half|Hamming|Hanning|Helvetica|Hertz|Kaiser2|Left|left|Linear|Nearest|no|None|Palatino|Parabolic|Rectangular|rectangular|Right|right|Semitones|Sinc|Sinc70|Sinc700|sones|Square|Times|Top|top|Welch|yes)", "name": "meta.function.parameters.praat" }, { "match": "(^|\\s*)(defaultDirectory\\$|homeDirectory\\$|macintosh|newline\\$|pi|praatVersion\\$|praatVersion|preferencesDirectory\\$|shellDirectory\\$|tab\\$|temporaryDirectory\\$|undefined|unix|windows)(\\s*(?=\\+|,)|$)", "name": "support.function.builtin.praat" }, { "match": "(^|\\s*)(exitScript|minusObject|plusObject|removeObject|runScript|selectObject)((?=:)|(?=\\())", "name": "support.function.builtin.praat" } ], "name": "Praat", "scopeName": "source.praat" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/prisma.tmLanguage.json ================================================ { "scopeName": "source.prisma", "patterns": [ { "include": "#triple_comment" }, { "include": "#double_comment" }, { "include": "#model_block_definition" }, { "include": "#config_block_definition" }, { "include": "#enum_block_definition" }, { "include": "#type_definition" } ], "repository": { "functional": { "begin": "(\\w+)(\\()", "endCaptures": { "0": { "name": "punctuation.definition.tag.prisma" } }, "patterns": [{ "include": "#value" }], "end": "\\)", "name": "source.prisma.functional", "beginCaptures": { "1": { "name": "support.function.functional.prisma" }, "2": { "name": "punctuation.definition.tag.prisma" } } }, "assignment": { "patterns": [ { "begin": "^\\s*(\\w+)\\s*(=)\\s*", "patterns": [ { "include": "#value" }, { "include": "#double_comment_inline" } ], "end": "\\n", "beginCaptures": { "1": { "name": "variable.other.assignment.prisma" }, "2": { "name": "keyword.operator.terraform" } } } ] }, "double_comment": { "begin": "//", "end": "$\\n?", "name": "comment.prisma" }, "named_argument": { "name": "source.prisma.named_argument", "patterns": [{ "include": "#map_key" }, { "include": "#value" }] }, "config_block_definition": { "begin": "^\\s*(generator|datasource)\\s+([A-Za-z][\\w]*)\\s+({)", "endCaptures": { "1": { "name": "punctuation.definition.tag.prisma" } }, "patterns": [ { "include": "#triple_comment" }, { "include": "#double_comment" }, { "include": "#assignment" } ], "end": "\\s*\\}", "name": "source.prisma.embedded.source", "beginCaptures": { "1": { "name": "storage.type.config.prisma" }, "2": { "name": "entity.name.type.config.prisma" }, "3": { "name": "punctuation.definition.tag.prisma" } } }, "map_key": { "name": "source.prisma.key", "patterns": [ { "match": "(\\w+)\\s*(:)\\s*", "captures": { "1": { "name": "variable.parameter.key.prisma" }, "2": { "name": "punctuation.definition.separator.key-value.prisma" } } } ] }, "attribute": { "name": "source.prisma.attribute", "match": "(@@?[\\w\\.]+)", "captures": { "1": { "name": "entity.name.function.attribute.prisma" } } }, "string_interpolation": { "patterns": [ { "begin": "\\$\\{", "endCaptures": { "0": { "name": "keyword.control.interpolation.end.prisma" } }, "end": "\\s*\\}", "patterns": [{ "include": "#value" }], "name": "source.tag.embedded.source.prisma", "beginCaptures": { "0": { "name": "keyword.control.interpolation.start.prisma" } } } ] }, "attribute_with_arguments": { "begin": "(@@?[\\w\\.]+)(\\()", "endCaptures": { "0": { "name": "punctuation.definition.tag.prisma" } }, "patterns": [{ "include": "#named_argument" }, { "include": "#value" }], "end": "\\)", "name": "source.prisma.attribute.with_arguments", "beginCaptures": { "1": { "name": "entity.name.function.attribute.prisma" }, "2": { "name": "punctuation.definition.tag.prisma" } } }, "array": { "begin": "\\[", "endCaptures": { "1": { "name": "punctuation.definition.tag.prisma" } }, "patterns": [{ "include": "#value" }], "end": "\\]", "name": "source.prisma.array", "beginCaptures": { "1": { "name": "punctuation.definition.tag.prisma" } } }, "enum_block_definition": { "begin": "^\\s*(enum)\\s+([A-Za-z][\\w]*)\\s+({)", "endCaptures": { "0": { "name": "punctuation.definition.tag.prisma" } }, "patterns": [ { "include": "#triple_comment" }, { "include": "#double_comment" }, { "include": "#enum_value_definition" } ], "end": "\\s*\\}", "name": "source.prisma.embedded.source", "beginCaptures": { "1": { "name": "storage.type.enum.prisma" }, "2": { "name": "entity.name.type.enum.prisma" }, "3": { "name": "punctuation.definition.tag.prisma" } } }, "model_block_definition": { "begin": "^\\s*(model|type)\\s+([A-Za-z][\\w]*)\\s*({)", "endCaptures": { "0": { "name": "punctuation.definition.tag.prisma" } }, "patterns": [ { "include": "#triple_comment" }, { "include": "#double_comment" }, { "include": "#field_definition" } ], "end": "\\s*\\}", "name": "source.prisma.embedded.source", "beginCaptures": { "1": { "name": "storage.type.model.prisma" }, "2": { "name": "entity.name.type.model.prisma" }, "3": { "name": "punctuation.definition.tag.prisma" } } }, "identifier": { "patterns": [ { "match": "\\b(\\w)+\\b", "name": "support.constant.constant.prisma" } ] }, "double_comment_inline": { "match": "//[^\\n]*", "name": "comment.prisma" }, "field_definition": { "patterns": [ { "match": "^\\s*(\\w+)(\\s*:)?\\s+(\\w+)(\\[\\])?(\\?)?(\\!)?", "captures": { "3": { "name": "support.type.primitive.prisma" }, "1": { "name": "variable.other.assignment.prisma" }, "6": { "name": "invalid.illegal.required_type.prisma" }, "4": { "name": "keyword.operator.list_type.prisma" }, "2": { "name": "invalid.illegal.colon.prisma" }, "5": { "name": "keyword.operator.optional_type.prisma" } } }, { "include": "#attribute_with_arguments" }, { "include": "#attribute" } ] }, "boolean": { "match": "\\b(true|false)\\b", "name": "constant.language.boolean.prisma" }, "type_definition": { "patterns": [ { "match": "^\\s*(type)\\s+(\\w+)\\s*=\\s*(\\w+)", "captures": { "1": { "name": "storage.type.type.prisma" }, "2": { "name": "entity.name.type.type.prisma" }, "3": { "name": "support.type.primitive.prisma" } } }, { "include": "#attribute_with_arguments" }, { "include": "#attribute" } ] }, "literal": { "name": "source.prisma.literal", "patterns": [ { "include": "#boolean" }, { "include": "#number" }, { "include": "#double_quoted_string" }, { "include": "#identifier" } ] }, "triple_comment": { "begin": "///", "end": "$\\n?", "name": "comment.prisma" }, "value": { "name": "source.prisma.value", "patterns": [ { "include": "#array" }, { "include": "#functional" }, { "include": "#literal" } ] }, "number": { "match": "((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b", "name": "constant.numeric.prisma" }, "double_quoted_string": { "begin": "\"", "endCaptures": { "0": { "name": "string.quoted.double.end.prisma" } }, "end": "\"", "patterns": [ { "include": "#string_interpolation" }, { "match": "([\\w\\-\\/\\._\\\\%@:\\?=]+)", "name": "string.quoted.double.prisma" } ], "name": "unnamed", "beginCaptures": { "0": { "name": "string.quoted.double.start.prisma" } } }, "enum_value_definition": { "patterns": [ { "match": "^\\s*(\\w+)\\s*$", "captures": { "1": { "name": "variable.other.assignment.prisma" } } }, { "include": "#attribute_with_arguments" }, { "include": "#attribute" } ] } }, "name": "Prisma" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/prolog.tmLanguage.json ================================================ { "scopeName": "source.prolog", "fileTypes": [], "patterns": [ { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.prolog" } }, "end": "'", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.prolog" }, { "match": "''", "name": "constant.character.escape.quote.prolog" } ], "name": "string.quoted.single.prolog", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.prolog" } } }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.prolog", "captures": { "0": { "name": "punctuation.definition.comment.prolog" } } }, { "begin": "(^[ \\t]+)?(?=%)", "end": "(?!\\G)", "patterns": [ { "begin": "%", "end": "\\n", "name": "comment.line.percentage.prolog", "beginCaptures": { "0": { "name": "punctuation.definition.comment.prolog" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.prolog" } } }, { "match": ":-", "name": "keyword.operator.definition.prolog" }, { "match": "\\b[A-Z][a-zA-Z0-9_]*\\b", "name": "variable.other.prolog" }, { "comment": "\n\t\t\tI changed this from entity to storage.type, but have no idea what it is -- Allan\n\t\t\tAnd I changed this to constant.other.symbol after glancing over the docs,\n\t\t\t might still be wrong. -- Infininight\n\t\t\t", "match": "\\b[a-z][a-zA-Z0-9_]*\\b", "name": "constant.other.symbol.prolog" } ], "name": "Prolog", "keyEquivalent": "^~P", "uuid": "C0E2ADB0-1706-4A28-8DB7-263BDC8B5C5C" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/properties.tmLanguage.json ================================================ { "scopeName": "source.tm-properties", "fileTypes": ["tm_properties", "tmProperties"], "patterns": [ { "begin": "^([a-zA-Z0-9][a-zA-Z0-9_+\\-]*)\\s*(=)\\s*", "end": "$", "patterns": [{ "include": "#string" }], "captures": { "1": { "name": "support.constant.tm-properties" }, "2": { "name": "punctuation.separator.key-value.tm-properties" } } }, { "begin": "^\\[", "endCaptures": { "0": { "name": "punctuation.definition.section.end.tm-properties" } }, "end": "\\]", "patterns": [{ "include": "#string" }], "name": "meta.section.tm-properties", "beginCaptures": { "0": { "name": "punctuation.definition.section.begin.tm-properties" } } }, { "include": "#comment" } ], "repository": { "comment": { "begin": "(^[ \\t]+)?(?=#)", "end": "(?!\\G)", "patterns": [ { "begin": "#", "end": "\\n", "name": "comment.line.number-sign.tm-properties", "beginCaptures": { "0": { "name": "punctuation.definition.comment.tm-properties" } } } ], "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tm-properties" } }, "captures": { "1": { "name": "punctuation.definition.comment.tm-properties" } } }, "string": { "patterns": [ { "match": "[a-zA-Z0-9][a-zA-Z0-9_+\\-]*", "name": "string.unquoted.tm-properties" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.tm-properties" } }, "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.tm-properties" } ], "name": "string.quoted.double.tm-properties", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tm-properties" } } }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.tm-properties" } }, "end": "'", "name": "string.quoted.single.tm-properties", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tm-properties" } } } ] } }, "name": "Properties", "uuid": "DE84747E-90A6-4731-92A4-A9C6823D35DE" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/protobuf.tmLanguage.json ================================================ { "scopeName": "source.proto", "fileTypes": ["proto"], "patterns": [ { "include": "#comments" }, { "include": "#storagetypes" }, { "include": "#enum" }, { "include": "#message" }, { "include": "#option" }, { "include": "#constants" }, { "include": "#strings" }, { "include": "#oneof" }, { "include": "#packaging" }, { "include": "#service" }, { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b", "name": "constant.numeric.proto" } ], "repository": { "comments": { "patterns": [ { "begin": "/\\*", "end": "\\*/", "name": "comment.block.proto" }, { "begin": "//", "end": "$\\n?", "name": "comment.line.double-slash.proto" } ] }, "option": { "begin": "(\\b)(option)(\\b)", "end": ";", "patterns": [ { "include": "#comments" }, { "include": "#strings" }, { "match": "default|packed|optimize\\_for|java\\_package|java\\_outer\\_classname|go\\_package|deprecated|lazy|\\w+\\_api\\_version", "name": "storage.type.proto" }, { "match": "(CODE\\_SIZE|SPEED)", "name": "constant.language.proto" } ], "beginCaptures": { "2": { "name": "keyword.source.proto" } } }, "service": { "begin": "(service)(\\s+)([A-Za-z][A-Za-z0-9_.]*)(\\s*)(\\{)?", "end": "\\}", "patterns": [ { "include": "#comments" }, { "begin": "(rpc)\\s+([A-Za-z][A-Z-a-z0-9_.]+)\\s*\\((stream\\s+)?([A-Za-z0-9_]+)\\)\\s+(returns)\\s+\\((stream\\s+)?([A-Za-z0-9_.]+)\\)\\{?", "end": "\\}|;", "patterns": [{ "include": "#comments" }, { "include": "#option" }], "beginCaptures": { "3": { "name": "keyword.source.proto" }, "1": { "name": "keyword.source.proto" }, "6": { "name": "keyword.source.proto" }, "2": { "name": "entity.name.function" }, "5": { "name": "keyword.source.proto" } } } ], "beginCaptures": { "1": { "name": "keyword.source.proto" }, "3": { "name": "entity.name.class.message.proto" } } }, "packaging": { "match": "(package|import)(?=(\\s+)([\"]?[A-Za-z][A-Za-z0-9-_./]*[\"]?)(;))", "captures": { "1": { "name": "keyword.source.proto" }, "2": { "name": "entity.name.tag" } } }, "message": { "begin": "(message|extend)(\\s+)([A-Za-z][A-Za-z0-9_.]*)(\\s*)(\\{)?", "end": "\\}", "patterns": [ { "include": "$self" }, { "include": "#enum" }, { "include": "#option" }, { "include": "#comments" }, { "include": "#oneof" }, { "begin": "(optional|repeated|required|to|extensions)(\\s+)", "end": ";", "patterns": [ { "include": "#storagetypes" }, { "match": "(map)<([A-Za-z][A-Za-z0-9_]*),\\s*([A-Za-z][A-Za-z0-9_]*)>\\s+([A-Za-z][A-Za-z0-9_]*)", "captures": { "1": { "name": "keyword.source.proto" }, "4": { "name": "entity.name.class.proto" } } }, { "match": "([A-Za-z][A-Za-z0-9_]*)(\\s+)([A-Za-z][A-Za-z0-9_]*)", "captures": { "1": { "name": "entity.name.class.proto" } } }, { "match": "(\\s*)(=)(\\s*)([0-9]*)", "captures": { "4": { "name": "constant.numeric.proto" } } }, { "begin": "\\[", "end": "\\]", "patterns": [ { "match": "default|packed|deprecated|lazy", "name": "keyword.source.proto" }, { "include": "#constants" } ] } ], "beginCaptures": { "1": { "name": "keyword.source.proto" } } } ], "beginCaptures": { "1": { "name": "keyword.source.proto" }, "3": { "name": "entity.name.class.message.proto" } } }, "storagetypes": { "match": "\\b(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\\b", "name": "storage.type.proto" }, "oneof": { "begin": "(oneof)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?", "end": "\\}", "patterns": [ { "include": "#option" }, { "include": "#comments" }, { "match": "\\b(to|extensions)\\b", "name": "keyword.source.proto" }, { "match": "([A-Za-z][A-Za-z0-9_]*)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(=)(\\s*)([0-9]*)", "captures": { "1": { "name": "entity.name.class.proto" }, "7": { "name": "constant.numeric.proto" } } } ], "beginCaptures": { "1": { "name": "keyword.source.proto" } } }, "enum": { "begin": "(enum)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?", "end": "\\}", "patterns": [ { "include": "#option" }, { "include": "#comments" }, { "match": "\\b(to|extensions)\\b", "name": "keyword.source.proto" }, { "match": "([A-Za-z][A-Za-z0-9_]*)(\\s*)(=)(\\s*)([0-9]*)", "captures": { "1": { "name": "constant.other.proto" }, "5": { "name": "constant.numeric.proto" } } } ], "beginCaptures": { "1": { "name": "keyword.source.proto" }, "3": { "name": "entity.name.class.message.proto" } } }, "strings": { "begin": "\"", "end": "\"", "name": "string.quoted.double.proto" }, "constants": { "match": "\\b(true|false|max)\\b", "name": "constant.language.proto" } }, "name": "Protocol Buffer", "uuid": "750ac1f3-b172-48de-b1a4-a3c310c4a293" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/pug.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/davidrios/pug-tmbundle/blob/master/Syntaxes/Pug.JSON-tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/davidrios/pug-tmbundle/commit/e67e895f6fb64932aa122e471000fa55d826bff6", "name": "pug", "scopeName": "text.pug", "patterns": [ { "match": "^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?", "name": "meta.tag.sgml.doctype.html", "comment": "Doctype declaration." }, { "begin": "^(\\s*)//-", "end": "^(?!(\\1\\s)|\\s*$)", "name": "comment.unbuffered.block.pug", "comment": "Unbuffered (pug-only) comments." }, { "begin": "^(\\s*)//", "end": "^(?!(\\1\\s)|\\s*$)", "name": "string.comment.buffered.block.pug", "comment": "Buffered (html) comments.", "patterns": [ { "captures": { "1": { "name": "invalid.illegal.comment.comment.block.pug" } }, "match": "^\\s*(//)(?!-)", "name": "string.comment.buffered.block.pug", "comment": "Buffered comments inside buffered comments will generate invalid html." } ] }, { "begin": "<!--", "end": "--\\s*>", "name": "comment.unbuffered.block.pug", "patterns": [ { "match": "--", "name": "invalid.illegal.comment.comment.block.pug" } ] }, { "begin": "^(\\s*)-$", "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.js", "comment": "Unbuffered code block.", "patterns": [ { "include": "source.js" } ] }, { "begin": "^(\\s*)(script)((\\.$)|(?=[^\\n]*(text|application)/javascript.*\\.$))", "beginCaptures": { "2": { "name": "entity.name.tag.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "meta.tag.other", "comment": "Script tag with JavaScript code.", "patterns": [ { "begin": "\\G(?=\\()", "end": "$", "patterns": [ { "include": "#tag_attributes" } ] }, { "begin": "\\G(?=[.#])", "end": "$", "patterns": [ { "include": "#complete_tag" } ] }, { "include": "source.js" } ] }, { "begin": "^(\\s*)(style)((\\.$)|(?=[.#(].*\\.$))", "beginCaptures": { "2": { "name": "entity.name.tag.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "meta.tag.other", "comment": "Style tag with CSS code.", "patterns": [ { "begin": "\\G(?=\\()", "end": "$", "patterns": [ { "include": "#tag_attributes" } ] }, { "begin": "\\G(?=[.#])", "end": "$", "patterns": [ { "include": "#complete_tag" } ] }, { "include": "source.css" } ] }, { "begin": "^(\\s*):(sass)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.sass.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.sass.filter.pug", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.sass" } ] }, { "begin": "^(\\s*):(less)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.less.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.less.filter.pug", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.less" } ] }, { "begin": "^(\\s*):(stylus)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.stylus.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.stylus" } ] }, { "begin": "^(\\s*):(coffee(-?script)?)(?=\\(|$)", "beginCaptures": { "2": { "name": "constant.language.name.coffeescript.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "source.coffeescript.filter.pug", "patterns": [ { "include": "#tag_attributes" }, { "include": "source.coffee" } ] }, { "begin": "^(\\s*)((:(?=.))|(:$))", "beginCaptures": { "4": { "name": "invalid.illegal.empty.generic.filter.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "comment": "Generic Pug filter.", "patterns": [ { "begin": "\\G(?<=:)(?=.)", "end": "$", "name": "name.generic.filter.pug", "patterns": [ { "match": "\\G\\(", "name": "invalid.illegal.name.generic.filter.pug" }, { "match": "[\\w-]", "name": "constant.language.name.generic.filter.pug" }, { "include": "#tag_attributes" }, { "match": "\\W", "name": "invalid.illegal.name.generic.filter.pug" } ] } ] }, { "begin": "^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?<=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))", "beginCaptures": { "2": { "name": "entity.other.attribute-name.id.pug" }, "3": { "name": "entity.other.attribute-name.class.pug" }, "4": { "name": "meta.tag.other entity.name.tag.pug" } }, "end": "^(?!(\\1\\s)|\\s*$)", "comment": "Generated from dot_block_tag.py", "patterns": [ { "include": "#tag_attributes" }, { "include": "#complete_tag" }, { "begin": "^(?=.)", "end": "$", "name": "text.block.pug", "patterns": [ { "include": "#inline_pug" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] } ] }, { "begin": "^\\s*", "end": "$", "comment": "All constructs that generally span a single line starting with any number of white-spaces.", "patterns": [ { "include": "#inline_pug" }, { "include": "#blocks_and_includes" }, { "include": "#unbuffered_code" }, { "include": "#mixin_definition" }, { "include": "#mixin_call" }, { "include": "#flow_control" }, { "include": "#case_conds" }, { "begin": "\\|", "end": "$", "name": "text.block.pipe.pug", "comment": "Tag pipe text line.", "patterns": [ { "include": "#inline_pug" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, { "include": "#printed_expression" }, { "begin": "\\G(?=(#[^\\{\\w-])|[^\\w.#])", "end": "$", "comment": "Line starting with characters incompatible with tag name/id/class is standalone text.", "patterns": [ { "begin": "</?(?=[!#])", "end": ">|$", "patterns": [ { "include": "#inline_pug" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, { "include": "#inline_pug" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, { "include": "#complete_tag" } ] } ], "repository": { "blocks_and_includes": { "captures": { "1": { "name": "storage.type.import.include.pug" }, "4": { "name": "variable.control.import.include.pug" } }, "match": "(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$", "name": "meta.first-class.pug", "comment": "Template blocks and includes." }, "unbuffered_code": { "begin": "(-|(([a-zA-Z0-9_]+)\\s+=))", "beginCaptures": { "3": { "name": "variable.parameter.javascript.embedded.pug" } }, "end": "(?=\\])|(({\\s*)?$)", "name": "source.js", "comment": "name = function() {}", "patterns": [ { "include": "#js_brackets" }, { "include": "#babel_parens" }, { "include": "source.js" } ] }, "mixin_definition": { "match": "(mixin\\s+)([\\w-]+)(?:(\\()\\s*((?:[a-zA-Z_]\\w*\\s*)(?:,\\s*[a-zA-Z_]\\w*\\s*)*)(\\)))?$", "captures": { "1": { "name": "storage.type.function.pug" }, "2": { "name": "meta.tag.other entity.name.function.pug" }, "3": { "name": "punctuation.definition.parameters.begin.js" }, "4": { "name": "variable.parameter.function.js" }, "5": { "name": "punctuation.definition.parameters.begin.js" } } }, "mixin_call": { "begin": "((?:mixin\\s+)|\\+)([\\w-]+)", "beginCaptures": { "1": { "name": "storage.type.function.pug" }, "2": { "name": "meta.tag.other entity.name.function.pug" } }, "end": "(?!\\()|$", "patterns": [ { "begin": "(?<!\\))\\(", "end": "\\)", "name": "args.mixin.pug", "patterns": [ { "include": "#js_parens" }, { "include": "#string" }, { "match": "([^\\s(),=/]+)\\s*=\\s*", "captures": { "1": { "name": "meta.tag.other entity.other.attribute-name.tag.pug" } } }, { "include": "source.js" } ] }, { "include": "#tag_attributes" } ] }, "flow_control": { "begin": "(for|if|else if|else|each|until|while|unless|case)(\\s+|$)", "captures": { "1": { "name": "storage.type.function.pug" } }, "end": "$", "name": "meta.control.flow.pug", "comment": "Pug control flow.", "patterns": [ { "begin": "", "end": "$", "name": "js.embedded.control.flow.pug", "patterns": [ { "include": "source.js" } ] } ] }, "case_when_paren": { "begin": "\\(", "end": "\\)", "name": "js.when.control.flow.pug", "patterns": [ { "include": "#case_when_paren" }, { "match": ":", "name": "invalid.illegal.name.tag.pug" }, { "include": "source.js" } ] }, "case_conds": { "begin": "(default|when)((\\s+|(?=:))|$)", "captures": { "1": { "name": "storage.type.function.pug" } }, "end": "$", "name": "meta.control.flow.pug", "comment": "Pug case conditionals.", "patterns": [ { "begin": "\\G(?!:)", "end": "(?=:\\s+)|$", "name": "js.embedded.control.flow.pug", "patterns": [ { "include": "#case_when_paren" }, { "include": "source.js" } ] }, { "begin": ":\\s+", "end": "$", "name": "tag.case.control.flow.pug", "patterns": [ { "include": "#complete_tag" } ] } ] }, "complete_tag": { "begin": "(?=[\\w.#])|(:\\s*)", "end": "(\\.?$)|(?=:.)", "patterns": [ { "include": "#blocks_and_includes" }, { "include": "#unbuffered_code" }, { "include": "#mixin_call" }, { "include": "#flow_control" }, { "match": "(?<=:)\\w.*$", "name": "invalid.illegal.name.tag.pug" }, { "include": "#tag_name" }, { "include": "#tag_id" }, { "include": "#tag_classes" }, { "include": "#tag_attributes" }, { "include": "#tag_mixin_attributes" }, { "match": "((\\.)\\s+$)|((:)\\s*$)", "captures": { "2": { "name": "invalid.illegal.end.tag.pug" }, "4": { "name": "invalid.illegal.end.tag.pug" } } }, { "include": "#printed_expression" }, { "include": "#tag_text" } ] }, "tag_name": { "begin": "([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))", "end": "(\\G(?<!\\5[^\\w-]))|\\}|$", "name": "meta.tag.other entity.name.tag.pug", "patterns": [ { "begin": "\\G(?<=\\{)", "end": "(?=\\})", "name": "meta.tag.other entity.name.tag.pug", "patterns": [ { "match": "{", "name": "invalid.illegal.tag.pug" }, { "include": "source.js" } ] } ] }, "tag_id": { "match": "#[\\w-]+", "name": "entity.other.attribute-name.id.pug" }, "tag_classes": { "match": "\\.([^\\w-])?[\\w-]*", "captures": { "1": { "name": "invalid.illegal.tag.pug" } }, "name": "entity.other.attribute-name.class.pug" }, "tag_attributes": { "begin": "(\\(\\s*)", "captures": { "1": { "name": "constant.name.attribute.tag.pug" } }, "end": "(\\))", "name": "meta.tag.other", "patterns": [ { "include": "#tag_attribute_name_paren" }, { "include": "#tag_attribute_name" }, { "match": "!(?!=)", "name": "invalid.illegal.tag.pug" }, { "begin": "=\\s*", "end": "$|(?=,|(?:\\s+[^!%&*-+~|<>:?/])|\\))", "name": "attribute_value", "patterns": [ { "include": "#string" }, { "include": "#js_parens" }, { "include": "#js_brackets" }, { "include": "#js_braces" }, { "include": "source.js" } ] }, { "begin": "(?<=[%&*-+~|<>:?/])\\s+", "end": "$|(?=,|(?:\\s+[^!%&*-+~|<>:?/])|\\))", "name": "attribute_value2", "patterns": [ { "include": "#string" }, { "include": "#js_parens" }, { "include": "#js_brackets" }, { "include": "#js_braces" }, { "include": "source.js" } ] } ] }, "tag_attribute_name": { "match": "([^\\s(),=/!]+)\\s*", "captures": { "1": { "name": "entity.other.attribute-name.tag.pug" } } }, "tag_attribute_name_paren": { "begin": "\\(\\s*", "end": "\\)", "name": "entity.other.attribute-name.tag.pug", "patterns": [ { "include": "#tag_attribute_name_paren" }, { "include": "#tag_attribute_name" } ] }, "tag_mixin_attributes": { "begin": "(&attributes\\()", "captures": { "1": { "name": "entity.name.function.pug" } }, "end": "(\\))", "name": "meta.tag.other", "patterns": [ { "match": "attributes(?=\\))", "name": "storage.type.keyword.pug" }, { "include": "source.js" } ] }, "tag_text": { "begin": "(?=.)", "end": "$", "patterns": [ { "include": "#inline_pug" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "inline_pug_text": { "begin": "", "end": "(?=\\])", "patterns": [ { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#inline_pug_text" } ] }, { "include": "#inline_pug" }, { "include": "#embedded_html" }, { "include": "#html_entity" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "inline_pug": { "begin": "(?<!\\\\)(#\\[)", "captures": { "1": { "name": "entity.name.function.pug" }, "2": { "name": "entity.name.function.pug" } }, "end": "(\\])", "name": "inline.pug", "patterns": [ { "include": "#inline_pug" }, { "include": "#mixin_call" }, { "begin": "(?<!\\])(?=[\\w.#])|(:\\s*)", "end": "(?=\\]|(:.)|=|\\s)", "name": "tag.inline.pug", "patterns": [ { "include": "#tag_name" }, { "include": "#tag_id" }, { "include": "#tag_classes" }, { "include": "#tag_attributes" }, { "include": "#tag_mixin_attributes" }, { "include": "#inline_pug" }, { "match": "\\[", "name": "invalid.illegal.tag.pug" } ] }, { "include": "#unbuffered_code" }, { "include": "#printed_expression" }, { "match": "\\[", "name": "invalid.illegal.tag.pug" }, { "include": "#inline_pug_text" } ] }, "html_entity": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html.text.pug" }, { "match": "[<>&]", "name": "invalid.illegal.html_entity.text.pug" } ] }, "interpolated_value": { "begin": "(?<!\\\\)[#!]\\{(?=.*?\\})", "end": "\\}", "name": "string.interpolated.pug", "patterns": [ { "match": "{", "name": "invalid.illegal.tag.pug" }, { "include": "source.js" } ] }, "interpolated_error": { "match": "(?<!\\\\)[#!]\\{(?=[^}]*$)", "name": "invalid.illegal.tag.pug" }, "printed_expression": { "begin": "(!?\\=)\\s*", "captures": { "1": { "name": "constant" } }, "end": "(?=\\])|$", "name": "source.js", "patterns": [ { "include": "#js_brackets" }, { "include": "source.js" } ] }, "string": { "begin": "(['\"])", "end": "(?<!\\\\)\\1", "name": "string.quoted.pug", "patterns": [ { "match": "\\\\((x[0-9a-fA-F]{2})|(u[0-9]{4})|.)", "name": "constant.character.quoted.pug" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "embedded_html": { "begin": "(?=<[^>]*>)", "end": "$|(?=>)", "name": "html", "patterns": [ { "include": "text.html.basic" }, { "include": "#interpolated_value" }, { "include": "#interpolated_error" } ] }, "js_parens": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#js_parens" }, { "include": "source.js" } ] }, "js_brackets": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#js_brackets" }, { "include": "source.js" } ] }, "js_braces": { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#js_braces" }, { "include": "source.js" } ] }, "babel_parens": { "begin": "\\(", "end": "\\)|(({\\s*)?$)", "patterns": [ { "include": "#babel_parens" }, { "include": "source.js" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/puppet.tmLanguage.json ================================================ { "scopeName": "source.puppet", "fileTypes": ["pp"], "foldingStartMarker": "(^\\s*/\\*|(\\{|\\[|\\()\\s*$)", "foldingStopMarker": "(\\*/|^\\s*(\\}|\\]|\\)))", "name": "Puppet", "patterns": [ { "include": "#line_comment" }, { "include": "#constants" }, { "begin": "^\\s*/\\*", "end": "\\*/", "name": "comment.block.puppet" }, { "begin": "\\b(node)\\b", "captures": { "1": { "name": "storage.type.puppet" }, "2": { "name": "entity.name.type.class.puppet" } }, "end": "(?={)", "name": "meta.definition.class.puppet", "patterns": [ { "match": "\\bdefault\\b", "name": "keyword.puppet" }, { "include": "#strings" }, { "include": "#regex-literal" } ] }, { "begin": "\\b(class)\\s+((?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+|(?#Bareword Resource Name)[a-z][a-z0-9_]*)\\s*", "captures": { "1": { "name": "storage.type.puppet" }, "2": { "name": "entity.name.type.class.puppet" } }, "end": "(?={)", "name": "meta.definition.class.puppet", "patterns": [ { "begin": "\\b(inherits)\\b\\s+", "captures": { "1": { "name": "storage.modifier.puppet" } }, "end": "(?=\\(|{)", "name": "meta.definition.class.inherits.puppet", "patterns": [ { "match": "\\b((?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+)\\b", "name": "support.type.puppet" } ] }, { "include": "#line_comment" }, { "include": "#resource-parameters" }, { "include": "#parameter-default-types" } ] }, { "begin": "^\\s*(plan)\\s+((?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+|(?#Bareword Resource Name)[a-z][a-z0-9_]*)\\s*", "captures": { "1": { "name": "storage.type.puppet" }, "2": { "name": "entity.name.type.plan.puppet" } }, "end": "(?={)", "name": "meta.definition.plan.puppet", "patterns": [ { "include": "#line_comment" }, { "include": "#resource-parameters" }, { "include": "#parameter-default-types" } ] }, { "begin": "^\\s*(define|function)\\s+((?#Bareword Resource Name)[a-z][a-z0-9_]*|(?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+)\\s*(\\()", "captures": { "1": { "name": "storage.type.function.puppet" }, "2": { "name": "entity.name.function.puppet" } }, "end": "(?={)", "name": "meta.function.puppet", "patterns": [ { "include": "#line_comment" }, { "include": "#resource-parameters" }, { "include": "#parameter-default-types" } ] }, { "match": "\\b(case|else|elsif|if|unless)(?!::)\\b", "captures": { "1": { "name": "keyword.control.puppet" } } }, { "include": "#keywords" }, { "include": "#resource-definition" }, { "include": "#heredoc" }, { "include": "#strings" }, { "include": "#puppet-datatypes" }, { "include": "#array" }, { "match": "((\\$?)\"?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\"?):(?=\\s+|$)", "name": "entity.name.section.puppet" }, { "include": "#numbers" }, { "include": "#variable" }, { "begin": "\\b(import|include|contain|require)\\s+(?!.*=>)", "beginCaptures": { "1": { "name": "keyword.control.import.include.puppet" } }, "end": "(?=\\s|$)", "contentName": "variable.parameter.include.puppet", "name": "meta.include.puppet" }, { "match": "\\b\\w+\\s*(?==>)\\s*", "name": "constant.other.key.puppet" }, { "match": "(?<={)\\s*\\w+\\s*(?=})", "name": "constant.other.bareword.puppet" }, { "match": "\\b(alert|crit|debug|defined|emerg|err|escape|fail|failed|file|generate|gsub|info|notice|package|realize|search|tag|tagged|template|warning)\\b(?!.*{)", "name": "support.function.puppet" }, { "match": "=>", "name": "punctuation.separator.key-value.puppet" }, { "match": "->", "name": "keyword.control.orderarrow.puppet" }, { "match": "~>", "name": "keyword.control.notifyarrow.puppet" }, { "include": "#regex-literal" } ], "repository": { "constants": { "patterns": [ { "match": "\\b(absent|directory|false|file|present|running|stopped|true)\\b(?!.*{)", "name": "constant.language.puppet" } ] }, "double-quoted-string": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.puppet" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.puppet" } }, "name": "string.quoted.double.interpolated.puppet", "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_puppet" } ] }, "interpolated_puppet": { "patterns": [ { "begin": "(\\${)(\\d+)", "beginCaptures": { "1": { "name": "punctuation.section.embedded.begin.puppet" }, "2": { "name": "source.puppet variable.other.readwrite.global.pre-defined.puppet" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.puppet" } }, "contentName": "source.puppet", "name": "meta.embedded.line.puppet", "patterns": [ { "include": "$self" } ] }, { "begin": "(\\${)(_[a-zA-Z0-9_]*)", "beginCaptures": { "1": { "name": "punctuation.section.embedded.begin.puppet" }, "2": { "name": "source.puppet variable.other.readwrite.global.puppet" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.puppet" } }, "contentName": "source.puppet", "name": "meta.embedded.line.puppet", "patterns": [ { "include": "$self" } ] }, { "begin": "(\\${)(([a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)*)", "beginCaptures": { "1": { "name": "punctuation.section.embedded.begin.puppet" }, "2": { "name": "source.puppet variable.other.readwrite.global.puppet" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.puppet" } }, "contentName": "source.puppet", "name": "meta.embedded.line.puppet", "patterns": [ { "include": "$self" } ] }, { "begin": "\\${", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.puppet" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.puppet" } }, "contentName": "source.puppet", "name": "meta.embedded.line.puppet", "patterns": [ { "include": "$self" } ] } ] }, "escaped_char": { "match": "\\\\.", "name": "constant.character.escape.puppet" }, "line_comment": { "patterns": [ { "captures": { "1": { "name": "comment.line.number-sign.puppet" }, "2": { "name": "punctuation.definition.comment.puppet" } }, "match": "^((#).*$\\n?)", "name": "meta.comment.full-line.puppet" }, { "captures": { "1": { "name": "punctuation.definition.comment.puppet" } }, "match": "(#).*$\\n?", "name": "comment.line.number-sign.puppet" } ] }, "nested_braces": { "begin": "\\{", "captures": { "1": { "name": "punctuation.section.scope.puppet" } }, "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_braces" } ] }, "nested_braces_interpolated": { "begin": "\\{", "captures": { "1": { "name": "punctuation.section.scope.puppet" } }, "end": "\\}", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_braces_interpolated" } ] }, "nested_brackets": { "begin": "\\[", "captures": { "1": { "name": "punctuation.section.scope.puppet" } }, "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_brackets" } ] }, "nested_brackets_interpolated": { "begin": "\\[", "captures": { "1": { "name": "punctuation.section.scope.puppet" } }, "end": "\\]", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_brackets_interpolated" } ] }, "nested_parens": { "begin": "\\(", "captures": { "1": { "name": "punctuation.section.scope.puppet" } }, "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#nested_parens" } ] }, "nested_parens_interpolated": { "begin": "\\(", "captures": { "1": { "name": "punctuation.section.scope.puppet" } }, "end": "\\)", "patterns": [ { "include": "#escaped_char" }, { "include": "#variable" }, { "include": "#nested_parens_interpolated" } ] }, "parameter-default-types": { "patterns": [ { "include": "#strings" }, { "include": "#numbers" }, { "include": "#variable" }, { "include": "#hash" }, { "include": "#array" }, { "include": "#function_call" }, { "include": "#constants" }, { "include": "#puppet-datatypes" } ] }, "resource-parameters": { "patterns": [ { "captures": { "1": { "name": "variable.other.puppet" }, "2": { "name": "punctuation.definition.variable.puppet" } }, "match": "((\\$+)[a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=,|\\))", "name": "meta.function.argument.puppet" }, { "begin": "((\\$+)[a-zA-Z_][a-zA-Z0-9_]*)(?:\\s*(=)\\s*)\\s*", "captures": { "1": { "name": "variable.other.puppet" }, "2": { "name": "punctuation.definition.variable.puppet" }, "3": { "name": "keyword.operator.assignment.puppet" } }, "end": "(?=,|\\))", "name": "meta.function.argument.puppet", "patterns": [ { "include": "#parameter-default-types" } ] } ] }, "array": { "begin": "(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.array.begin.puppet" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.puppet" } }, "name": "meta.array.puppet", "patterns": [ { "match": "\\s*,\\s*" }, { "include": "#parameter-default-types" }, { "include": "#line_comment" } ] }, "hash": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.hash.begin.puppet" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.hash.end.puppet" } }, "name": "meta.hash.puppet", "patterns": [ { "match": "\\b\\w+\\s*(?==>)\\s*", "name": "constant.other.key.puppet" }, { "include": "#parameter-default-types" }, { "include": "#line_comment" } ] }, "single-quoted-string": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.puppet" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.puppet" } }, "name": "string.quoted.single.puppet", "patterns": [ { "include": "#escaped_char" } ] }, "strings": { "patterns": [ { "include": "#double-quoted-string" }, { "include": "#single-quoted-string" } ] }, "keywords": { "match": "\\b(undef)\\b", "captures": { "1": { "name": "keyword.puppet" } } }, "numbers": { "patterns": [ { "comment": "HEX 0x 0-f", "match": "(?<!\\w|\\d)([-+]?)(?i:0x)(?i:[0-9a-f])+(?!\\w|\\d)", "name": "constant.numeric.hexadecimal.puppet" }, { "comment": "INTEGERS [(+|-)] digits [e [(+|-)] digits]", "match": "(?<!\\w|\\.)([-+]?)(?<!\\d)\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?!\\w|\\d|\\.)", "name": "constant.numeric.integer.puppet" }, { "comment": "FLOAT [(+|-)] digits . digits [e [(+|-)] digits]", "match": "(?<!\\w)([-+]?)\\d+\\.\\d+(?i:e(\\+|-){0,1}\\d+){0,1}(?!\\w|\\d)", "name": "constant.numeric.integer.puppet" } ] }, "resource-definition": { "begin": "(?:^|\\b)((?#Toplevel Bareword)::[a-z][a-z0-9_]*|(?#Bareword Resource Name)[a-z][a-z0-9_]*|(?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+)\\s*({)\\s*", "beginCaptures": { "1": { "name": "meta.definition.resource.puppet storage.type.puppet" } }, "end": ":", "contentName": "entity.name.section.puppet", "patterns": [ { "include": "#strings" }, { "include": "#variable" }, { "include": "#array" } ] }, "variable": { "patterns": [ { "match": "(\\$)(\\d+)", "name": "variable.other.readwrite.global.pre-defined.puppet", "captures": { "1": { "name": "punctuation.definition.variable.puppet" } } }, { "match": "(\\$)_[a-zA-Z0-9_]*", "name": "variable.other.readwrite.global.puppet", "captures": { "1": { "name": "punctuation.definition.variable.puppet" } } }, { "match": "(\\$)(([a-z][a-zA-Z0-9_]*)?(?:::[a-z][a-zA-Z0-9_]*)*)", "name": "variable.other.readwrite.global.puppet", "captures": { "1": { "name": "punctuation.definition.variable.puppet" } } } ] }, "function_call": { "begin": "([a-zA-Z_][a-zA-Z0-9_]*)(\\()", "end": "\\)", "name": "meta.function-call.puppet", "patterns": [ { "include": "#parameter-default-types" }, { "match": ",", "name": "punctuation.separator.parameters.puppet" } ] }, "puppet-datatypes": { "patterns": [ { "comment": "Puppet Data type", "match": "(?<![a-zA-Z\\$])([A-Z][a-zA-Z0-9_]*)(?![a-zA-Z0-9_])", "name": "storage.type.puppet" } ] }, "regex-literal": { "match": "(\\/)(.+?)(?:[^\\\\]\\/)", "name": "string.regexp.literal.puppet", "comment": "Puppet Regular expression literal without interpolation" }, "heredoc": { "patterns": [ { "begin": "@\\([[:blank:]]*\"([^:\\/) \\t]+)\"[[:blank:]]*(:[[:blank:]]*[a-z][a-zA-Z0-9_+]*[[:blank:]]*)?(\\/[[:blank:]]*[tsrnL$]*)?[[:blank:]]*\\)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.puppet" } }, "end": "^[[:blank:]]*(\\|[[:blank:]]*-|\\||-)?[[:blank:]]*\\1", "endCaptures": { "0": { "name": "punctuation.definition.string.end.puppet" } }, "name": "string.interpolated.heredoc.puppet", "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_puppet" } ] }, { "begin": "@\\([[:blank:]]*([^:\\/) \\t]+)[[:blank:]]*(:[[:blank:]]*[a-z][a-zA-Z0-9_+]*[[:blank:]]*)?(\\/[[:blank:]]*[tsrnL$]*)?[[:blank:]]*\\)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.puppet" } }, "end": "^[[:blank:]]*(\\|[[:blank:]]*-|\\||-)?[[:blank:]]*\\1", "endCaptures": { "0": { "name": "punctuation.definition.string.end.puppet" } }, "name": "string.unquoted.heredoc.puppet" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/python.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/MagicStack/MagicPython/commit/b453f26ed856c9b16a053517c41207e3a72cc7d5", "name": "MagicPython", "scopeName": "source.python", "patterns": [ { "include": "#statement" }, { "include": "#expression" } ], "repository": { "impossible": { "comment": "This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a match to fail and move to the next token.", "match": "$.^" }, "statement": { "patterns": [ { "include": "#import" }, { "include": "#class-declaration" }, { "include": "#function-declaration" }, { "include": "#statement-keyword" }, { "include": "#assignment-operator" }, { "include": "#decorator" }, { "include": "#docstring-statement" }, { "include": "#semicolon" } ] }, "semicolon": { "patterns": [ { "name": "invalid.deprecated.semicolon.python", "match": "\\;$" } ] }, "comments": { "patterns": [ { "name": "comment.line.number-sign.python", "contentName": "meta.typehint.comment.python", "begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n", "end": "(?:$|(?=\\#))", "beginCaptures": { "0": { "name": "meta.typehint.comment.python" }, "1": { "name": "comment.typehint.directive.notation.python" } }, "patterns": [ { "name": "comment.typehint.ignore.notation.python", "match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n" }, { "name": "comment.typehint.type.notation.python", "match": "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n" }, { "name": "comment.typehint.punctuation.notation.python", "match": "([\\[\\]\\(\\),\\.\\=\\*]|(->))" }, { "name": "comment.typehint.variable.notation.python", "match": "([[:alpha:]_]\\w*)" } ] }, { "include": "#comments-base" } ] }, "docstring-statement": { "begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))", "end": "(?<=\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\")", "patterns": [ { "include": "#docstring" } ] }, "docstring": { "patterns": [ { "name": "string.quoted.docstring.multi.python", "begin": "(\\'\\'\\'|\\\"\\\"\\\")", "end": "(\\1)", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" } }, "patterns": [ { "include": "#docstring-prompt" }, { "include": "#codetags" }, { "include": "#docstring-guts-unicode" } ] }, { "name": "string.quoted.docstring.raw.multi.python", "begin": "([rR])(\\'\\'\\'|\\\"\\\"\\\")", "end": "(\\2)", "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" } }, "patterns": [ { "include": "#string-consume-escape" }, { "include": "#docstring-prompt" }, { "include": "#codetags" } ] }, { "name": "string.quoted.docstring.single.python", "begin": "(\\'|\\\")", "end": "(\\1)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#codetags" }, { "include": "#docstring-guts-unicode" } ] }, { "name": "string.quoted.docstring.raw.single.python", "begin": "([rR])(\\'|\\\")", "end": "(\\2)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-consume-escape" }, { "include": "#codetags" } ] } ] }, "docstring-guts-unicode": { "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" } ] }, "docstring-prompt": { "match": "(?x)\n (?:\n (?:^|\\G) \\s* (?# '\\G' is necessary for ST)\n ((?:>>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n", "captures": { "1": { "name": "keyword.control.flow.python" } } }, "statement-keyword": { "patterns": [ { "name": "storage.type.function.python", "match": "\\b((async\\s+)?\\s*def)\\b" }, { "name": "keyword.control.flow.python", "match": "(?x)\n \\b(?<!\\.)(\n as | async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n" }, { "name": "storage.modifier.declaration.python", "match": "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n" }, { "name": "storage.type.class.python", "match": "\\b(?<!\\.)(class)\\b" } ] }, "expression-bare": { "comment": "valid Python expressions w/o comments and line continuation", "patterns": [ { "include": "#backticks" }, { "include": "#illegal-anno" }, { "include": "#literal" }, { "include": "#regexp" }, { "include": "#string" }, { "include": "#lambda" }, { "include": "#illegal-operator" }, { "include": "#operator" }, { "include": "#curly-braces" }, { "include": "#item-access" }, { "include": "#list" }, { "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": { "comment": "valid Python expressions with comments and line continuation", "patterns": [ { "include": "#comments" }, { "include": "#expression-bare" }, { "include": "#line-continuation" } ] }, "expression": { "comment": "All valid Python expressions", "patterns": [ { "include": "#expression-base" }, { "include": "#member-access" }, { "comment": "Tokenize identifiers to help linters", "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" } ] }, "member-access": { "begin": "(\\.)\\s*(?!\\.)", "end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n", "beginCaptures": { "1": { "name": "punctuation.separator.period.python" } }, "patterns": [ { "include": "#function-call" }, { "include": "#member-access-base" } ] }, "member-access-base": { "patterns": [ { "include": "#magic-names" }, { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#special-names" }, { "include": "#line-continuation" }, { "include": "#item-access" } ] }, "special-names": { "name": "constant.other.caps.python", "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" }, "curly-braces": { "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.dict.begin.python" } }, "endCaptures": { "0": { "name": "punctuation.definition.dict.end.python" } }, "patterns": [ { "name": "punctuation.separator.dict.python", "match": ":" }, { "include": "#expression" } ] }, "list": { "begin": "\\[", "end": "\\]", "beginCaptures": { "0": { "name": "punctuation.definition.list.begin.python" } }, "endCaptures": { "0": { "name": "punctuation.definition.list.end.python" } }, "patterns": [ { "include": "#expression" } ] }, "round-braces": { "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.parenthesis.begin.python" } }, "endCaptures": { "0": { "name": "punctuation.parenthesis.end.python" } }, "patterns": [ { "include": "#expression" } ] }, "line-continuation": { "patterns": [ { "match": "(\\\\)\\s*(\\S.*$\\n?)", "captures": { "1": { "name": "punctuation.separator.continuation.line.python" }, "2": { "name": "invalid.illegal.line.continuation.python" } } }, { "begin": "(\\\\)\\s*$\\n?", "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n", "beginCaptures": { "1": { "name": "punctuation.separator.continuation.line.python" } }, "patterns": [ { "include": "#regexp" }, { "include": "#string" } ] } ] }, "assignment-operator": { "name": "keyword.operator.assignment.python", "match": "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n" }, "operator": { "match": "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n", "captures": { "1": { "name": "keyword.operator.logical.python" }, "2": { "name": "keyword.control.flow.python" }, "3": { "name": "keyword.operator.bitwise.python" }, "4": { "name": "keyword.operator.arithmetic.python" }, "5": { "name": "keyword.operator.comparison.python" } } }, "punctuation": { "patterns": [ { "name": "punctuation.separator.colon.python", "match": ":" }, { "name": "punctuation.separator.element.python", "match": "," } ] }, "literal": { "patterns": [ { "name": "constant.language.python", "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b" }, { "include": "#number" } ] }, "number": { "name": "constant.numeric.python", "patterns": [ { "include": "#number-float" }, { "include": "#number-dec" }, { "include": "#number-hex" }, { "include": "#number-oct" }, { "include": "#number-bin" }, { "include": "#number-long" }, { "name": "invalid.illegal.name.python", "match": "\\b[0-9]+\\w+" } ] }, "number-float": { "name": "constant.numeric.float.python", "match": "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n", "captures": { "1": { "name": "storage.type.imaginary.number.python" } } }, "number-dec": { "name": "constant.numeric.dec.python", "match": "(?x)\n (?<![\\w\\.])(?:\n [1-9](?: _?[0-9] )*\n |\n 0+\n |\n [0-9](?: _?[0-9] )* ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n", "captures": { "1": { "name": "storage.type.imaginary.number.python" }, "2": { "name": "invalid.illegal.dec.python" }, "3": { "name": "invalid.illegal.dec.python" } } }, "number-hex": { "name": "constant.numeric.hex.python", "match": "(?x)\n (?<![\\w\\.])\n (0[xX]) (_?[0-9a-fA-F])+\n \\b\n", "captures": { "1": { "name": "storage.type.number.python" } } }, "number-oct": { "name": "constant.numeric.oct.python", "match": "(?x)\n (?<![\\w\\.])\n (0[oO]) (_?[0-7])+\n \\b\n", "captures": { "1": { "name": "storage.type.number.python" } } }, "number-bin": { "name": "constant.numeric.bin.python", "match": "(?x)\n (?<![\\w\\.])\n (0[bB]) (_?[01])+\n \\b\n", "captures": { "1": { "name": "storage.type.number.python" } } }, "number-long": { "name": "constant.numeric.bin.python", "comment": "this is to support python2 syntax for long ints", "match": "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n", "captures": { "2": { "name": "storage.type.number.python" } } }, "regexp": { "patterns": [ { "include": "#regexp-single-three-line" }, { "include": "#regexp-double-three-line" }, { "include": "#regexp-single-one-line" }, { "include": "#regexp-double-one-line" }, { "include": "#fregexp-single-three-line" }, { "include": "#fregexp-double-three-line" }, { "include": "#fregexp-single-one-line" }, { "include": "#fregexp-double-one-line" } ] }, "string": { "patterns": [ { "include": "#string-quoted-multi-line" }, { "include": "#string-quoted-single-line" }, { "include": "#string-bin-quoted-multi-line" }, { "include": "#string-bin-quoted-single-line" }, { "include": "#string-raw-quoted-multi-line" }, { "include": "#string-raw-quoted-single-line" }, { "include": "#string-raw-bin-quoted-multi-line" }, { "include": "#string-raw-bin-quoted-single-line" }, { "include": "#fstring-fnorm-quoted-multi-line" }, { "include": "#fstring-fnorm-quoted-single-line" }, { "include": "#fstring-normf-quoted-multi-line" }, { "include": "#fstring-normf-quoted-single-line" }, { "include": "#fstring-raw-quoted-multi-line" }, { "include": "#fstring-raw-quoted-single-line" } ] }, "string-unicode-guts": { "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#string-entity" }, { "include": "#string-brace-formatting" } ] }, "string-consume-escape": { "match": "\\\\['\"\\n\\\\]" }, "string-raw-guts": { "patterns": [ { "include": "#string-consume-escape" }, { "include": "#string-formatting" }, { "include": "#string-brace-formatting" } ] }, "string-raw-bin-guts": { "patterns": [ { "include": "#string-consume-escape" }, { "include": "#string-formatting" } ] }, "string-entity": { "patterns": [ { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#string-formatting" } ] }, "fstring-guts": { "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#fstring-formatting" } ] }, "fstring-raw-guts": { "patterns": [ { "include": "#string-consume-escape" }, { "include": "#fstring-formatting" } ] }, "fstring-illegal-single-brace": { "comment": "it is illegal to have a multiline brace inside a single-line string", "begin": "(\\{)(?=[^\\n}]*$\\n?)", "end": "(\\})|(?=\\n)", "beginCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "endCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "patterns": [ { "include": "#fstring-terminator-single" }, { "include": "#f-expression" } ] }, "fstring-illegal-multi-brace": { "patterns": [ { "include": "#impossible" } ] }, "f-expression": { "comment": "All valid Python expressions, except comments and line cont", "patterns": [ { "include": "#expression-bare" }, { "include": "#member-access" }, { "comment": "Tokenize identifiers to help linters", "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b" } ] }, "escape-sequence-unicode": { "patterns": [ { "name": "constant.character.escape.python", "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n" } ] }, "escape-sequence": { "name": "constant.character.escape.python", "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n" }, "string-line-continuation": { "name": "constant.language.python", "match": "\\\\$" }, "string-formatting": { "name": "constant.character.format.placeholder.other.python", "match": "(?x)\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsa%]\n" }, "string-brace-formatting": { "patterns": [ { "name": "constant.character.format.placeholder.other.python", "match": "(?x)\n (?:\n {{ | }}\n | (?:\n {\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n", "captures": { "2": { "name": "storage.type.format.python" }, "3": { "name": "storage.type.format.python" } } }, { "name": "constant.character.format.placeholder.other.python", "begin": "(?x)\n \\{\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n (:)\n (?=[^'\"}\\n]*\\})\n", "end": "\\}", "beginCaptures": { "2": { "name": "storage.type.format.python" }, "3": { "name": "storage.type.format.python" } }, "patterns": [ { "match": "(?x) \\{ [^'\"}\\n]*? \\} (?=.*?\\})\n" } ] } ] }, "fstring-formatting": { "patterns": [ { "include": "#fstring-formatting-braces" }, { "include": "#fstring-formatting-singe-brace" } ] }, "fstring-formatting-singe-brace": { "name": "invalid.illegal.brace.python", "match": "(}(?!}))" }, "import": { "comment": "Import statements\n", "patterns": [ { "match": "(?x)\n \\s* \\b(from)\\b \\s*(\\.+)\\s* (import)?\n", "captures": { "1": { "name": "keyword.control.import.python" }, "2": { "name": "punctuation.separator.period.python" }, "3": { "name": "keyword.control.import.python" } } }, { "name": "keyword.control.import.python", "match": "\\b(?<!\\.)import\\b" } ] }, "class-declaration": { "patterns": [ { "name": "meta.class.python", "begin": "(?x)\n \\s*(class)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n", "end": "(:)", "beginCaptures": { "1": { "name": "storage.type.class.python" } }, "endCaptures": { "1": { "name": "punctuation.section.class.begin.python" } }, "patterns": [ { "include": "#class-name" }, { "include": "#class-inheritance" } ] } ] }, "class-name": { "patterns": [ { "include": "#illegal-object-name" }, { "include": "#builtin-possible-callables" }, { "name": "entity.name.type.class.python", "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" } ] }, "class-inheritance": { "name": "meta.class.inheritance.python", "begin": "(\\()", "end": "(\\))", "beginCaptures": { "1": { "name": "punctuation.definition.inheritance.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.inheritance.end.python" } }, "patterns": [ { "name": "keyword.operator.unpacking.arguments.python", "match": "(\\*\\*|\\*)" }, { "name": "punctuation.separator.inheritance.python", "match": "," }, { "name": "keyword.operator.assignment.python", "match": "=(?!=)" }, { "name": "support.type.metaclass.python", "match": "\\bmetaclass\\b" }, { "include": "#illegal-names" }, { "include": "#class-kwarg" }, { "include": "#call-wrapper-inheritance" }, { "include": "#expression-base" }, { "include": "#member-access-class" }, { "include": "#inheritance-identifier" } ] }, "class-kwarg": { "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n", "captures": { "1": { "name": "entity.other.inherited-class.python variable.parameter.class.python" }, "2": { "name": "keyword.operator.assignment.python" } } }, "inheritance-identifier": { "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n", "captures": { "1": { "name": "entity.other.inherited-class.python" } } }, "member-access-class": { "begin": "(\\.)\\s*(?!\\.)", "end": "(?<=\\S)(?=\\W)|$", "beginCaptures": { "1": { "name": "punctuation.separator.period.python" } }, "patterns": [ { "include": "#call-wrapper-inheritance" }, { "include": "#member-access-base" }, { "include": "#inheritance-identifier" } ] }, "lambda": { "patterns": [ { "match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))", "captures": { "1": { "name": "keyword.control.flow.python" } } }, { "match": "\\b(lambda)\\s*?(?=[,\\n]|$)", "captures": { "1": { "name": "storage.type.function.lambda.python" } } }, { "name": "meta.lambda-function.python", "begin": "(?x)\n \\b (lambda) \\b\n", "end": "(:)|(\\n)", "beginCaptures": { "1": { "name": "storage.type.function.lambda.python" } }, "endCaptures": { "1": { "name": "punctuation.section.function.lambda.begin.python" } }, "contentName": "meta.function.lambda.parameters.python", "patterns": [ { "name": "keyword.operator.unpacking.parameter.python", "match": "(\\*\\*|\\*)" }, { "include": "#lambda-nested-incomplete" }, { "include": "#illegal-names" }, { "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))", "captures": { "1": { "name": "variable.parameter.function.language.python" }, "2": { "name": "punctuation.separator.parameters.python" } } }, { "include": "#comments" }, { "include": "#backticks" }, { "include": "#illegal-anno" }, { "include": "#lambda-parameter-with-default" }, { "include": "#line-continuation" }, { "include": "#illegal-operator" } ] } ] }, "lambda-incomplete": { "name": "storage.type.function.lambda.python", "match": "\\blambda(?=\\s*[,)])" }, "lambda-nested-incomplete": { "name": "storage.type.function.lambda.python", "match": "\\blambda(?=\\s*[:,)])" }, "lambda-parameter-with-default": { "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n", "end": "(,)|(?=:|$)", "beginCaptures": { "1": { "name": "variable.parameter.function.language.python" }, "2": { "name": "keyword.operator.python" } }, "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, "patterns": [ { "include": "#expression" } ] }, "function-declaration": { "name": "meta.function.python", "begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n", "end": "(:|(?=[#'\"\\n]))", "beginCaptures": { "1": { "name": "storage.type.function.async.python" }, "2": { "name": "storage.type.function.python" } }, "endCaptures": { "1": { "name": "punctuation.section.function.begin.python" } }, "patterns": [ { "include": "#function-def-name" }, { "include": "#parameters" }, { "include": "#line-continuation" }, { "include": "#return-annotation" } ] }, "function-def-name": { "patterns": [ { "include": "#illegal-object-name" }, { "include": "#builtin-possible-callables" }, { "name": "entity.name.function.python", "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" } ] }, "parameters": { "name": "meta.function.parameters.python", "begin": "(\\()", "end": "(\\))", "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.python" } }, "patterns": [ { "name": "keyword.operator.unpacking.parameter.python", "match": "(\\*\\*|\\*)" }, { "include": "#lambda-incomplete" }, { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#parameter-special" }, { "match": "(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n", "captures": { "1": { "name": "variable.parameter.function.language.python" }, "2": { "name": "punctuation.separator.parameters.python" } } }, { "include": "#comments" }, { "include": "#loose-default" }, { "include": "#annotated-parameter" } ] }, "parameter-special": { "match": "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n", "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" } } }, "loose-default": { "begin": "(=)", "end": "(,)|(?=\\))", "beginCaptures": { "1": { "name": "keyword.operator.python" } }, "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, "patterns": [ { "include": "#expression" } ] }, "annotated-parameter": { "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n", "end": "(,)|(?=\\))", "beginCaptures": { "1": { "name": "variable.parameter.function.language.python" }, "2": { "name": "punctuation.separator.annotation.python" } }, "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, "patterns": [ { "include": "#expression" }, { "name": "keyword.operator.assignment.python", "match": "=(?!=)" } ] }, "return-annotation": { "begin": "(->)", "end": "(?=:)", "beginCaptures": { "1": { "name": "punctuation.separator.annotation.result.python" } }, "patterns": [ { "include": "#expression" } ] }, "item-access": { "patterns": [ { "name": "meta.item-access.python", "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n", "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, "patterns": [ { "include": "#item-name" }, { "include": "#item-index" }, { "include": "#expression" } ] } ] }, "item-name": { "patterns": [ { "include": "#special-variables" }, { "include": "#builtin-functions" }, { "include": "#special-names" }, { "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" } ] }, "item-index": { "begin": "(\\[)", "end": "(?=\\])", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.python" } }, "contentName": "meta.item-access.arguments.python", "patterns": [ { "name": "punctuation.separator.slice.python", "match": ":" }, { "include": "#expression" } ] }, "decorator": { "name": "meta.function.decorator.python", "begin": "(?x)\n ^\\s*\n (@) \\s* (?=[[:alpha:]_]\\w*)\n", "end": "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n", "beginCaptures": { "1": { "name": "entity.name.function.decorator.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" }, "2": { "name": "invalid.illegal.decorator.python" } }, "patterns": [ { "include": "#decorator-name" }, { "include": "#function-arguments" } ] }, "decorator-name": { "patterns": [ { "include": "#builtin-callables" }, { "include": "#illegal-object-name" }, { "name": "entity.name.function.decorator.python", "match": "(?x)\n ([[:alpha:]_]\\w*) | \\.\n" }, { "include": "#line-continuation" }, { "name": "invalid.illegal.decorator.python", "match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n", "captures": { "1": { "name": "invalid.illegal.decorator.python" } } } ] }, "call-wrapper-inheritance": { "comment": "same as a function call, but in inheritance context", "name": "meta.function-call.python", "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, "patterns": [ { "include": "#inheritance-name" }, { "include": "#function-arguments" } ] }, "inheritance-name": { "patterns": [ { "include": "#lambda-incomplete" }, { "include": "#builtin-possible-callables" }, { "include": "#inheritance-identifier" } ] }, "function-call": { "name": "meta.function-call.python", "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, "patterns": [ { "include": "#special-variables" }, { "include": "#function-name" }, { "include": "#function-arguments" } ] }, "function-name": { "patterns": [ { "include": "#builtin-possible-callables" }, { "comment": "Some color schemas support meta.function-call.generic scope", "name": "meta.function-call.generic.python", "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" } ] }, "function-arguments": { "begin": "(?x)\n (?:\n (\\()\n (?:\\s*(\\*\\*|\\*))?\n )\n", "end": "(?=\\))(?!\\)\\s*\\()", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.python" }, "2": { "name": "keyword.operator.unpacking.arguments.python" } }, "contentName": "meta.function-call.arguments.python", "patterns": [ { "match": "(?x)\n (?:\n (,)\n (?:\\s*(\\*\\*|\\*))?\n )\n", "captures": { "1": { "name": "punctuation.separator.arguments.python" }, "2": { "name": "keyword.operator.unpacking.arguments.python" } } }, { "include": "#lambda-incomplete" }, { "include": "#illegal-names" }, { "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)", "captures": { "1": { "name": "variable.parameter.function-call.python" }, "2": { "name": "keyword.operator.assignment.python" } } }, { "name": "keyword.operator.assignment.python", "match": "=(?!=)" }, { "include": "#expression" }, { "match": "\\s*(\\))\\s*(\\()", "captures": { "1": { "name": "punctuation.definition.arguments.end.python" }, "2": { "name": "punctuation.definition.arguments.begin.python" } } } ] }, "builtin-callables": { "patterns": [ { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#builtin-exceptions" }, { "include": "#builtin-functions" }, { "include": "#builtin-types" } ] }, "builtin-possible-callables": { "patterns": [ { "include": "#builtin-callables" }, { "include": "#magic-names" } ] }, "builtin-exceptions": { "name": "support.type.exception.python", "match": "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision | ModuleNotFound\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n" }, "builtin-functions": { "patterns": [ { "name": "support.function.builtin.python", "match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | all | any | ascii | bin | callable\n | chr | compile | copyright | credits | delattr | dir | divmod\n | enumerate | eval | exec | exit | filter | format | getattr\n | globals | hasattr | hash | help | hex | id | input\n | isinstance | issubclass | iter | len | license | locals | map\n | max | memoryview | min | next | oct | open | ord | pow | print\n | quit | range | reload | repr | reversed | round\n | setattr | sorted | sum | vars | zip\n )\\b\n" }, { "name": "variable.legacy.builtin.python", "match": "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n" } ] }, "builtin-types": { "name": "support.type.python", "match": "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n" }, "magic-function-names": { "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n", "match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext | await\n | bool | call | ceil | cmp | coerce | complex | contains\n | copy | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq | exit | float\n | floor | floordiv | format | ge | get | getattr\n | getattribute | getinitargs | getitem | getnewargs\n | getslice | getstate | gt | hash | hex | iadd | iand | idiv\n | ifloordiv | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow | irshift | isub\n | iter | itruediv | ixor | le | len | long | lshift | lt\n | missing | mod | mul | ne | neg | new | next | nonzero | oct | or\n | pos | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv | rlshift | rmod\n | rmul | ror | round | rpow | rrshift | rshift | rsub\n | rtruediv | rxor | set | setattr | setitem | setslice\n | setstate | sizeof | str | sub | subclasscheck | truediv\n | trunc | unicode | xor | matmul | rmatmul | imatmul\n | init_subclass | set_name | fspath | bytes | prepare\n )__\n )\\b\n", "captures": { "1": { "name": "support.function.magic.python" } } }, "magic-variable-names": { "comment": "magic variables which a class/module may have.", "match": "(?x)\n \\b(\n __(?:\n all | bases | builtins | class | code | debug | defaults | dict\n | doc | file | func | kwdefaults | members\n | metaclass | methods | module | mro | name\n | qualname | self | signature | slots | subclasses\n | version | weakref | wrapped | annotations | classcell\n | spec | path | package | future | traceback\n )__\n )\\b\n", "captures": { "1": { "name": "support.variable.magic.python" } } }, "magic-names": { "patterns": [ { "include": "#magic-function-names" }, { "include": "#magic-variable-names" } ] }, "illegal-names": { "name": "keyword.control.flow.python", "match": "(?x)\n \\b(\n and | as | assert | async | await | break | class | continue | def\n | del | elif | else | except | exec | finally | for | from | global\n | if | import | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n )\\b\n" }, "special-variables": { "match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n", "captures": { "1": { "name": "variable.language.special.self.python" }, "2": { "name": "variable.language.special.cls.python" } } }, "ellipsis": { "name": "constant.other.ellipsis.python", "match": "\\.\\.\\." }, "backticks": { "name": "invalid.deprecated.backtick.python", "begin": "\\`", "end": "(?:\\`|(?<!\\\\)(\\n))", "patterns": [ { "include": "#expression" } ] }, "illegal-operator": { "patterns": [ { "name": "invalid.illegal.operator.python", "match": "&&|\\|\\||--|\\+\\+" }, { "name": "invalid.illegal.operator.python", "match": "[?$]" }, { "name": "invalid.illegal.operator.python", "comment": "We don't want `!` to flash when we're typing `!=`", "match": "!\\b" } ] }, "illegal-object-name": { "comment": "It's illegal to name class or function \"True\"", "name": "keyword.illegal.name.python", "match": "\\b(True|False|None)\\b" }, "illegal-anno": { "name": "invalid.illegal.annotation.python", "match": "->" }, "regexp-base-expression": { "patterns": [ { "include": "#regexp-quantifier" }, { "include": "#regexp-base-common" } ] }, "fregexp-base-expression": { "patterns": [ { "include": "#fregexp-quantifier" }, { "include": "#fstring-formatting-braces" }, { "match": "\\{.*?\\}" }, { "include": "#regexp-base-common" } ] }, "fstring-formatting-braces": { "patterns": [ { "comment": "empty braces are illegal", "match": "({)(\\s*?)(})", "captures": { "1": { "name": "constant.character.format.placeholder.other.python" }, "2": { "name": "invalid.illegal.brace.python" }, "3": { "name": "constant.character.format.placeholder.other.python" } } }, { "name": "constant.character.escape.python", "match": "({{|}})" } ] }, "regexp-base-common": { "patterns": [ { "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", "match": "\\|" }, { "include": "#regexp-escape-sequence" } ] }, "regexp-quantifier": { "name": "keyword.operator.quantifier.regexp", "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n" }, "fregexp-quantifier": { "name": "keyword.operator.quantifier.regexp", "match": "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n" }, "regexp-backreference-number": { "name": "meta.backreference.regexp", "match": "(\\\\[1-9]\\d?)", "captures": { "1": { "name": "entity.name.tag.backreference.regexp" } } }, "regexp-backreference": { "name": "meta.backreference.named.regexp", "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", "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" } } }, "regexp-flags": { "name": "storage.modifier.flag.regexp", "match": "\\(\\?[aiLmsux]+\\)" }, "regexp-escape-special": { "name": "support.other.escape.special.regexp", "match": "\\\\([AbBdDsSwWZ])" }, "regexp-escape-character": { "name": "constant.character.escape.regexp", "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n" }, "regexp-escape-unicode": { "name": "constant.character.unicode.regexp", "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n" }, "regexp-escape-catchall": { "name": "constant.character.escape.regexp", "match": "\\\\(.|\\n)" }, "regexp-escape-sequence": { "patterns": [ { "include": "#regexp-escape-special" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-backreference-number" }, { "include": "#regexp-escape-catchall" } ] }, "regexp-charecter-set-escapes": { "patterns": [ { "name": "constant.character.escape.regexp", "match": "\\\\[abfnrtv\\\\]" }, { "include": "#regexp-escape-special" }, { "name": "constant.character.escape.regexp", "match": "\\\\([0-7]{1,3})" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-escape-catchall" } ] }, "codetags": { "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)", "captures": { "1": { "name": "keyword.codetag.notation.python" } } }, "comments-base": { "name": "comment.line.number-sign.python", "begin": "(\\#)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.python" } }, "end": "($)", "patterns": [ { "include": "#codetags" } ] }, "comments-string-single-three": { "name": "comment.line.number-sign.python", "begin": "(\\#)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.python" } }, "end": "($|(?='''))", "patterns": [ { "include": "#codetags" } ] }, "comments-string-double-three": { "name": "comment.line.number-sign.python", "begin": "(\\#)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.python" } }, "end": "($|(?=\"\"\"))", "patterns": [ { "include": "#codetags" } ] }, "single-one-regexp-expression": { "patterns": [ { "include": "#regexp-base-expression" }, { "include": "#single-one-regexp-character-set" }, { "include": "#single-one-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#single-one-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#single-one-regexp-lookahead" }, { "include": "#single-one-regexp-lookahead-negative" }, { "include": "#single-one-regexp-lookbehind" }, { "include": "#single-one-regexp-lookbehind-negative" }, { "include": "#single-one-regexp-conditional" }, { "include": "#single-one-regexp-parentheses-non-capturing" }, { "include": "#single-one-regexp-parentheses" } ] }, "single-one-regexp-character-set": { "patterns": [ { "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" }, { "name": "meta.character.set.regexp", "begin": "(\\[)(\\^)?(\\])?", "end": "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "1": { "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" }, "2": { "name": "keyword.operator.negation.regexp" }, "3": { "name": "constant.character.set.regexp" } }, "endCaptures": { "1": { "name": "punctuation.character.set.end.regexp constant.other.set.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-charecter-set-escapes" }, { "name": "constant.character.set.regexp", "match": "[^\\n]" } ] } ] }, "single-one-regexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#codetags" } ] }, "single-one-regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-three-regexp-expression": { "patterns": [ { "include": "#regexp-base-expression" }, { "include": "#single-three-regexp-character-set" }, { "include": "#single-three-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#single-three-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#single-three-regexp-lookahead" }, { "include": "#single-three-regexp-lookahead-negative" }, { "include": "#single-three-regexp-lookbehind" }, { "include": "#single-three-regexp-lookbehind-negative" }, { "include": "#single-three-regexp-conditional" }, { "include": "#single-three-regexp-parentheses-non-capturing" }, { "include": "#single-three-regexp-parentheses" }, { "include": "#comments-string-single-three" } ] }, "single-three-regexp-character-set": { "patterns": [ { "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" }, { "name": "meta.character.set.regexp", "begin": "(\\[)(\\^)?(\\])?", "end": "(\\]|(?=\\'\\'\\'))", "beginCaptures": { "1": { "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" }, "2": { "name": "keyword.operator.negation.regexp" }, "3": { "name": "constant.character.set.regexp" } }, "endCaptures": { "1": { "name": "punctuation.character.set.end.regexp constant.other.set.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-charecter-set-escapes" }, { "name": "constant.character.set.regexp", "match": "[^\\n]" } ] } ] }, "single-three-regexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-regexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#codetags" } ] }, "single-three-regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-regexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-regexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-regexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-regexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-regexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-regexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.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": "\\(\\?:", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "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" } ] }, "single-three-regexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "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" } ] }, "double-one-regexp-expression": { "patterns": [ { "include": "#regexp-base-expression" }, { "include": "#double-one-regexp-character-set" }, { "include": "#double-one-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#double-one-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#double-one-regexp-lookahead" }, { "include": "#double-one-regexp-lookahead-negative" }, { "include": "#double-one-regexp-lookbehind" }, { "include": "#double-one-regexp-lookbehind-negative" }, { "include": "#double-one-regexp-conditional" }, { "include": "#double-one-regexp-parentheses-non-capturing" }, { "include": "#double-one-regexp-parentheses" } ] }, "double-one-regexp-character-set": { "patterns": [ { "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" }, { "name": "meta.character.set.regexp", "begin": "(\\[)(\\^)?(\\])?", "end": "(\\]|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "1": { "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" }, "2": { "name": "keyword.operator.negation.regexp" }, "3": { "name": "constant.character.set.regexp" } }, "endCaptures": { "1": { "name": "punctuation.character.set.end.regexp constant.other.set.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-charecter-set-escapes" }, { "name": "constant.character.set.regexp", "match": "[^\\n]" } ] } ] }, "double-one-regexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#codetags" } ] }, "double-one-regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-one-regexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "double-three-regexp-expression": { "patterns": [ { "include": "#regexp-base-expression" }, { "include": "#double-three-regexp-character-set" }, { "include": "#double-three-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#double-three-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#double-three-regexp-lookahead" }, { "include": "#double-three-regexp-lookahead-negative" }, { "include": "#double-three-regexp-lookbehind" }, { "include": "#double-three-regexp-lookbehind-negative" }, { "include": "#double-three-regexp-conditional" }, { "include": "#double-three-regexp-parentheses-non-capturing" }, { "include": "#double-three-regexp-parentheses" }, { "include": "#comments-string-double-three" } ] }, "double-three-regexp-character-set": { "patterns": [ { "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" }, { "name": "meta.character.set.regexp", "begin": "(\\[)(\\^)?(\\])?", "end": "(\\]|(?=\"\"\"))", "beginCaptures": { "1": { "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" }, "2": { "name": "keyword.operator.negation.regexp" }, "3": { "name": "constant.character.set.regexp" } }, "endCaptures": { "1": { "name": "punctuation.character.set.end.regexp constant.other.set.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-charecter-set-escapes" }, { "name": "constant.character.set.regexp", "match": "[^\\n]" } ] } ] }, "double-three-regexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-regexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#codetags" } ] }, "double-three-regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-regexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-regexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-regexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-regexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-regexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-regexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.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": "\\(\\?:", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "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" } ] }, "double-three-regexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "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" } ] }, "regexp-single-one-line": { "name": "string.regexp.quoted.single.python", "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')", "end": "(\\')|(?<!\\\\)(\\n)", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "regexp-single-three-line": { "name": "string.regexp.quoted.multi.python", "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')", "end": "(\\'\\'\\')", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-regexp-expression" } ] }, "regexp-double-one-line": { "name": "string.regexp.quoted.single.python", "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\")", "end": "(\")|(?<!\\\\)(\\n)", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-regexp-expression" } ] }, "regexp-double-three-line": { "name": "string.regexp.quoted.multi.python", "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\"\"\")", "end": "(\"\"\")", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-regexp-expression" } ] }, "single-one-fregexp-expression": { "patterns": [ { "include": "#fregexp-base-expression" }, { "include": "#single-one-regexp-character-set" }, { "include": "#single-one-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#single-one-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#single-one-fregexp-lookahead" }, { "include": "#single-one-fregexp-lookahead-negative" }, { "include": "#single-one-fregexp-lookbehind" }, { "include": "#single-one-fregexp-lookbehind-negative" }, { "include": "#single-one-fregexp-conditional" }, { "include": "#single-one-fregexp-parentheses-non-capturing" }, { "include": "#single-one-fregexp-parentheses" } ] }, "single-one-fregexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-one-fregexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "single-three-fregexp-expression": { "patterns": [ { "include": "#fregexp-base-expression" }, { "include": "#single-three-regexp-character-set" }, { "include": "#single-three-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#single-three-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#single-three-fregexp-lookahead" }, { "include": "#single-three-fregexp-lookahead-negative" }, { "include": "#single-three-fregexp-lookbehind" }, { "include": "#single-three-fregexp-lookbehind-negative" }, { "include": "#single-three-fregexp-conditional" }, { "include": "#single-three-fregexp-parentheses-non-capturing" }, { "include": "#single-three-fregexp-parentheses" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "single-three-fregexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\\'\\'\\'))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" }, { "include": "#comments-string-single-three" } ] }, "double-one-fregexp-expression": { "patterns": [ { "include": "#fregexp-base-expression" }, { "include": "#double-one-regexp-character-set" }, { "include": "#double-one-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#double-one-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#double-one-fregexp-lookahead" }, { "include": "#double-one-fregexp-lookahead-negative" }, { "include": "#double-one-fregexp-lookbehind" }, { "include": "#double-one-fregexp-lookbehind-negative" }, { "include": "#double-one-fregexp-conditional" }, { "include": "#double-one-fregexp-parentheses-non-capturing" }, { "include": "#double-one-fregexp-parentheses" } ] }, "double-one-fregexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-one-fregexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "double-three-fregexp-expression": { "patterns": [ { "include": "#fregexp-base-expression" }, { "include": "#double-three-regexp-character-set" }, { "include": "#double-three-regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#double-three-regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#double-three-fregexp-lookahead" }, { "include": "#double-three-fregexp-lookahead-negative" }, { "include": "#double-three-fregexp-lookbehind" }, { "include": "#double-three-fregexp-lookbehind-negative" }, { "include": "#double-three-fregexp-conditional" }, { "include": "#double-three-fregexp-parentheses-non-capturing" }, { "include": "#double-three-fregexp-parentheses" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "double-three-fregexp-parentheses": { "begin": "\\(", "end": "(\\)|(?=\"\"\"))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" }, { "include": "#comments-string-double-three" } ] }, "fregexp-single-one-line": { "name": "string.interpolated.python string.regexp.quoted.single.python", "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\')", "end": "(\\')|(?<!\\\\)(\\n)", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-one-fregexp-expression" } ] }, "fregexp-single-three-line": { "name": "string.interpolated.python string.regexp.quoted.multi.python", "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\'\\'\\')", "end": "(\\'\\'\\')", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#single-three-fregexp-expression" } ] }, "fregexp-double-one-line": { "name": "string.interpolated.python string.regexp.quoted.single.python", "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\")", "end": "(\")|(?<!\\\\)(\\n)", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-one-fregexp-expression" } ] }, "fregexp-double-three-line": { "name": "string.interpolated.python string.regexp.quoted.multi.python", "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\"\"\")", "end": "(\"\"\")", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#double-three-fregexp-expression" } ] }, "string-raw-quoted-single-line": { "name": "string.quoted.raw.single.python", "begin": "\\b(([uU]R)|(R))((['\"]))", "end": "(\\4)|((?<!\\\\)\\n)", "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-single-bad-brace1-formatting-raw" }, { "include": "#string-single-bad-brace2-formatting-raw" }, { "include": "#string-raw-guts" } ] }, "string-bin-quoted-single-line": { "name": "string.quoted.binary.single.python", "begin": "(\\b[bB])((['\"]))", "end": "(\\2)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-entity" } ] }, "string-raw-bin-quoted-single-line": { "name": "string.quoted.raw.binary.single.python", "begin": "(\\b(?:R[bB]|[bB]R))((['\"]))", "end": "(\\2)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-raw-bin-guts" } ] }, "string-quoted-single-line": { "name": "string.quoted.single.python", "begin": "(\\b[rR](?=[uU]))?([uU])?((['\"]))", "end": "(\\3)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-single-bad-brace1-formatting-unicode" }, { "include": "#string-single-bad-brace2-formatting-unicode" }, { "include": "#string-unicode-guts" } ] }, "string-single-bad-brace1-formatting-unicode": { "comment": "template using {% ... %}", "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", "end": "(?=(['\"])|((?<!\\\\)\\n))", "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" } ] }, "string-single-bad-brace1-formatting-raw": { "comment": "template using {% ... %}", "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n", "end": "(?=(['\"])|((?<!\\\\)\\n))", "patterns": [ { "include": "#string-consume-escape" } ] }, "string-single-bad-brace2-formatting-unicode": { "comment": "odd format or format-like syntax", "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", "end": "(?=(['\"])|((?<!\\\\)\\n))", "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#string-entity" } ] }, "string-single-bad-brace2-formatting-raw": { "comment": "odd format or format-like syntax", "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n", "end": "(?=(['\"])|((?<!\\\\)\\n))", "patterns": [ { "include": "#string-consume-escape" }, { "include": "#string-formatting" } ] }, "string-raw-quoted-multi-line": { "name": "string.quoted.raw.multi.python", "begin": "\\b(([uU]R)|(R))('''|\"\"\")", "end": "(\\4)", "beginCaptures": { "2": { "name": "invalid.deprecated.prefix.python" }, "3": { "name": "storage.type.string.python" }, "4": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-multi-bad-brace1-formatting-raw" }, { "include": "#string-multi-bad-brace2-formatting-raw" }, { "include": "#string-raw-guts" } ] }, "string-bin-quoted-multi-line": { "name": "string.quoted.binary.multi.python", "begin": "(\\b[bB])('''|\"\"\")", "end": "(\\2)", "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-entity" } ] }, "string-raw-bin-quoted-multi-line": { "name": "string.quoted.raw.binary.multi.python", "begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")", "end": "(\\2)", "beginCaptures": { "1": { "name": "storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-raw-bin-guts" } ] }, "string-quoted-multi-line": { "name": "string.quoted.multi.python", "begin": "(\\b[rR](?=[uU]))?([uU])?('''|\"\"\")", "end": "(\\3)", "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#string-multi-bad-brace1-formatting-unicode" }, { "include": "#string-multi-bad-brace2-formatting-unicode" }, { "include": "#string-unicode-guts" } ] }, "string-multi-bad-brace1-formatting-unicode": { "comment": "template using {% ... %}", "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", "end": "(?='''|\"\"\")", "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" } ] }, "string-multi-bad-brace1-formatting-raw": { "comment": "template using {% ... %}", "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n", "end": "(?='''|\"\"\")", "patterns": [ { "include": "#string-consume-escape" } ] }, "string-multi-bad-brace2-formatting-unicode": { "comment": "odd format or format-like syntax", "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", "end": "(?='''|\"\"\")", "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#string-entity" } ] }, "string-multi-bad-brace2-formatting-raw": { "comment": "odd format or format-like syntax", "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n", "end": "(?='''|\"\"\")", "patterns": [ { "include": "#string-consume-escape" }, { "include": "#string-formatting" } ] }, "fstring-fnorm-quoted-single-line": { "name": "meta.fstring.python", "begin": "(\\b[fF])([bBuU])?((['\"]))", "end": "(\\3)|((?<!\\\\)\\n)", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#fstring-guts" }, { "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "include": "#fstring-single-core" } ] }, "fstring-normf-quoted-single-line": { "name": "meta.fstring.python", "begin": "(\\b[bBuU])([fF])((['\"]))", "end": "(\\3)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "string.interpolated.python string.quoted.single.python storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python string.quoted.single.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#fstring-guts" }, { "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "include": "#fstring-single-core" } ] }, "fstring-raw-quoted-single-line": { "name": "meta.fstring.python", "begin": "(\\b(?:[R][fF]|[fF][R]))((['\"]))", "end": "(\\2)|((?<!\\\\)\\n)", "beginCaptures": { "1": { "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#fstring-raw-guts" }, { "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "include": "#fstring-raw-single-core" } ] }, "fstring-single-core": { "name": "string.interpolated.python string.quoted.single.python", "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" }, "fstring-raw-single-core": { "name": "string.interpolated.python string.quoted.raw.single.python", "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" }, "fstring-single-brace": { "comment": "value interpolation using { ... }", "begin": "(\\{)", "end": "(?x)\n (\\})|(?=\\n)\n", "beginCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "endCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "patterns": [ { "include": "#fstring-terminator-single" }, { "include": "#f-expression" } ] }, "fstring-terminator-single": { "patterns": [ { "name": "storage.type.format.python", "match": "(![rsa])(?=})" }, { "match": "(?x)\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", "captures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } } }, { "include": "#fstring-terminator-single-tail" } ] }, "fstring-terminator-single-tail": { "begin": "(![rsa])?(:)(?=.*?{)", "end": "(?=})|(?=\\n)", "beginCaptures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } }, "patterns": [ { "include": "#fstring-illegal-single-brace" }, { "include": "#fstring-single-brace" }, { "name": "storage.type.format.python", "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)" } ] }, "fstring-fnorm-quoted-multi-line": { "name": "meta.fstring.python", "begin": "(\\b[fF])([bBuU])?('''|\"\"\")", "end": "(\\3)", "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" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#fstring-guts" }, { "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "include": "#fstring-multi-core" } ] }, "fstring-normf-quoted-multi-line": { "name": "meta.fstring.python", "begin": "(\\b[bBuU])([fF])('''|\"\"\")", "end": "(\\3)", "beginCaptures": { "1": { "name": "invalid.illegal.prefix.python" }, "2": { "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python" }, "3": { "name": "punctuation.definition.string.begin.python string.quoted.multi.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#fstring-guts" }, { "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "include": "#fstring-multi-core" } ] }, "fstring-raw-quoted-multi-line": { "name": "meta.fstring.python", "begin": "(\\b(?:[R][fF]|[fF][R]))('''|\"\"\")", "end": "(\\2)", "beginCaptures": { "1": { "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python" }, "2": { "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#fstring-raw-guts" }, { "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "include": "#fstring-raw-multi-core" } ] }, "fstring-multi-core": { "name": "string.interpolated.python string.quoted.multi.python", "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" }, "fstring-raw-multi-core": { "name": "string.interpolated.python string.quoted.raw.multi.python", "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n" }, "fstring-multi-brace": { "comment": "value interpolation using { ... }", "begin": "(\\{)", "end": "(?x)\n (\\})\n", "beginCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "endCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, "patterns": [ { "include": "#fstring-terminator-multi" }, { "include": "#f-expression" } ] }, "fstring-terminator-multi": { "patterns": [ { "name": "storage.type.format.python", "match": "(![rsa])(?=})" }, { "match": "(?x)\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n", "captures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } } }, { "include": "#fstring-terminator-multi-tail" } ] }, "fstring-terminator-multi-tail": { "begin": "(![rsa])?(:)(?=.*?{)", "end": "(?=})", "beginCaptures": { "1": { "name": "storage.type.format.python" }, "2": { "name": "storage.type.format.python" } }, "patterns": [ { "include": "#fstring-illegal-multi-brace" }, { "include": "#fstring-multi-brace" }, { "name": "storage.type.format.python", "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)" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/qml.tmLanguage.json ================================================ { "scopeName": "source.qml", "fileTypes": ["qml", "qmlproject"], "patterns": [ { "begin": "/\\*(?!/)", "end": "\\*/", "comment": "Block comment.", "name": "comment.block.documentation.qml" }, { "comment": "Line comment.", "match": "//.*$", "name": "comment.line.double-slash.qml" }, { "begin": "\\b(import)\\s+", "end": "$", "comment": "import statement.", "name": "meta.import.qml", "beginCaptures": { "1": { "name": "keyword.other.import.qml" } }, "patterns": [ { "match": "([\\w\\d\\.]+)\\s+(\\d+\\.\\d+)(?:\\s+(as)\\s+([A-Z][\\w\\d]*))?", "comment": "import Namespace VersionMajor.VersionMinor [as SingletonTypeIdentifier]", "name": "meta.import.namespace.qml", "captures": { "3": { "name": "keyword.other.import.qml" }, "1": { "name": "entity.name.class.qml" }, "4": { "name": "entity.name.class.qml" }, "2": { "name": "constant.numeric.qml" } } }, { "match": "(\\\"[^\\\"]+\\\")(?:\\s+(as)\\s+([A-Z][\\w\\d]*))?", "comment": "import <string> [as Script]", "name": "meta.import.dirjs.qml", "captures": { "1": { "name": "string.quoted.double.qml" }, "2": { "name": "keyword.other.import.qml" }, "3": { "name": "entity.name.class.qml" } } } ] }, { "comment": "Capitalized word (class or enum).", "match": "\\b[A-Z]\\w*\\b", "name": "support.class.qml" }, { "comment": "onSomething - handler.", "match": "(((^|\\{)\\s*)|\\b)on[A-Z]\\w*\\b", "name": "support.class.qml" }, { "match": "(?:^|\\{)\\s*(id)\\s*\\:\\s*([^;\\s]+)\\b", "comment": "id: <something>", "name": "meta.id.qml", "captures": { "1": { "name": "keyword.other.qml" }, "2": { "name": "storage.modifier.qml" } } }, { "match": "^\\s*(?:(default|readonly)\\s+)?(property)\\s+(?:(alias)|([\\w\\<\\>]+))\\s+(\\w+)", "comment": "property definition.", "name": "meta.propertydef.qml", "captures": { "3": { "name": "keyword.other.qml" }, "1": { "name": "keyword.other.qml" }, "4": { "name": "storage.type.qml" }, "2": { "name": "keyword.other.qml" }, "5": { "name": "entity.other.attribute-name.qml" } } }, { "begin": "\\b(signal)\\s+(\\w+)\\s*", "end": ";|(?=/)|$", "comment": "signal <signalName>[([<type> <parameter>[, ...]])]", "name": "meta.signal.qml", "beginCaptures": { "1": { "name": "keyword.other.qml" }, "2": { "name": "support.function.qml" } }, "patterns": [ { "match": "(\\w+)\\s+(\\w+)", "name": "meta.signal.parameters.qml", "captures": { "1": { "name": "storage.type.qml" }, "2": { "name": "variable.parameter.qml" } } } ] }, { "match": "(?:\\b|\\s+)(?:(true|false|null|undefined)|(var|void)|(on|as|enum|connect|break|case|catch|continue|debugger|default|delete|do|else|finally|for|if|in|instanceof|new|return|switch|this|throw|try|typeof|while|with))\\b", "comment": "js keywords.", "name": "meta.keyword.qml", "captures": { "1": { "name": "constant.language.qml" }, "2": { "name": "storage.type.qml" }, "3": { "name": "keyword.control.qml" } } }, { "match": "\\b(function)\\s+([\\w_]+)\\s*(?=\\()", "comment": "function definition.", "name": "meta.function.qml", "captures": { "1": { "name": "storage.type.qml" }, "2": { "name": "entity.name.function.untitled" } } }, { "comment": "function call.", "match": "\\b[\\w_]+\\s*(?=\\()", "name": "support.function.qml" }, { "comment": "property (property: <something>).", "match": "(?:^|\\{|;)\\s*[a-z][\\w\\.]*\\s*(?=\\:)", "name": "entity.other.attribute-name.qml" }, { "comment": "property of the variable (name.property).", "match": "(?<=\\.)\\b\\w*", "name": "entity.other.attribute-name.qml" }, { "comment": "All non colored words are assumed to be variables.", "match": "\\b([a-z_]\\w*)\\b", "name": "variable.parameter" }, { "include": "source.js" } ], "name": "QML", "uuid": "13a281e0-0507-45b4-bb6c-a57177630f10" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/r.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/Ikuyadeu/vscode-R/blob/master/syntax/r.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/Ikuyadeu/vscode-R/commit/ff60e426f66503f3c9533c7a62a8fd3f9f6c53df", "name": "r", "scopeName": "source.r", "patterns": [ { "include": "#roxygen" }, { "include": "#comments" }, { "include": "#constants" }, { "include": "#keywords" }, { "include": "#storage-type" }, { "include": "#strings" }, { "include": "#brackets" }, { "include": "#function-declarations" }, { "include": "#lambda-functions" }, { "include": "#builtin-functions" }, { "include": "#function-calls" }, { "include": "#general-variables" } ], "repository": { "comments": { "patterns": [ { "captures": { "1": { "name": "comment.line.pragma.r" }, "2": { "name": "entity.name.pragma.name.r" } }, "match": "^(#pragma[ \\t]+mark)[ \\t](.*)", "name": "comment.line.pragma-mark.r" }, { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.r" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.r" } }, "end": "\\n", "name": "comment.line.number-sign.r" } ] } ] }, "constants": { "patterns": [ { "match": "\\b(pi|letters|LETTERS|month\\.abb|month\\.name)\\b", "name": "support.constant.misc.r" }, { "match": "\\b(TRUE|FALSE|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_|Inf|NaN)\\b", "name": "constant.language.r" }, { "match": "\\b0(x|X)[0-9a-fA-F]+i\\b", "name": "constant.numeric.imaginary.hexadecimal.r" }, { "match": "\\b[0-9]+\\.?[0-9]*(?:(e|E)(\\+|-)?[0-9]+)?i\\b", "name": "constant.numeric.imaginary.decimal.r" }, { "match": "\\.[0-9]+(?:(e|E)(\\+|-)?[0-9]+)?i\\b", "name": "constant.numeric.imaginary.decimal.r" }, { "match": "\\b0(x|X)[0-9a-fA-F]+L\\b", "name": "constant.numeric.integer.hexadecimal.r" }, { "match": "\\b(?:[0-9]+\\.?[0-9]*)(?:(e|E)(\\+|-)?[0-9]+)?L\\b", "name": "constant.numeric.integer.decimal.r" }, { "match": "\\b0(x|X)[0-9a-fA-F]+\\b", "name": "constant.numeric.float.hexadecimal.r" }, { "match": "\\b[0-9]+\\.?[0-9]*(?:(e|E)(\\+|-)?[0-9]+)?\\b", "name": "constant.numeric.float.decimal.r" }, { "match": "\\.[0-9]+(?:(e|E)(\\+|-)?[0-9]+)?\\b", "name": "constant.numeric.float.decimal.r" } ] }, "general-variables": { "patterns": [ { "captures": { "1": { "name": "variable.parameter.r" }, "2": { "name": "keyword.operator.assignment.r" } }, "match": "([[:alpha:].][[:alnum:]._]*)\\s*(=)(?=[^=])" }, { "captures": { "1": { "name": "variable.parameter.r" }, "2": { "name": "keyword.operator.assignment.r" } }, "match": "(`[^`]+`)\\s*(=)(?=[^=])" }, { "match": "\\b([\\d_][[:alnum:]._]+)\\b", "name": "invalid.illegal.variable.other.r" }, { "match": "\\b([[:alnum:]_]+)(?=::)", "name": "entity.namespace.r" }, { "match": "\\b([[:alnum:]._]+)\\b", "name": "variable.other.r" }, { "match": "(`[^`]+`)", "name": "variable.other.r" } ] }, "keywords": { "patterns": [ { "match": "\\b(break|next|repeat|else|in)\\b", "name": "keyword.control.r" }, { "match": "\\b(ifelse|if|for|return|switch|while|invisible)\\b(?=\\s*\\()", "name": "keyword.control.r" }, { "match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%o%|%x%|\\^)", "name": "keyword.operator.arithmetic.r" }, { "match": "(:=|<-|<<-|->|->>)", "name": "keyword.operator.assignment.r" }, { "match": "(==|<=|>=|!=|<>|<|>|%in%)", "name": "keyword.operator.comparison.r" }, { "match": "(!|&{1,2}|[|]{1,2})", "name": "keyword.operator.logical.r" }, { "match": "(\\|>)", "name": "keyword.operator.pipe.r" }, { "match": "(%between%|%chin%|%like%|%\\+%|%\\+replace%|%:%|%do%|%dopar%|%>%|%<>%|%T>%|%\\$%)", "name": "keyword.operator.other.r" }, { "match": "(\\.\\.\\.|\\$|:|\\~|@)", "name": "keyword.other.r" } ] }, "storage-type": { "patterns": [ { "match": "\\b(character|complex|double|expression|integer|list|logical|numeric|single|raw)\\b(?=\\s*\\()", "name": "storage.type.r" } ] }, "strings": { "patterns": [ { "begin": "[rR]\"(-*)\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, "end": "\\]\\1\"", "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, "name": "string.quoted.double.raw.r" }, { "begin": "[rR]'(-*)\\[", "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, "end": "\\]\\1'", "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, "name": "string.quoted.single.raw.r" }, { "begin": "[rR]\"(-*)\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, "end": "\\}\\1\"", "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, "name": "string.quoted.double.raw.r" }, { "begin": "[rR]'(-*)\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, "end": "\\}\\1'", "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, "name": "string.quoted.single.raw.r" }, { "begin": "[rR]\"(-*)\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, "end": "\\)\\1\"", "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, "name": "string.quoted.double.raw.r" }, { "begin": "[rR]'(-*)\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, "end": "\\)\\1'", "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, "name": "string.quoted.single.raw.r" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.r" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.r" } }, "name": "string.quoted.double.r", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.r" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.r" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.r" } }, "name": "string.quoted.single.r", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.r" } ] } ] }, "brackets": { "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.r" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.r" } }, "patterns": [ { "include": "source.r" } ] }, { "begin": "\\[(?!\\[)", "beginCaptures": { "0": { "name": "punctuation.section.brackets.single.begin.r" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.single.end.r" } }, "patterns": [ { "include": "source.r" } ] }, { "begin": "\\[\\[", "beginCaptures": { "0": { "name": "punctuation.section.brackets.double.begin.r" } }, "end": "\\]\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.double.end.r" } }, "contentName": "meta.item-access.arguments.r", "patterns": [ { "include": "source.r" } ] }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.r" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.braces.end.r" } }, "patterns": [ { "include": "source.r" } ] } ] }, "function-declarations": { "patterns": [ { "match": "((?:`[^`\\\\]*(?:\\\\.[^`\\\\]*)*`)|(?:[[:alpha:].][[:alnum:]._]*))\\s*(<?<-|=(?!=))\\s*(function|\\\\)(?!\\w)", "captures": { "1": { "name": "entity.name.function.r" }, "2": { "name": "keyword.operator.assignment.r" }, "3": { "name": "keyword.control.r" } }, "name": "meta.function.r", "patterns": [ { "include": "#lambda-functions" } ] } ] }, "lambda-functions": { "patterns": [ { "begin": "\\b(function)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.r" }, "2": { "name": "punctuation.section.parens.begin.r" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.r" } }, "name": "meta.function.r", "contentName": "meta.function.parameters.r", "patterns": [ { "include": "#comments" }, { "match": "(?:[a-zA-Z._][\\w.]*|`[^`]+`)", "name": "variable.other.r" }, { "begin": "(?==)", "end": "(?=[,)])", "patterns": [ { "include": "source.r" } ] }, { "match": ",", "name": "punctuation.separator.parameters.r" } ] } ] }, "function-calls": { "begin": "(?:\\b|(?=\\.))((?:[a-zA-Z._][\\w.]*|`[^`]+`))\\s*(\\()", "beginCaptures": { "1": { "name": "variable.function.r" }, "2": { "name": "punctuation.section.parens.begin.r" } }, "contentName": "meta.function-call.arguments.r", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.parens.end.r" } }, "name": "meta.function-call.r", "patterns": [ { "include": "#function-parameters" } ] }, "function-parameters": { "patterns": [ { "name": "meta.function-call.r", "contentName": "meta.function-call.parameters.r" }, { "match": "(?:[a-zA-Z._][\\w.]*|`[^`]+`)(?=\\s[^=])", "name": "variable.other.r" }, { "begin": "(?==)", "end": "(?=[,)])", "patterns": [ { "include": "source.r" } ] }, { "match": ",", "name": "punctuation.separator.parameters.r" }, { "include": "source.r" } ] }, "roxygen": { "patterns": [ { "begin": "^\\s*(#')\\s*", "beginCaptures": { "1": { "name": "punctuation.definition.comment.r" } }, "end": "$\\n?", "name": "comment.line.roxygen.r", "patterns": [ { "captures": { "1": { "name": "keyword.other.r" }, "2": { "name": "variable.parameter.r" } }, "match": "(@param)\\s*((?:[a-zA-Z._][\\w.]*|`[^`]+`))" }, { "match": "@[a-zA-Z0-9]+", "name": "keyword.other.r" } ] } ] }, "builtin-functions": { "patterns": [ { "match": "\\b(abbreviate|abs|acos|acosh|addNA|addTaskCallback|agrep|agrepl|alist|all|all\\.equal|all\\.equal.character|all\\.equal.default|all\\.equal.environment|all\\.equal.envRefClass|all\\.equal.factor|all\\.equal.formula|all\\.equal.language|all\\.equal.list|all\\.equal.numeric|all\\.equal.POSIXt|all\\.equal.raw|all\\.names|all\\.vars|any|anyDuplicated|anyDuplicated\\.array|anyDuplicated\\.data.frame|anyDuplicated\\.default|anyDuplicated\\.matrix|anyNA|anyNA\\.numeric_version|anyNA\\.POSIXlt|aperm|aperm\\.default|aperm\\.table|append|apply|Arg|args|array|arrayInd|as\\.array|as\\.array.default|as\\.call|as\\.character|as\\.character.condition|as\\.character.Date|as\\.character.default|as\\.character.error|as\\.character.factor|as\\.character.hexmode|as\\.character.numeric_version|as\\.character.octmode|as\\.character.POSIXt|as\\.character.srcref|as\\.complex|as\\.data.frame|as\\.data.frame.array|as\\.data.frame.AsIs|as\\.data.frame.character|as\\.data.frame.complex|as\\.data.frame.data.frame|as\\.data.frame.Date|as\\.data.frame.default|as\\.data.frame.difftime|as\\.data.frame.factor|as\\.data.frame.integer|as\\.data.frame.list|as\\.data.frame.logical|as\\.data.frame.matrix|as\\.data.frame.model.matrix|as\\.data.frame.noquote|as\\.data.frame.numeric|as\\.data.frame.numeric_version|as\\.data.frame.ordered|as\\.data.frame.POSIXct|as\\.data.frame.POSIXlt|as\\.data.frame.raw|as\\.data.frame.table|as\\.data.frame.ts|as\\.data.frame.vector|as\\.Date|as\\.Date.character|as\\.Date.date|as\\.Date.dates|as\\.Date.default|as\\.Date.factor|as\\.Date.numeric|as\\.Date.POSIXct|as\\.Date.POSIXlt|as\\.difftime|as\\.double|as\\.double.difftime|as\\.double.POSIXlt|as\\.environment|as\\.expression|as\\.expression.default|as\\.factor|as\\.function|as\\.function.default|as\\.hexmode|as\\.integer|as\\.list|as\\.list.data.frame|as\\.list.Date|as\\.list.default|as\\.list.environment|as\\.list.factor|as\\.list.function|as\\.list.numeric_version|as\\.list.POSIXct|as\\.logical|as\\.logical.factor|as\\.matrix|as\\.matrix.data.frame|as\\.matrix.default|as\\.matrix.noquote|as\\.matrix.POSIXlt|as\\.name|as\\.null|as\\.null.default|as\\.numeric|as\\.numeric_version|as\\.octmode|as\\.ordered|as\\.package_version|as\\.pairlist|as\\.POSIXct|as\\.POSIXct.date|as\\.POSIXct.Date|as\\.POSIXct.dates|as\\.POSIXct.default|as\\.POSIXct.numeric|as\\.POSIXct.POSIXlt|as\\.POSIXlt|as\\.POSIXlt.character|as\\.POSIXlt.date|as\\.POSIXlt.Date|as\\.POSIXlt.dates|as\\.POSIXlt.default|as\\.POSIXlt.factor|as\\.POSIXlt.numeric|as\\.POSIXlt.POSIXct|as\\.qr|as\\.raw|as\\.single|as\\.single.default|as\\.symbol|as\\.table|as\\.table.default|as\\.vector|as\\.vector.factor|asin|asinh|asNamespace|asS3|asS4|assign|atan|atan2|atanh|attach|attachNamespace|attr|attr\\.all.equal|attributes|autoload|autoloader|backsolve|baseenv|basename|besselI|besselJ|besselK|besselY|beta|bindingIsActive|bindingIsLocked|bindtextdomain|bitwAnd|bitwNot|bitwOr|bitwShiftL|bitwShiftR|bitwXor|body|bquote|break|browser|browserCondition|browserSetDebug|browserText|builtins|by|by\\.data.frame|by\\.default|bzfile|c|c\\.Date|c\\.difftime|c\\.noquote|c\\.numeric_version|c\\.POSIXct|c\\.POSIXlt|c\\.warnings|call|callCC|capabilities|casefold|cat|cbind|cbind\\.data.frame|ceiling|char\\.expand|character|charmatch|charToRaw|chartr|check_tzones|chkDots|chol|chol\\.default|chol2inv|choose|class|clearPushBack|close|close\\.connection|close\\.srcfile|close\\.srcfilealias|closeAllConnections|col|colMeans|colnames|colSums|commandArgs|comment|complex|computeRestarts|conditionCall|conditionCall\\.condition|conditionMessage|conditionMessage\\.condition|conflicts|Conj|contributors|cos|cosh|cospi|crossprod|Cstack_info|cummax|cummin|cumprod|cumsum|curlGetHeaders|cut|cut\\.Date|cut\\.default|cut\\.POSIXt|data\\.class|data\\.frame|data\\.matrix|date|debug|debuggingState|debugonce|default\\.stringsAsFactors|delayedAssign|deparse|det|detach|determinant|determinant\\.matrix|dget|diag|diff|diff\\.Date|diff\\.default|diff\\.difftime|diff\\.POSIXt|difftime|digamma|dim|dim\\.data.frame|dimnames|dimnames\\.data.frame|dir|dir\\.create|dir\\.exists|dirname|do\\.call|dontCheck|double|dput|dQuote|drop|droplevels|droplevels\\.data.frame|droplevels\\.factor|dump|duplicated|duplicated\\.array|duplicated\\.data.frame|duplicated\\.default|duplicated\\.matrix|duplicated\\.numeric_version|duplicated\\.POSIXlt|duplicated\\.warnings|dyn\\.load|dyn\\.unload|dynGet|eapply|eigen|emptyenv|enc2native|enc2utf8|encodeString|Encoding|endsWith|enquote|env\\.profile|environment|environmentIsLocked|environmentName|eval|eval\\.parent|evalq|exists|exp|expand\\.grid|expm1|expression|extSoftVersion|factor|factorial|fifo|file|file\\.access|file\\.append|file\\.choose|file\\.copy|file\\.create|file\\.exists|file\\.info|file\\.link|file\\.mode|file\\.mtime|file\\.path|file\\.remove|file\\.rename|file\\.show|file\\.size|file\\.symlink|Filter|Find|find\\.package|findInterval|findPackageEnv|findRestart|floor|flush|flush\\.connection|for|force|forceAndCall|formals|format|format\\.AsIs|format\\.data.frame|format\\.Date|format\\.default|format\\.difftime|format\\.factor|format\\.hexmode|format\\.info|format\\.libraryIQR|format\\.numeric_version|format\\.octmode|format\\.packageInfo|format\\.POSIXct|format\\.POSIXlt|format\\.pval|format\\.summaryDefault|formatC|formatDL|forwardsolve|function|gamma|gc|gc\\.time|gcinfo|gctorture|gctorture2|get|get0|getAllConnections|getCallingDLL|getCallingDLLe|getConnection|getDLLRegisteredRoutines|getDLLRegisteredRoutines\\.character|getDLLRegisteredRoutines\\.DLLInfo|getElement|geterrmessage|getExportedValue|getHook|getLoadedDLLs|getNamespace|getNamespaceExports|getNamespaceImports|getNamespaceInfo|getNamespaceName|getNamespaceUsers|getNamespaceVersion|getNativeSymbolInfo|getOption|getRversion|getSrcLines|getTaskCallbackNames|gettext|gettextf|getwd|gl|globalenv|gregexpr|grep|grepl|grepRaw|grouping|gsub|gzcon|gzfile|I|iconv|iconvlist|icuGetCollate|icuSetCollate|identical|identity|if|ifelse|Im|importIntoEnv|inherits|integer|interaction|interactive|intersect|intToBits|intToUtf8|inverse\\.rle|invisible|invokeRestart|invokeRestartInteractively|is\\.array|is\\.atomic|is\\.call|is\\.character|is\\.complex|is\\.data.frame|is\\.double|is\\.element|is\\.environment|is\\.expression|is\\.factor|is\\.finite|is\\.function|is\\.infinite|is\\.integer|is\\.language|is\\.list|is\\.loaded|is\\.logical|is\\.matrix|is\\.na|is\\.na.data.frame|is\\.na.numeric_version|is\\.na.POSIXlt|is\\.name|is\\.nan|is\\.null|is\\.numeric|is\\.numeric_version|is\\.numeric.Date|is\\.numeric.difftime|is\\.numeric.POSIXt|is\\.object|is\\.ordered|is\\.package_version|is\\.pairlist|is\\.primitive|is\\.qr|is\\.R|is\\.raw|is\\.recursive|is\\.single|is\\.symbol|is\\.table|is\\.unsorted|is\\.vector|isatty|isBaseNamespace|isdebugged|isIncomplete|isNamespace|isNamespaceLoaded|ISOdate|ISOdatetime|isOpen|isRestart|isS4|isSeekable|isSymmetric|isSymmetric\\.matrix|isTRUE|jitter|julian|julian\\.Date|julian\\.POSIXt|kappa|kappa\\.default|kappa\\.lm|kappa\\.qr|kronecker|l10n_info|La_library|La_version|La\\.svd|labels|labels\\.default|lapply|lazyLoad|lazyLoadDBexec|lazyLoadDBfetch|lbeta|lchoose|length|length\\.POSIXlt|lengths|levels|levels\\.default|lfactorial|lgamma|libcurlVersion|library|library\\.dynam|library\\.dynam.unload|licence|license|list|list\\.dirs|list\\.files|list2env|load|loadedNamespaces|loadingNamespaceInfo|loadNamespace|local|lockBinding|lockEnvironment|log|log10|log1p|log2|logb|logical|lower\\.tri|ls|make\\.names|make\\.unique|makeActiveBinding|Map|mapply|margin\\.table|mat\\.or.vec|match|match\\.arg|match\\.call|match\\.fun|Math\\.data.frame|Math\\.Date|Math\\.difftime|Math\\.factor|Math\\.POSIXt|matrix|max|max\\.col|mean|mean\\.Date|mean\\.default|mean\\.difftime|mean\\.POSIXct|mean\\.POSIXlt|mem\\.limits|memCompress|memDecompress|memory\\.profile|merge|merge\\.data.frame|merge\\.default|message|mget|min|missing|Mod|mode|months|months\\.Date|months\\.POSIXt|names|names\\.POSIXlt|namespaceExport|namespaceImport|namespaceImportClasses|namespaceImportFrom|namespaceImportMethods|nargs|nchar|ncol|NCOL|Negate|new\\.env|next|NextMethod|ngettext|nlevels|noquote|norm|normalizePath|nrow|NROW|numeric|numeric_version|nzchar|objects|oldClass|OlsonNames|on\\.exit|open|open\\.connection|open\\.srcfile|open\\.srcfilealias|open\\.srcfilecopy|Ops\\.data.frame|Ops\\.Date|Ops\\.difftime|Ops\\.factor|Ops\\.numeric_version|Ops\\.ordered|Ops\\.POSIXt|options|order|ordered|outer|package_version|packageEvent|packageHasNamespace|packageStartupMessage|packBits|pairlist|parent\\.env|parent\\.frame|parse|parseNamespaceFile|paste|paste0|path\\.expand|path\\.package|pcre_config|pipe|pmatch|pmax|pmax\\.int|pmin|pmin\\.int|polyroot|pos\\.to.env|Position|pretty|pretty\\.default|prettyNum|print|print\\.AsIs|print\\.by|print\\.condition|print\\.connection|print\\.data.frame|print\\.Date|print\\.default|print\\.difftime|print\\.Dlist|print\\.DLLInfo|print\\.DLLInfoList|print\\.DLLRegisteredRoutines|print\\.eigen|print\\.factor|print\\.function|print\\.hexmode|print\\.libraryIQR|print\\.listof|print\\.NativeRoutineList|print\\.noquote|print\\.numeric_version|print\\.octmode|print\\.packageInfo|print\\.POSIXct|print\\.POSIXlt|print\\.proc_time|print\\.restart|print\\.rle|print\\.simple.list|print\\.srcfile|print\\.srcref|print\\.summary.table|print\\.summaryDefault|print\\.table|print\\.warnings|prmatrix|proc\\.time|prod|prop\\.table|provideDimnames|psigamma|pushBack|pushBackLength|q|qr|qr\\.coef|qr\\.default|qr\\.fitted|qr\\.Q|qr\\.qty|qr\\.qy|qr\\.R|qr\\.resid|qr\\.solve|qr\\.X|quarters|quarters\\.Date|quarters\\.POSIXt|quit|quote|R_system_version|R\\.home|R\\.Version|range|range\\.default|rank|rapply|raw|rawConnection|rawConnectionValue|rawShift|rawToBits|rawToChar|rbind|rbind\\.data.frame|rcond|Re|read\\.dcf|readBin|readChar|readline|readLines|readRDS|readRenviron|Recall|Reduce|reg\\.finalizer|regexec|regexpr|registerS3method|registerS3methods|regmatches|remove|removeTaskCallback|rep|rep_len|rep\\.Date|rep\\.factor|rep\\.int|rep\\.numeric_version|rep\\.POSIXct|rep\\.POSIXlt|repeat|replace|replicate|require|requireNamespace|restartDescription|restartFormals|retracemem|return|returnValue|rev|rev\\.default|rle|rm|RNGkind|RNGversion|round|round\\.Date|round\\.POSIXt|row|row\\.names|row\\.names.data.frame|row\\.names.default|rowMeans|rownames|rowsum|rowsum\\.data.frame|rowsum\\.default|rowSums|sample|sample\\.int|sapply|save|save\\.image|saveRDS|scale|scale\\.default|scan|search|searchpaths|seek|seek\\.connection|seq|seq_along|seq_len|seq\\.Date|seq\\.default|seq\\.int|seq\\.POSIXt|sequence|serialize|set\\.seed|setdiff|setequal|setHook|setNamespaceInfo|setSessionTimeLimit|setTimeLimit|setwd|showConnections|shQuote|sign|signalCondition|signif|simpleCondition|simpleError|simpleMessage|simpleWarning|simplify2array|sin|single|sinh|sink|sink\\.number|sinpi|slice\\.index|socketConnection|socketSelect|solve|solve\\.default|solve\\.qr|sort|sort\\.default|sort\\.int|sort\\.list|sort\\.POSIXlt|source|split|split\\.data.frame|split\\.Date|split\\.default|split\\.POSIXct|sprintf|sqrt|sQuote|srcfile|srcfilealias|srcfilecopy|srcref|standardGeneric|startsWith|stderr|stdin|stdout|stop|stopifnot|storage\\.mode|strftime|strptime|strrep|strsplit|strtoi|strtrim|structure|strwrap|sub|subset|subset\\.data.frame|subset\\.default|subset\\.matrix|substitute|substr|substring|sum|summary|summary\\.connection|summary\\.data.frame|Summary\\.data.frame|summary\\.Date|Summary\\.Date|summary\\.default|Summary\\.difftime|summary\\.factor|Summary\\.factor|summary\\.matrix|Summary\\.numeric_version|Summary\\.ordered|summary\\.POSIXct|Summary\\.POSIXct|summary\\.POSIXlt|Summary\\.POSIXlt|summary\\.proc_time|summary\\.srcfile|summary\\.srcref|summary\\.table|suppressMessages|suppressPackageStartupMessages|suppressWarnings|svd|sweep|switch|sys\\.call|sys\\.calls|Sys\\.chmod|Sys\\.Date|sys\\.frame|sys\\.frames|sys\\.function|Sys\\.getenv|Sys\\.getlocale|Sys\\.getpid|Sys\\.glob|Sys\\.info|sys\\.load.image|Sys\\.localeconv|sys\\.nframe|sys\\.on.exit|sys\\.parent|sys\\.parents|Sys\\.readlink|sys\\.save.image|Sys\\.setenv|Sys\\.setFileTime|Sys\\.setlocale|Sys\\.sleep|sys\\.source|sys\\.status|Sys\\.time|Sys\\.timezone|Sys\\.umask|Sys\\.unsetenv|Sys\\.which|system|system\\.file|system\\.time|system2|t|t\\.data.frame|t\\.default|table|tabulate|tan|tanh|tanpi|tapply|taskCallbackManager|tcrossprod|tempdir|tempfile|testPlatformEquivalence|textConnection|textConnectionValue|tolower|topenv|toString|toString\\.default|toupper|trace|traceback|tracemem|tracingState|transform|transform\\.data.frame|transform\\.default|trigamma|trimws|trunc|trunc\\.Date|trunc\\.POSIXt|truncate|truncate\\.connection|try|tryCatch|typeof|unclass|undebug|union|unique|unique\\.array|unique\\.data.frame|unique\\.default|unique\\.matrix|unique\\.numeric_version|unique\\.POSIXlt|unique\\.warnings|units|units\\.difftime|unix\\.time|unlink|unlist|unloadNamespace|unlockBinding|unname|unserialize|unsplit|untrace|untracemem|unz|upper\\.tri|url|UseMethod|utf8ToInt|validEnc|validUTF8|vapply|vector|Vectorize|warning|warnings|weekdays|weekdays\\.Date|weekdays\\.POSIXt|which|which\\.max|which\\.min|while|with|with\\.default|withAutoprint|withCallingHandlers|within|within\\.data.frame|within\\.list|withRestarts|withVisible|write|write\\.dcf|writeBin|writeChar|writeLines|xor|xor\\.hexmode|xor\\.octmode|xpdrows\\.data.frame|xtfrm|xtfrm\\.AsIs|xtfrm\\.Date|xtfrm\\.default|xtfrm\\.difftime|xtfrm\\.factor|xtfrm\\.numeric_version|xtfrm\\.POSIXct|xtfrm\\.POSIXlt|xtfrm\\.Surv|xzfile|zapsmall)\\s*(\\()", "captures": { "1": { "name": "support.function.r" } } }, { "match": "\\b(abline|arrows|assocplot|axis|Axis|axis\\.Date|Axis\\.Date|Axis\\.default|axis\\.POSIXct|Axis\\.POSIXt|Axis\\.table|axTicks|barplot|barplot\\.default|box|boxplot|boxplot\\.default|boxplot\\.formula|boxplot\\.matrix|bxp|cdplot|cdplot\\.default|cdplot\\.formula|clip|close\\.screen|co\\.intervals|contour|contour\\.default|coplot|curve|dotchart|erase\\.screen|filled\\.contour|fourfoldplot|frame|grconvertX|grconvertY|grid|hist|hist\\.Date|hist\\.default|hist\\.POSIXt|identify|identify\\.default|image|image\\.default|layout|layout\\.show|lcm|legend|lines|lines\\.default|lines\\.formula|lines\\.histogram|lines\\.table|locator|matlines|matplot|matpoints|mosaicplot|mosaicplot\\.default|mosaicplot\\.formula|mtext|pairs|pairs\\.default|pairs\\.formula|panel\\.smooth|par|persp|persp\\.default|pie|piechart|plot|plot\\.data.frame|plot\\.default|plot\\.design|plot\\.factor|plot\\.formula|plot\\.function|plot\\.histogram|plot\\.new|plot\\.raster|plot\\.table|plot\\.window|plot\\.xy|plotHclust|points|points\\.default|points\\.formula|points\\.table|polygon|polypath|rasterImage|rect|rug|screen|segments|smoothScatter|spineplot|spineplot\\.default|spineplot\\.formula|split\\.screen|stars|stem|strheight|stripchart|stripchart\\.default|stripchart\\.formula|strwidth|sunflowerplot|sunflowerplot\\.default|sunflowerplot\\.formula|symbols|text|text\\.default|text\\.formula|title|xinch|xspline|xyinch|yinch)\\s*(\\()", "captures": { "1": { "name": "support.function.r" } } }, { "match": "\\b(adjustcolor|anyNA\\.raster|as\\.graphicsAnnot|as\\.matrix.raster|as\\.raster|as\\.raster.array|as\\.raster.character|as\\.raster.logical|as\\.raster.matrix|as\\.raster.numeric|as\\.raster.raster|as\\.raster.raw|axisTicks|bitmap|bmp|boxplot\\.stats|c2to3|cairo_pdf|cairo_ps|cairoVersion|check_for_XQuartz|check_gs_type|check\\.options|checkFont|checkFont\\.CIDFont|checkFont\\.default|checkFont\\.Type1Font|checkFontInUse|checkIntFormat|checkQuartzFont|checkX11Font|chromaticAdaptation|chull|CIDFont|cm|cm\\.colors|col2rgb|colorConverter|colorRamp|colorRampPalette|colors|colours|contourLines|convertColor|densCols|dev\\.capabilities|dev\\.capture|dev\\.control|dev\\.copy|dev\\.copy2eps|dev\\.copy2pdf|dev\\.cur|dev\\.displaylist|dev\\.flush|dev\\.hold|dev\\.interactive|dev\\.list|dev\\.new|dev\\.next|dev\\.off|dev\\.prev|dev\\.print|dev\\.set|dev\\.size|dev2bitmap|devAskNewPage|deviceIsInteractive|embedFonts|extendrange|getGraphicsEvent|getGraphicsEventEnv|graphics\\.off|gray|gray\\.colors|grey|grey\\.colors|grSoftVersion|guessEncoding|hcl|heat\\.colors|hsv|initPSandPDFfonts|is\\.na.raster|is\\.raster|isPDF|jpeg|make\\.rgb|matchEncoding|matchEncoding\\.CIDFont|matchEncoding\\.Type1Font|matchFont|n2mfrow|nclass\\.FD|nclass\\.scott|nclass\\.Sturges|Ops\\.raster|palette|pdf|pdf\\.options|pdfFonts|pictex|png|postscript|postscriptFonts|prettyDate|print\\.colorConverter|print\\.raster|print\\.recordedplot|print\\.RGBcolorConverter|printFont|printFont\\.CIDFont|printFont\\.Type1Font|printFonts|ps\\.options|quartz|quartz\\.options|quartz\\.save|quartzFont|quartzFonts|rainbow|recordGraphics|recordPalette|recordPlot|replayPlot|restoreRecordedPlot|rgb|rgb2hsv|savePlot|seqDtime|setEPS|setFonts|setGraphicsEventEnv|setGraphicsEventHandlers|setPS|setQuartzFonts|setX11Fonts|svg|terrain\\.colors|tiff|topo\\.colors|trans3d|trunc_POSIXt|Type1Font|x11|X11|X11\\.options|X11Font|X11FontError|X11Fonts|xfig|xy\\.coords|xyTable|xyz\\.coords)\\s*(\\()", "captures": { "1": { "name": "support.function.r" } } }, { "match": "\\b(addNextMethod|allGenerics|allNames|Arith|as|asMethodDefinition|assignClassDef|assignMethodsMetaData|balanceMethodsList|bind_activation|cacheGenericsMetaData|cacheMetaData|cacheMethod|cacheOnAssign|callGeneric|callNextMethod|canCoerce|cbind|cbind2|checkAtAssignment|checkSlotAssignment|classesToAM|classGeneratorFunction|classLabel|classMetaName|className|coerce|Compare|completeClassDefinition|completeExtends|completeSubclasses|Complex|conformMethod|defaultDumpName|defaultPrototype|dispatchIsInternal|doPrimitiveMethod|dumpMethod|dumpMethods|el|elNamed|empty\\.dump|emptyMethodsList|envRefInferField|envRefSetField|evalOnLoad|evalqOnLoad|evalSource|existsFunction|existsMethod|extends|externalRefMethod|finalDefaultMethod|findClass|findFunction|findMethod|findMethods|findMethodSignatures|findUnique|fixPre1\\.8|formalArgs|fromNextMethod|functionBody|generic\\.skeleton|genericForBasic|getAccess|getAllMethods|getAllSuperClasses|getClass|getClassDef|getClasses|getClassName|getClassPackage|getDataPart|getExtends|getFunction|getGeneric|getGenericFromCall|getGenerics|getGroup|getGroupMembers|getLoadActions|getMethod|getMethods|getMethodsAndAccessors|getMethodsForDispatch|getMethodsMetaData|getPackageName|getProperties|getPrototype|getRefClass|getRefSuperClasses|getSlots|getSubclasses|getValidity|getVirtual|hasArg|hasLoadAction|hasMethod|hasMethods|implicitGeneric|inBasicFuns|inferProperties|inheritedSlotNames|inheritedSubMethodLists|initFieldArgs|initialize|initMethodDispatch|initRefFields|insertClassMethods|insertMethod|insertMethodInEmptyList|insertSource|installClassMethod|is|isBaseFun|isClass|isClassDef|isClassUnion|isGeneric|isGrammarSymbol|isGroup|isMixin|isRematched|isS3Generic|isSealedClass|isSealedMethod|isVirtualClass|isXS3Class|kronecker|languageEl|linearizeMlist|listFromMethods|listFromMlist|loadMethod|Logic|makeClassMethod|makeClassRepresentation|makeEnvRefMethods|makeExtends|makeGeneric|makeMethodsList|makePrototypeFromClassDef|makeStandardGeneric|matchDefaults|matchSignature|Math|Math2|mergeMethods|metaNameUndo|method\\.skeleton|MethodAddCoerce|methodSignatureMatrix|MethodsList|MethodsListSelect|methodsPackageMetaName|missingArg|mlistMetaName|multipleClasses|new|newBasic|newClassRepresentation|newEmptyObject|Ops|outerLabels|packageSlot|possibleExtends|print\\.MethodsList|printClassRepresentation|printPropertiesList|prohibitGeneric|promptClass|promptMethods|prototype|Quote|rbind|rbind2|reconcilePropertiesAndPrototype|refClassFields|refClassInformation|refClassMethods|refClassPrompt|refObjectClass|registerImplicitGenerics|rematchDefinition|removeClass|removeGeneric|removeMethod|removeMethods|removeMethodsObject|representation|requireMethods|resetClass|resetGeneric|S3Class|S3forS4Methods|S3Part|sealClass|seemsS4Object|selectMethod|selectSuperClasses|setAs|setCacheOnAssign|setClass|setClassUnion|setDataPart|setGeneric|setGenericImplicit|setGroupGeneric|setIs|setLoadAction|setLoadActions|setMethod|setNames|setOldClass|setPackageName|setPrimitiveMethods|setRefClass|setReplaceMethod|setValidity|show|showClass|showClassMethod|showDefault|showExtends|showExtraSlots|showMethods|showMlist|showRefClassDef|signature|SignatureMethod|sigToEnv|slot|slotNames|slotsFromS3|substituteDirect|substituteFunctionArgs|Summary|superClassDepth|superClassMethodName|tableNames|testInheritedMethods|testVirtual|traceOff|traceOn|tryNew|unRematchDefinition|useMTable|validObject|validSlotNames)\\s*(\\()", "captures": { "1": { "name": "support.function.r" } } }, { "match": "\\b(acf|acf2AR|add\\.name|add1|add1\\.default|add1\\.glm|add1\\.lm|add1\\.mlm|addmargins|aggregate|aggregate\\.data.frame|aggregate\\.default|aggregate\\.formula|aggregate\\.ts|AIC|AIC\\.default|AIC\\.logLik|alias|alias\\.formula|alias\\.lm|anova|anova\\.glm|anova\\.glmlist|anova\\.lm|anova\\.lmlist|anova\\.loess|anova\\.mlm|anova\\.mlmlist|anova\\.nls|anovalist\\.nls|ansari\\.test|ansari\\.test.default|ansari\\.test.formula|aov|approx|approxfun|ar|ar\\.burg|ar\\.burg.default|ar\\.burg.mts|ar\\.mle|ar\\.ols|ar\\.yw|ar\\.yw.default|ar\\.yw.mts|arima|arima\\.sim|arima0|arima0\\.diag|ARMAacf|ARMAtoMA|as\\.data.frame.aovproj|as\\.data.frame.ftable|as\\.data.frame.logLik|as\\.dendrogram|as\\.dendrogram.dendrogram|as\\.dendrogram.hclust|as\\.dist|as\\.dist.default|as\\.formula|as\\.hclust|as\\.hclust.default|as\\.hclust.dendrogram|as\\.hclust.twins|as\\.matrix.dist|as\\.matrix.ftable|as\\.stepfun|as\\.stepfun.default|as\\.stepfun.isoreg|as\\.table.ftable|as\\.ts|as\\.ts.default|asOneSidedFormula|ave|bandwidth\\.kernel|bartlett\\.test|bartlett\\.test.default|bartlett\\.test.formula|BIC|BIC\\.default|BIC\\.logLik|binom\\.test|binomial|biplot|biplot\\.default|biplot\\.prcomp|biplot\\.princomp|Box\\.test|bw_pair_cnts|bw\\.bcv|bw\\.nrd|bw\\.nrd0|bw\\.SJ|bw\\.ucv|C|cancor|case\\.names|case\\.names.default|case\\.names.lm|cbind\\.ts|ccf|check_exact|chisq\\.test|cmdscale|coef|coef\\.aov|coef\\.Arima|coef\\.default|coef\\.listof|coef\\.maov|coef\\.nls|coefficients|complete\\.cases|confint|confint\\.default|confint\\.glm|confint\\.lm|confint\\.nls|constrOptim|contr\\.helmert|contr\\.poly|contr\\.SAS|contr\\.sum|contr\\.treatment|contrasts|convolve|cooks\\.distance|cooks\\.distance.glm|cooks\\.distance.lm|cophenetic|cophenetic\\.default|cophenetic\\.dendrogram|cor|cor\\.test|cor\\.test.default|cor\\.test.formula|cov|cov\\.wt|cov2cor|covratio|cpgram|cut\\.dendrogram|cutree|cycle|cycle\\.default|cycle\\.ts|D|dbeta|dbinom|dcauchy|dchisq|decompose|delete\\.response|deltat|deltat\\.default|dendrapply|density|density\\.default|deriv|deriv\\.default|deriv\\.formula|deriv3|deriv3\\.default|deriv3\\.formula|deviance|deviance\\.default|deviance\\.glm|deviance\\.lm|deviance\\.mlm|deviance\\.nls|dexp|df|df\\.kernel|df\\.residual|df\\.residual.default|df\\.residual.nls|dfbeta|dfbeta\\.lm|dfbetas|dfbetas\\.lm|dffits|dgamma|dgeom|dhyper|diff\\.ts|diffinv|diffinv\\.default|diffinv\\.ts|diffinv\\.vector|dist|dlnorm|dlogis|dmultinom|dnbinom|dnorm|dpois|drop\\.name|drop\\.terms|drop1|drop1\\.default|drop1\\.glm|drop1\\.lm|drop1\\.mlm|dsignrank|dt|dummy\\.coef|dummy\\.coef.aovlist|dummy\\.coef.lm|dunif|dweibull|dwilcox|ecdf|eff\\.aovlist|effects|effects\\.glm|effects\\.lm|embed|end|end\\.default|estVar|estVar\\.mlm|estVar\\.SSD|expand\\.model.frame|extractAIC|extractAIC\\.aov|extractAIC\\.coxph|extractAIC\\.glm|extractAIC\\.lm|extractAIC\\.negbin|extractAIC\\.survreg|factanal|factanal\\.fit.mle|factor\\.name|family|family\\.glm|family\\.lm|fft|filter|fisher\\.test|fitted|fitted\\.default|fitted\\.isoreg|fitted\\.kmeans|fitted\\.nls|fitted\\.smooth.spline|fitted\\.values|fivenum|fligner\\.test|fligner\\.test.default|fligner\\.test.formula|format_perc|format\\.dist|format\\.ftable|format\\.perc|formula|formula\\.character|formula\\.data.frame|formula\\.default|formula\\.formula|formula\\.glm|formula\\.lm|formula\\.nls|formula\\.terms|frequency|frequency\\.default|friedman\\.test|friedman\\.test.default|friedman\\.test.formula|ftable|ftable\\.default|ftable\\.formula|Gamma|gaussian|get_all_vars|getCall|getCall\\.default|getInitial|getInitial\\.default|getInitial\\.formula|getInitial\\.selfStart|glm|glm\\.control|glm\\.fit|hasTsp|hat|hatvalues|hatvalues\\.lm|hatvalues\\.smooth.spline|hclust|heatmap|HL|HoltWinters|hyman_filter|identify\\.hclust|influence|influence\\.glm|influence\\.lm|influence\\.measures|integrate|interaction\\.plot|inverse\\.gaussian|IQR|is\\.empty.model|is\\.leaf|is\\.mts|is\\.stepfun|is\\.ts|is\\.tskernel|isoreg|KalmanForecast|KalmanLike|KalmanRun|KalmanSmooth|kernapply|kernapply\\.default|kernapply\\.ts|kernapply\\.tskernel|kernapply\\.vector|kernel|kmeans|knots|knots\\.stepfun|kruskal\\.test|kruskal\\.test.default|kruskal\\.test.formula|ks\\.test|ksmooth|labels\\.dendrogram|labels\\.dist|labels\\.lm|labels\\.terms|lag|lag\\.default|lag\\.plot|line|lines\\.isoreg|lines\\.stepfun|lines\\.ts|lm|lm\\.fit|lm\\.influence|lm\\.wfit|loadings|loess|loess\\.control|loess\\.smooth|logLik|logLik\\.Arima|logLik\\.glm|logLik\\.lm|logLik\\.logLik|logLik\\.nls|loglin|lowess|ls\\.diag|ls\\.print|lsfit|mad|mahalanobis|make\\.link|make\\.tables.aovproj|make\\.tables.aovprojlist|makeARIMA|makepredictcall|makepredictcall\\.default|makepredictcall\\.poly|manova|mantelhaen\\.test|mauchly\\.test|mauchly\\.test.mlm|mauchly\\.test.SSD|mcnemar\\.test|median|median\\.default|medpolish|merge\\.dendrogram|midcache\\.dendrogram|model\\.extract|model\\.frame|model\\.frame.aovlist|model\\.frame.default|model\\.frame.glm|model\\.frame.lm|model\\.matrix|model\\.matrix.default|model\\.matrix.lm|model\\.offset|model\\.response|model\\.tables|model\\.tables.aov|model\\.tables.aovlist|model\\.weights|monthplot|monthplot\\.default|monthplot\\.stl|monthplot\\.StructTS|monthplot\\.ts|mood\\.test|mood\\.test.default|mood\\.test.formula|mvfft|n\\.knots|na\\.action|na\\.action.default|na\\.contiguous|na\\.contiguous.default|na\\.exclude|na\\.exclude.data.frame|na\\.exclude.default|na\\.fail|na\\.fail.default|na\\.omit|na\\.omit.data.frame|na\\.omit.default|na\\.omit.ts|na\\.pass|napredict|napredict\\.default|napredict\\.exclude|naprint|naprint\\.default|naprint\\.exclude|naprint\\.omit|naresid|naresid\\.default|naresid\\.exclude|nextn|nleaves|nlm|nlminb|nls|nls_port_fit|nls\\.control|nlsModel|nlsModel\\.plinear|NLSstAsymptotic|NLSstAsymptotic\\.sortedXyData|NLSstClosestX|NLSstClosestX\\.sortedXyData|NLSstLfAsymptote|NLSstLfAsymptote\\.sortedXyData|NLSstRtAsymptote|NLSstRtAsymptote\\.sortedXyData|nobs|nobs\\.default|nobs\\.dendrogram|nobs\\.glm|nobs\\.lm|nobs\\.logLik|nobs\\.nls|numericDeriv|offset|oneway\\.test|Ops\\.ts|optim|optimHess|optimise|optimize|order\\.dendrogram|p\\.adjust|pacf|pacf\\.default|pairwise\\.prop.test|pairwise\\.t.test|pairwise\\.table|pairwise\\.wilcox.test|pbeta|pbinom|pbirthday|pcauchy|pchisq|pexp|pf|pgamma|pgeom|phyper|Pillai|plclust|plnorm|plogis|plot\\.acf|plot\\.decomposed.ts|plot\\.dendrogram|plot\\.density|plot\\.ecdf|plot\\.hclust|plot\\.HoltWinters|plot\\.isoreg|plot\\.lm|plot\\.medpolish|plot\\.mlm|plot\\.ppr|plot\\.prcomp|plot\\.princomp|plot\\.profile.nls|plot\\.spec|plot\\.spec.coherency|plot\\.spec.phase|plot\\.stepfun|plot\\.stl|plot\\.ts|plot\\.tskernel|plot\\.TukeyHSD|plotNode|plotNodeLimit|pnbinom|pnorm|pointwise|poisson|poisson\\.test|poly|polym|port_get_named_v|port_msg|power|power\\.anova.test|power\\.prop.test|power\\.t.test|PP\\.test|ppoints|ppois|ppr|ppr\\.default|ppr\\.formula|prcomp|prcomp\\.default|prcomp\\.formula|predict|predict\\.ar|predict\\.Arima|predict\\.arima0|predict\\.glm|predict\\.HoltWinters|predict\\.lm|predict\\.loess|predict\\.mlm|predict\\.nls|predict\\.poly|predict\\.ppr|predict\\.prcomp|predict\\.princomp|predict\\.smooth.spline|predict\\.smooth.spline.fit|predict\\.StructTS|predLoess|preplot|princomp|princomp\\.default|princomp\\.formula|print\\.acf|print\\.anova|print\\.aov|print\\.aovlist|print\\.ar|print\\.Arima|print\\.arima0|print\\.dendrogram|print\\.density|print\\.dist|print\\.dummy_coef|print\\.dummy_coef_list|print\\.ecdf|print\\.factanal|print\\.family|print\\.formula|print\\.ftable|print\\.glm|print\\.hclust|print\\.HoltWinters|print\\.htest|print\\.infl|print\\.integrate|print\\.isoreg|print\\.kmeans|print\\.lm|print\\.loadings|print\\.loess|print\\.logLik|print\\.medpolish|print\\.mtable|print\\.nls|print\\.pairwise.htest|print\\.power.htest|print\\.ppr|print\\.prcomp|print\\.princomp|print\\.smooth.spline|print\\.stepfun|print\\.stl|print\\.StructTS|print\\.summary.aov|print\\.summary.aovlist|print\\.summary.ecdf|print\\.summary.glm|print\\.summary.lm|print\\.summary.loess|print\\.summary.manova|print\\.summary.nls|print\\.summary.ppr|print\\.summary.prcomp|print\\.summary.princomp|print\\.tables_aov|print\\.terms|print\\.ts|print\\.tskernel|print\\.TukeyHSD|print\\.tukeyline|print\\.tukeysmooth|print\\.xtabs|printCoefmat|profile|profile\\.nls|profiler|profiler\\.nls|proj|proj\\.aov|proj\\.aovlist|proj\\.default|proj\\.lm|proj\\.matrix|promax|prop\\.test|prop\\.trend.test|psignrank|pt|ptukey|punif|pweibull|pwilcox|qbeta|qbinom|qbirthday|qcauchy|qchisq|qexp|qf|qgamma|qgeom|qhyper|qlnorm|qlogis|qnbinom|qnorm|qpois|qqline|qqnorm|qqnorm\\.default|qqplot|qr\\.lm|qsignrank|qt|qtukey|quade\\.test|quade\\.test.default|quade\\.test.formula|quantile|quantile\\.default|quantile\\.ecdf|quantile\\.POSIXt|quasi|quasibinomial|quasipoisson|qunif|qweibull|qwilcox|r2dtable|Rank|rbeta|rbinom|rcauchy|rchisq|read\\.ftable|rect\\.hclust|reformulate|regularize\\.values|relevel|relevel\\.default|relevel\\.factor|relevel\\.ordered|reorder|reorder\\.default|reorder\\.dendrogram|replications|reshape|resid|residuals|residuals\\.default|residuals\\.glm|residuals\\.HoltWinters|residuals\\.isoreg|residuals\\.lm|residuals\\.nls|residuals\\.smooth.spline|residuals\\.tukeyline|rev\\.dendrogram|rexp|rf|rgamma|rgeom|rhyper|rlnorm|rlogis|rmultinom|rnbinom|rnorm|Roy|rpois|rsignrank|rstandard|rstandard\\.glm|rstandard\\.lm|rstudent|rstudent\\.glm|rstudent\\.lm|rt|runif|runmed|rweibull|rwilcox|rWishart|safe_pchisq|safe_pf|scatter\\.smooth|screeplot|screeplot\\.default|sd|se\\.aov|se\\.aovlist|se\\.contrast|se\\.contrast.aov|se\\.contrast.aovlist|selfStart|selfStart\\.default|selfStart\\.formula|setNames|shapiro\\.test|sigma|sigma\\.default|sigma\\.mlm|simpleLoess|simulate|simulate\\.lm|smooth|smooth\\.spline|smoothEnds|sortedXyData|sortedXyData\\.default|spec\\.ar|spec\\.pgram|spec\\.taper|spectrum|sphericity|spl_coef_conv|spline|splinefun|splinefunH|splinefunH0|SSasymp|SSasympOff|SSasympOrig|SSbiexp|SSD|SSD\\.mlm|SSfol|SSfpl|SSgompertz|SSlogis|SSmicmen|SSweibull|start|start\\.default|stat\\.anova|step|stepfun|stl|str\\.dendrogram|str\\.logLik|StructTS|summary\\.aov|summary\\.aovlist|summary\\.ecdf|summary\\.glm|summary\\.infl|summary\\.lm|summary\\.loess|summary\\.manova|summary\\.mlm|summary\\.nls|summary\\.ppr|summary\\.prcomp|summary\\.princomp|summary\\.stepfun|summary\\.stl|summary\\.tukeysmooth|supsmu|symnum|t\\.test|t\\.test.default|t\\.test.formula|t\\.ts|termplot|terms|terms\\.aovlist|terms\\.default|terms\\.formula|terms\\.terms|Thin\\.col|Thin\\.row|time|time\\.default|time\\.ts|toeplitz|Tr|ts|ts\\.intersect|ts\\.plot|ts\\.union|tsdiag|tsdiag\\.Arima|tsdiag\\.arima0|tsdiag\\.StructTS|tsp|tsSmooth|tsSmooth\\.StructTS|TukeyHSD|TukeyHSD\\.aov|uniroot|update|update\\.default|update\\.formula|var|var\\.test|var\\.test.default|var\\.test.formula|variable\\.names|variable\\.names.default|variable\\.names.lm|varimax|vcov|vcov\\.Arima|vcov\\.glm|vcov\\.lm|vcov\\.mlm|vcov\\.nls|vcov\\.summary.glm|vcov\\.summary.lm|weighted\\.mean|weighted\\.mean.Date|weighted\\.mean.default|weighted\\.mean.difftime|weighted\\.mean.POSIXct|weighted\\.mean.POSIXlt|weighted\\.residuals|weights|weights\\.default|weights\\.glm|weights\\.nls|wilcox\\.test|wilcox\\.test.default|wilcox\\.test.formula|Wilks|window|window\\.default|window\\.ts|write\\.ftable|xtabs)\\s*(\\()", "captures": { "1": { "name": "support.function.r" } } }, { "match": "\\b(adist|alarm|apropos|aregexec|argNames|argsAnywhere|as\\.bibentry|as\\.bibentry.bibentry|as\\.bibentry.citation|as\\.character.person|as\\.character.roman|as\\.person|as\\.person.default|as\\.personList|as\\.personList.default|as\\.personList.person|as\\.relistable|as\\.roman|aspell|aspell_find_dictionaries|aspell_find_program|aspell_inspect_context|aspell_package|aspell_package_C_files|aspell_package_description|aspell_package_pot_files|aspell_package_R_files|aspell_package_Rd_files|aspell_package_vignettes|aspell_R_C_files|aspell_R_manuals|aspell_R_R_files|aspell_R_Rd_files|aspell_R_vignettes|aspell_write_personal_dictionary_file|assignInMyNamespace|assignInNamespace|attachedPackageCompletions|available\\.packages|bibentry|blank_out_ignores_in_lines|blank_out_regexp_matches|browseEnv|browseURL|browseVignettes|bug\\.report|bug\\.report.info|c\\.bibentry|c\\.person|capture\\.output|changedFiles|check_for_XQuartz|checkCRAN|chooseBioCmirror|chooseCRANmirror|citation|cite|citeNatbib|citEntry|citFooter|citHeader|close\\.socket|close\\.txtProgressBar|combn|compareVersion|contrib\\.url|correctFilenameToken|count\\.fields|CRAN\\.packages|create\\.post|data|data\\.entry|dataentry|de|de\\.ncols|de\\.restore|de\\.setup|debugcall|debugger|defaultUserAgent|demo|download\\.file|download\\.packages|dump\\.frames|edit|edit\\.data.frame|edit\\.default|edit\\.matrix|edit\\.vignette|emacs|example|expr2token|file_test|file\\.edit|fileCompletionPreferred|fileCompletions|fileSnapshot|filter_packages_by_depends_predicates|find|find_files_in_directories|findExactMatches|findFuzzyMatches|findGeneric|findLineNum|findMatches|fix|fixInNamespace|flush\\.console|fnLineNum|format\\.aspell|format\\.bibentry|format\\.citation|format\\.news_db|format\\.object_size|format\\.person|format\\.roman|formatOL|formatUL|functionArgs|fuzzyApropos|get_parse_data_for_message_strings|getAnywhere|getCRANmirrors|getDependencies|getFromNamespace|getIsFirstArg|getKnownS3generics|getParseData|getParseText|getRcode|getRcode\\.vignette|getS3method|getSrcDirectory|getSrcfile|getSrcFilename|getSrcLocation|getSrcref|getTxtProgressBar|glob2rx|globalVariables|hasName|head|head\\.data.frame|head\\.default|head\\.ftable|head\\.function|head\\.matrix|head\\.table|help|help\\.request|help\\.search|help\\.start|helpCompletions|history|hsearch_db|hsearch_db_concepts|hsearch_db_keywords|index\\.search|inFunction|install\\.packages|installed\\.packages|is\\.relistable|isBasePkg|isInsideQuotes|isS3method|isS3stdGeneric|keywordCompletions|limitedLabels|loadedPackageCompletions|loadhistory|localeToCharset|ls\\.str|lsf\\.str|maintainer|make_sysdata_rda|make\\.packages.html|make\\.socket|makeRegexpSafe|makeRweaveLatexCodeRunner|makeUserAgent|matchAvailableTopics|memory\\.limit|memory\\.size|menu|merge_demo_index|merge_vignette_index|methods|mirror2html|modifyList|new\\.packages|news|normalCompletions|nsl|object\\.size|offline_help_helper|old\\.packages|Ops\\.roman|package\\.skeleton|packageDescription|packageName|packageStatus|packageVersion|page|person|personList|pico|print\\.aspell|print\\.aspell_inspect_context|print\\.bibentry|print\\.Bibtex|print\\.browseVignettes|print\\.changedFiles|print\\.citation|print\\.fileSnapshot|print\\.findLineNumResult|print\\.getAnywhere|print\\.help_files_with_topic|print\\.hsearch|print\\.hsearch_db|print\\.Latex|print\\.ls_str|print\\.MethodsFunction|print\\.news_db|print\\.object_size|print\\.packageDescription|print\\.packageIQR|print\\.packageStatus|print\\.person|print\\.roman|print\\.sessionInfo|print\\.socket|print\\.summary.packageStatus|print\\.vignette|printhsearchInternal|process\\.events|prompt|prompt\\.data.frame|prompt\\.default|promptData|promptImport|promptPackage|rc\\.getOption|rc\\.options|rc\\.settings|rc\\.status|read\\.csv|read\\.csv2|read\\.delim|read\\.delim2|read\\.DIF|read\\.fortran|read\\.fwf|read\\.socket|read\\.table|readCitationFile|recover|registerNames|regquote|relist|relist\\.default|relist\\.factor|relist\\.list|relist\\.matrix|remove\\.packages|removeSource|rep\\.bibentry|rep\\.roman|resolvePkgType|Rprof|Rprof_memory_summary|Rprofmem|RShowDoc|RSiteSearch|rtags|rtags\\.file|Rtangle|RtangleFinish|RtangleRuncode|RtangleSetup|RtangleWritedoc|RweaveChunkPrefix|RweaveEvalWithOpt|RweaveLatex|RweaveLatexFinish|RweaveLatexOptions|RweaveLatexRuncode|RweaveLatexSetup|RweaveLatexWritedoc|RweaveTryStop|savehistory|select\\.list|sessionInfo|setBreakpoint|setIsFirstArg|setRepositories|setTxtProgressBar|shorten\\.to.string|simplifyRepos|sort\\.bibentry|specialCompletions|specialFunctionArgs|specialOpCompletionsHelper|specialOpLocs|stack|stack\\.data.frame|stack\\.default|Stangle|str|str\\.data.frame|str\\.Date|str\\.default|str\\.POSIXt|strcapture|strextract|strOptions|substr_with_tabs|summary\\.aspell|summary\\.packageStatus|summaryRprof|suppressForeignCheck|Sweave|SweaveGetSyntax|SweaveHooks|SweaveParseOptions|SweaveReadFile|SweaveSyntConv|tail|tail\\.data.frame|tail\\.default|tail\\.ftable|tail\\.function|tail\\.matrix|tail\\.table|tar|timestamp|toBibtex|toBibtex\\.bibentry|toBibtex\\.person|toLatex|toLatex\\.sessionInfo|topicName|txtProgressBar|type\\.convert|undebugcall|unique\\.bibentry|unlist\\.relistable|unstack|unstack\\.data.frame|unstack\\.default|untar|untar2|unzip|update\\.packages|update\\.packageStatus|upgrade|upgrade\\.packageStatus|url\\.show|URLdecode|URLencode|vi|View|vignette|write\\.csv|write\\.csv2|write\\.etags|write\\.socket|write\\.table|wsbrowser|xedit|xemacs|zip)\\s*(\\()", "captures": { "1": { "name": "support.function.r" } } } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/raku.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl%206.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5", "name": "raku", "scopeName": "source.perl.6", "patterns": [ { "begin": "^=begin", "end": "^=end", "name": "comment.block.perl" }, { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.perl" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.perl" } }, "end": "\\n", "name": "comment.line.number-sign.perl" } ] }, { "captures": { "1": { "name": "storage.type.class.perl.6" }, "3": { "name": "entity.name.type.class.perl.6" } }, "match": "(class|enum|grammar|knowhow|module|package|role|slang|subset)(\\s+)(((?:::|')?(?:([a-zA-Z_\\x{C0}-\\x{FF}\\$])([a-zA-Z0-9_\\x{C0}-\\x{FF}\\\\$]|[\\-'][a-zA-Z0-9_\\x{C0}-\\x{FF}\\$])*))+)", "name": "meta.class.perl.6" }, { "begin": "(?<=\\s)'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.single.perl", "patterns": [ { "match": "\\\\['\\\\]", "name": "constant.character.escape.perl" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.perl" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.perl" } }, "name": "string.quoted.double.perl", "patterns": [ { "match": "\\\\[abtnfre\"\\\\]", "name": "constant.character.escape.perl" } ] }, { "begin": "q(q|to|heredoc)*\\s*:?(q|to|heredoc)*\\s*/(.+)/", "end": "\\3", "name": "string.quoted.single.heredoc.perl" }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*{{", "end": "}}", "name": "string.quoted.double.heredoc.brace.perl", "patterns": [ { "include": "#qq_brace_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\(\\(", "end": "\\)\\)", "name": "string.quoted.double.heredoc.paren.perl", "patterns": [ { "include": "#qq_paren_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\[\\[", "end": "\\]\\]", "name": "string.quoted.double.heredoc.bracket.perl", "patterns": [ { "include": "#qq_bracket_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*{", "end": "}", "name": "string.quoted.single.heredoc.brace.perl", "patterns": [ { "include": "#qq_brace_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*/", "end": "/", "name": "string.quoted.single.heredoc.slash.perl", "patterns": [ { "include": "#qq_slash_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\(", "end": "\\)", "name": "string.quoted.single.heredoc.paren.perl", "patterns": [ { "include": "#qq_paren_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\\[", "end": "\\]", "name": "string.quoted.single.heredoc.bracket.perl", "patterns": [ { "include": "#qq_bracket_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*'", "end": "'", "name": "string.quoted.single.heredoc.single.perl", "patterns": [ { "include": "#qq_single_string_content" } ] }, { "begin": "(q|Q)(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*:?(x|exec|w|words|ww|quotewords|v|val|q|single|qq|double|s|scalar|a|array|h|hash|f|function|c|closure|b|blackslash|regexp|substr|trans|codes|p|path)*\\s*\"", "end": "\"", "name": "string.quoted.single.heredoc.double.perl", "patterns": [ { "include": "#qq_double_string_content" } ] }, { "match": "\\b\\$\\w+\\b", "name": "variable.other.perl" }, { "match": "\\b(macro|sub|submethod|method|multi|proto|only|rule|token|regex|category)\\b", "name": "storage.type.declare.routine.perl" }, { "match": "\\b(self)\\b", "name": "variable.language.perl" }, { "match": "\\b(use|require)\\b", "name": "keyword.other.include.perl" }, { "match": "\\b(if|else|elsif|unless)\\b", "name": "keyword.control.conditional.perl" }, { "match": "\\b(let|my|our|state|temp|has|constant)\\b", "name": "storage.type.variable.perl" }, { "match": "\\b(for|loop|repeat|while|until|gather|given)\\b", "name": "keyword.control.repeat.perl" }, { "match": "\\b(take|do|when|next|last|redo|return|contend|maybe|defer|default|exit|make|continue|break|goto|leave|async|lift)\\b", "name": "keyword.control.flowcontrol.perl" }, { "match": "\\b(is|as|but|trusts|of|returns|handles|where|augment|supersede)\\b", "name": "storage.modifier.type.constraints.perl" }, { "match": "\\b(BEGIN|CHECK|INIT|START|FIRST|ENTER|LEAVE|KEEP|UNDO|NEXT|LAST|PRE|POST|END|CATCH|CONTROL|TEMP)\\b", "name": "meta.function.perl" }, { "match": "\\b(die|fail|try|warn)\\b", "name": "keyword.control.control-handlers.perl" }, { "match": "\\b(prec|irs|ofs|ors|export|deep|binary|unary|reparsed|rw|parsed|cached|readonly|defequiv|will|ref|copy|inline|tighter|looser|equiv|assoc|required)\\b", "name": "storage.modifier.perl" }, { "match": "\\b(NaN|Inf)\\b", "name": "constant.numeric.perl" }, { "match": "\\b(oo|fatal)\\b", "name": "keyword.other.pragma.perl" }, { "match": "\\b(Object|Any|Junction|Whatever|Capture|MatchSignature|Proxy|Matcher|Package|Module|ClassGrammar|Scalar|Array|Hash|KeyHash|KeySet|KeyBagPair|List|Seq|Range|Set|Bag|Mapping|Void|UndefFailure|Exception|Code|Block|Routine|Sub|MacroMethod|Submethod|Regex|Str|str|Blob|Char|ByteCodepoint|Grapheme|StrPos|StrLen|Version|NumComplex|num|complex|Bit|bit|bool|True|FalseIncreasing|Decreasing|Ordered|Callable|AnyCharPositional|Associative|Ordering|KeyExtractorComparator|OrderingPair|IO|KitchenSink|RoleInt|int|int1|int2|int4|int8|int16|int32|int64Rat|rat|rat1|rat2|rat4|rat8|rat16|rat32|rat64Buf|buf|buf1|buf2|buf4|buf8|buf16|buf32|buf64UInt|uint|uint1|uint2|uint4|uint8|uint16|uint32uint64|Abstraction|utf8|utf16|utf32)\\b", "name": "support.type.perl6" }, { "match": "\\b(div|xx|x|mod|also|leg|cmp|before|after|eq|ne|le|lt|not|gt|ge|eqv|ff|fff|and|andthen|or|xor|orelse|extra|lcm|gcd)\\b", "name": "keyword.operator.perl" }, { "match": "(\\$|@|%|&)(\\*|:|!|\\^|~|=|\\?|(<(?=.+>)))?([a-zA-Z_\\x{C0}-\\x{FF}\\$])([a-zA-Z0-9_\\x{C0}-\\x{FF}\\$]|[\\-'][a-zA-Z0-9_\\x{C0}-\\x{FF}\\$])*", "name": "variable.other.identifier.perl.6" }, { "match": "\\b(eager|hyper|substr|index|rindex|grep|map|sort|join|lines|hints|chmod|split|reduce|min|max|reverse|truncate|zip|cat|roundrobin|classify|first|sum|keys|values|pairs|defined|delete|exists|elems|end|kv|any|all|one|wrap|shape|key|value|name|pop|push|shift|splice|unshift|floor|ceiling|abs|exp|log|log10|rand|sign|sqrt|sin|cos|tan|round|strand|roots|cis|unpolar|polar|atan2|pick|chop|p5chop|chomp|p5chomp|lc|lcfirst|uc|ucfirst|capitalize|normalize|pack|unpack|quotemeta|comb|samecase|sameaccent|chars|nfd|nfc|nfkd|nfkc|printf|sprintf|caller|evalfile|run|runinstead|nothing|want|bless|chr|ord|gmtime|time|eof|localtime|gethost|getpw|chroot|getlogin|getpeername|kill|fork|wait|perl|graphs|codes|bytes|clone|print|open|read|write|readline|say|seek|close|opendir|readdir|slurp|spurt|shell|run|pos|fmt|vec|link|unlink|symlink|uniq|pair|asin|atan|sec|cosec|cotan|asec|acosec|acotan|sinh|cosh|tanh|asinh|done|acos|acosh|atanh|sech|cosech|cotanh|sech|acosech|acotanh|asech|ok|nok|plan_ok|dies_ok|lives_ok|skip|todo|pass|flunk|force_todo|use_ok|isa_ok|diag|is_deeply|isnt|like|skip_rest|unlike|cmp_ok|eval_dies_ok|nok_error|eval_lives_ok|approx|is_approx|throws_ok|version_lt|plan|EVAL|succ|pred|times|nonce|once|signature|new|connect|operator|undef|undefine|sleep|from|to|infix|postfix|prefix|circumfix|postcircumfix|minmax|lazy|count|unwrap|getc|pi|e|context|void|quasi|body|each|contains|rewinddir|subst|can|isa|flush|arity|assuming|rewind|callwith|callsame|nextwith|nextsame|attr|eval_elsewhere|none|srand|trim|trim_start|trim_end|lastcall|WHAT|WHERE|HOW|WHICH|VAR|WHO|WHENCE|ACCEPTS|REJECTS|not|true|iterator|by|re|im|invert|flip|gist|flat|tree|is-prime|throws_like|trans)\\b", "name": "support.function.perl" } ], "repository": { "qq_brace_string_content": { "begin": "{", "end": "}", "patterns": [ { "include": "#qq_brace_string_content" } ] }, "qq_bracket_string_content": { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#qq_bracket_string_content" } ] }, "qq_double_string_content": { "begin": "\"", "end": "\"", "patterns": [ { "include": "#qq_double_string_content" } ] }, "qq_paren_string_content": { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#qq_paren_string_content" } ] }, "qq_single_string_content": { "begin": "'", "end": "'", "patterns": [ { "include": "#qq_single_string_content" } ] }, "qq_slash_string_content": { "begin": "\\\\/", "end": "\\\\/", "patterns": [ { "include": "#qq_slash_string_content" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/razor.tmLanguage.json ================================================ { "name": "razor", "scopeName": "text.aspnetcorerazor", "fileTypes": ["razor", "cshtml"], "patterns": [ { "include": "#razor-control-structures" }, { "include": "text.html.basic" } ], "repository": { "razor-control-structures": { "patterns": [ { "include": "#razor-comment" }, { "include": "#razor-codeblock" }, { "include": "#explicit-razor-expression" }, { "include": "#escaped-transition" }, { "include": "#directives" }, { "include": "#transitioned-csharp-control-structures" }, { "include": "#implicit-expression" } ] }, "escaped-transition": { "name": "constant.character.escape.razor.transition", "match": "@@" }, "transition": { "match": "@", "name": "keyword.control.cshtml.transition" }, "razor-codeblock": { "name": "meta.structure.razor.codeblock", "begin": "(@)(\\{)", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.codeblock.open" } }, "contentName": "source.cs", "patterns": [ { "include": "#razor-codeblock-body" } ], "end": "(\\})", "endCaptures": { "1": { "name": "keyword.control.razor.directive.codeblock.close" } } }, "razor-codeblock-body": { "patterns": [ { "include": "#text-tag" }, { "include": "#wellformed-html" }, { "include": "#razor-single-line-markup" }, { "include": "#razor-control-structures" }, { "include": "source.cs" } ] }, "razor-single-line-markup": { "match": "(\\@\\:)([^$]*)$", "captures": { "1": { "name": "keyword.control.razor.singleLineMarkup" }, "2": { "patterns": [ { "include": "#razor-control-structures" }, { "include": "text.html.basic" } ] } } }, "text-tag": { "begin": "(<text\\s*>)", "beginCaptures": { "1": { "name": "keyword.control.cshtml.transition.textTag.open" } }, "patterns": [ { "include": "#wellformed-html" }, { "include": "$self" } ], "end": "(</text>)", "endCaptures": { "1": { "name": "keyword.control.cshtml.transition.textTag.close" } } }, "razor-comment": { "name": "meta.comment.razor", "begin": "(@)(\\*)", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.comment.star" } }, "contentName": "comment.block.razor", "end": "(\\*)(@)", "endCaptures": { "1": { "name": "keyword.control.razor.comment.star" }, "2": { "patterns": [ { "include": "#transition" } ] } } }, "wellformed-html": { "patterns": [ { "include": "#void-tag" }, { "include": "#non-void-tag" } ] }, "void-tag": { "name": "meta.tag.structure.$3.void.html", "begin": "(?i)(<)(!)?(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)(?=\\s|/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "constant.character.escape.razor.tagHelperOptOut" }, "3": { "name": "entity.name.tag.html" } }, "patterns": [ { "include": "text.html.basic#attribute" } ], "end": "/?>", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.html" } } }, "non-void-tag": { "begin": "(?=<(!)?([^/\\s>]+)(\\s|/?>))", "end": "(</)(\\2)\\s*(>)|(/>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" }, "3": { "name": "punctuation.definition.tag.end.html" }, "4": { "name": "punctuation.definition.tag.end.html" } }, "patterns": [ { "begin": "(<)(!)?([^/\\s>]+)(?=\\s|/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "constant.character.escape.razor.tagHelperOptOut" }, "3": { "name": "entity.name.tag.html" } }, "end": "(?=/?>)", "patterns": [ { "include": "#razor-control-structures" }, { "include": "text.html.basic#attribute" } ] }, { "begin": ">", "beginCaptures": { "0": { "name": "punctuation.definition.tag.end.html" } }, "end": "(?=</)", "patterns": [ { "include": "#wellformed-html" }, { "include": "$self" } ] } ] }, "explicit-razor-expression": { "name": "meta.expression.explicit.cshtml", "begin": "(@)\\(", "beginCaptures": { "0": { "name": "keyword.control.cshtml" }, "1": { "patterns": [ { "include": "#transition" } ] } }, "patterns": [ { "include": "source.cs#expression" } ], "end": "\\)", "endCaptures": { "0": { "name": "keyword.control.cshtml" } } }, "implicit-expression": { "name": "meta.expression.implicit.cshtml", "contentName": "source.cs", "begin": "(?<![[:alpha:][:alnum:]])(@)", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] } }, "patterns": [ { "include": "#await-prefix" }, { "include": "#implicit-expression-body" } ], "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" }, "implicit-expression-body": { "patterns": [ { "include": "#implicit-expression-invocation-start" }, { "include": "#implicit-expression-accessor-start" } ], "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" }, "implicit-expression-invocation-start": { "begin": "([_[:alpha:]][_[:alnum:]]*)(?=\\()", "beginCaptures": { "1": { "name": "entity.name.function.cs" } }, "patterns": [ { "include": "#implicit-expression-continuation" } ], "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" }, "implicit-expression-accessor-start": { "begin": "([_[:alpha:]][_[:alnum:]]*)", "beginCaptures": { "1": { "name": "variable.other.object.cs" } }, "patterns": [ { "include": "#implicit-expression-continuation" } ], "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" }, "implicit-expression-continuation": { "patterns": [ { "include": "#balanced-parenthesis-csharp" }, { "include": "#balanced-brackets-csharp" }, { "include": "#implicit-expression-invocation" }, { "include": "#implicit-expression-accessor" }, { "include": "#implicit-expression-extension" } ], "end": "(?=[\\s<>\\{\\}\\)\\]'\"])" }, "implicit-expression-accessor": { "match": "(?<=\\.)[_[:alpha:]][_[:alnum:]]*", "name": "variable.other.object.property.cs" }, "implicit-expression-invocation": { "match": "(?<=\\.)[_[:alpha:]][_[:alnum:]]*(?=\\()", "name": "entity.name.function.cs" }, "implicit-expression-operator": { "patterns": [ { "include": "#implicit-expression-dot-operator" }, { "include": "#implicit-expression-null-conditional-operator" }, { "include": "#implicit-expression-null-forgiveness-operator" } ] }, "implicit-expression-dot-operator": { "match": "(\\.)(?=[_[:alpha:]][_[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.cs" } } }, "implicit-expression-null-conditional-operator": { "match": "(\\?)(?=[.\\[])", "captures": { "1": { "name": "keyword.operator.null-conditional.cs" } } }, "implicit-expression-null-forgiveness-operator": { "match": "(\\!)(?=(?:\\.[_[:alpha:]][_[:alnum:]]*)|\\?|[\\[\\(])", "captures": { "1": { "name": "keyword.operator.logical.cs" } } }, "balanced-parenthesis-csharp": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.parenthesis.open.cs" } }, "name": "razor.test.balanced.parenthesis", "patterns": [ { "include": "source.cs" } ], "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.parenthesis.close.cs" } } }, "balanced-brackets-csharp": { "begin": "(\\[)", "beginCaptures": { "1": { "name": "punctuation.squarebracket.open.cs" } }, "name": "razor.test.balanced.brackets", "patterns": [ { "include": "source.cs" } ], "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.squarebracket.close.cs" } } }, "directives": { "patterns": [ { "include": "#code-directive" }, { "include": "#functions-directive" }, { "include": "#page-directive" }, { "include": "#addTagHelper-directive" }, { "include": "#removeTagHelper-directive" }, { "include": "#tagHelperPrefix-directive" }, { "include": "#model-directive" }, { "include": "#inherits-directive" }, { "include": "#implements-directive" }, { "include": "#namespace-directive" }, { "include": "#inject-directive" }, { "include": "#attribute-directive" }, { "include": "#section-directive" }, { "include": "#layout-directive" }, { "include": "#using-directive" } ] }, "code-directive": { "begin": "(@)(code)\\s*", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.code" } }, "patterns": [ { "include": "#directive-codeblock" } ], "end": "(?<=})|\\s" }, "functions-directive": { "begin": "(@)(functions)\\s*", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.functions" } }, "patterns": [ { "include": "#directive-codeblock" } ], "end": "(?<=})|\\s" }, "directive-codeblock": { "begin": "(\\{)", "beginCaptures": { "1": { "name": "keyword.control.razor.directive.codeblock.open" } }, "name": "meta.structure.razor.directive.codeblock", "contentName": "source.cs", "patterns": [ { "include": "source.cs" } ], "end": "(\\})", "endCaptures": { "1": { "name": "keyword.control.razor.directive.codeblock.close" } } }, "page-directive": { "name": "meta.directive", "match": "(@)(page)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.page" }, "3": { "patterns": [ { "include": "source.cs#string-literal" } ] } } }, "addTagHelper-directive": { "name": "meta.directive", "match": "(@)(addTagHelper)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.addTagHelper" }, "3": { "patterns": [ { "include": "#tagHelper-directive-argument" } ] } } }, "removeTagHelper-directive": { "name": "meta.directive", "match": "(@)(removeTagHelper)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.removeTagHelper" }, "3": { "patterns": [ { "include": "#tagHelper-directive-argument" } ] } } }, "tagHelperPrefix-directive": { "name": "meta.directive", "match": "(@)(tagHelperPrefix)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.tagHelperPrefix" }, "3": { "patterns": [ { "include": "#tagHelper-directive-argument" } ] } } }, "tagHelper-directive-argument": { "patterns": [ { "include": "source.cs#string-literal" }, { "include": "#unquoted-string-argument" } ] }, "unquoted-string-argument": { "name": "string.quoted.double.cs", "match": "[^$]+" }, "model-directive": { "name": "meta.directive", "match": "(@)(model)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.model" }, "3": { "patterns": [ { "include": "source.cs#type" } ] } } }, "inherits-directive": { "name": "meta.directive", "match": "(@)(inherits)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.inherits" }, "3": { "patterns": [ { "include": "source.cs#type" } ] } } }, "implements-directive": { "name": "meta.directive", "match": "(@)(implements)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.implements" }, "3": { "patterns": [ { "include": "source.cs#type" } ] } } }, "layout-directive": { "name": "meta.directive", "match": "(@)(layout)\\s+([^$]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.layout" }, "3": { "patterns": [ { "include": "source.cs#type" } ] } } }, "namespace-directive": { "name": "meta.directive", "match": "(@)(namespace)\\s+([^\\s]+)?", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.namespace" }, "3": { "patterns": [ { "include": "#namespace-directive-argument" } ] } } }, "namespace-directive-argument": { "match": "([_[:alpha:]][_[:alnum:]]*)(\\.)?", "captures": { "1": { "name": "entity.name.type.namespace.cs" }, "2": { "name": "punctuation.accessor.cs" } } }, "inject-directive": { "name": "meta.directive", "match": "(@)(inject)\\s*([\\S\\s]+?)?\\s*([_[:alpha:]][_[:alnum:]]*)?\\s*(?=$)", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.inject" }, "3": { "patterns": [ { "include": "source.cs#type" } ] }, "4": { "name": "entity.name.variable.property.cs" } } }, "attribute-directive": { "name": "meta.directive", "begin": "(@)(attribute)\\b\\s+", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.attribute" } }, "patterns": [ { "include": "source.cs#attribute-section" } ], "end": "(?<=\\])|$" }, "section-directive": { "name": "meta.directive.block", "begin": "(@)(section)\\b\\s+([_[:alpha:]][_[:alnum:]]*)?", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.razor.directive.section" }, "3": { "name": "variable.other.razor.directive.sectionName" } }, "patterns": [ { "include": "#directive-markupblock" } ], "end": "(?<=})" }, "directive-markupblock": { "name": "meta.structure.razor.directive.markblock", "begin": "(\\{)", "beginCaptures": { "1": { "name": "keyword.control.razor.directive.codeblock.open" } }, "patterns": [ { "include": "$self" } ], "end": "(\\})", "endCaptures": { "1": { "name": "keyword.control.razor.directive.codeblock.close" } } }, "using-directive": { "name": "meta.directive", "match": "(@)(using)\\b\\s+(?!\\(|\\s)(.+?)?(;)?$", "captures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.other.using.cs" }, "3": { "patterns": [ { "include": "#using-static-directive" }, { "include": "#using-alias-directive" }, { "include": "#using-standard-directive" } ] }, "4": { "name": "keyword.control.razor.optionalSemicolon" } } }, "using-static-directive": { "match": "(static)\\b\\s+(.+)", "captures": { "1": { "name": "keyword.other.static.cs" }, "2": { "patterns": [ { "include": "source.cs#type" } ] } } }, "using-alias-directive": { "match": "([_[:alpha:]][_[:alnum:]]*)\\b\\s*(=)\\s*(.+)\\s*", "captures": { "1": { "name": "entity.name.type.alias.cs" }, "2": { "name": "keyword.operator.assignment.cs" }, "3": { "patterns": [ { "include": "source.cs#type" } ] } } }, "using-standard-directive": { "match": "([_[:alpha:]][_[:alnum:]]*)\\s*", "captures": { "1": { "name": "entity.name.type.namespace.cs" } } }, "transitioned-csharp-control-structures": { "patterns": [ { "include": "#using-statement" }, { "include": "#if-statement" }, { "include": "#else-part" }, { "include": "#foreach-statement" }, { "include": "#for-statement" }, { "include": "#while-statement" }, { "include": "#switch-statement" }, { "include": "#lock-statement" }, { "include": "#do-statement" }, { "include": "#try-statement" } ] }, "using-statement": { "name": "meta.statement.using.razor", "begin": "(?:^\\s*|(@))(using)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.other.using.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "if-statement": { "name": "meta.statement.if.razor", "begin": "(?:^\\s*|(@))(if)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.conditional.if.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "else-part": { "name": "meta.statement.else.razor", "begin": "(?:^|(?<=}))\\s*(else)\\b\\s*?(?: (if))?\\s*?(?=[\\n\\(\\{])", "beginCaptures": { "1": { "name": "keyword.control.conditional.else.cs" }, "2": { "name": "keyword.control.conditional.if.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "for-statement": { "name": "meta.statement.for.razor", "begin": "(?:^\\s*|(@))(for)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.loop.for.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "foreach-statement": { "name": "meta.statement.foreach.razor", "begin": "(?:^\\s*|(@)(await\\s+)?)(foreach)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "patterns": [ { "include": "#await-prefix" } ] }, "3": { "name": "keyword.control.loop.foreach.cs" } }, "patterns": [ { "include": "#foreach-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "foreach-condition": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b", "captures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "source.cs#type" } ] }, "7": { "name": "entity.name.variable.local.cs" }, "8": { "name": "keyword.control.loop.in.cs" } } }, { "match": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)?\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s+\n\\b(in)\\b", "captures": { "1": { "name": "keyword.other.var.cs" }, "2": { "patterns": [ { "include": "source.cs#tuple-declaration-deconstruction-element-list" } ] }, "3": { "name": "keyword.control.loop.in.cs" } } }, { "include": "source.cs#expression" } ] }, "do-statement": { "name": "meta.statement.do.razor", "begin": "(?:^\\s*|(@))(do)\\b\\s*", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.loop.do.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "while-statement": { "name": "meta.statement.while.razor", "begin": "(?:(@)|^\\s*|(?<=})\\s*)(while)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.loop.while.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})|(;)", "endCaptures": { "1": { "name": "punctuation.terminator.statement.cs" } } }, "switch-statement": { "name": "meta.statement.switch.razor", "begin": "(?:^\\s*|(@))(switch)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.switch.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#switch-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "switch-code-block": { "name": "meta.structure.razor.csharp.codeblock.switch", "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.curlybrace.open.cs" } }, "patterns": [ { "include": "source.cs#switch-label" }, { "include": "#razor-codeblock-body" } ], "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.curlybrace.close.cs" } } }, "lock-statement": { "name": "meta.statement.lock.razor", "begin": "(?:^\\s*|(@))(lock)\\b\\s*(?=\\()", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.other.lock.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "try-statement": { "patterns": [ { "include": "#try-block" }, { "include": "#catch-clause" }, { "include": "#finally-clause" } ] }, "try-block": { "name": "meta.statement.try.razor", "begin": "(?:^\\s*|(@))(try)\\b\\s*", "beginCaptures": { "1": { "patterns": [ { "include": "#transition" } ] }, "2": { "name": "keyword.control.try.cs" } }, "patterns": [ { "include": "#csharp-condition" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "catch-clause": { "name": "meta.statement.catch.razor", "begin": "(?:^|(?<=}))\\s*(catch)\\b\\s*?(?=[\\n\\(\\{])", "beginCaptures": { "1": { "name": "keyword.control.try.catch.cs" } }, "patterns": [ { "include": "#catch-condition" }, { "include": "source.cs#when-clause" }, { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "catch-condition": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.cs" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.cs" } }, "patterns": [ { "match": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?", "captures": { "1": { "patterns": [ { "include": "source.cs#type" } ] }, "6": { "name": "entity.name.variable.local.cs" } } } ] }, "finally-clause": { "name": "meta.statement.finally.razor", "begin": "(?:^|(?<=}))\\s*(finally)\\b\\s*?(?=[\\n\\{])", "beginCaptures": { "1": { "name": "keyword.control.try.finally.cs" } }, "patterns": [ { "include": "#csharp-code-block" }, { "include": "#razor-codeblock-body" } ], "end": "(?<=})" }, "await-prefix": { "name": "keyword.other.await.cs", "match": "(await)\\s+" }, "csharp-code-block": { "name": "meta.structure.razor.csharp.codeblock", "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.curlybrace.open.cs" } }, "patterns": [ { "include": "#razor-codeblock-body" } ], "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.curlybrace.close.cs" } } }, "csharp-condition": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.parenthesis.open.cs" } }, "patterns": [ { "include": "source.cs#local-variable-declaration" }, { "include": "source.cs#expression" }, { "include": "source.cs#punctuation-comma" }, { "include": "source.cs#punctuation-semicolon" } ], "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.parenthesis.close.cs" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/rdoc.tmLanguage.json ================================================ { "scopeName": "text.rdoc", "fileTypes": ["rdoc"], "patterns": [ { "match": "^\\s*(•).*$\\n?", "name": "meta.bullet-point.strong.text", "captures": { "1": { "name": "punctuation.definition.item.text" } } }, { "match": "^\\s*(·).*$\\n?", "name": "meta.bullet-point.light.text", "captures": { "1": { "name": "punctuation.definition.item.text" } } }, { "match": "^\\s*(\\*).*$\\n?", "name": "meta.bullet-point.star.text", "captures": { "1": { "name": "punctuation.definition.item.text" } } }, { "begin": "^([ \\t]*)(?=\\S)", "end": "^(?!\\1(?=\\S))", "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t( (https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)\n\t\t\t\t\t\t[-:@a-zA-Z0-9_.,~%+/?=&#]+(?<![.,?:])\n\t\t\t\t\t", "name": "markup.underline.link.text" } ], "contentName": "meta.paragraph.text" } ], "name": "RDoc", "uuid": "753B331D-F00D-435B-A7F5-3E6D311438D0" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/red.tmLanguage.json ================================================ { "name": "Red", "scopeName": "source.red", "uuid": "6BE0E13B-C4DD-478F-953A-2D84DBBCA2BA", "fileTypes": ["red", "reds"], "patterns": [ { "include": "#comments" }, { "include": "#type-literal" }, { "include": "#logic" }, { "include": "#strings" }, { "include": "#values" }, { "include": "#words" }, { "include": "#errors" } ], "repository": { "binary-base-sixty-four": { "begin": "64#\\{", "end": "\\}", "name": "string.other.base64.red", "patterns": [ { "include": "#comment-line" }, { "match": "[\\w+/=]+", "name": "constant.character.base64.red" } ] }, "binary-base-two": { "begin": "2#\\{", "end": "\\}", "name": "string.other.base2.red", "patterns": [ { "include": "#comment-line" }, { "match": "[01]+", "name": "constant.character.base2.red" } ] }, "binary-base-sixteen": { "begin": "(16)?#\\{", "end": "\\}", "name": "string.other.base16.red", "patterns": [ { "include": "#comment-line" }, { "match": "\\h+", "name": "constant.character.base16.red" } ] }, "block-blocks": { "begin": "(\\[)", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.red" } }, "end": "(\\])", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.red" } }, "name": "meta.group.block.red", "patterns": [ { "include": "$self" } ] }, "block-parens": { "begin": "\\(", "end": "\\)", "name": "meta.group.paren.red", "patterns": [ { "include": "$self" } ] }, "blocks": { "patterns": [ { "include": "#block-blocks" }, { "include": "#block-parens" } ] }, "character": { "begin": "#\"", "end": "\"", "name": "string.character.red", "patterns": [ { "include": "#character-inline" }, { "match": "[^\"^]", "name": "string.character.red" } ] }, "character-html": { "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } }, "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html" }, "character-inline": { "match": "\\^(\\((\\h{2,4}|[a-zA-Z]{3,6})\\)|.)", "name": "constant.character.red" }, "comment-line": { "match": ";([^%\\n]|%(?!>))*", "name": "comment.line.semicolon.red" }, "comment-multiline-block": { "begin": "comment\\s*\\[", "end": "\\]", "name": "comment.block.red", "patterns": [ { "include": "#comment-multiline-block-nested" } ] }, "comment-multiline-block-nested": { "begin": "\\[", "end": "\\]", "name": "comment.block.red", "patterns": [ { "include": "#comment-multiline-block-nested" } ] }, "comment-multiline-string": { "begin": "comment\\s*\\{", "end": "\\}", "name": "comment.block.red", "patterns": [ { "include": "#comment-multiline-string-nested" } ] }, "comment-multiline-string-nested": { "begin": "\\{", "end": "\\}", "name": "comment.block.red", "patterns": [ { "include": "#comment-multiline-string-nested" } ] }, "comment-tag": { "begin": "(?<=^|[\\s\\[\\]()}\"])<!--", "end": "-->", "name": "comment.block.tag.red" }, "comments": { "patterns": [ { "include": "#comment-shebang" }, { "include": "#comment-line" }, { "include": "#comment-multiline-string" }, { "include": "#comment-multiline-block" }, { "include": "#comment-tag" } ] }, "comments-shebang": { "match": "^#!/.*red.*", "name": "comment.line.shebang.red" }, "error-commas": { "match": ",", "name": "invalid.illegal.comma.red" }, "errors": { "patterns": [ { "include": "#error-commas" } ] }, "logic": { "match": "#\\[(true|false|none)\\]", "name": "constant.language.logic.red" }, "string-email": { "match": "[^\\s\\n:/\\[\\]()]+@[^\\s\\n:/\\[\\]()]+", "name": "string.email.red" }, "string-rawstring": { "begin": "(%+)\\{", "end": "\\}\\1", "name": "string.other.red" }, "string-file": { "match": "%[^\\s\\n\\[\\](){}]*", "name": "string.other.file.red" }, "string-file-quoted": { "begin": "%\"", "end": "\"", "name": "string.other.file.red", "patterns": [ { "match": "%\\h{2}", "name": "constant.character.hex.red" } ] }, "string-issue": { "match": "#[^\\s\\n\\[\\]()]*", "name": "string.other.issue.red" }, "string-ref": { "match": "(?<=^|[\\s()\\[\\]}/])@[^\\s\\n\\[\\](){}]+", "name": "string.other.tag.red" }, "string-multiline": { "begin": "\\{", "end": "\\}", "name": "string.other.red", "patterns": [ { "include": "#string-rsp-tag" }, { "include": "#character-inline" }, { "include": "#character-html" }, { "include": "#string-nested-multiline" } ] }, "string-nested-multiline": { "begin": "\\{", "end": "\\}", "name": "string.other.red", "patterns": [ { "include": "#string-nested-multiline" } ] }, "string-quoted": { "begin": "\"", "end": "\"", "name": "string.quoted.red", "patterns": [ { "include": "#string-rsp-tag" }, { "include": "#character-inline" }, { "include": "#character-html" } ] }, "string-rsp-tag": { "begin": "<%(==?|:|!)? ", "end": " %>", "name": "source.red.embedded.block.html", "patterns": [ { "include": "source.red" } ] }, "string-tag": { "begin": "<(?:/|%={0,2} |!)?(?:([\\w\\-]+):)?([\\w\\-:]+)", "captures": { "1": { "name": "entity.other.namespace.xml" }, "2": { "name": "entity.name.tag.xml" } }, "end": "(?:\\s/| %)?>", "name": "meta.tag.red", "patterns": [ { "captures": { "1": { "name": "entity.other.namespace.xml" }, "2": { "name": "entity.other.attribute-name.xml" } }, "match": " (?:([\\w-]+):)?([\\w-]+)" }, { "include": "#string-tag-double-quoted" }, { "include": "#string-tag-single-quoted" } ] }, "string-tag-double-quoted": { "begin": "\"", "end": "\"", "name": "string.quoted.double.xml" }, "string-tag-single-quoted": { "begin": "'", "end": "'", "name": "string.quoted.single.xml" }, "string-url": { "match": "[A-Za-z][\\w-]{1,15}:(/{0,3}[^\\s\\n\\[\\]()]+|//)", "name": "string.other.url.red" }, "strings": { "patterns": [ { "include": "#character" }, { "include": "#string-quoted" }, { "include": "#string-rawstring" }, { "include": "#string-multiline" }, { "include": "#string-tag" }, { "include": "#string-file-quoted" }, { "include": "#string-file" }, { "include": "#string-url" }, { "include": "#string-email" }, { "include": "#binary-base-two" }, { "include": "#binary-base-sixty-four" }, { "include": "#binary-base-sixteen" }, { "include": "#string-issue" }, { "include": "#string-ref" } ] }, "type-literal": { "begin": "#\\[(?:([\\w\\-]+!))", "captures": { "1": { "name": "keyword.control.datatype.red" } }, "end": "\\]", "name": "meta.literal.red", "patterns": [ { "include": "$self" } ] }, "value-date": { "match": "\\d{1,4}\\-(Jan(u(a(ry?)?)?)?|Feb(r(u(a(ry?)?)?)?)?|Mar(ch?)?|Apr(il?)?|May|June?|July?|Aug(u(st?)?)?|Sep(t(e(m(b(er?)?)?)?)?)?|Oct(o(b(er?)?)?)?|Nov(e(m(b(er?)?)?)?)?|Dec(e(m(b(er?)?)?)?)?|[1-9]|1[012])\\-\\d{1,4}(/\\d{1,2}[:]\\d{1,2}([:]\\d{1,2}(\\.\\d{1,5})?)?([+-]\\d{1,2}[:]\\d{1,2})?)?", "name": "constant.other.date.red" }, "value-money": { "match": "(?<!\\w)-?[a-zA-Z]*\\$\\d+(\\.\\d{2})?", "name": "constant.numeric.money.red" }, "value-number": { "match": "(?<![\\w.,])([-+]?((\\d+[\\d']*[.,]?[\\d']*)|([.,]\\d+[\\d']*))([eE](\\+|-)?\\d+)?)(?=\\W)", "name": "constant.numeric.red" }, "value-hex": { "match": "(?<!\\w)[0-9A-F]+[0-9A-F]*h(?=[\\s\\[\\](){\"]|$)", "name": "constant.numeric.hex.red" }, "value-pair": { "match": "(?<!\\w)[-+]?\\d+[xX][-+]?\\d+", "name": "constant.numeric.pair.red" }, "value-time": { "match": "[+-]?\\d+:\\d+(:\\d+(\\.\\d+)?)?", "name": "constant.numeric.time.red" }, "value-tuple": { "match": "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){2,9}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.?", "name": "constant.rgb-value.red" }, "values": { "patterns": [ { "include": "#value-date" }, { "include": "#value-time" }, { "include": "#value-tuple" }, { "include": "#value-number" }, { "include": "#value-hex" }, { "include": "#value-pair" }, { "include": "#value-money" } ] }, "word-datatype": { "match": "(?<=^|[\\s\\[\\]()}\"/])[A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*(/([A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-!?*+\\.`~&'^]*|[+-]?\\d+([xX][+-]?\\d+|[.,]\\d+([eE][+-]?\\d+)?)?))*\\!", "name": "storage.type.cs.red" }, "word-set": { "match": "[A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*(/([A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*|[+-]?\\d+([xX][+-]?\\d+|[.,]\\d+([eE][+-]?\\d+)?)?))*:", "name": "variable.name.red" }, "word-get": { "match": ":[A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*(/([A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*|[+-]?\\d+([xX][+-]?\\d+|[.,]\\d+([eE][+-]?\\d+)?)?)*)*", "name": "variable.other.getword.red" }, "word-header": { "match": "(?<=^\\[|^)(Red|Red(/System)?)(?=\\s*\\[)", "name": "keyword.control.header.red" }, "word-lit": { "match": "(?<=^|[\\s\\[\\]()}\"/])'[A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*(/([A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-?!*+\\.`~&'^]*|[+-]?\\d+([xX][+-]?\\d+|[.,]\\d+([eE][+-]?\\d+)?)?))*", "name": "constant.other.litword.red" }, "word-native": { "match": "(?<=^|[\\s\\[\\]()}\"])(datatype!|unset!|none!|logic!|block!|paren!|string!|file!|url!|char!|integer!|float!|word!|set-word!|lit-word!|get-word!|refinement!|issue!|native!|action!|op!|function!|path!|lit-path!|set-path!|get-path!|routine!|bitset!|point!|object!|typeset!|error!|vector!|hash!|pair!|percent!|tuple!|map!|binary!|series!|time!|tag!|email!|handle!|date!|image!|to|not|remove|while|collect|any|copy|insert|if|quote|set|case|change|clear|move|poke|put|random|reverse|sort|swap|take|trim|uppercase|lowercase|checksum|add|subtract|divide|on-parse-event|try|catch|multiply|browse|throw|math|event!|make|any-type!|return|reflect|form|mold|all|modify|absolute|number!|negate|power|remainder|round|even\\?|odd\\?|and~|complement|or~|xor~|append|at|back|any-object!|find|skip|last|tail|head|head\\?|index\\?|any-word!|length\\?|next|pick|scalar!|any-string!|select|any-function!|tail\\?|delete|query|read|source|as|write|unless|either|until|loop|repeat|forever|foreach|forall|remove-each|func|function|does|has|switch|do|expand|reduce|any-block!|compose|get|print|prin|equal\\?|not-equal\\?|strict-equal\\?|lesser\\?|greater\\?|lesser-or-equal\\?|greater-or-equal\\?|same\\?|type\\?|stats|show|bind|context|in|object|parse|input|union|unique|intersect|difference|exclude|complement\\?|dehex|negative\\?|positive\\?|max|min|shift|to-hex|sine|cosine|tangent|arcsine|arccosine|arctangent|arctangent2|NaN\\?|zero\\?|log-2|log-10|log-e|exp|square-root|construct|value\\?|as-pair|break|continue|exit|extend|debase|enbase|to-local-file|wait|unset|new-line|any-list!|new-line\\?|context\\?|set-env|get-env|list-env|now|sign\\?|any-path!|call|size\\?|decompress|recycle|transcode|on|off|quit|\\+|no|last-lf\\?|get-current-dir|dir|set-current-dir|make-dir|<|true|<>|%|<<|or|null|cause-error|view|unview|error\\?|quit-return|=|none|immediate!|all-word!|none\\?|any-block\\?|system|any-list\\?|word\\?|char\\?|tag\\?|any-string\\?|block\\?|series\\?|binary\\?|\\*|/|attempt|p-indent|newline|url\\?|string\\?|suffix\\?|file\\?|object\\?|body-of|yes|first|second|third|-|>|mod|<=|slash|clean-path|dir\\?|exists\\?|normalize-dir|empty\\?|dirize|create-dir|dbl-quote|to-red-file|space|offset\\?|what-dir|expand-directives|load|Red|split-path|change-dir|path-thru|save|load-thru|sum|to-local-date|false|float\\?|>=|charset|\\?|lf|tab|set-quiet|repend|set-word\\?|q|stop-reactor|words-of|replace|react|function\\?|spec-of|unset\\?|rebol|halt|op\\?|any-function\\?|to-paren|routine|as-color|as-rgba|\\*\\*|class-of|face!|rich-text|size-text|hex-to-rgb|tuple\\?|make-face|gui-console-ctx|debug-info\\?|find-flag\\?|draw|handle\\?|link-tabs-to-parent|link-sub-to-parent|on-face-deep-change\\*|update-font-faces|do-actor|do-safe|event\\?|do-events|white|font-fixed|font-sans-serif|font-serif|transparent|pair\\?|font!|foreach-face|cancel-captions|CR|LF|CRLF|pad|issue\\?|para!|alter|path\\?|typeset\\?|datatype\\?|set-flag|layout|extract|image\\?|rtd-layout|get-word\\?|to-logic|to-set-word|//|to-block|center-face|dump-face|scroller!|request-font|request-file|request-dir|rejoin|dot|ellipsize-at|any-object\\?|map\\?|keys-of|a-an|also|help-string|what|routine\\?|os-info|to-UTC-date|escape|ask|list-dir|probe|action\\?|native\\?|refinement\\?|to-word|comma|get-scroller|caret-to-offset|offset-to-caret|write-clipboard|read-clipboard|integer\\?|red-complete-ctx|highlight|to-string|fstk-logo|gray|shift-right|shift-left|shift-logical|as-ipv4|write-stdout|sp|crlf|pi|internal!|external!|default!|aqua|beige|black|blue|brick|brown|coal|coffee|crimson|cyan|forest|gold|green|ivory|khaki|leaf|linen|magenta|maroon|mint|navy|oldrab|olive|orange|papaya|pewter|pink|purple|reblue|rebolor|sienna|silver|sky|snow|tanned|teal|violet|water|wheat|yello|yellow|glass|alert|comment|\\?\\?|fourth|fifth|values-of|bitset\\?|email\\?|get-path\\?|hash\\?|lit-path\\?|lit-word\\?|logic\\?|paren\\?|percent\\?|set-path\\?|time\\?|date\\?|vector\\?|any-path\\?|any-word\\?|number\\?|immediate\\?|scalar\\?|all-word\\?|to-bitset|to-binary|to-char|to-email|to-file|to-float|to-get-path|to-get-word|to-hash|to-integer|to-issue|to-lit-path|to-lit-word|to-map|to-none|to-pair|to-path|to-percent|to-refinement|to-set-path|to-tag|to-time|to-typeset|to-tuple|to-unset|to-url|to-image|to-date|parse-trace|modulo|eval-set-path|extract-boot-args|flip-exe-flag|split|do-file|exists-thru\\?|read-thru|do-thru|cos|sin|tan|acos|asin|atan|atan2|sqrt|average|==|=\\?|>>|>>>|and|xor|reactor!|deep-reactor!|clear-reactions|dump-reactions|is|react\\?|preprocessor|within\\?|overlap\\?|distance\\?|face\\?|offset-to-char|metrics\\?|insert-event-func|remove-event-func|set-focus|help-ctx|help|fetch-help|about|ls|ll|pwd|cd|red-complete-input|tips!|self)((?=/[A-Za-z_=\\-?!*+\\.`~&^])|(?=[\\s\\[\\](){\"]|$))", "name": "storage.type.function.red" }, "word-native-reds": { "match": "(?<=^|[\\s\\[\\]()}\"])(\\?\\?|as|assert|size\\?|if|either|case|switch|until|while|loop|any|all|exit|return|break|continue|catch|declare|use|null|context|with|comment|true|false|func|function|alias)((?=/[A-Za-z_=\\-?!*+\\.`~&^])|(?=[\\s\\[\\](){\"]|$))", "name": "storage.type.function.reds.red" }, "word-parse": { "match": "(?<=^|[\\s\\[\\]()}\"])(thru|some|opt|end|into|ahead|then|fail|keep)(?=[\\s\\[\\](){\"]|$)", "name": "keyword.control.parse.red" }, "word-qm": { "match": "(?<=^|[\\s\\[\\]()}\"])(qm|route|render|redirect-to|publish|response|validate|verify|get-param|get-cookie|set-cookie|require)(/(?=[A-Za-z_=\\-?!*+\\.`~&^])|(?=[\\s\\[\\](){\"]))", "name": "keyword.control.qm.red" }, "word-refine": { "match": "/([A-Za-z_=\\-?!*+\\.`~&^][\\w=\\-!?*\\.`~&'^]*|[+-]?\\d+([xX][+-]?\\d+|[.,]\\d+([eE][+-]?\\d+)?)?)", "name": "constant.other.word.refinement.red" }, "words": { "name": "meta.word.red", "patterns": [ { "include": "#word-datatype" }, { "include": "#word-set" }, { "include": "#word-get" }, { "include": "#word-lit" }, { "include": "#word-header" }, { "include": "#word-native" }, { "include": "#word-native-reds" }, { "include": "#word-refine" }, { "include": "#word-parse" }, { "include": "#word-qm" }, { "include": "#word" } ] } }, "version": "https://github.com/yoyocat/red-vscode/commit/47c7f19488476299148785c1d39c32860abfaa5a" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/regexp-extended.tmLanguage.json ================================================ { "name": "Regular Expression (Extended)", "scopeName": "source.regexp.extended", "firstLineMatch": "^\\s*(?:/\\s*)?(\\(\\?\\^?[A-Za-wyz]*x[A-Za-z]*[-A-Za-wyz]*\\))", "patterns": [ { "include": "#main" } ], "repository": { "main": { "patterns": [ { "include": "#comment" }, { "include": "source.regexp#comment" }, { "include": "source.regexp#variable" }, { "include": "source.regexp#anchor" }, { "include": "source.regexp#escape" }, { "include": "source.regexp#wildcard" }, { "include": "source.regexp#alternation" }, { "include": "source.regexp#quantifier" }, { "include": "#assertion" }, { "include": "#conditional" }, { "include": "#group" }, { "include": "source.regexp#class" } ] }, "comment": { "name": "comment.line.number-sign.regexp", "begin": "#", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.regexp" } } }, "injection": { "begin": "(?:\\A|\\G)\\s*(?:/\\s*)?(\\(\\?\\^?[A-Za-wyz]*x[A-Za-z]*[-A-Za-wyz]*\\))", "end": "(?=A)B", "beginCaptures": { "1": { "patterns": [ { "include": "#group" } ] } }, "contentName": "source.embedded.regexp.extended", "patterns": [ { "include": "source.regexp.extended" } ] }, "calloutBrackets": { "begin": "{", "end": "}", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.curly.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.bracket.curly.end.regexp" } }, "patterns": [ { "include": "#calloutBrackets" }, { "include": "#main" } ] }, "assertion": { "patterns": [ { "name": "meta.assertion.positive.look-ahead.regexp", "begin": "\\(\\?=", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.assertion.negative.look-ahead.regexp", "begin": "\\(\\?!", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.assertion.negative.look-behind.regexp", "begin": "\\(\\?<!", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.assertion.positive.look-behind.regexp", "begin": "\\(\\?<=", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] } ] }, "conditional": { "name": "meta.conditional.regexp", "begin": "(\\()(\\?)(?=\\()", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.section.condition.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" } }, "endCaptures": { "0": { "name": "punctuation.section.condition.end.regexp" } }, "patterns": [ { "name": "punctuation.separator.condition.if-else.regexp", "match": "\\|" }, { "include": "#assertion" }, { "name": "meta.condition.function-call.regexp", "begin": "\\G\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.condition.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.section.condition.end.regexp" } }, "patterns": [ { "match": "\\GDEFINE", "name": "storage.type.function.subpattern.regexp" }, { "match": "\\Gassert", "name": "keyword.other.assertion.regexp" }, { "match": "\\G(?:(<)([^>]+)(>)|(')([^>]+)('))", "captures": { "1": { "name": "punctuation.definition.group-reference.bracket.angle.begin.regexp" }, "2": { "name": "entity.group.name.regexp" }, "3": { "name": "punctuation.definition.group-reference.bracket.angle.end.regexp" }, "4": { "name": "punctuation.definition.group-reference.quote.single.begin.regexp" }, "5": { "name": "entity.group.name.regexp" }, "6": { "name": "punctuation.definition.group-reference.quote.single.end.regexp" } } }, { "match": "\\G(R(&))(\\w+)", "captures": { "1": { "name": "keyword.other.recursion.specific.regexp" }, "2": { "name": "punctuation.definition.reference.regexp" }, "3": { "name": "entity.group.name.regexp" } } }, { "match": "\\GR\\d+", "name": "keyword.other.recursion.specific-group.regexp" }, { "match": "\\GR", "name": "keyword.other.recursion.overall.regexp" }, { "match": "\\G\\d+", "name": "keyword.other.reference.absolute.regexp" }, { "match": "\\G[-+]\\d+", "name": "keyword.other.reference.relative.regexp" }, { "match": "\\G\\w+", "name": "entity.group.name.regexp" } ] }, { "include": "#main" } ] }, "group": { "patterns": [ { "include": "source.regexp#fixedGroups" }, { "name": "meta.group.named.regexp", "begin": "\\(\\?(?=P?[<'])", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "contentName": "entity.group.name.regexp", "begin": "\\G(P?)(<)", "end": ">", "beginCaptures": { "1": { "name": "storage.type.function.named-group.regexp" }, "2": { "name": "punctuation.definition.named-group.bracket.angle.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.named-group.bracket.angle.end.regexp" } } }, { "contentName": "entity.group.name.regexp", "begin": "\\G'", "end": "'", "beginCaptures": { "0": { "name": "punctuation.definition.named-group.quote.single.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.named-group.quote.single.end.regexp" } } }, { "include": "#main" } ] }, { "name": "meta.group.non-capturing.regexp", "patterns": [ { "include": "#main" } ], "begin": "(\\(\\?)((?:y{[\\w]+}|[-A-Za-z^])*)(:)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "patterns": [ { "include": "source.regexp#scopedModifiers" } ] }, "3": { "name": "punctuation.separator.colon.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.group.atomic.regexp", "begin": "\\(\\?>", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.group.script-run.regexp", "begin": "(\\(\\*)((?:atomic_)?script_run|a?sr)(:)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.verb.regexp" }, "3": { "name": "punctuation.separator.colon.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.group.callout.contents.regexp", "begin": "(\\(\\?{1,2})({)", "end": "(?x)\n(}) # Last closing bracket\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\]))? # [tag]\n(X|<|>)? # Callout direction\n(?:[^\\)]*) # Silently skip unexpected characters\n(\\)) # Closing bracket", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "punctuation.definition.bracket.curly.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.bracket.curly.end.regexp" }, "2": { "name": "entity.name.tag.callout-tag.regexp" }, "3": { "name": "punctuation.definition.callout-tag.begin.regexp" }, "4": { "name": "callout-tag.constant.other.regexp" }, "5": { "name": "punctuation.definition.callout-tag.end.regexp" }, "6": { "name": "constant.language.callout-direction.regexp" }, "7": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#calloutBrackets" }, { "include": "#main" } ] }, { "name": "meta.group.callout.regexp", "begin": "(?x)\n(\\(\\*)\n([_A-Za-z][_A-Za-z0-9]*) # Name\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\]))? # [tag]\n({)", "end": "(?x)\n(})\n(?:[^\\)]*)\n(?:(\\))|(?=$))", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "entity.name.callout.regexp" }, "3": { "name": "entity.name.tag.callout-tag.regexp" }, "4": { "name": "punctuation.definition.callout-tag.begin.regexp" }, "5": { "name": "callout-tag.constant.other.regexp" }, "6": { "name": "punctuation.definition.callout-tag.end.regexp" }, "7": { "name": "punctuation.definition.arguments.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.regexp" }, "2": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" }, { "name": "variable.parameter.argument.regexp", "match": "[-\\w]+" } ] }, { "name": "meta.absent-function.regexp", "begin": "(\\()(\\?~)(\\|)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" }, "3": { "name": "punctuation.separator.delimiter.pipe.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "name": "punctuation.separator.delimiter.pipe.regexp", "match": "\\|" }, { "name": "variable.parameter.argument.regexp", "match": "[-\\w]+" }, { "include": "#main" } ] }, { "name": "meta.group.regexp", "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/regexp-javascript.tmLanguage.json ================================================ { "hideFromUser": true, "fileTypes": [], "repository": { "regex-character-class": { "patterns": [ { "match": "\\\\[wWsSdD]|\\.", "name": "constant.character.character-class.regexp" }, { "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)", "name": "constant.character.numeric.regexp" }, { "match": "\\\\c[A-Z]", "name": "constant.character.control.regexp" }, { "match": "\\\\.", "name": "constant.character.escape.backslash.regexp" } ] }, "regexp": { "patterns": [ { "match": "\\\\[bB]|\\^|\\$", "name": "keyword.control.anchor.regexp" }, { "match": "\\\\[1-9]\\d*", "name": "keyword.other.back-reference.regexp" }, { "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??", "name": "keyword.operator.quantifier.regexp" }, { "match": "\\|", "name": "keyword.operator.or.regexp" }, { "begin": "(\\()((\\?=)|(\\?!))", "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } }, "end": "(\\))", "patterns": [{ "include": "#regexp" }], "name": "meta.group.assertion.regexp", "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "3": { "name": "meta.assertion.look-ahead.regexp" }, "4": { "name": "meta.assertion.negative-look-ahead.regexp" } } }, { "begin": "\\((\\?:)?", "endCaptures": { "0": { "name": "punctuation.definition.group.regexp" } }, "end": "\\)", "patterns": [{ "include": "#regexp" }], "name": "meta.group.regexp", "beginCaptures": { "0": { "name": "punctuation.definition.group.regexp" } } }, { "begin": "(\\[)(\\^)?", "endCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" } }, "end": "(\\])", "patterns": [ { "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))", "name": "constant.other.character-class.range.regexp", "captures": { "3": { "name": "constant.character.escape.backslash.regexp" }, "1": { "name": "constant.character.numeric.regexp" }, "6": { "name": "constant.character.escape.backslash.regexp" }, "4": { "name": "constant.character.numeric.regexp" }, "2": { "name": "constant.character.control.regexp" }, "5": { "name": "constant.character.control.regexp" } } }, { "include": "#regex-character-class" } ], "name": "constant.other.character-class.set.regexp", "beginCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" }, "2": { "name": "keyword.operator.negation.regexp" } } }, { "include": "#regex-character-class" } ] } }, "uuid": "AC8679DE-3AC7-4056-84F9-69A7ADC29DDD", "patterns": [{ "include": "#regexp" }], "name": "Regular Expressions (JavaScript)", "scopeName": "source.js.regexp" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/regexp-posix.tmLanguage.json ================================================ { "name": "Regular Expression (POSIX - Extended)", "scopeName": "source.regexp.posix", "patterns": [ { "include": "#main" } ], "repository": { "main": { "patterns": [ { "include": "source.regexp#alternation" }, { "include": "source.regexp#wildcard" }, { "include": "#escape" }, { "include": "#brackets" }, { "include": "#bound" }, { "include": "#anchor" }, { "include": "#group" } ] }, "anchor": { "match": "\\^|\\$", "captures": { "0": { "patterns": [ { "include": "source.regexp#anchor" } ] } } }, "bound": { "patterns": [ { "match": "\\\\{," }, { "include": "source.regexp#quantifier" } ] }, "brackets": { "patterns": [ { "name": "meta.character-class.set.empty.regexp", "match": "(\\[)(\\])", "captures": { "1": { "name": "punctuation.definition.character-class.set.begin.regexp" }, "2": { "name": "punctuation.definition.character-class.set.end.regexp" } } }, { "name": "meta.character-class.set.regexp", "begin": "\\[", "end": "(?!\\G)-?\\]", "beginCaptures": { "0": { "name": "punctuation.definition.character-class.set.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.character-class.set.end.regexp" } }, "patterns": [ { "match": "\\G(\\^)(?:-|\\])?", "captures": { "1": { "patterns": [ { "include": "source.regexp#classInnards" } ] } } }, { "include": "#charRange" }, { "include": "#localeClasses" } ] } ] }, "charClass": { "name": "constant.language.$2-char.character-class.regexp.posix", "match": "(\\[:)(\\^?)(\\w+)(:\\])", "captures": { "1": { "name": "punctuation.definition.character-class.set.begin.regexp" }, "2": { "name": "keyword.operator.logical.not.regexp" }, "3": { "name": "support.constant.posix-class.regexp" }, "4": { "name": "punctuation.definition.character-class.set.end.regexp" } } }, "charRange": { "patterns": [ { "name": "invalid.illegal.range.ambiguous-endpoint.regexp", "match": "(?<=[^-])-[^\\[\\]\\\\]" }, { "name": "(?:[^\\]\\\\]|(?<=\\]))(-)(?:[^\\[\\]\\\\]|(?=[^\\\\[\\]\\\\]))", "captures": { "1": { "name": "punctuation.separator.range.dash.regexp" } } } ] }, "collatingElement": { "name": "constant.language.collating-element.regexp.posix", "match": "(\\[\\.)(.*?)(\\.\\])", "captures": { "1": { "name": "punctuation.definition.collating-element.set.begin.regexp" }, "2": { "name": "storage.type.var.regexp" }, "3": { "name": "punctuation.definition.collating-element.set.end.regexp" } } }, "equivalenceClass": { "name": "constant.language.posix.equivalence-class.regexp", "match": "(\\[=)(.*?)(=\\])", "captures": { "1": { "name": "punctuation.definition.class.begin.regexp" }, "2": { "name": "storage.type.class.regexp" }, "3": { "name": "punctuation.definition.class.end.regexp" } } }, "escape": { "patterns": [ { "include": "#escapeMeta" }, { "include": "#escapeOther" } ] }, "escapeMeta": { "name": "constant.character.escape.literal-metacharacter.regexp", "match": "\\\\[.^\\[$\\(\\)|*+?{\\\\]" }, "escapeOther": { "name": "constant.character.escape.misc.regexp", "match": "\\\\." }, "group": { "patterns": [ { "name": "meta.group.empty.regexp", "match": "(\\()(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.group.regexp", "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] } ] }, "localeClasses": { "patterns": [ { "include": "#collatingElement" }, { "include": "#equivalenceClass" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/regexp-python.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicRegExp.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/MagicStack/MagicPython/commit/c9b3409deb69acec31bbf7913830e93a046b30cc", "name": "MagicRegExp", "scopeName": "source.regexp.python", "patterns": [ { "include": "#regexp-expression" } ], "repository": { "regexp-base-expression": { "patterns": [ { "include": "#regexp-quantifier" }, { "include": "#regexp-base-common" } ] }, "fregexp-base-expression": { "patterns": [ { "include": "#fregexp-quantifier" }, { "include": "#fstring-formatting-braces" }, { "match": "\\{.*?\\}" }, { "include": "#regexp-base-common" } ] }, "fstring-formatting-braces": { "patterns": [ { "comment": "empty braces are illegal", "match": "({)(\\s*?)(})", "captures": { "1": { "name": "constant.character.format.placeholder.other.python" }, "2": { "name": "invalid.illegal.brace.python" }, "3": { "name": "constant.character.format.placeholder.other.python" } } }, { "name": "constant.character.escape.python", "match": "({{|}})" } ] }, "regexp-base-common": { "patterns": [ { "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", "match": "\\|" }, { "include": "#regexp-escape-sequence" } ] }, "regexp-quantifier": { "name": "keyword.operator.quantifier.regexp", "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n" }, "fregexp-quantifier": { "name": "keyword.operator.quantifier.regexp", "match": "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n" }, "regexp-backreference-number": { "name": "meta.backreference.regexp", "match": "(\\\\[1-9]\\d?)", "captures": { "1": { "name": "entity.name.tag.backreference.regexp" } } }, "regexp-backreference": { "name": "meta.backreference.named.regexp", "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", "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" } } }, "regexp-flags": { "name": "storage.modifier.flag.regexp", "match": "\\(\\?[aiLmsux]+\\)" }, "regexp-escape-special": { "name": "support.other.escape.special.regexp", "match": "\\\\([AbBdDsSwWZ])" }, "regexp-escape-character": { "name": "constant.character.escape.regexp", "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n" }, "regexp-escape-unicode": { "name": "constant.character.unicode.regexp", "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n" }, "regexp-escape-catchall": { "name": "constant.character.escape.regexp", "match": "\\\\(.|\\n)" }, "regexp-escape-sequence": { "patterns": [ { "include": "#regexp-escape-special" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-backreference-number" }, { "include": "#regexp-escape-catchall" } ] }, "regexp-charecter-set-escapes": { "patterns": [ { "name": "constant.character.escape.regexp", "match": "\\\\[abfnrtv\\\\]" }, { "include": "#regexp-escape-special" }, { "name": "constant.character.escape.regexp", "match": "\\\\([0-7]{1,3})" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-escape-catchall" } ] }, "codetags": { "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)", "captures": { "1": { "name": "keyword.codetag.notation.python" } } }, "regexp-expression": { "patterns": [ { "include": "#regexp-base-expression" }, { "include": "#regexp-character-set" }, { "include": "#regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#regexp-lookahead" }, { "include": "#regexp-lookahead-negative" }, { "include": "#regexp-lookbehind" }, { "include": "#regexp-lookbehind-negative" }, { "include": "#regexp-conditional" }, { "include": "#regexp-parentheses-non-capturing" }, { "include": "#regexp-parentheses" } ] }, "regexp-character-set": { "patterns": [ { "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" }, { "name": "meta.character.set.regexp", "begin": "(\\[)(\\^)?(\\])?", "end": "(\\])", "beginCaptures": { "1": { "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" }, "2": { "name": "keyword.operator.negation.regexp" }, "3": { "name": "constant.character.set.regexp" } }, "endCaptures": { "1": { "name": "punctuation.character.set.end.regexp constant.other.set.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-charecter-set-escapes" }, { "name": "constant.character.set.regexp", "match": "[^\\n]" } ] } ] }, "regexp-named-group": { "name": "meta.named.regexp", "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "end": "(\\))", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-comments": { "name": "comment.regexp", "begin": "\\(\\?#", "end": "(\\))", "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#codetags" } ] }, "regexp-lookahead": { "begin": "(\\()\\?=", "end": "(\\))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-lookahead-negative": { "begin": "(\\()\\?!", "end": "(\\))", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-lookbehind": { "begin": "(\\()\\?<=", "end": "(\\))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-lookbehind-negative": { "begin": "(\\()\\?<!", "end": "(\\))", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "end": "(\\))", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-parentheses-non-capturing": { "begin": "\\(\\?:", "end": "(\\))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] }, "regexp-parentheses": { "begin": "\\(", "end": "(\\))", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [ { "include": "#regexp-expression" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/regexp.tmLanguage.json ================================================ { "name": "Regular Expression", "scopeName": "source.regexp", "fileTypes": ["regexp", "regex"], "patterns": [ { "include": "source.regexp.extended#injection" }, { "include": "source.sy#injection" }, { "include": "#main" } ], "repository": { "main": { "patterns": [ { "include": "#comment" }, { "include": "#variable" }, { "include": "#anchor" }, { "include": "#escape" }, { "include": "#wildcard" }, { "include": "#alternation" }, { "include": "#quantifier" }, { "include": "#assertion" }, { "include": "#conditional" }, { "include": "#group" }, { "include": "#class" } ] }, "alternation": { "name": "keyword.operator.logical.or.regexp", "match": "\\|" }, "anchor": { "patterns": [ { "match": "\\^", "name": "keyword.control.anchor.line-start.regexp" }, { "match": "\\$", "name": "keyword.control.anchor.line-end.regexp" }, { "match": "\\\\A", "name": "keyword.control.anchor.string-start.regexp" }, { "match": "\\\\Z", "name": "keyword.control.anchor.string-end-line.regexp" }, { "match": "\\\\z", "name": "keyword.control.anchor.string-end.regexp" }, { "match": "\\\\G", "name": "keyword.control.anchor.search-start.regexp" }, { "name": "meta.unicode-boundary.regexp", "match": "(?:(\\\\b)|(\\\\B))(\\{)(\\w+)(})", "captures": { "1": { "name": "keyword.control.anchor.word-boundary.regexp" }, "2": { "name": "keyword.control.anchor.non-word-boundary.regexp" }, "3": { "name": "punctuation.definition.unicode-boundary.bracket.curly.begin.regexp" }, "4": { "name": "entity.property.name.regexp" }, "5": { "name": "punctuation.definition.unicode-boundary.bracket.curly.end.regexp" } } }, { "match": "\\\\b", "name": "keyword.control.anchor.word-boundary.regexp" }, { "match": "\\\\B", "name": "keyword.control.anchor.non-word-boundary.regexp" } ] }, "assertion": { "patterns": [ { "name": "meta.assertion.positive.look-ahead.regexp", "begin": "\\(\\?=", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.assertion.negative.look-ahead.regexp", "begin": "\\(\\?!", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.assertion.negative.look-behind.regexp", "begin": "\\(\\?<!", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.assertion.positive.look-behind.regexp", "begin": "\\(\\?<=", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.assertion.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.assertion.end.regexp" } }, "patterns": [ { "include": "#main" } ] } ] }, "calloutBrackets": { "begin": "{", "end": "}", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.curly.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.bracket.curly.end.regexp" } }, "patterns": [ { "include": "#calloutBrackets" }, { "include": "#main" } ] }, "class": { "name": "meta.character-class.set.regexp", "begin": "\\[", "end": "\\]", "beginCaptures": { "0": { "name": "punctuation.definition.character-class.set.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.character-class.set.end.regexp" } }, "patterns": [ { "include": "#classInnards" } ] }, "classInnards": { "patterns": [ { "name": "keyword.operator.logical.not.regexp", "match": "\\G\\^" }, { "name": "constant.character.escape.backspace.regexp", "match": "\\\\b" }, { "begin": "(&&)(\\[)", "end": "\\]", "beginCaptures": { "1": { "name": "keyword.operator.logical.intersect.regexp" }, "2": { "name": "punctuation.definition.character-class.set.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.character-class.set.end.regexp" } }, "patterns": [ { "include": "#classInnards" } ] }, { "name": "keyword.operator.logical.intersect.regexp", "match": "&&" }, { "name": "punctuation.separator.range.dash.regexp", "match": "(?<!\\G|\\\\[dwshDWSHN])-(?!\\])" }, { "include": "source.regexp.posix#charClass" }, { "name": "constant.character.escape.backslash.regexp", "match": "\\\\\\[|\\\\\\]" }, { "match": "\\^|\\$|\\(|\\)|\\[" }, { "include": "#escape" }, { "include": "#main" }, { "name": "constant.single.character.character-class.regexp", "match": "[^\\]]" } ] }, "comment": { "begin": "\\(\\?#", "end": "\\)", "name": "comment.block.regexp", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.backslash.regexp" } ] }, "conditional": { "name": "meta.conditional.regexp", "begin": "(\\()(\\?)(?=\\()", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.section.condition.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" } }, "endCaptures": { "0": { "name": "punctuation.section.condition.end.regexp" } }, "patterns": [ { "name": "punctuation.separator.condition.if-else.regexp", "match": "\\|" }, { "include": "#assertion" }, { "name": "meta.condition.function-call.regexp", "begin": "\\G\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.condition.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.section.condition.end.regexp" } }, "patterns": [ { "match": "\\GDEFINE", "name": "storage.type.function.subpattern.regexp" }, { "match": "\\Gassert", "name": "keyword.other.assertion.regexp" }, { "match": "\\G(?:(<)([^>]+)(>)|(')(['>]+)('))", "captures": { "1": { "name": "punctuation.definition.group-reference.bracket.angle.begin.regexp" }, "2": { "name": "entity.group.name.regexp" }, "3": { "name": "punctuation.definition.group-reference.bracket.angle.end.regexp" }, "4": { "name": "punctuation.definition.group-reference.quote.single.begin.regexp" }, "5": { "name": "entity.group.name.regexp" }, "6": { "name": "punctuation.definition.group-reference.quote.single.end.regexp" } } }, { "match": "\\G(R(&))(\\w+)", "captures": { "1": { "name": "keyword.other.recursion.specific.regexp" }, "2": { "name": "punctuation.definition.reference.regexp" }, "3": { "name": "entity.group.name.regexp" } } }, { "match": "\\GR\\d+", "name": "keyword.other.recursion.specific-group.regexp" }, { "match": "\\GR", "name": "keyword.other.recursion.overall.regexp" }, { "match": "\\G\\d+", "name": "keyword.other.reference.absolute.regexp" }, { "match": "\\G[-+]\\d+", "name": "keyword.other.reference.relative.regexp" }, { "match": "\\G\\w+", "name": "entity.group.name.regexp" } ] }, { "include": "#main" } ] }, "escape": { "patterns": [ { "match": "\\\\d", "name": "constant.character.escape.decimal.regexp" }, { "match": "\\\\s", "name": "constant.character.escape.whitespace.regexp" }, { "match": "\\\\w", "name": "constant.character.escape.word-char.regexp" }, { "match": "\\\\n", "name": "constant.character.escape.newline.regexp" }, { "match": "\\\\t", "name": "constant.character.escape.tab.regexp" }, { "match": "\\\\r", "name": "constant.character.escape.return.regexp" }, { "match": "\\\\D", "name": "constant.character.escape.non-decimal.regexp" }, { "match": "\\\\S", "name": "constant.character.escape.non-whitespace.regexp" }, { "match": "\\\\W", "name": "constant.character.escape.non-word-char.regexp" }, { "match": "\\\\a", "name": "constant.character.escape.alarm.regexp" }, { "match": "\\\\e", "name": "constant.character.escape.escape-char.regexp" }, { "match": "\\\\f", "name": "constant.character.escape.form-feed.regexp" }, { "match": "\\\\v", "name": "constant.character.escape.vertical-tab.regexp" }, { "match": "\\\\x[0-9A-Fa-f]{2}", "name": "constant.character.escape.numeric.regexp" }, { "name": "meta.character-escape.hex.regexp", "match": "(\\\\x)({)([0-9A-Fa-f]+(?>\\s+[0-9A-Fa-f]+)*)\\s*(})", "captures": { "1": { "name": "keyword.operator.unicode-escape.hex.regexp" }, "2": { "name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp" }, "3": { "patterns": [ { "match": "\\S+", "name": "constant.numeric.codepoint.hex.regexp" } ] }, "4": { "name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp" } } }, { "name": "meta.character-escape.octal.regexp", "match": "(\\\\o)({)([0-7]+(?>\\s+[0-7]+)*)\\s*(})", "captures": { "1": { "name": "keyword.operator.unicode-escape.octal.regexp" }, "2": { "name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp" }, "3": { "patterns": [ { "match": "\\S+", "name": "constant.numeric.codepoint.octal.regexp" } ] }, "4": { "name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp" } } }, { "name": "meta.unicode-property.regexp", "match": "(\\\\[Pp])(\\{)(\\^?)([^{}]+)(\\})", "captures": { "1": { "name": "keyword.operator.unicode-property.regexp" }, "2": { "name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp" }, "3": { "name": "keyword.operator.logical.not.regexp" }, "4": { "name": "entity.property.name.regexp", "patterns": [ { "include": "#propInnards" } ] }, "5": { "name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp" } } }, { "name": "meta.unicode-property.single-letter.regexp", "match": "(\\\\[Pp])(\\w)", "captures": { "1": { "name": "keyword.operator.unicode-property.regexp" }, "2": { "name": "entity.property.name.regexp" } } }, { "name": "meta.group-reference.regexp", "contentName": "entity.group.name.regexp", "patterns": [ { "include": "#groupRefInnards" } ], "begin": "(\\\\[kg])(<)", "end": ">", "beginCaptures": { "1": { "name": "keyword.operator.group-reference.regexp" }, "2": { "name": "punctuation.definition.group-reference.bracket.angle.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group-reference.bracket.angle.end.regexp" } } }, { "name": "meta.group-reference.regexp", "contentName": "entity.group.name.regexp", "patterns": [ { "include": "#groupRefInnards" } ], "begin": "(\\\\[kg])(')", "end": "'", "beginCaptures": { "1": { "name": "keyword.operator.group-reference.regexp" }, "2": { "name": "punctuation.definition.group-reference.quote.single.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group-reference.quote.single.end.regexp" } } }, { "name": "meta.group-reference.regexp", "contentName": "entity.group.name.regexp", "begin": "(\\\\[kg])({)", "end": "}", "beginCaptures": { "1": { "name": "keyword.operator.group-reference.regexp" }, "2": { "name": "punctuation.definition.group-reference.bracket.curly.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group-reference.bracket.curly.end.regexp" } } }, { "name": "meta.group-reference.single-letter.regexp", "match": "(\\\\g)(\\d)", "captures": { "1": { "name": "keyword.operator.group-reference.regexp" }, "2": { "name": "entity.group.name.regexp" } } }, { "name": "meta.named-char.regexp", "match": "(\\\\N)(\\{)([^{}]+)(\\})", "captures": { "1": { "name": "keyword.operator.named-char.regexp" }, "2": { "name": "punctuation.definition.unicode-escape.bracket.curly.begin.regexp" }, "3": { "name": "entity.character.name.regexp", "patterns": [ { "name": "punctuation.separator.colon.regexp", "match": ":" }, { "name": "punctuation.separator.codepoint.regexp", "match": "(?<=U)\\+(?=[A-Fa-f0-9])" } ] }, "4": { "name": "punctuation.definition.unicode-escape.bracket.curly.end.regexp" } } }, { "name": "meta.quoted-chars.regexp", "begin": "\\\\Q(?=.*?\\\\E)", "end": "\\\\E", "contentName": "markup.raw.verbatim.string.regexp", "beginCaptures": { "0": { "name": "keyword.control.quote-mode.begin.regexp" } }, "endCaptures": { "0": { "name": "keyword.control.quote-mode.end.regexp" } } }, { "match": "\\\\(?:\\d{3}|0\\d)", "name": "constant.character.escape.octal.numeric.regexp" }, { "match": "\\\\0", "name": "constant.character.escape.null-byte.numeric.regexp" }, { "match": "\\\\(\\d{1,2})", "name": "keyword.other.back-reference.$1.regexp" }, { "match": "\\\\(?:c|C-)[?-_]", "name": "constant.character.escape.control-char.regexp" }, { "match": "\\\\h", "name": "constant.character.escape.hex-digit.regexp" }, { "match": "\\\\H", "name": "constant.character.escape.non-hex-digit.regexp" }, { "match": "\\\\E", "name": "keyword.control.end-mode.regexp" }, { "match": "\\\\Q", "name": "keyword.control.quote-mode.regexp" }, { "match": "\\\\F", "name": "keyword.control.foldcase-mode.regexp" }, { "match": "\\\\L", "name": "keyword.control.lowercase-mode.regexp" }, { "match": "\\\\U", "name": "keyword.control.titlecase-mode.regexp" }, { "match": "\\\\K", "name": "keyword.control.keep-out.regexp" }, { "match": "\\\\l", "name": "constant.character.escape.lowercase-next.regexp" }, { "match": "\\\\u", "name": "constant.character.escape.titlecase-next.regexp" }, { "match": "\\\\N", "name": "constant.character.escape.non-newline.regexp" }, { "match": "\\\\X", "name": "constant.character.escape.extended-grapheme.regexp" }, { "match": "\\\\R", "name": "constant.character.escape.linebreak-grapheme.regexp" }, { "match": "\\\\V", "name": "constant.character.escape.non-vertical-whitespace.regexp" }, { "match": "\\\\M-\\\\C-[?-_]", "name": "constant.character.escape.meta-control.regexp" }, { "match": "\\\\M-.", "name": "constant.character.escape.meta-char.regexp" }, { "match": "\\\\O", "name": "constant.character.escape.any-char.regexp" }, { "match": "\\\\[yY]", "name": "keyword.control.anchor.text-boundary.regexp" }, { "match": "\\\\.", "name": "constant.character.escape.misc.regexp" } ] }, "fixedGroups": { "patterns": [ { "name": "meta.group-reference.reset.regexp", "match": "(\\()(\\?[R0])(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.other.back-reference.regexp" }, "3": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.group.scoped-modifiers.regexp", "match": "(\\(\\?)((?:y{[\\w]+}|[-A-Za-z^])*)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "patterns": [ { "include": "#scopedModifiers" } ] }, "3": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.control-verb.regexp", "match": "(\\(\\*)(\\w*)(?:([:=])([^\\s()]*))?(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.verb.regexp" }, "3": { "name": "punctuation.separator.key-value.regexp" }, "4": { "name": "variable.parameter.control-verb.regexp" }, "5": { "name": "punctuation.definition.group.begin.regexp" } } }, { "name": "meta.group-reference.named.regexp", "match": "(\\()(\\?(?:&|P[>=]))(\\w+)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.other.back-reference.regexp" }, "3": { "name": "entity.group.name.regexp" }, "4": { "name": "punctuation.definition.group.begin.regexp" } } }, { "name": "meta.group-reference.relative.regexp", "match": "(\\()(\\?[-+]\\d+)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.other.back-reference.regexp" }, "3": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.callout.regexp", "match": "(\\()(\\?C\\d*)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.callout.regexp" }, "3": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.callout.regexp", "match": "(?x)\n(\\(\\*)\n([_A-Za-z][_A-Za-z0-9]*) # Name\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\])) # [tag]\n(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "entity.name.callout.regexp" }, "3": { "name": "entity.name.tag.callout-tag.regexp" }, "4": { "name": "punctuation.definition.callout-tag.begin.regexp" }, "5": { "name": "callout-tag.constant.other.regexp" }, "6": { "name": "punctuation.definition.callout-tag.end.regexp" }, "7": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.absent-function.clear-range.regexp", "match": "(\\()(\\?~)(\\|)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" }, "3": { "name": "punctuation.separator.delimiter.pipe.regexp" }, "4": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.absent-stopper.regexp", "match": "(\\()(\\?~)(\\|)([^|\\)]*)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" }, "3": { "name": "punctuation.separator.delimiter.pipe.regexp" }, "4": { "name": "variable.parameter.absent-function.regexp", "patterns": [ { "include": "#main" } ] }, "5": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.absent-expression.regexp", "match": "(?x)\n(\\()\n(\\?~)\n(\\|) ([^|\\)]*)\n(\\|) ([^|\\)]*)\n(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" }, "3": { "name": "punctuation.separator.delimiter.pipe.regexp" }, "4": { "name": "variable.parameter.absent-function.regexp", "patterns": [ { "include": "#main" } ] }, "5": { "name": "punctuation.separator.delimiter.pipe.regexp" }, "6": { "name": "variable.parameter.absent-function.regexp", "patterns": [ { "include": "#main" } ] }, "7": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.absent-repeater.regexp", "match": "(\\()(\\?~)([^|\\)]*)(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" }, "3": { "name": "variable.parameter.absent-function.regexp", "patterns": [ { "include": "#main" } ] }, "4": { "name": "punctuation.definition.group.end.regexp" } } } ] }, "group": { "patterns": [ { "include": "#fixedGroups" }, { "name": "meta.group.named.regexp", "begin": "\\(\\?(?=P?[<'])", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "contentName": "entity.group.name.regexp", "begin": "\\G(P?)(<)", "end": ">", "beginCaptures": { "1": { "name": "storage.type.function.named-group.regexp" }, "2": { "name": "punctuation.definition.named-group.bracket.angle.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.named-group.bracket.angle.end.regexp" } } }, { "contentName": "entity.group.name.regexp", "begin": "\\G'", "end": "'", "beginCaptures": { "0": { "name": "punctuation.definition.named-group.quote.single.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.named-group.quote.single.end.regexp" } } }, { "include": "#main" } ] }, { "name": "meta.group.non-capturing.regexp.extended", "begin": "(\\(\\?)([A-Za-wyz]*x[A-Za-z]*[-A-Za-wyz]*)(:)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "patterns": [ { "include": "#scopedModifiers" } ] }, "3": { "name": "punctuation.separator.colon.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "contentName": "source.embedded.regexp.extended", "patterns": [ { "include": "source.regexp.extended#main" } ] }, { "name": "meta.group.non-capturing.regexp", "patterns": [ { "include": "#main" } ], "begin": "(\\(\\?)((?:y{[\\w]+}|[-A-Za-z^])*)(:)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "patterns": [ { "include": "#scopedModifiers" } ] }, "3": { "name": "punctuation.separator.colon.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.group.atomic.regexp", "begin": "\\(\\?>", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.group.script-run.regexp", "begin": "(\\(\\*)((?:atomic_)?script_run|a?sr)(:)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.verb.regexp" }, "3": { "name": "punctuation.separator.colon.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] }, { "name": "meta.group.callout.contents.regexp", "begin": "(\\(\\?{1,2})({)", "end": "(?x)\n(}) # Last closing bracket\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\]))? # [tag]\n(X|<|>)? # Callout direction\n(?:[^\\)]*) # Silently skip unexpected characters\n(\\)) # Closing bracket", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "punctuation.definition.bracket.curly.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.bracket.curly.end.regexp" }, "2": { "name": "entity.name.tag.callout-tag.regexp" }, "3": { "name": "punctuation.definition.callout-tag.begin.regexp" }, "4": { "name": "callout-tag.constant.other.regexp" }, "5": { "name": "punctuation.definition.callout-tag.end.regexp" }, "6": { "name": "constant.language.callout-direction.regexp" }, "7": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#calloutBrackets" }, { "include": "#main" } ] }, { "name": "meta.group.callout.regexp", "begin": "(?x)\n(\\(\\*)\n([_A-Za-z][_A-Za-z0-9]*) # Name\n((\\[)([_A-Za-z][_A-Za-z0-9]*)(\\]))? # [tag]\n({)", "end": "(?x)\n(})\n(?:[^\\)]*)\n(?:(\\))|(?=$))", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "entity.name.callout.regexp" }, "3": { "name": "entity.name.tag.callout-tag.regexp" }, "4": { "name": "punctuation.definition.callout-tag.begin.regexp" }, "5": { "name": "callout-tag.constant.other.regexp" }, "6": { "name": "punctuation.definition.callout-tag.end.regexp" }, "7": { "name": "punctuation.definition.arguments.begin.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.regexp" }, "2": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" }, { "name": "variable.parameter.argument.regexp", "match": "[-\\w]+" } ] }, { "name": "meta.absent-function.regexp", "begin": "(\\()(\\?~)(\\|)", "end": "\\)", "beginCaptures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "keyword.control.flow.regexp" }, "3": { "name": "punctuation.separator.delimiter.pipe.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "name": "punctuation.separator.delimiter.pipe.regexp", "match": "\\|" }, { "name": "variable.parameter.argument.regexp", "match": "[-\\w]+" }, { "include": "#main" } ] }, { "name": "meta.group.empty.regexp", "match": "(\\()(\\))", "captures": { "1": { "name": "punctuation.definition.group.begin.regexp" }, "2": { "name": "punctuation.definition.group.end.regexp" } } }, { "name": "meta.group.regexp", "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.definition.group.begin.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.end.regexp" } }, "patterns": [ { "include": "#main" } ] } ] }, "groupRefInnards": { "patterns": [ { "match": "\\-(?=\\d)", "name": "keyword.operator.arithmetic.minus.regexp" }, { "match": "\\+(?=\\d)", "name": "keyword.operator.arithmetic.plus.regexp" } ] }, "propInnards": { "patterns": [ { "match": "=", "name": "keyword.operator.comparison.regexp" }, { "match": "True|False", "name": "constant.language.boolean.${0:/downcase}.regexp" } ] }, "quantifier": { "patterns": [ { "include": "#quantifierSymbolic" }, { "include": "#quantifierNumeric" } ] }, "quantifierNumeric": { "name": "keyword.operator.quantifier.specific.unescaped.regexp", "match": "(\\{)(?:(\\d+)(,?)(\\d*)|(,)(\\d+))(\\})", "captures": { "1": { "name": "punctuation.definition.quantifier.bracket.curly.begin.regexp" }, "2": { "name": "keyword.operator.quantifier.min.regexp" }, "3": { "name": "punctuation.delimiter.comma.regexp" }, "4": { "name": "keyword.operator.quantifier.max.regexp" }, "5": { "name": "punctuation.delimiter.comma.regexp" }, "6": { "name": "keyword.operator.quantifier.max.regexp" }, "7": { "name": "punctuation.definition.quantifier.bracket.curly.end.regexp" } } }, "quantifierNumericOld": { "name": "keyword.operator.quantifier.specific.escaped.regexp", "match": "(\\\\{)(?:(\\d+)(,?)(\\d*)|(,)(\\d+))(\\\\})", "captures": { "1": { "name": "punctuation.definition.quantifier.bracket.curly.begin.regexp" }, "2": { "name": "keyword.operator.quantifier.min.regexp" }, "3": { "name": "punctuation.delimiter.comma.regexp" }, "4": { "name": "keyword.operator.quantifier.max.regexp" }, "5": { "name": "punctuation.delimiter.comma.regexp" }, "6": { "name": "keyword.operator.quantifier.max.regexp" }, "7": { "name": "punctuation.definition.quantifier.bracket.curly.end.regexp" } } }, "quantifierSymbolic": { "name": "keyword.operator.quantifier.regexp", "match": "[*+?]" }, "scopedModifiers": { "patterns": [ { "name": "meta.text-segment-mode.regexp", "match": "(y)({)(\\w+)(})", "captures": { "1": { "name": "storage.modifier.flag.y.regexp" }, "2": { "name": "punctuation.definition.option.bracket.curly.begin.regexp" }, "3": { "name": "variable.parameter.option-mode.regexp" }, "4": { "name": "punctuation.definition.option.bracket.curly.end.regexp" } } }, { "match": "(?:(?<=\\?)|\\G|^)\\^", "name": "keyword.operator.modifier.reset.regexp" }, { "match": "-", "name": "keyword.operator.modifier.negate.regexp" }, { "match": "[A-Za-z]", "name": "storage.modifier.flag.$0.regexp" } ] }, "variable": { "patterns": [ { "name": "variable.other.regexp", "match": "(?<![^\\\\]\\\\|^\\\\)\\$(?!\\d|-)[-\\w]+", "captures": { "1": { "name": "punctuation.definition.variable.regexp" } } }, { "name": "variable.other.bracket.regexp", "match": "(?<![^\\\\]\\\\|^\\\\)(\\$\\{)\\s*(?!\\d|-)[-\\w]+\\s*(\\})", "captures": { "1": { "name": "punctuation.definition.variable.begin.regexp" }, "2": { "name": "punctuation.definition.variable.end.regexp" } } } ] }, "wildcard": { "name": "constant.character.wildcard.dot.match.any.regexp", "match": "\\." } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/rst.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/trond-snekvik/vscode-rst/blob/master/syntaxes/rst.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/trond-snekvik/vscode-rst/commit/f0fe19ffde6509be52ad9267a57e1b3df665f072", "scopeName": "source.rst", "patterns": [ { "include": "#body" } ], "repository": { "body": { "patterns": [ { "include": "#title" }, { "include": "#inline-markup" }, { "include": "#anchor" }, { "include": "#line-block" }, { "include": "#replace-include" }, { "include": "#footnote" }, { "include": "#substitution" }, { "include": "#blocks" }, { "include": "#table" }, { "include": "#simple-table" }, { "include": "#options-list" } ] }, "title": { "match": "^(\\*{3,}|#{3,}|\\={3,}|~{3,}|\\+{3,}|-{3,}|`{3,}|\\^{3,}|:{3,}|\"{3,}|_{3,}|'{3,})$", "name": "markup.heading" }, "inline-markup": { "patterns": [ { "include": "#escaped" }, { "include": "#ignore" }, { "include": "#ref" }, { "include": "#literal" }, { "include": "#monospaced" }, { "include": "#citation" }, { "include": "#bold" }, { "include": "#italic" }, { "include": "#list" }, { "include": "#macro" }, { "include": "#reference" }, { "include": "#footnote-ref" } ] }, "ignore": { "patterns": [ { "match": "'[`*]+'" }, { "match": "<[`*]+>" }, { "match": "{[`*]+}" }, { "match": "\\([`*]+\\)" }, { "match": "\\[[`*]+\\]" }, { "match": "\"[`*]+\"" } ] }, "table": { "begin": "^\\s*\\+[=+-]+\\+\\s*$", "end": "^(?![+|])", "beginCaptures": { "0": { "name": "keyword.control.table" } }, "patterns": [ { "match": "[=+|-]", "name": "keyword.control.table" } ] }, "simple-table": { "match": "^[=\\s]+$", "name": "keyword.control.table" }, "ref": { "begin": "(:ref:)`", "end": "`|^\\s*$", "name": "entity.name.tag", "beginCaptures": { "1": { "name": "keyword.control" } }, "patterns": [ { "match": "<.*?>", "name": "markup.underline.link" } ] }, "reference": { "match": "[\\w-]*[a-zA-Z\\d-]__?\\b", "name": "entity.name.tag" }, "macro": { "match": "\\|[^\\|]+\\|", "name": "entity.name.tag" }, "literal": { "match": "(:\\S+:)(`.*?`\\\\?)", "captures": { "1": { "name": "keyword.control" }, "2": { "name": "entity.name.tag" } } }, "monospaced": { "begin": "(?<=[\\s\"'(\\[{<]|^)``[^\\s`]", "end": "``|^\\s*$", "name": "string.interpolated" }, "citation": { "begin": "(?<=[\\s\"'(\\[{<]|^)`[^\\s`]", "end": "`_{,2}|^\\s*$", "name": "entity.name.tag", "applyEndPatternLast": 0 }, "bold": { "begin": "(?<=[\\s\"'(\\[{<]|^)\\*{2}[^\\s*]", "end": "\\*{2}|^\\s*$", "name": "markup.bold" }, "italic": { "begin": "(?<=[\\s\"'(\\[{<]|^)\\*[^\\s*]", "end": "\\*|^\\s*$", "name": "markup.italic" }, "escaped": { "match": "\\\\.", "name": "constant.character.escape" }, "list": { "match": "^\\s*(\\d+\\.|\\* -|[a-zA-Z#]\\.|[iIvVxXmMcC]+\\.|\\(\\d+\\)|\\d+\\)|[*+-])\\s+", "name": "keyword.control" }, "line-block": { "match": "^\\|\\s+", "name": "keyword.control" }, "raw-html": { "begin": "^(\\s*)(\\.{2}\\s+raw\\s*::)\\s+(html)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "3": { "name": "variable.parameter.html" } }, "patterns": [ { "include": "#block-param" }, { "include": "text.html.derivative" } ] }, "anchor": { "match": "^\\.{2}\\s+(_[^:]+:)\\s*", "name": "entity.name.tag.anchor" }, "replace-include": { "match": "^\\s*(\\.{2})\\s+(\\|[^\\|]+\\|)\\s+(replace::)", "captures": { "1": { "name": "keyword.control" }, "2": { "name": "entity.name.tag" }, "3": { "name": "keyword.control" } } }, "footnote": { "match": "^\\s*\\.{2}\\s+\\[(?:[\\w\\.-]+|[#*]|#\\w+)\\]\\s+", "name": "entity.name.tag" }, "footnote-ref": { "match": "\\[(?:[\\w\\.-]+|[#*])\\]_", "name": "entity.name.tag" }, "substitution": { "match": "^\\.{2}\\s*\\|([^|]+)\\|", "name": "entity.name.tag" }, "options-list": { "match": "^((?:-\\w|--[\\w-]+|/\\w+)(?:,? ?[\\w-]+)*)(?: |\\t|$)", "name": "variable.parameter" }, "blocks": { "patterns": [ { "include": "#domains" }, { "include": "#doctest" }, { "include": "#code-block-cpp" }, { "include": "#code-block-py" }, { "include": "#code-block-console" }, { "include": "#code-block-javascript" }, { "include": "#code-block-yaml" }, { "include": "#code-block-cmake" }, { "include": "#code-block-kconfig" }, { "include": "#code-block-ruby" }, { "include": "#code-block-dts" }, { "include": "#code-block" }, { "include": "#doctest-block" }, { "include": "#raw-html" }, { "include": "#block" }, { "include": "#literal-block" }, { "include": "#block-comment" } ] }, "block-comment": { "begin": "^(\\s*)\\.{2}", "while": "^\\1(?=\\s)|^\\s*$", "name": "comment.block" }, "literal-block": { "begin": "^(\\s*)(.*)(::)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "patterns": [ { "include": "#inline-markup" } ] }, "3": { "name": "keyword.control" } } }, "block": { "begin": "^(\\s*)(\\.{2}\\s+\\S+::)(.*)", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "3": { "name": "variable" } }, "patterns": [ { "include": "#block-param" }, { "include": "#body" } ] }, "block-param": { "patterns": [ { "match": "(:param\\s+(.+?):)(?:\\s|$)", "captures": { "1": { "name": "keyword.control" }, "2": { "name": "variable.parameter" } } }, { "match": "(:.+?:)(?:$|\\s+(.*))", "captures": { "1": { "name": "keyword.control" }, "2": { "patterns": [ { "match": "\\b(0x[a-fA-F\\d]+|\\d+)\\b", "name": "constant.numeric" }, { "include": "#inline-markup" } ] } } } ] }, "domains": { "patterns": [ { "include": "#domain-cpp" }, { "include": "#domain-py" }, { "include": "#domain-auto" }, { "include": "#domain-js" } ] }, "domain-cpp": { "begin": "^(\\s*)(\\.{2}\\s+(?:cpp|c):(?:class|struct|function|member|var|type|enum|enum-struct|enum-class|enumerator|union|concept)::)\\s*(?:(@\\w+)|(.*))", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "3": { "name": "entity.name.tag" }, "4": { "patterns": [ { "include": "source.cpp" } ] } }, "patterns": [ { "include": "#block-param" }, { "include": "#body" } ] }, "domain-py": { "begin": "^(\\s*)(\\.{2}\\s+py:(?:module|function|data|exception|class|attribute|property|method|staticmethod|classmethod|decorator|decoratormethod)::)\\s*(.*)", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "3": { "patterns": [ { "include": "source.python" } ] } }, "patterns": [ { "include": "#block-param" }, { "include": "#body" } ] }, "domain-auto": { "begin": "^(\\s*)(\\.{2}\\s+auto(?:class|module|exception|function|decorator|data|method|attribute|property)::)\\s*(.*)", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control.py" }, "3": { "patterns": [ { "include": "source.python" } ] } }, "patterns": [ { "include": "#block-param" }, { "include": "#body" } ] }, "domain-js": { "begin": "^(\\s*)(\\.{2}\\s+js:\\w+::)\\s*(.*)", "end": "^(?!\\1[ \\t]|$)", "beginCaptures": { "2": { "name": "keyword.control" }, "3": { "patterns": [ { "include": "source.js" } ] } }, "patterns": [ { "include": "#block-param" }, { "include": "#body" } ] }, "doctest": { "begin": "^(>>>)\\s*(.*)", "end": "^\\s*$", "beginCaptures": { "1": { "name": "keyword.control" }, "2": { "patterns": [ { "include": "source.python" } ] } } }, "code-block-cpp": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(c|c\\+\\+|cpp|C|C\\+\\+|CPP|Cpp)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.cpp" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.cpp" } ] }, "code-block-console": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(console|shell|bash)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.console" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.shell" } ] }, "code-block-py": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(python)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.py" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.python" } ] }, "code-block-javascript": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(javascript)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.js" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.js" } ] }, "code-block-yaml": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ya?ml)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.yaml" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.yaml" } ] }, "code-block-cmake": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(cmake)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.cmake" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.cmake" } ] }, "code-block-kconfig": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*([kK]config)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.kconfig" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.kconfig" } ] }, "code-block-ruby": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(ruby)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.ruby" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.ruby" } ] }, "code-block-dts": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(dts|DTS|devicetree)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.dts" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.dts" } ] }, "code-block": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" } }, "patterns": [ { "include": "#block-param" } ] }, "doctest-block": { "begin": "^(\\s*)(\\.{2}\\s+doctest::)\\s*$", "while": "^\\1(?=\\s)|^\\s*$", "beginCaptures": { "2": { "name": "keyword.control" } }, "patterns": [ { "include": "#block-param" }, { "include": "source.python" } ] } }, "name": "rst" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/ruby.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/ruby.tmbundle/commit/efcb8941c701343f1b2e9fb105c678152fea6892", "name": "ruby", "scopeName": "source.ruby", "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <<end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t• Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t• Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE' \n\tThis is single quoted. \n\tThe above used #{Time.now} \n\tTHERE \n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\t\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n", "patterns": [ { "captures": { "1": { "name": "keyword.control.class.ruby" }, "2": { "name": "entity.name.type.class.ruby" }, "3": { "name": "keyword.operator.other.ruby" }, "4": { "name": "entity.other.inherited-class.ruby" }, "5": { "name": "keyword.operator.other.ruby" }, "6": { "name": "variable.other.object.ruby" } }, "match": "^\\s*(class)\\s+(?:([.a-zA-Z0-9_:]+)(?:\\s*(<)\\s*([.a-zA-Z0-9_:]+))?|(<<)\\s*([.a-zA-Z0-9_:]+))", "name": "meta.class.ruby" }, { "captures": { "1": { "name": "keyword.control.module.ruby" }, "2": { "name": "entity.name.type.module.ruby" }, "3": { "name": "entity.other.inherited-class.module.first.ruby" }, "4": { "name": "punctuation.separator.inheritance.ruby" }, "5": { "name": "entity.other.inherited-class.module.second.ruby" }, "6": { "name": "punctuation.separator.inheritance.ruby" }, "7": { "name": "entity.other.inherited-class.module.third.ruby" }, "8": { "name": "punctuation.separator.inheritance.ruby" } }, "match": "^\\s*(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)", "name": "meta.module.ruby" }, { "comment": "else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.", "match": "(?<!\\.)\\belse(\\s)+if\\b", "name": "invalid.deprecated.ruby" }, { "captures": { "1": { "name": "punctuation.definition.constant.ruby" } }, "comment": "symbols as hash key (1.9 syntax)", "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", "name": "constant.other.symbol.hashkey.ruby" }, { "captures": { "1": { "name": "punctuation.definition.constant.ruby" } }, "comment": "symbols as hash key (1.8 syntax)", "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)", "name": "constant.other.symbol.hashkey.ruby" }, { "comment": "everything being a reserved word, not a value and needing a 'end' is a..", "match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\\b(?![?!])", "name": "keyword.control.ruby" }, { "comment": "contextual smart pair support for block parameters", "match": "(?<!\\.)\\bdo\\b", "name": "keyword.control.start-block.ruby" }, { "comment": "contextual smart pair support", "match": "(?<=\\{)(\\s+)", "name": "meta.syntax.ruby.start-block" }, { "match": "(?<!\\.)\\b(alias|alias_method|block_given[?]|break|defined[?]|iterator[?]|next|redo|retry|return|super|undef|yield)(\\b|(?<=[?]))(?![?!])", "name": "keyword.control.pseudo-method.ruby" }, { "match": "\\b(nil|true|false)\\b(?![?!])", "name": "constant.language.ruby" }, { "match": "\\b(__(dir|FILE|LINE)__)\\b(?![?!])", "name": "variable.language.ruby" }, { "begin": "^__END__\\n", "captures": { "0": { "name": "string.unquoted.program-block.ruby" } }, "comment": "__END__ marker", "contentName": "text.plain", "end": "(?=not)impossible", "patterns": [ { "begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))", "end": "(?=not)impossible", "name": "text.html.embedded.ruby", "patterns": [ { "include": "text.html.basic" } ] } ] }, { "match": "\\b(self)\\b(?![?!])", "name": "variable.language.self.ruby" }, { "comment": " everything being a method but having a special function is a..", "match": "\\b(initialize|new|loop|include|extend|prepend|fail|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|public_class_method|protected|refine|using)\\b(?![?!])", "name": "keyword.other.special-method.ruby" }, { "begin": "\\b(?<!\\.|::)(require|require_relative)\\b", "captures": { "1": { "name": "keyword.other.special-method.ruby" } }, "end": "$|(?=#|\\})", "name": "meta.require.ruby", "patterns": [ { "include": "$self" } ] }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(@)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.instance.ruby" }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(@@)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.class.ruby" }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(\\$)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.global.ruby" }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpvw])", "name": "variable.other.readwrite.global.pre-defined.ruby" }, { "begin": "\\b(ENV)\\[", "beginCaptures": { "1": { "name": "variable.other.constant.ruby" } }, "end": "\\]", "name": "meta.environment-variable.ruby", "patterns": [ { "include": "$self" } ] }, { "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))", "name": "support.class.ruby" }, { "match": "\\b(abort|at_exit|autoload[?]?|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)(\\b|(?<=[?!]))(?![?!])", "name": "support.function.kernel.ruby" }, { "match": "\\b[A-Z]\\w*\\b", "name": "variable.other.constant.ruby" }, { "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ", "beginCaptures": { "1": { "name": "keyword.control.def.ruby" }, "2": { "name": "entity.name.function.ruby" }, "3": { "name": "punctuation.definition.parameters.ruby" } }, "comment": "the method pattern comes from the symbol pattern, see there for a explaination", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.ruby" } }, "name": "meta.function.method.with-arguments.ruby", "patterns": [ { "begin": "(?=[&*_a-zA-Z])", "end": "(?=[,)])", "patterns": [ { "captures": { "1": { "name": "storage.type.variable.ruby" }, "2": { "name": "constant.other.symbol.hashkey.parameter.function.ruby" }, "3": { "name": "punctuation.definition.constant.ruby" }, "4": { "name": "variable.parameter.function.ruby" } }, "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" }, { "include": "#parens" }, { "include": "#braces" }, { "include": "$self" } ] } ], "repository": { "braces": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.function.begin.ruby" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.function.end.ruby" } }, "patterns": [ { "include": "#parens" }, { "include": "#braces" }, { "include": "$self" } ] }, "parens": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.function.begin.ruby" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.end.ruby" } }, "patterns": [ { "include": "#parens" }, { "include": "#braces" }, { "include": "$self" } ] } } }, { "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", "beginCaptures": { "1": { "name": "keyword.control.def.ruby" }, "2": { "name": "entity.name.function.ruby" } }, "comment": "same as the previous rule, but without parentheses around the arguments", "end": "$", "name": "meta.function.method.with-arguments.ruby", "patterns": [ { "begin": "(?![\\s,])", "end": "(?=,|$)", "patterns": [ { "captures": { "1": { "name": "storage.type.variable.ruby" }, "2": { "name": "constant.other.symbol.hashkey.parameter.function.ruby" }, "3": { "name": "punctuation.definition.constant.ruby" }, "4": { "name": "variable.parameter.function.ruby" } }, "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))", "name": "variable.parameter.function.ruby" }, { "include": "$self" } ] } ] }, { "captures": { "1": { "name": "keyword.control.def.ruby" }, "3": { "name": "entity.name.function.ruby" } }, "comment": " the optional name is just to catch the def also without a method-name", "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ", "name": "meta.function.method.without-arguments.ruby" }, { "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b", "name": "constant.numeric.float.ruby" }, { "match": "\\b(0|(0[dD]\\d|[1-9])(?>_?\\d)*)r?i?\\b", "name": "constant.numeric.integer.ruby" }, { "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b", "name": "constant.numeric.hex.ruby" }, { "match": "\\b0[bB][01](?>_?[01])*r?i?\\b", "name": "constant.numeric.binary.ruby" }, { "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b", "name": "constant.numeric.octal.ruby" }, { "begin": ":'", "captures": { "0": { "name": "punctuation.definition.constant.ruby" } }, "end": "'", "name": "constant.other.symbol.single-quoted.ruby", "patterns": [ { "match": "\\\\['\\\\]", "name": "constant.character.escape.ruby" } ] }, { "begin": ":\"", "captures": { "0": { "name": "punctuation.definition.constant.ruby" } }, "end": "\"", "name": "constant.other.symbol.double-quoted.ruby", "patterns": [ { "include": "#interpolated_ruby" }, { "include": "#escaped_char" } ] }, { "comment": "Needs higher precedence than regular expressions.", "match": "(?<!\\()/=", "name": "keyword.operator.assignment.augmented.ruby" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "comment": "single quoted string (does not allow interpolation)", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.quoted.single.ruby", "patterns": [ { "match": "\\\\'|\\\\\\\\", "name": "constant.character.escape.ruby" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "comment": "double quoted string (allows for interpolation)", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.quoted.double.ruby", "patterns": [ { "include": "#interpolated_ruby" }, { "include": "#escaped_char" } ] }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "comment": "execute string (allows for interpolation)", "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.interpolated.ruby", "patterns": [ { "include": "#interpolated_ruby" }, { "include": "#escaped_char" } ] }, { "include": "#percent_literals" }, { "begin": "(?x)\n\t\t\t (?:\n\t\t\t ^ # beginning of line\n\t\t\t | (?<= # or look-behind on:\n\t\t\t [=>~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t", "captures": { "1": { "name": "string.regexp.classic.ruby" }, "2": { "name": "punctuation.definition.string.ruby" } }, "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t", "contentName": "string.regexp.classic.ruby", "end": "((/[eimnosux]*))", "patterns": [ { "include": "#regex_sub" } ] }, { "captures": { "1": { "name": "punctuation.definition.constant.ruby" } }, "comment": "symbols", "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|(@@?|\\$)[a-zA-Z_]\\w*)", "name": "constant.other.symbol.ruby" }, { "begin": "^=begin", "captures": { "0": { "name": "punctuation.definition.comment.ruby" } }, "comment": "multiline comments", "end": "^=end", "name": "comment.block.documentation.ruby" }, { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.ruby" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.ruby" } }, "end": "\\n", "name": "comment.line.number-sign.ruby" } ] }, { "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t", "match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])", "name": "constant.numeric.ruby" }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1))", "comment": "Heredoc with embedded html", "end": "(?!\\G)", "name": "meta.embedded.block.html", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "text.html", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "text.html.basic" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1))", "comment": "Heredoc with embedded xml", "end": "(?!\\G)", "name": "meta.embedded.block.xml", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "text.xml", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "text.xml" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1))", "comment": "Heredoc with embedded sql", "end": "(?!\\G)", "name": "meta.embedded.block.sql", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.sql", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.sql" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1))", "comment": "Heredoc with embedded css", "end": "(?!\\G)", "name": "meta.embedded.block.css", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.css", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.css" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1))", "comment": "Heredoc with embedded c++", "end": "(?!\\G)", "name": "meta.embedded.block.c++", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.c++", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.c++" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1))", "comment": "Heredoc with embedded c", "end": "(?!\\G)", "name": "meta.embedded.block.c", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.c", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.c" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))", "comment": "Heredoc with embedded javascript", "end": "(?!\\G)", "name": "meta.embedded.block.js", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.js", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.js" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))", "comment": "Heredoc with embedded jQuery javascript", "end": "(?!\\G)", "name": "meta.embedded.block.js.jquery", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.js.jquery", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.js.jquery" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))", "comment": "Heredoc with embedded shell", "end": "(?!\\G)", "name": "meta.embedded.block.shell", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.shell", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.shell" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1))", "comment": "Heredoc with embedded lua", "end": "(?!\\G)", "name": "meta.embedded.block.lua", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.lua", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.lua" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1))", "comment": "Heredoc with embedded ruby", "end": "(?!\\G)", "name": "meta.embedded.block.ruby", "patterns": [ { "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "contentName": "source.ruby", "end": "\\s*\\2$\\n?", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "source.ruby" }, { "include": "#escaped_char" } ] } ] }, { "begin": "(?>=\\s*<<(\\w+))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "end": "^\\1$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "#escaped_char" } ] }, { "begin": "(?><<[-~](\\w+))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "comment": "heredoc with indented terminator", "end": "\\s*\\1$", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.unquoted.heredoc.ruby", "patterns": [ { "include": "#heredoc" }, { "include": "#interpolated_ruby" }, { "include": "#escaped_char" } ] }, { "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)", "captures": { "1": { "name": "punctuation.separator.arguments.ruby" } }, "end": "(?<!\\|)(\\|)(?!\\|)", "patterns": [ { "include": "$self" }, { "match": "[_a-zA-Z][_a-zA-Z0-9]*", "name": "variable.other.block.ruby" }, { "match": ",", "name": "punctuation.separator.variable.ruby" } ] }, { "match": "=>", "name": "punctuation.separator.key-value" }, { "match": "->", "name": "support.function.kernel.lambda.ruby" }, { "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<", "name": "keyword.operator.assignment.augmented.ruby" }, { "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?", "name": "keyword.operator.comparison.ruby" }, { "match": "(?<!\\.)\\b(and|not|or)\\b(?![?!])", "name": "keyword.operator.logical.ruby" }, { "comment": "Make sure this goes after assignment and comparison", "match": "(?<=^|[ \\t])!|&&|\\|\\||\\^", "name": "keyword.operator.logical.ruby" }, { "captures": { "1": { "name": "punctuation.separator.method.ruby" } }, "comment": "Safe navigation operator - Added in 2.3", "match": "(&\\.)\\s*(?![A-Z])" }, { "match": "(%|&|\\*\\*|\\*|\\+|-|/)", "name": "keyword.operator.arithmetic.ruby" }, { "match": "=", "name": "keyword.operator.assignment.ruby" }, { "match": "\\||~|>>", "name": "keyword.operator.other.ruby" }, { "match": ";", "name": "punctuation.separator.statement.ruby" }, { "match": ",", "name": "punctuation.separator.object.ruby" }, { "captures": { "1": { "name": "punctuation.separator.namespace.ruby" } }, "comment": "Mark as namespace separator if double colons followed by capital letter", "match": "(::)\\s*(?=[A-Z])" }, { "captures": { "1": { "name": "punctuation.separator.method.ruby" } }, "comment": "Mark as method separator if double colons not followed by capital letter", "match": "(\\.|::)\\s*(?![A-Z])" }, { "comment": "Must come after method and constant separators to prefer double colons", "match": ":", "name": "punctuation.separator.other.ruby" }, { "match": "\\{", "name": "punctuation.section.scope.begin.ruby" }, { "match": "\\}", "name": "punctuation.section.scope.end.ruby" }, { "match": "\\[", "name": "punctuation.section.array.begin.ruby" }, { "match": "\\]", "name": "punctuation.section.array.end.ruby" }, { "match": "\\(|\\)", "name": "punctuation.section.function.ruby" } ], "repository": { "escaped_char": { "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", "name": "constant.character.escape.ruby" }, "heredoc": { "begin": "^<<[-~]?\\w+", "end": "$", "patterns": [ { "include": "$self" } ] }, "interpolated_ruby": { "patterns": [ { "begin": "#\\{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.ruby" } }, "contentName": "source.ruby", "end": "(\\})", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.ruby" }, "1": { "name": "source.ruby" } }, "name": "meta.embedded.line.ruby", "patterns": [ { "include": "#nest_curly_and_self" }, { "include": "$self" } ], "repository": { "nest_curly_and_self": { "patterns": [ { "begin": "\\{", "captures": { "0": { "name": "punctuation.section.scope.ruby" } }, "end": "\\}", "patterns": [ { "include": "#nest_curly_and_self" } ] }, { "include": "$self" } ] } } }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(#@)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.instance.ruby" }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(#@@)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.class.ruby" }, { "captures": { "1": { "name": "punctuation.definition.variable.ruby" } }, "match": "(#\\$)[a-zA-Z_]\\w*", "name": "variable.other.readwrite.global.ruby" } ] }, "percent_literals": { "patterns": [ { "begin": "%i(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.section.array.end.ruby" } }, "name": "meta.array.symbol.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" }, { "include": "#symbol" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" }, { "include": "#symbol" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" }, { "include": "#symbol" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" }, { "include": "#symbol" } ] }, { "include": "#symbol" } ], "repository": { "angles": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\<|\\\\>", "name": "constant.other.symbol.ruby" }, { "begin": "<", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": ">", "patterns": [ { "include": "#angles" }, { "include": "#symbol" } ] } ] }, "braces": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\{|\\\\\\}", "name": "constant.other.symbol.ruby" }, { "begin": "\\{", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": "\\}", "patterns": [ { "include": "#braces" }, { "include": "#symbol" } ] } ] }, "brackets": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\[|\\\\\\]", "name": "constant.other.symbol.ruby" }, { "begin": "\\[", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": "\\]", "patterns": [ { "include": "#brackets" }, { "include": "#symbol" } ] } ] }, "parens": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\(|\\\\\\)", "name": "constant.other.symbol.ruby" }, { "begin": "\\(", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": "\\)", "patterns": [ { "include": "#parens" }, { "include": "#symbol" } ] } ] }, "symbol": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\\\|\\\\[ ]", "name": "constant.other.symbol.ruby" }, { "match": "\\S\\w*", "name": "constant.other.symbol.ruby" } ] } } }, { "begin": "%I(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.section.array.end.ruby" } }, "name": "meta.array.symbol.interpolated.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" }, { "include": "#symbol" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" }, { "include": "#symbol" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" }, { "include": "#symbol" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" }, { "include": "#symbol" } ] }, { "include": "#symbol" } ], "repository": { "angles": { "patterns": [ { "begin": "<", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": ">", "patterns": [ { "include": "#angles" }, { "include": "#symbol" } ] } ] }, "braces": { "patterns": [ { "begin": "\\{", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": "\\}", "patterns": [ { "include": "#braces" }, { "include": "#symbol" } ] } ] }, "brackets": { "patterns": [ { "begin": "\\[", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": "\\]", "patterns": [ { "include": "#brackets" }, { "include": "#symbol" } ] } ] }, "parens": { "patterns": [ { "begin": "\\(", "captures": { "0": { "name": "constant.other.symbol.ruby" } }, "end": "\\)", "patterns": [ { "include": "#parens" }, { "include": "#symbol" } ] } ] }, "symbol": { "patterns": [ { "begin": "(?=\\\\|#\\{)", "end": "(?!\\G)", "name": "constant.other.symbol.ruby", "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" } ] }, { "match": "\\S\\w*", "name": "constant.other.symbol.ruby" } ] } } }, { "begin": "%q(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.quoted.other.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" } ] } ], "repository": { "angles": { "patterns": [ { "match": "\\\\<|\\\\>|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "<", "end": ">", "patterns": [ { "include": "#angles" } ] } ] }, "braces": { "patterns": [ { "match": "\\\\\\{|\\\\\\}|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#braces" } ] } ] }, "brackets": { "patterns": [ { "match": "\\\\\\[|\\\\\\]|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#brackets" } ] } ] }, "parens": { "patterns": [ { "match": "\\\\\\(|\\\\\\)|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#parens" } ] } ] } } }, { "begin": "%Q?(?:([(\\[{<])|([^\\w\\s=]|_))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.quoted.other.interpolated.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" } ] }, { "include": "#escaped_char" }, { "include": "#interpolated_ruby" } ], "repository": { "angles": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "<", "end": ">", "patterns": [ { "include": "#angles" } ] } ] }, "braces": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#braces" } ] } ] }, "brackets": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#brackets" } ] } ] }, "parens": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#parens" } ] } ] } } }, { "begin": "%r(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "end": "([)\\]}>]\\2|\\1\\2)[eimnosux]*", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.regexp.percent.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" } ] }, { "include": "#regex_sub" } ], "repository": { "angles": { "patterns": [ { "include": "#regex_sub" }, { "begin": "<", "end": ">", "patterns": [ { "include": "#angles" } ] } ] }, "braces": { "patterns": [ { "include": "#regex_sub" }, { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#braces" } ] } ] }, "brackets": { "patterns": [ { "include": "#regex_sub" }, { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#brackets" } ] } ] }, "parens": { "patterns": [ { "include": "#regex_sub" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#parens" } ] } ] } } }, { "begin": "%s(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.definition.constant.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.definition.constant.end.ruby" } }, "name": "constant.other.symbol.percent.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" } ] } ], "repository": { "angles": { "patterns": [ { "match": "\\\\<|\\\\>|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "<", "end": ">", "patterns": [ { "include": "#angles" } ] } ] }, "braces": { "patterns": [ { "match": "\\\\\\{|\\\\\\}|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#braces" } ] } ] }, "brackets": { "patterns": [ { "match": "\\\\\\[|\\\\\\]|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#brackets" } ] } ] }, "parens": { "patterns": [ { "match": "\\\\\\(|\\\\\\)|\\\\\\\\", "name": "constant.character.escape.ruby" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#parens" } ] } ] } } }, { "begin": "%w(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.section.array.end.ruby" } }, "name": "meta.array.string.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" }, { "include": "#string" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" }, { "include": "#string" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" }, { "include": "#string" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" }, { "include": "#string" } ] }, { "include": "#string" } ], "repository": { "angles": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\<|\\\\>", "name": "string.other.ruby" }, { "begin": "<", "captures": { "0": { "name": "string.other.ruby" } }, "end": ">", "patterns": [ { "include": "#angles" }, { "include": "#string" } ] } ] }, "braces": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\{|\\\\\\}", "name": "string.other.ruby" }, { "begin": "\\{", "captures": { "0": { "name": "string.other.ruby" } }, "end": "\\}", "patterns": [ { "include": "#braces" }, { "include": "#string" } ] } ] }, "brackets": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\[|\\\\\\]", "name": "string.other.ruby" }, { "begin": "\\[", "captures": { "0": { "name": "string.other.ruby" } }, "end": "\\]", "patterns": [ { "include": "#brackets" }, { "include": "#string" } ] } ] }, "parens": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\(|\\\\\\)", "name": "string.other.ruby" }, { "begin": "\\(", "captures": { "0": { "name": "string.other.ruby" } }, "end": "\\)", "patterns": [ { "include": "#parens" }, { "include": "#string" } ] } ] }, "string": { "patterns": [ { "captures": { "0": { "name": "constant.character.escape.ruby" } }, "match": "\\\\\\\\|\\\\[ ]", "name": "string.other.ruby" }, { "match": "\\S\\w*", "name": "string.other.ruby" } ] } } }, { "begin": "%W(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.section.array.end.ruby" } }, "name": "meta.array.string.interpolated.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" }, { "include": "#string" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" }, { "include": "#string" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" }, { "include": "#string" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" }, { "include": "#string" } ] }, { "include": "#string" } ], "repository": { "angles": { "patterns": [ { "begin": "<", "captures": { "0": { "name": "string.other.ruby" } }, "end": ">", "patterns": [ { "include": "#angles" }, { "include": "#string" } ] } ] }, "braces": { "patterns": [ { "begin": "\\{", "captures": { "0": { "name": "string.other.ruby" } }, "end": "\\}", "patterns": [ { "include": "#braces" }, { "include": "#string" } ] } ] }, "brackets": { "patterns": [ { "begin": "\\[", "captures": { "0": { "name": "string.other.ruby" } }, "end": "\\]", "patterns": [ { "include": "#brackets" }, { "include": "#string" } ] } ] }, "parens": { "patterns": [ { "begin": "\\(", "captures": { "0": { "name": "string.other.ruby" } }, "end": "\\)", "patterns": [ { "include": "#parens" }, { "include": "#string" } ] } ] }, "string": { "patterns": [ { "begin": "(?=\\\\|#\\{)", "end": "(?!\\G)", "name": "string.other.ruby", "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" } ] }, { "match": "\\S\\w*", "name": "string.other.ruby" } ] } } }, { "begin": "%x(?:([(\\[{<])|([^\\w\\s]|_))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ruby" } }, "end": "[)\\]}>]\\2|\\1\\2", "endCaptures": { "0": { "name": "punctuation.definition.string.end.ruby" } }, "name": "string.interpolated.percent.ruby", "patterns": [ { "begin": "\\G(?<=\\()(?!\\))", "end": "(?=\\))", "patterns": [ { "include": "#parens" } ] }, { "begin": "\\G(?<=\\[)(?!\\])", "end": "(?=\\])", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\G(?<=\\{)(?!\\})", "end": "(?=\\})", "patterns": [ { "include": "#braces" } ] }, { "begin": "\\G(?<=<)(?!>)", "end": "(?=>)", "patterns": [ { "include": "#angles" } ] }, { "include": "#escaped_char" }, { "include": "#interpolated_ruby" } ], "repository": { "angles": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "<", "end": ">", "patterns": [ { "include": "#angles" } ] } ] }, "braces": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "\\{", "end": "\\}", "patterns": [ { "include": "#braces" } ] } ] }, "brackets": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#brackets" } ] } ] }, "parens": { "patterns": [ { "include": "#escaped_char" }, { "include": "#interpolated_ruby" }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#parens" } ] } ] } } } ] }, "regex_sub": { "patterns": [ { "include": "#interpolated_ruby" }, { "include": "#escaped_char" }, { "captures": { "1": { "name": "punctuation.definition.quantifier.begin.ruby" }, "3": { "name": "punctuation.definition.quantifier.end.ruby" } }, "match": "(\\{)\\d+(,\\d+)?(\\})", "name": "keyword.operator.quantifier.ruby" }, { "begin": "\\[\\^?", "beginCaptures": { "0": { "name": "punctuation.definition.character-class.begin.ruby" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.character-class.end.ruby" } }, "name": "constant.other.character-class.set.ruby", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "\\(\\?#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.ruby" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.ruby" } }, "name": "comment.line.number-sign.ruby", "patterns": [ { "include": "#escaped_char" } ] }, { "begin": "\\(", "captures": { "0": { "name": "punctuation.definition.group.ruby" } }, "end": "\\)", "name": "meta.group.regexp.ruby", "patterns": [ { "include": "#regex_sub" } ] }, { "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.ruby" } }, "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", "end": "$\\n?", "name": "comment.line.number-sign.ruby" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/rust.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/dustypomerleau/rust-syntax/blob/master/syntaxes/rust.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/dustypomerleau/rust-syntax/commit/20462d50ff97338f42c6b64c3f421c634fd60734", "name": "rust", "scopeName": "source.rust", "patterns": [ { "comment": "boxed slice literal", "begin": "(<)(\\[)", "beginCaptures": { "1": { "name": "punctuation.brackets.angle.rust" }, "2": { "name": "punctuation.brackets.square.rust" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.brackets.angle.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#gtypes" }, { "include": "#lvariables" }, { "include": "#lifetimes" }, { "include": "#punctuation" }, { "include": "#types" } ] }, { "comment": "macro type metavariables", "name": "meta.macro.metavariable.type.rust", "match": "(\\$)((crate)|([A-Z][A-Za-z0-9_]*))((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?", "captures": { "1": { "name": "keyword.operator.macro.dollar.rust" }, "3": { "name": "keyword.other.crate.rust" }, "4": { "name": "entity.name.type.metavariable.rust" }, "6": { "name": "keyword.operator.key-value.rust" }, "7": { "name": "variable.other.metavariable.specifier.rust" } }, "patterns": [ { "include": "#keywords" } ] }, { "comment": "macro metavariables", "name": "meta.macro.metavariable.rust", "match": "(\\$)([a-z][A-Za-z0-9_]*)((:)(block|expr|ident|item|lifetime|literal|meta|path?|stmt|tt|ty|vis))?", "captures": { "1": { "name": "keyword.operator.macro.dollar.rust" }, "2": { "name": "variable.other.metavariable.name.rust" }, "4": { "name": "keyword.operator.key-value.rust" }, "5": { "name": "variable.other.metavariable.specifier.rust" } }, "patterns": [ { "include": "#keywords" } ] }, { "comment": "macro rules", "name": "meta.macro.rules.rust", "match": "\\b(macro_rules!)\\s+(([a-z0-9_]+)|([A-Z][a-z0-9_]*))\\s+(\\{)", "captures": { "1": { "name": "entity.name.function.macro.rules.rust" }, "3": { "name": "entity.name.function.macro.rust" }, "4": { "name": "entity.name.type.macro.rust" }, "5": { "name": "punctuation.brackets.curly.rust" } } }, { "comment": "attributes", "name": "meta.attribute.rust", "begin": "(#)(\\!?)(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.attribute.rust" }, "2": { "name": "keyword.operator.attribute.inner.rust" }, "3": { "name": "punctuation.brackets.attribute.rust" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.brackets.attribute.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#lifetimes" }, { "include": "#punctuation" }, { "include": "#strings" }, { "include": "#gtypes" }, { "include": "#types" } ] }, { "comment": "modules", "match": "(mod)\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][A-Za-z0-9_]*)", "captures": { "1": { "name": "storage.type.rust" }, "2": { "name": "entity.name.module.rust" } } }, { "comment": "external crate imports", "name": "meta.import.rust", "begin": "\\b(extern)\\s+(crate)", "beginCaptures": { "1": { "name": "storage.type.rust" }, "2": { "name": "keyword.other.crate.rust" } }, "end": ";", "endCaptures": { "0": { "name": "punctuation.semi.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#punctuation" } ] }, { "comment": "use statements", "name": "meta.use.rust", "begin": "\\b(use)\\s", "beginCaptures": { "1": { "name": "keyword.other.rust" } }, "end": ";", "endCaptures": { "0": { "name": "punctuation.semi.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#namespaces" }, { "include": "#punctuation" }, { "include": "#types" }, { "include": "#lvariables" } ] }, { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#lvariables" }, { "include": "#constants" }, { "include": "#gtypes" }, { "include": "#functions" }, { "include": "#types" }, { "include": "#keywords" }, { "include": "#lifetimes" }, { "include": "#macros" }, { "include": "#namespaces" }, { "include": "#punctuation" }, { "include": "#strings" }, { "include": "#variables" } ], "repository": { "comments": { "patterns": [ { "comment": "documentation comments", "name": "comment.line.documentation.rust", "match": "^\\s*///.*" }, { "comment": "line comments", "name": "comment.line.double-slash.rust", "match": "\\s*//.*" } ] }, "block-comments": { "patterns": [ { "comment": "empty block comments", "name": "comment.block.rust", "match": "/\\*\\*/" }, { "comment": "block documentation comments", "name": "comment.block.documentation.rust", "begin": "/\\*\\*", "end": "\\*/", "patterns": [ { "include": "#block-comments" } ] }, { "comment": "block comments", "name": "comment.block.rust", "begin": "/\\*(?!\\*)", "end": "\\*/", "patterns": [ { "include": "#block-comments" } ] } ] }, "constants": { "patterns": [ { "comment": "ALL CAPS constants", "name": "constant.other.caps.rust", "match": "\\b[A-Z]{2}[A-Z0-9_]*\\b" }, { "comment": "constant declarations", "match": "\\b(const)\\s+([A-Z][A-Za-z0-9_]*)\\b", "captures": { "1": { "name": "storage.type.rust" }, "2": { "name": "constant.other.caps.rust" } } }, { "comment": "decimal integers and floats", "name": "constant.numeric.decimal.rust", "match": "\\b\\d[\\d_]*(\\.?)[\\d_]*(?:(E)([+-])([\\d_]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", "captures": { "1": { "name": "punctuation.separator.dot.decimal.rust" }, "2": { "name": "keyword.operator.exponent.rust" }, "3": { "name": "keyword.operator.exponent.sign.rust" }, "4": { "name": "constant.numeric.decimal.exponent.mantissa.rust" }, "5": { "name": "entity.name.type.numeric.rust" } } }, { "comment": "hexadecimal integers", "name": "constant.numeric.hex.rust", "match": "\\b0x[\\da-fA-F_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", "captures": { "1": { "name": "entity.name.type.numeric.rust" } } }, { "comment": "octal integers", "name": "constant.numeric.oct.rust", "match": "\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", "captures": { "1": { "name": "entity.name.type.numeric.rust" } } }, { "comment": "binary integers", "name": "constant.numeric.bin.rust", "match": "\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\b", "captures": { "1": { "name": "entity.name.type.numeric.rust" } } }, { "comment": "booleans", "name": "constant.language.bool.rust", "match": "\\b(true|false)\\b" } ] }, "escapes": { "comment": "escapes: ASCII, byte, Unicode, quote, regex", "name": "constant.character.escape.rust", "match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))", "captures": { "1": { "name": "constant.character.escape.backslash.rust" }, "2": { "name": "constant.character.escape.bit.rust" }, "3": { "name": "constant.character.escape.unicode.rust" }, "4": { "name": "constant.character.escape.unicode.punctuation.rust" }, "5": { "name": "constant.character.escape.unicode.punctuation.rust" } } }, "functions": { "patterns": [ { "comment": "pub as a function", "match": "\\b(pub)(\\()", "captures": { "1": { "name": "keyword.other.rust" }, "2": { "name": "punctuation.brackets.round.rust" } } }, { "comment": "function definition", "name": "meta.function.definition.rust", "begin": "\\b(fn)\\s+((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)((\\()|(<))", "beginCaptures": { "1": { "name": "keyword.other.fn.rust" }, "2": { "name": "entity.name.function.rust" }, "4": { "name": "punctuation.brackets.round.rust" }, "5": { "name": "punctuation.brackets.angle.rust" } }, "end": "\\{|;", "endCaptures": { "0": { "name": "punctuation.brackets.curly.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#lvariables" }, { "include": "#constants" }, { "include": "#gtypes" }, { "include": "#functions" }, { "include": "#lifetimes" }, { "include": "#macros" }, { "include": "#namespaces" }, { "include": "#punctuation" }, { "include": "#strings" }, { "include": "#types" }, { "include": "#variables" } ] }, { "comment": "function/method calls, chaining", "name": "meta.function.call.rust", "begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(\\()", "beginCaptures": { "1": { "name": "entity.name.function.rust" }, "2": { "name": "punctuation.brackets.round.rust" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.brackets.round.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#lvariables" }, { "include": "#constants" }, { "include": "#gtypes" }, { "include": "#functions" }, { "include": "#lifetimes" }, { "include": "#macros" }, { "include": "#namespaces" }, { "include": "#punctuation" }, { "include": "#strings" }, { "include": "#types" }, { "include": "#variables" } ] }, { "comment": "function/method calls with turbofish", "name": "meta.function.call.rust", "begin": "((?:r#(?!crate|[Ss]elf|super))?[A-Za-z0-9_]+)(?=::<.*>\\()", "beginCaptures": { "1": { "name": "entity.name.function.rust" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.brackets.round.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#lvariables" }, { "include": "#constants" }, { "include": "#gtypes" }, { "include": "#functions" }, { "include": "#lifetimes" }, { "include": "#macros" }, { "include": "#namespaces" }, { "include": "#punctuation" }, { "include": "#strings" }, { "include": "#types" }, { "include": "#variables" } ] } ] }, "keywords": { "patterns": [ { "comment": "control flow keywords", "name": "keyword.control.rust", "match": "\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\b" }, { "comment": "storage keywords", "name": "keyword.other.rust storage.type.rust", "match": "\\b(extern|let|macro|mod)\\b" }, { "comment": "const keyword", "name": "storage.modifier.rust", "match": "\\b(const)\\b" }, { "comment": "type keyword", "name": "keyword.declaration.type.rust storage.type.rust", "match": "\\b(type)\\b" }, { "comment": "enum keyword", "name": "keyword.declaration.enum.rust storage.type.rust", "match": "\\b(enum)\\b" }, { "comment": "trait keyword", "name": "keyword.declaration.trait.rust storage.type.rust", "match": "\\b(trait)\\b" }, { "comment": "struct keyword", "name": "keyword.declaration.struct.rust storage.type.rust", "match": "\\b(struct)\\b" }, { "comment": "storage modifiers", "name": "storage.modifier.rust", "match": "\\b(abstract|static)\\b" }, { "comment": "other keywords", "name": "keyword.other.rust", "match": "\\b(as|async|become|box|dyn|move|final|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\b" }, { "comment": "fn", "name": "keyword.other.fn.rust", "match": "\\bfn\\b" }, { "comment": "crate", "name": "keyword.other.crate.rust", "match": "\\bcrate\\b" }, { "comment": "mut", "name": "storage.modifier.mut.rust", "match": "\\bmut\\b" }, { "comment": "logical operators", "name": "keyword.operator.logical.rust", "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)" }, { "comment": "logical AND, borrow references", "name": "keyword.operator.borrow.and.rust", "match": "&(?![&=])" }, { "comment": "assignment operators", "name": "keyword.operator.assignment.rust", "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)" }, { "comment": "single equal", "name": "keyword.operator.assignment.equal.rust", "match": "(?<![<>])=(?!=|>)" }, { "comment": "comparison operators", "name": "keyword.operator.comparison.rust", "match": "(=(=)?(?!>)|!=|<=|(?<!=)>=)" }, { "comment": "math operators", "name": "keyword.operator.math.rust", "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))" }, { "comment": "less than, greater than (special case)", "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))", "captures": { "1": { "name": "punctuation.brackets.round.rust" }, "2": { "name": "punctuation.brackets.square.rust" }, "3": { "name": "punctuation.brackets.curly.rust" }, "4": { "name": "keyword.operator.comparison.rust" }, "5": { "name": "punctuation.brackets.round.rust" }, "6": { "name": "punctuation.brackets.square.rust" }, "7": { "name": "punctuation.brackets.curly.rust" } } }, { "comment": "namespace operator", "name": "keyword.operator.namespace.rust", "match": "::" }, { "comment": "dereference asterisk", "match": "(\\*)(?=\\w+)", "captures": { "1": { "name": "keyword.operator.dereference.rust" } } }, { "comment": "subpattern binding", "name": "keyword.operator.subpattern.rust", "match": "@" }, { "comment": "dot access", "name": "keyword.operator.access.dot.rust", "match": "\\.(?!\\.)" }, { "comment": "ranges, range patterns", "name": "keyword.operator.range.rust", "match": "\\.{2}(=|\\.)?" }, { "comment": "colon", "name": "keyword.operator.key-value.rust", "match": ":(?!:)" }, { "comment": "dashrocket, skinny arrow", "name": "keyword.operator.arrow.skinny.rust", "match": "->" }, { "comment": "hashrocket, fat arrow", "name": "keyword.operator.arrow.fat.rust", "match": "=>" }, { "comment": "dollar macros", "name": "keyword.operator.macro.dollar.rust", "match": "\\$" }, { "comment": "question mark operator, questionably sized, macro kleene matcher", "name": "keyword.operator.question.rust", "match": "\\?" } ] }, "interpolations": { "comment": "curly brace interpolations", "name": "meta.interpolation.rust", "match": "({)[^\"{}]*(})", "captures": { "1": { "name": "punctuation.definition.interpolation.rust" }, "2": { "name": "punctuation.definition.interpolation.rust" } } }, "lifetimes": { "patterns": [ { "comment": "named lifetime parameters", "match": "(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b", "captures": { "1": { "name": "punctuation.definition.lifetime.rust" }, "2": { "name": "entity.name.type.lifetime.rust" } } }, { "comment": "borrowing references to named lifetimes", "match": "(\\&)(['])([a-zA-Z_][0-9a-zA-Z_]*)(?!['])\\b", "captures": { "1": { "name": "keyword.operator.borrow.rust" }, "2": { "name": "punctuation.definition.lifetime.rust" }, "3": { "name": "entity.name.type.lifetime.rust" } } } ] }, "macros": { "patterns": [ { "comment": "macros", "name": "meta.macro.rust", "match": "(([a-z_][A-Za-z0-9_]*!)|([A-Z_][A-Za-z0-9_]*!))", "captures": { "2": { "name": "entity.name.function.macro.rust" }, "3": { "name": "entity.name.type.macro.rust" } } } ] }, "namespaces": { "patterns": [ { "comment": "namespace (non-type, non-function path segment)", "match": "(?<![A-Za-z0-9_])([a-z0-9_]+)((?<!super|self)::)", "captures": { "1": { "name": "entity.name.namespace.rust" }, "2": { "name": "keyword.operator.namespace.rust" } } } ] }, "types": { "patterns": [ { "comment": "numeric types", "match": "(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\\b", "captures": { "1": { "name": "entity.name.type.numeric.rust" } } }, { "comment": "parameterized types", "begin": "\\b([A-Z][A-Za-z0-9]*)(<)", "beginCaptures": { "1": { "name": "entity.name.type.rust" }, "2": { "name": "punctuation.brackets.angle.rust" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.brackets.angle.rust" } }, "patterns": [ { "include": "#block-comments" }, { "include": "#comments" }, { "include": "#keywords" }, { "include": "#lvariables" }, { "include": "#lifetimes" }, { "include": "#punctuation" }, { "include": "#types" }, { "include": "#variables" } ] }, { "comment": "primitive types", "name": "entity.name.type.primitive.rust", "match": "\\b(bool|char|str)\\b" }, { "comment": "trait declarations", "match": "\\b(trait)\\s+([A-Z][A-Za-z0-9]*)\\b", "captures": { "1": { "name": "keyword.declaration.trait.rust storage.type.rust" }, "2": { "name": "entity.name.type.trait.rust" } } }, { "comment": "struct declarations", "match": "\\b(struct)\\s+([A-Z][A-Za-z0-9]*)\\b", "captures": { "1": { "name": "keyword.declaration.struct.rust storage.type.rust" }, "2": { "name": "entity.name.type.struct.rust" } } }, { "comment": "enum declarations", "match": "\\b(enum)\\s+([A-Z][A-Za-z0-9_]*)\\b", "captures": { "1": { "name": "keyword.declaration.enum.rust storage.type.rust" }, "2": { "name": "entity.name.type.enum.rust" } } }, { "comment": "type declarations", "match": "\\b(type)\\s+([A-Z][A-Za-z0-9_]*)\\b", "captures": { "1": { "name": "keyword.declaration.type.rust storage.type.rust" }, "2": { "name": "entity.name.type.declaration.rust" } } }, { "comment": "types", "name": "entity.name.type.rust", "match": "\\b[A-Z][A-Za-z0-9]*\\b(?!!)" } ] }, "gtypes": { "patterns": [ { "comment": "option types", "name": "entity.name.type.option.rust", "match": "\\b(Some|None)\\b" }, { "comment": "result types", "name": "entity.name.type.result.rust", "match": "\\b(Ok|Err)\\b" } ] }, "punctuation": { "patterns": [ { "comment": "comma", "name": "punctuation.comma.rust", "match": "," }, { "comment": "curly braces", "name": "punctuation.brackets.curly.rust", "match": "[{}]" }, { "comment": "parentheses, round brackets", "name": "punctuation.brackets.round.rust", "match": "[()]" }, { "comment": "semicolon", "name": "punctuation.semi.rust", "match": ";" }, { "comment": "square brackets", "name": "punctuation.brackets.square.rust", "match": "[\\[\\]]" }, { "comment": "angle brackets", "name": "punctuation.brackets.angle.rust", "match": "(?<!=)[<>]" } ] }, "strings": { "patterns": [ { "comment": "double-quoted strings and byte strings", "name": "string.quoted.double.rust", "begin": "(b?)(\")", "beginCaptures": { "1": { "name": "string.quoted.byte.raw.rust" }, "2": { "name": "punctuation.definition.string.rust" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.rust" } }, "patterns": [ { "include": "#escapes" }, { "include": "#interpolations" } ] }, { "comment": "double-quoted raw strings and raw byte strings", "name": "string.quoted.double.rust", "begin": "(b?r)(#*)(\")", "beginCaptures": { "1": { "name": "string.quoted.byte.raw.rust" }, "2": { "name": "punctuation.definition.string.raw.rust" }, "3": { "name": "punctuation.definition.string.rust" } }, "end": "(\")(\\2)", "endCaptures": { "1": { "name": "punctuation.definition.string.rust" }, "2": { "name": "punctuation.definition.string.raw.rust" } } }, { "comment": "characters and bytes", "name": "string.quoted.single.char.rust", "begin": "(b)?(')", "beginCaptures": { "1": { "name": "string.quoted.byte.raw.rust" }, "2": { "name": "punctuation.definition.char.rust" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.char.rust" } }, "patterns": [ { "include": "#escapes" } ] } ] }, "lvariables": { "patterns": [ { "comment": "self", "name": "variable.language.self.rust", "match": "\\b[Ss]elf\\b" }, { "comment": "super", "name": "variable.language.super.rust", "match": "\\bsuper\\b" } ] }, "variables": { "patterns": [ { "comment": "variables", "name": "variable.other.rust", "match": "\\b(?<!(?<!\\.)\\.)(?:r#(?!(crate|[Ss]elf|super)))?[a-z0-9_]+\\b" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/sas.tmLanguage.json ================================================ { "name": "sas", "patterns": [ { "include": "#comments" }, { "captures": { "1": { "name": "support.function.sas" }, "2": { "name": "entity.name.function.sas" } }, "match": "(?i:(proc) (\\w+))" }, { "captures": { "1": { "name": "support.function.sas" }, "2": { "name": "constant.other.table-name.sas" } }, "match": "(?i:^(data) ([^\\s]+))" }, { "captures": { "1": { "name": "entity.other.attribute-name.sas" }, "2": { "name": "constant.other.library-name.sas" }, "3": { "name": "constant.other.table-name.sas" } }, "match": "(?i:\\b(data|out)=(\\w+\\.)?(\\w*)\\b)" }, { "match": "(?i:\\bsort|run|quit|output\\b)", "name": "support.function.sas" }, { "match": "\\b\\d+(\\.\\d+)*\\b", "name": "constant.numeric.sas" }, { "match": "\\blow|high\\b", "name": "constant.sas" }, { "captures": { "1": { "name": "keyword.other.sas" }, "2": { "name": "variable.other.sas" } }, "match": "(?i:\\b(by) ([^\\s]+)\\b)" }, { "captures": { "1": { "name": "keyword.other.sas" }, "2": { "name": "variable.other.sas" } }, "match": "(?i:(keep|drop|retain|format|class|var) ([\\w\\s]+))" }, { "captures": { "1": { "name": "keyword.other.sas" }, "2": { "name": "constant.other.table-name.sas" } }, "match": "(?i:\\b(set|tables|merge) ([\\w\\s]+)\\b)" }, { "match": "\\b(if|else|then|end)\\b", "name": "keyword.control.sas" }, { "match": "(?i)\\b(descending)\\b", "name": "keyword.other.order.sas" }, { "match": "(?i)\\b(title)\\b", "name": "keyword.other.sas" }, { "match": "\\*", "name": "keyword.operator.star.sas" }, { "match": "\\b<|>|eq|ne\\b", "name": "keyword.operator.comparison.sas" }, { "match": " \\. ", "name": "keyword.null.sas" }, { "match": "-|\\+|/", "name": "keyword.operator.math.sas" }, { "match": "(?i)\\b(avg|sum)(?=\\s*\\()", "name": "support.function.aggregate.sas" }, { "captures": { "1": { "name": "constant.other.library-name.sas" }, "2": { "name": "constant.other.table-name.sas" } }, "match": "(\\w+?)\\.(\\w+)" }, { "begin": "proc sas;", "end": "quit;", "patterns": [ { "include": "source.sas" } ] }, { "include": "#strings" } ], "repository": { "comments": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.sas" } }, "match": "^\\s*(\\*).*;\\s*$\\n?", "name": "comment.line.asterisk.sas" }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.sas" } }, "end": "\\*/", "name": "comment.block.c" } ] }, "string_escape": { "match": "\\\\.", "name": "constant.character.escape.sas" }, "string_interpolation": { "captures": { "1": { "name": "punctuation.definition.string.end.sas" } }, "match": "(#\\{)([^\\}]*)(\\})", "name": "string.interpolated.sas" }, "strings": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.string.begin.sas" }, "3": { "name": "punctuation.definition.string.end.sas" } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and sas files tend to have very long lines.", "match": "(')[^'\\\\]*(')", "name": "string.quoted.single.sas" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sas" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sas" } }, "name": "string.quoted.single.sas", "patterns": [ { "include": "#string_escape" } ] }, { "captures": { "1": { "name": "punctuation.definition.string.begin.sas" }, "3": { "name": "punctuation.definition.string.end.sas" } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and sas files tend to have very long lines.", "match": "(`)[^`\\\\]*(`)", "name": "string.quoted.other.backtick.sas" }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sas" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sas" } }, "name": "string.quoted.other.backtick.sas", "patterns": [ { "include": "#string_escape" } ] }, { "captures": { "1": { "name": "punctuation.definition.string.begin.sas" }, "3": { "name": "punctuation.definition.string.end.sas" } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and sas files tend to have very long lines.", "match": "(\")[^\"#]*(\")", "name": "string.quoted.double.sas" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sas" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sas" } }, "name": "string.quoted.double.sas", "patterns": [ { "include": "#string_interpolation" } ] }, { "begin": "%\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sas" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sas" } }, "name": "string.other.quoted.brackets.sas", "patterns": [ { "include": "#string_interpolation" } ] } ] } }, "scopeName": "source.sas" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/sass.tmLanguage.json ================================================ { "foldingStopMarker": "\\*/|^\\s*$", "foldingStartMarker": "/\\*|^#|^\\*|^\\b|^\\.", "repository": { "nested-parens": { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#nested-parens" }], "captures": { "0": { "name": "punctuation.section.scope.sass" } } }, "double-quoted": { "begin": "\"", "end": "\"", "name": "string.quoted.double.css.sass" }, "placeholder-selector": { "match": "%[a-zA-Z0-9_-]+", "name": "entity.other.attribute-name.placeholder-selector.sass" }, "single-quoted": { "begin": "'", "end": "'", "name": "string.quoted.single.css.sass" }, "variable": { "match": "\\$[a-zA-Z0-9_-]+", "name": "variable" } }, "keyEquivalent": "^~S", "fileTypes": ["sass", "scss"], "uuid": "0AB51F6F-7780-4BF2-BEE3-5405ABA6A6B9", "patterns": [ { "match": "(?i)(\\[)\\s*(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)(?:\\s*([~|^$*]?=)\\s*(?:(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)|((?>(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", "name": "meta.attribute-selector.scss", "captures": { "7": { "name": "punctuation.definition.string.end.scss" }, "3": { "name": "punctuation.separator.operator.scss" }, "4": { "name": "string.unquoted.attribute-value.scss" }, "5": { "name": "string.quoted.double.attribute-value.scss" }, "1": { "name": "punctuation.definition.entity.scss" }, "6": { "name": "punctuation.definition.string.begin.scss" }, "2": { "name": "entity.other.attribute-name.attribute.scss" } } }, { "match": "(?<=@include|@mixin)\\s[a-zA-Z0-9_-]+", "name": "support.function.name.sass" }, { "match": "(@media\\s(all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)*)|(@else\\s(if)*)|@[a-zA-Z-]+", "name": "keyword.control.at-rule.css.sass" }, { "include": "#variable" }, { "include": "#placeholder-selector" }, { "match": "[a-z-]+(?=:)|\\b(from|through|to|in)\\b", "name": "support.type.property-name.css.sass" }, { "match": "@(import|for|else|each|mixin|include|charset|import|media|page|namespace|extend)\\s[\\%\\/\\.\\w-]*\\b", "name": "keyword.control.at-rule.sass" }, { "match": "!(important|default|optional)", "name": "keyword.other.important.css.sass" }, { "match": "\\*", "name": "entity.name.tag.wildcard.scss" }, { "match": "(?<=[\\d])(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vw)\\b|%", "name": "keyword.other.unit.scss" }, { "match": "\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b", "name": "keyword.control.untitled" }, { "match": "(?<![!<>=a-zA-Z0-9_-]|[<>=a-zA-Z0-9_-] )[=+][a-zA-Z0-9_-]+", "name": "keyword.control.mixin-shorthand.sass" }, { "begin": "'", "end": "'", "patterns": [ { "match": "\\\\.", "name": "constant.character.escaped.sass" } ], "name": "string.quoted.single.sass" }, { "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escaped.sass" } ], "name": "string.quoted.double.sass" }, { "match": "[\\.%][a-zA-Z0-9_-]+", "name": "entity.other.attribute-name.class.sass" }, { "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", "name": "constant.other.rgb-value.sass" }, { "match": "!(important|default|optional)", "name": "keyword.other.important.css.sass" }, { "match": "#[a-zA-Z0-9_-]+", "name": "entity.other.attribute-name.id.sass" }, { "match": "[!\\$][a-zA-Z0-9_-]+", "name": "variable.parameter.sass" }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.sass" }, { "begin": "//", "end": "$\\n?", "name": "comment.line.double-slash.sass" }, { "match": "(-|\\+)?\\s*[0-9]+(\\.[0-9]+)?", "name": "constant.numeric.sass" }, { "match": "\\b(whitespace|wait|w-resize|visible|rect|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b", "name": "support.constant.property-value.sass" }, { "match": "(left|right|true|false|top|bottom)(?!:)", "name": "constant.string.sass" }, { "begin": "(headings|stylesheet-url|rgba?|hsla?|ie-hex-str|red|green|blue|alpha|opacity|hue|saturation|lightness|prefixed|prefix|-moz|-svg|-css2|-pie|-webkit|-ms|-o|-khtml|font-(?:files|url)|grid-image|image-(?:width|height|url|color)|sprites?|sprite-(?:map|map-name|file|url|position)|inline-(?:font-files|image)|opposite-position|grad-point|grad-end-position|color-stops|color-stops-in-percentages|grad-color-stops|(?:radial|linear)-(?:gradient|svg-gradient)|opacify|fade-?in|transparentize|fade-?out|lighten|darken|saturate|desaturate|grayscale|adjust-(?:hue|lightness|saturation|color)|scale-(?:lightness|saturation|color)|change-color|spin|complement|invert|mix|-compass-(?:list|space-list|slice|nth|list-size)|blank|compact|nth|first-value-of|join|length|append|nest|append-selector|headers|enumerate|range|percentage|unitless|unit|if|type-of|comparable|elements-of-type|quote|unquote|escape|e|sin|cos|tan|abs|round|ceil|floor|pi|translate(?:X|Y))\\s*(\\()", "endCaptures": { "1": { "name": "punctuation.section.function.scss" } }, "end": "(\\))", "patterns": [ { "include": "#double-quoted" }, { "include": "#single-quoted" }, { "include": "#variable" }, { "match": "\\^|\\$|\\*|~", "name": "keyword.other.regex.sass" }, { "include": "#parameters" } ], "beginCaptures": { "1": { "name": "support.function.misc.scss" }, "2": { "name": "punctuation.section.function.scss" } } }, { "match": "&", "name": "keyword.control.untitled" }, { "match": ":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)", "name": "entity.other.attribute-name.tag.pseudo-class" }, { "match": "::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)", "name": "entity.other.attribute-name.tag.pseudo-element" }, { "match": "\\b(-webkit-[A-Za-z]+|-moz-[A-Za-z]+|-o-[A-Za-z]+|-ms-[A-Za-z]+|-khtml-[A-Za-z]+|[0-9]{1,3}\\%|zoom|z-index|y|x|wrap|word-wrap|word-spacing|word-break|word|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|variant|user-select|up|unicode-bidi|unicode|trim|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-transform|text-shadow|text-replace|text-outline|text-justify|text-indent|text-height|text-emphasis|text-decoration|text-align-last|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|style-type|style-position|style-image|style|string-set|stretch|stress|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak|span|spacing|space-collapse|space|sizing|size-adjust|size|shadow|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-align|ruby|rows|rotation-point|rotation|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resolution|resize|reset|replace|repeat|rendering-intent|rate|radius|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|pack|overhang|overflow-y|overflow-x|overflow-style|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|opacity|offset|numeral|new|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|model|min-width|min-height|min|max-width|max-height|max|marquee-style|marquee-speed|marquee-play-count|marquee-direction|marquee|marks|mark-before|mark-after|mark|margin-top|margin-right|margin-left|margin-bottom|margin|mask-image|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-height|line|level|letter-spacing|length|left-width|left-style|left-color|left|label|justify|iteration-count|inline-box-align|initial-value|initial-size|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-resolution|image-orientation|image|icon|hyphens|hyphenate-resource|hyphenate-lines|hyphenate-character|hyphenate-before|hyphenate-after|hyphenate|height|header|hanging-punctuation|grid-rows|grid-columns|grid|gap|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float-offset|float|flex-group|flex|fit-position|fit|fill|filter|family|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cursor|cue-before|cue-after|cue|crop|counter-reset|counter-increment|counter|count|content|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-profile|color|collapse|clip|clear|character|caption-side|break-inside|break-before|break-after|break|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-length|border-left-width|border-left-style|border-left-color|border-left|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|bookmark-target|bookmark-level|bookmark-label|bookmark|binding|bidi|before|baseline-shift|baseline|balance|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-break|background-attachment|background|backface-visibility|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-duration|animation-direction|animation-delay|animation|alignment-baseline|alignment-adjust|alignment|align-last|align|after|adjust)\\b", "name": "support.type.property-name.sass" }, { "match": "(\\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\\b)", "name": "support.constant.font-name.sass" }, { "match": "(?>-(webkit|moz|ms|o|apple|khtml|xv|wap|epub)[a-zA-Z0-9_-]+)(?!\\()", "name": "support.type.property-name.sass" }, { "match": "(?<=\\s\\s)-?\\w\\n?", "name": "helper.sublime.property-name.sass" }, { "match": "(?<=\\w: )\\w\\n?", "name": "helper.sublime.property-value.sass" } ], "name": "Sass", "scopeName": "source.sass" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/sassdoc.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-sass/blob/master/grammars/sassdoc.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-sass/commit/303bbf0c250fe380b9e57375598cfd916110758b", "name": "SassDoc", "scopeName": "source.sassdoc", "patterns": [ { "match": "(?x)\n((@)(?:access))\n\\s+\n(private|public)\n\\b", "captures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "constant.language.access-type.sassdoc" } } }, { "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", "captures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "entity.name.type.instance.sassdoc" }, "4": { "name": "punctuation.definition.bracket.angle.begin.sassdoc" }, "5": { "name": "constant.other.email.link.underline.sassdoc" }, "6": { "name": "punctuation.definition.bracket.angle.end.sassdoc" } } }, { "name": "meta.example.css.scss.sassdoc", "begin": "(?x)\n((@)example)\n\\s+\n(css|scss)", "end": "(?=@|///$)", "beginCaptures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "variable.other.sassdoc" } }, "patterns": [ { "match": "^///\\s+" }, { "match": "[^\\s@*](?:[^*]|\\*[^/])*", "captures": { "0": { "name": "source.embedded.css.scss", "patterns": [ { "include": "source.css.scss" } ] } } } ] }, { "name": "meta.example.html.sassdoc", "begin": "(?x)\n((@)example)\n\\s+\n(markup)", "end": "(?=@|///$)", "beginCaptures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "variable.other.sassdoc" } }, "patterns": [ { "match": "^///\\s+" }, { "match": "[^\\s@*](?:[^*]|\\*[^/])*", "captures": { "0": { "name": "source.embedded.html", "patterns": [ { "include": "source.html" } ] } } } ] }, { "name": "meta.example.js.sassdoc", "begin": "(?x)\n((@)example)\n\\s+\n(javascript)", "end": "(?=@|///$)", "beginCaptures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "variable.other.sassdoc" } }, "patterns": [ { "match": "^///\\s+" }, { "match": "[^\\s@*](?:[^*]|\\*[^/])*", "captures": { "0": { "name": "source.embedded.js", "patterns": [ { "include": "source.js" } ] } } } ] }, { "match": "(?x)\n((@)link)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n)", "captures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "variable.other.link.underline.sassdoc" }, "4": { "name": "entity.name.type.instance.sassdoc" } } }, { "match": "(?x)\n(\n (@)\n (?:arg|argument|param|parameter|requires?|see|colors?|fonts?|ratios?|sizes?)\n)\n\\s+\n(\n [A-Za-z_$%]\n [\\-\\w$.\\[\\]]*\n)", "captures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "variable.other.sassdoc" } } }, { "begin": "((@)(?:arg|argument|param|parameter|prop|property|requires?|see|sizes?))\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#sassdoctype" }, { "match": "([A-Za-z_$%][\\-\\w$.\\[\\]]*)", "name": "variable.other.sassdoc" }, { "name": "variable.other.sassdoc", "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else (sorry)\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", "captures": { "1": { "name": "punctuation.definition.optional-value.begin.bracket.square.sassdoc" }, "2": { "name": "keyword.operator.assignment.sassdoc" }, "3": { "name": "source.embedded.js", "patterns": [ { "include": "source.js" } ] }, "4": { "name": "punctuation.definition.optional-value.end.bracket.square.sassdoc" }, "5": { "name": "invalid.illegal.syntax.sassdoc" } } } ] }, { "begin": "(?x)\n(\n (@)\n (?:returns?|throws?|exception|outputs?)\n)\n\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" } }, "end": "(?=\\s|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#sassdoctype" } ] }, { "match": "(?x)\n(\n (@)\n (?:type)\n)\n\\s+\n(\n (?:\n [A-Za-z |]+\n )\n)", "captures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "entity.name.type.instance.sassdoc", "patterns": [ { "include": "#sassdoctypedelimiter" } ] } } }, { "match": "(?x)\n(\n (@)\n (?:alias|group|name|requires?|see|icons?)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", "captures": { "1": { "name": "storage.type.class.sassdoc" }, "2": { "name": "punctuation.definition.block.tag.sassdoc" }, "3": { "name": "entity.name.type.instance.sassdoc" } } }, { "name": "storage.type.class.sassdoc", "match": "(?x)\n(@)\n(?:access|alias|author|content|deprecated|example|exception|group\n|ignore|name|prop|property|requires?|returns?|see|since|throws?|todo\n|type|outputs?)\n\\b", "captures": { "1": { "name": "punctuation.definition.block.tag.sassdoc" } } } ], "repository": { "brackets": { "patterns": [ { "begin": "{", "end": "}|(?=$)", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\[", "end": "\\]|(?=$)", "patterns": [ { "include": "#brackets" } ] } ] }, "sassdoctypedelimiter": { "match": "(\\|)", "captures": { "1": { "name": "punctuation.definition.delimiter.sassdoc" } } }, "sassdoctype": { "patterns": [ { "name": "invalid.illegal.type.sassdoc", "match": "\\G{(?:[^}*]|\\*[^/}])+$" }, { "begin": "\\G({)", "beginCaptures": { "0": { "name": "entity.name.type.instance.sassdoc" }, "1": { "name": "punctuation.definition.bracket.curly.begin.sassdoc" } }, "contentName": "entity.name.type.instance.sassdoc", "end": "((}))\\s*|(?=$)", "endCaptures": { "1": { "name": "entity.name.type.instance.sassdoc" }, "2": { "name": "punctuation.definition.bracket.curly.end.sassdoc" } }, "patterns": [ { "include": "#brackets" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/scad.tmLanguage.json ================================================ { "foldingStopMarker": "\\*\\*/|^\\s*\\}", "foldingStartMarker": "/\\*\\*|\\{\\s*$", "keyEquivalent": "^~S", "fileTypes": ["scad"], "uuid": "ED71CA06-521E-4D30-B9C0-480808749662", "patterns": [ { "match": "^(module)\\s.*$", "name": "meta.function.scad", "captures": { "1": { "name": "keyword.control.scad" } } }, { "match": "\\b(if|else|for|intersection_for|assign|render|function|include|use)\\b", "name": "keyword.control.scad" }, { "begin": "/\\*\\*(?!/)", "end": "\\*/", "name": "comment.block.documentation.scad", "captures": { "0": { "name": "punctuation.definition.comment.scad" } } }, { "begin": "/\\*", "end": "\\*/", "name": "comment.block.scad", "captures": { "0": { "name": "punctuation.definition.comment.scad" } } }, { "match": "(//).*$\\n?", "name": "comment.line.double-slash.scad", "captures": { "1": { "name": "punctuation.definition.comment.scad" } } }, { "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.scad" } ], "name": "string.quoted.double.scad" }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.scad" } }, "end": "'", "patterns": [ { "match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.scad" } ], "name": "string.quoted.single.scad", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.scad" } } }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.scad" } }, "end": "\"", "patterns": [ { "match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)", "name": "constant.character.escape.scad" } ], "name": "string.quoted.double.scad", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.scad" } } }, { "match": "\\b(abs|acos|asun|atan|atan2|ceil|cos|exp|floor|ln|log|lookup|max|min|pow|rands|round|sign|sin|sqrt|tan|str|cube|sphere|cylinder|polyhedron|scale|rotate|translate|mirror|multimatrix|color|minkowski|hull|union|difference|intersection|echo)\\b", "name": "support.function.scad" }, { "match": "\\;", "name": "punctuation.terminator.statement.scad" }, { "match": ",[ |\\t]*", "name": "meta.delimiter.object.comma.scad" }, { "match": "\\.", "name": "meta.delimiter.method.period.scad" }, { "match": "\\{|\\}", "name": "meta.brace.curly.scad" }, { "match": "\\(|\\)", "name": "meta.brace.round.scad" }, { "match": "\\[|\\]", "name": "meta.brace.square.scad" }, { "match": "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)\\b", "name": "keyword.operator.scad" }, { "match": "\\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\b", "name": "constant.numeric.scad" }, { "match": "\\btrue\\b", "name": "constant.language.boolean.true.scad" }, { "match": "\\bfalse\\b", "name": "constant.language.boolean.false.scad" } ], "name": "OpenSCAD", "scopeName": "source.scad" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/scala.tmLanguage.json ================================================ { "fileTypes": ["scala"], "firstLineMatch": "^#!/.*\\b\\w*scala\\b", "foldingStartMarker": "/\\*\\*|\\{\\s*$", "foldingStopMarker": "\\*\\*/|^\\s*\\}", "keyEquivalent": "^~S", "repository": { "empty-parentheses": { "match": "(\\(\\))", "captures": { "1": { "name": "meta.bracket.scala" } }, "name": "meta.parentheses.scala" }, "imports": { "end": "(?<=[\\n;])", "begin": "\\b(import)\\s+", "beginCaptures": { "1": { "name": "keyword.other.import.scala" } }, "patterns": [ { "include": "#comments" }, { "match": "\\b(given)\\b", "name": "keyword.other.import.given.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}]+)?", "name": "entity.name.class.import.scala" }, { "match": "(`[^`]+`|(?:[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}]+))", "name": "entity.name.import.scala" }, { "match": "\\.", "name": "punctuation.definition.import" }, { "end": "}", "begin": "{", "beginCaptures": { "0": { "name": "meta.bracket.scala" } }, "patterns": [ { "match": "(?x)(given\\s)?\\s*(?:([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}]+)?)|(`[^`]+`|(?:[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{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[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*", "captures": { "1": { "name": "keyword.other.import.given.scala" }, "2": { "name": "entity.name.class.import.renamed-from.scala" }, "3": { "name": "entity.name.import.renamed-from.scala" }, "4": { "name": "keyword.other.arrow.scala" }, "5": { "name": "entity.name.class.import.renamed-to.scala" }, "6": { "name": "entity.name.import.renamed-to.scala" } } }, { "match": "\\b(given)\\b", "name": "keyword.other.import.given.scala" }, { "match": "(given\\s+)?(?:([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}]+)?)|(`[^`]+`|(?:[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.import.given.scala" }, "2": { "name": "entity.name.class.import.scala" }, "3": { "name": "entity.name.import.scala" } } } ], "endCaptures": { "0": { "name": "meta.bracket.scala" } }, "name": "meta.import.selector.scala" } ], "name": "meta.import.scala" }, "exports": { "end": "(?<=[\\n;])", "begin": "\\b(export)\\s+(given\\s+)?", "beginCaptures": { "1": { "name": "keyword.other.export.scala" }, "2": { "name": "keyword.other.export.given.scala" } }, "patterns": [ { "include": "#comments" }, { "match": "(`[^`]+`|(?:[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}]+))", "name": "entity.name.export.scala" }, { "match": "\\.", "name": "punctuation.definition.export" }, { "end": "}", "begin": "{", "beginCaptures": { "0": { "name": "meta.bracket.scala" } }, "patterns": [ { "match": "(?x)\\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}]+))\\s*", "captures": { "1": { "name": "entity.name.export.renamed-from.scala" }, "2": { "name": "keyword.other.arrow.scala" }, "3": { "name": "entity.name.export.renamed-to.scala" } } }, { "match": "([^\\s.,}]+)", "name": "entity.name.export.scala" } ], "endCaptures": { "0": { "name": "meta.bracket.scala" } }, "name": "meta.export.selector.scala" } ], "name": "meta.export.scala" }, "constants": { "patterns": [ { "match": "\\b(false|null|true)\\b", "name": "constant.language.scala" }, { "match": "\\b(0[xX][0-9a-fA-F_]*)\\b", "name": "constant.numeric.scala" }, { "match": "\\b(([0-9][0-9_]*(\\.[0-9][0-9_]*)?)([eE](\\+|-)?[0-9][0-9_]*)?|[0-9][0-9_]*)[LlFfDd]?\\b", "name": "constant.numeric.scala" }, { "match": "(\\.[0-9][0-9_]*)([eE](\\+|-)?[0-9][0-9_]*)?[LlFfDd]?\\b", "name": "constant.numeric.scala" }, { "match": "\\b(this|super)\\b", "name": "variable.language.scala" } ] }, "script-header": { "match": "^#!(.*)$", "captures": { "1": { "name": "string.unquoted.shebang.scala" } }, "name": "comment.block.shebang.scala" }, "code": { "patterns": [ { "include": "#script-header" }, { "include": "#storage-modifiers" }, { "include": "#declarations" }, { "include": "#inheritance" }, { "include": "#extension" }, { "include": "#imports" }, { "include": "#exports" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#initialization" }, { "include": "#xml-literal" }, { "include": "#keywords" }, { "include": "#using" }, { "include": "#constants" }, { "include": "#scala-symbol" }, { "include": "#singleton-type" }, { "include": "#inline" }, { "include": "#scala-quoted" }, { "include": "#char-literal" }, { "include": "#empty-parentheses" }, { "include": "#parameter-list" }, { "include": "#qualifiedClassName" }, { "include": "#backQuotedVariable" }, { "include": "#curly-braces" }, { "include": "#meta-brackets" }, { "include": "#meta-bounds" }, { "include": "#meta-colons" } ] }, "strings": { "patterns": [ { "end": "\"\"\"(?!\")", "begin": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.scala" } }, "patterns": [ { "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}", "name": "constant.character.escape.scala" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.scala" } }, "name": "string.quoted.triple.scala" }, { "begin": "\\b(raw)(\"\"\")", "end": "(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", "beginCaptures": { "1": { "name": "keyword.interpolation.scala" }, "2": { "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala" } }, "patterns": [ { "match": "\\$[\\$\"]", "name": "constant.character.escape.scala" }, { "include": "#string-interpolation" }, { "match": ".", "name": "string.quoted.triple.interpolated.scala" } ], "endCaptures": { "1": { "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala" }, "2": { "name": "invalid.illegal.unrecognized-string-escape.scala" } } }, { "begin": "\\b((?:[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}]+)?))(\"\"\")", "end": "(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", "beginCaptures": { "1": { "name": "keyword.interpolation.scala" }, "2": { "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala" } }, "patterns": [ { "include": "#string-interpolation" }, { "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}", "name": "constant.character.escape.scala" }, { "match": ".", "name": "string.quoted.triple.interpolated.scala" } ], "endCaptures": { "1": { "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala" }, "2": { "name": "invalid.illegal.unrecognized-string-escape.scala" } } }, { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.scala" } }, "patterns": [ { "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})", "name": "constant.character.escape.scala" }, { "match": "\\\\.", "name": "invalid.illegal.unrecognized-string-escape.scala" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.scala" } }, "name": "string.quoted.double.scala" }, { "begin": "\\b(raw)(\")", "end": "(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", "beginCaptures": { "1": { "name": "keyword.interpolation.scala" }, "2": { "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala" } }, "patterns": [ { "match": "\\$[\\$\"]", "name": "constant.character.escape.scala" }, { "include": "#string-interpolation" }, { "match": ".", "name": "string.quoted.double.interpolated.scala" } ], "endCaptures": { "1": { "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala" }, "2": { "name": "invalid.illegal.unrecognized-string-escape.scala" } } }, { "begin": "\\b((?:[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}]+)?))(\")", "end": "(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])", "beginCaptures": { "1": { "name": "keyword.interpolation.scala" }, "2": { "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala" } }, "patterns": [ { "match": "\\$[\\$\"]", "name": "constant.character.escape.scala" }, { "include": "#string-interpolation" }, { "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})", "name": "constant.character.escape.scala" }, { "match": "\\\\.", "name": "invalid.illegal.unrecognized-string-escape.scala" }, { "match": ".", "name": "string.quoted.double.interpolated.scala" } ], "endCaptures": { "1": { "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala" }, "2": { "name": "invalid.illegal.unrecognized-string-escape.scala" } } } ] }, "using": { "patterns": [ { "match": "(?<=\\()\\s*(using)\\s", "captures": { "1": { "name": "keyword.declaration.scala" } } } ] }, "string-interpolation": { "patterns": [ { "name": "constant.character.escape.interpolation.scala", "match": "\\$\\$" }, { "name": "meta.template.expression.scala", "match": "(\\$)([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]*)", "captures": { "1": { "name": "punctuation.definition.template-expression.begin.scala" } } }, { "name": "meta.template.expression.scala", "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.scala" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.scala" } }, "patterns": [ { "include": "#code" } ], "contentName": "meta.embedded.line.scala" } ] }, "xml-entity": { "match": "(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)", "captures": { "1": { "name": "punctuation.definition.constant.xml" }, "3": { "name": "punctuation.definition.constant.xml" } }, "name": "constant.character.entity.xml" }, "xml-singlequotedString": { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } }, "patterns": [ { "include": "#xml-entity" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "name": "string.quoted.single.xml" }, "meta-colons": { "patterns": [ { "match": "(?<!:):(?!:)", "name": "meta.colon.scala" } ], "comment": "For themes: Matching type colons" }, "keywords": { "patterns": [ { "match": "\\b(return|throw)\\b", "name": "keyword.control.flow.jump.scala" }, { "match": "\\b(classOf|isInstanceOf|asInstanceOf)\\b", "name": "support.function.type-of.scala" }, { "match": "\\b(else|if|then|do|while|for|yield|match|case)\\b", "name": "keyword.control.flow.scala" }, { "match": "^\\s*(end)\\s+(if|while|for|match)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", "name": "keyword.control.flow.end.scala" }, { "match": "^\\s*(end)\\s+(val)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", "name": "keyword.declaration.stable.end.scala" }, { "match": "^\\s*(end)\\s+(var)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", "name": "keyword.declaration.volatile.end.scala" }, { "match": "^\\s*(end)\\s+(?:(new|extension)|([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}]+)?))(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", "captures": { "1": { "name": "keyword.declaration.end.scala" }, "2": { "name": "keyword.declaration.end.scala" }, "3": { "name": "entity.name.type.declaration" } } }, { "match": "\\b(catch|finally|try)\\b", "name": "keyword.control.exception.scala" }, { "match": "^\\s*(end)\\s+(try)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)", "name": "keyword.control.exception.end.scala" }, { "match": "^\\s*(end)\\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*\\S.*).*)?$)", "captures": { "1": { "name": "keyword.declaration.end.scala" }, "2": { "name": "entity.name.declaration" } } }, { "match": "(==?|!=|<=|>=|<>|<|>)", "name": "keyword.operator.comparison.scala" }, { "match": "(\\-|\\+|\\*|/(?![/*])|%|~)", "name": "keyword.operator.arithmetic.scala" }, { "match": "(?<![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]|_)(!|&&|\\|\\|)(?![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}])", "name": "keyword.operator.logical.scala" }, { "match": "(<-|←|->|→|=>|⇒|\\?|\\:+|@|\\|)+", "name": "keyword.operator.scala" } ] }, "singleton-type": { "match": "\\.(type)(?![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}]+)?|[0-9])", "captures": { "1": { "name": "keyword.type.scala" } } }, "inline": { "patterns": [ { "match": "\\b(inline)(?=\\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*:)", "name": "storage.modifier.other" }, { "match": "\\b(inline)\\b(?=(?:.(?!\\b(?:val|def|given)\\b))*\\b(if|match)\\b)", "name": "keyword.control.flow.scala" } ] }, "scala-quoted": { "patterns": [ { "match": "['$]\\{(?!')", "name": "punctuation.section.block.begin.scala" }, { "match": "'\\[(?!')", "name": "meta.bracket.scala" } ] }, "xml-doublequotedString": { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } }, "patterns": [ { "include": "#xml-entity" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "name": "string.quoted.double.xml" }, "declarations": { "patterns": [ { "match": "\\b(def)\\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}]+)|`[^`]+`))?", "captures": { "1": { "name": "keyword.declaration.scala" }, "2": { "name": "entity.name.function.declaration" } } }, { "match": "\\b(trait)\\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}]+)|`[^`]+`))?", "captures": { "1": { "name": "keyword.declaration.scala" }, "2": { "name": "entity.name.class.declaration" } } }, { "match": "\\b(?:(case)\\s+)?(class|object|enum)\\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}]+)|`[^`]+`))?", "captures": { "1": { "name": "keyword.declaration.scala" }, "2": { "name": "keyword.declaration.scala" }, "3": { "name": "entity.name.class.declaration" } } }, { "match": "(?<!\\.)\\b(type)\\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}]+)|`[^`]+`))?", "captures": { "1": { "name": "keyword.declaration.scala" }, "2": { "name": "entity.name.type.declaration" } } }, { "match": "\\b(?:(val)|(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}]+)|`[^`]+`)?\\()", "captures": { "1": { "name": "keyword.declaration.stable.scala" }, "2": { "name": "keyword.declaration.volatile.scala" } } }, { "match": "\\b(?:(val)|(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*,)", "captures": { "1": { "name": "keyword.declaration.stable.scala" }, "2": { "name": "keyword.declaration.volatile.scala" } } }, { "match": "\\b(?:(val)|(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}]+)|`[^`]+`))?", "captures": { "1": { "name": "keyword.declaration.stable.scala" }, "2": { "name": "keyword.declaration.volatile.scala" }, "3": { "name": "variable.other.declaration.scala" } } }, { "match": "\\b(package)\\s+(object)\\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}]+)|`[^`]+`))?", "captures": { "1": { "name": "keyword.other.scoping.scala" }, "2": { "name": "keyword.declaration.scala" }, "3": { "name": "entity.name.class.declaration" } } }, { "end": "(?<=[\\n;])", "begin": "\\b(package)\\s+", "beginCaptures": { "1": { "name": "keyword.other.import.scala" } }, "patterns": [ { "include": "#comments" }, { "match": "(`[^`]+`|(?:[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}]+))", "name": "entity.name.package.scala" }, { "match": "\\.", "name": "punctuation.definition.package" } ], "name": "meta.package.scala" }, { "match": "\\b(given)\\b\\s*([_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}]+)?|`[^`]+`)?", "captures": { "1": { "name": "keyword.declaration.scala" }, "2": { "name": "entity.name.given.declaration" } } } ] }, "char-literal": { "end": "'|$", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.character.begin.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" }, { "match": "[^']{2,}", "name": "invalid.illegal.character-literal-too-long" }, { "match": "(?<!')[^']", "name": "invalid.illegal.character-literal-too-long" } ], "endCaptures": { "0": { "name": "punctuation.definition.character.end.scala" } }, "name": "string.quoted.other constant.character.literal.scala" }, "initialization": { "match": "\\b(new)\\b", "captures": { "1": { "name": "keyword.declaration.scala" } } }, "scala-symbol": { "match": "(?>'(?:[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}]+))(?!')", "name": "constant.other.symbol.scala" }, "curly-braces": { "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.scala" } }, "endCaptures": { "0": { "name": "punctuation.section.block.end.scala" } }, "patterns": [ { "include": "#code" } ] }, "meta-brackets": { "patterns": [ { "match": "\\{", "comment": "The punctuation.section.*.begin is needed for return snippet in source bundle", "name": "punctuation.section.block.begin.scala" }, { "match": "\\}", "comment": "The punctuation.section.*.end is needed for return snippet in source bundle", "name": "punctuation.section.block.end.scala" }, { "match": "{|}|\\(|\\)|\\[|\\]", "name": "meta.bracket.scala" } ], "comment": "For themes: Brackets look nice when colored." }, "qualifiedClassName": { "match": "(\\b([A-Z][\\w]*)(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)", "captures": { "1": { "name": "entity.name.class" } } }, "backQuotedVariable": { "match": "`[^`]+`" }, "storage-modifiers": { "patterns": [ { "match": "\\b(private\\[\\S+\\]|protected\\[\\S+\\]|private|protected)\\b", "name": "storage.modifier.access" }, { "match": "\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\\b", "name": "storage.modifier.other" }, { "match": "(?<=^|\\s)\\b(transparent|opaque|infix|open|inline)\\b(?=[a-z\\s]*\\b(def|val|var|given|type|class|trait|object|enum)\\b)", "name": "storage.modifier.other" } ] }, "meta-bounds": { "match": "<%|=:=|<:<|<%<|>:|<:", "comment": "For themes: Matching view bounds", "name": "meta.bounds.scala" }, "comments": { "patterns": [ { "include": "#block-comments" }, { "end": "(?!\\G)", "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.scala" } }, "patterns": [ { "end": "\\n", "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.scala" } }, "name": "comment.line.double-slash.scala" } ] } ] }, "block-comments": { "patterns": [ { "match": "/\\*\\*/", "captures": { "0": { "name": "punctuation.definition.comment.scala" } }, "name": "comment.block.empty.scala" }, { "end": "\\*/", "begin": "^\\s*(/\\*\\*)(?!/)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.scala" } }, "patterns": [ { "match": "(@param)\\s+(\\S+)", "captures": { "1": { "name": "keyword.other.documentation.scaladoc.scala" }, "2": { "name": "variable.parameter.scala" } } }, { "match": "(@(?:tparam|throws))\\s+(\\S+)", "captures": { "1": { "name": "keyword.other.documentation.scaladoc.scala" }, "2": { "name": "entity.name.class" } } }, { "match": "@(return|see|note|example|constructor|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b", "name": "keyword.other.documentation.scaladoc.scala" }, { "match": "(\\[\\[)([^\\]]+)(\\]\\])", "captures": { "1": { "name": "punctuation.definition.documentation.link.scala" }, "2": { "name": "string.other.link.title.markdown" }, "3": { "name": "punctuation.definition.documentation.link.scala" } } }, { "include": "#block-comments" } ], "endCaptures": { "0": { "name": "punctuation.definition.comment.scala" } }, "name": "comment.block.documentation.scala" }, { "end": "\\*/", "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.scala" } }, "patterns": [ { "include": "#block-comments" } ], "name": "comment.block.scala" } ] }, "xml-embedded-content": { "patterns": [ { "end": "}", "begin": "{", "patterns": [ { "include": "#code" } ], "captures": { "0": { "name": "meta.bracket.scala" } }, "name": "meta.source.embedded.scala" }, { "match": " (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)=", "captures": { "1": { "name": "entity.other.attribute-name.namespace.xml" }, "2": { "name": "entity.other.attribute-name.xml" }, "3": { "name": "punctuation.separator.namespace.xml" }, "4": { "name": "entity.other.attribute-name.localname.xml" } } }, { "include": "#xml-doublequotedString" }, { "include": "#xml-singlequotedString" } ] }, "inheritance": { "patterns": [ { "match": "\\b(extends|with|derives)\\b\\s*([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}]+)?|`[^`]+`|(?=\\([^\\)]+=>)|(?=(?:[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.declaration.scala" }, "2": { "name": "entity.other.inherited-class.scala" } } } ] }, "extension": { "patterns": [ { "match": "^\\s*(extension)\\s+(?=[\\[\\(])", "captures": { "1": { "name": "keyword.declaration.scala" } } } ] }, "parameter-list": { "patterns": [ { "match": "(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_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}]+)?)\\s*(:)\\s+", "captures": { "1": { "name": "variable.parameter.scala" }, "2": { "name": "meta.colon.scala" } } } ] }, "xml-literal": { "patterns": [ { "end": "(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]*[_a-zA-Z0-9])(>)", "begin": "(<)((?:([_a-zA-Z0-9][_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*))(?=(\\s[^>]*)?></\\2>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xml" }, "3": { "name": "entity.name.tag.namespace.xml" }, "4": { "name": "entity.name.tag.xml" }, "5": { "name": "punctuation.separator.namespace.xml" }, "6": { "name": "entity.name.tag.localname.xml" } }, "patterns": [ { "include": "#xml-embedded-content" } ], "comment": "We do not allow a tag name to start with a - since this would likely conflict with the <- operator. This is not very common for tag names anyway. Also code such as -- if (val <val2 || val> val3) will falsly be recognized as an xml tag. The solution is to put a space on either side of the comparison operator", "endCaptures": { "1": { "name": "punctuation.definition.tag.xml" }, "2": { "name": "meta.scope.between-tag-pair.xml" }, "3": { "name": "entity.name.tag.namespace.xml" }, "4": { "name": "entity.name.tag.xml" }, "5": { "name": "punctuation.separator.namespace.xml" }, "6": { "name": "entity.name.tag.localname.xml" }, "7": { "name": "punctuation.definition.tag.xml" } }, "name": "meta.tag.no-content.xml" }, { "end": "(/?>)", "begin": "(</?)(?:([_a-zA-Z0-9][-_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*)(?=[^>]*?>)", "patterns": [ { "include": "#xml-embedded-content" } ], "captures": { "1": { "name": "punctuation.definition.tag.xml" }, "2": { "name": "entity.name.tag.namespace.xml" }, "3": { "name": "entity.name.tag.xml" }, "4": { "name": "punctuation.separator.namespace.xml" }, "5": { "name": "entity.name.tag.localname.xml" } }, "name": "meta.tag.xml" }, { "include": "#xml-entity" } ] } }, "uuid": "158C0929-299A-40C8-8D89-316BE0C446E8", "patterns": [ { "include": "#code" } ], "name": "scala", "scopeName": "source.scala" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/scheme.tmLanguage.json ================================================ { "foldingStartMarker": "(?x)^ [ \\t]* \\(\n\t (?<par>\n\t ( [^()\\n]++ | \\( \\g<par> \\)? )*+\n\t )\n\t$", "foldingStopMarker": "^\\s*$", "keyEquivalent": "^~S", "fileTypes": ["scm", "sch"], "repository": { "quoted": { "patterns": [ { "include": "#string" }, { "begin": "(\\()", "endCaptures": { "1": { "name": "punctuation.section.expression.end.scheme" } }, "end": "(\\))", "patterns": [{ "include": "#quoted" }], "name": "meta.expression.scheme", "beginCaptures": { "1": { "name": "punctuation.section.expression.begin.scheme" } } }, { "include": "#quote" }, { "include": "#illegal" } ] }, "illegal": { "match": "[()\\[\\]]", "name": "invalid.illegal.parenthesis.scheme" }, "string": { "begin": "(\")", "endCaptures": { "1": { "name": "punctuation.definition.string.end.scheme" } }, "end": "(\")", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.scheme" } ], "name": "string.quoted.double.scheme", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.scheme" } } }, "quote": { "comment": "\n\t\t\t\tWe need to be able to quote any kind of item, which creates\n\t\t\t\ta tiny bit of complexity in our grammar. It is hopefully\n\t\t\t\tnot overwhelming complexity.\n\t\t\t\t\n\t\t\t\tNote: the first two matches are special cases. quoted\n\t\t\t\tsymbols, and quoted empty lists are considered constant.other\n\t\t\t\t\n\t\t\t", "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t", "name": "constant.other.symbol.scheme", "captures": { "1": { "name": "punctuation.section.quoted.symbol.scheme" } } }, { "match": "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t((\\()\\s*(\\)))\n\t\t\t\t\t", "name": "constant.other.empty-list.schem", "captures": { "3": { "name": "punctuation.section.expression.begin.scheme" }, "1": { "name": "punctuation.section.quoted.empty-list.scheme" }, "4": { "name": "punctuation.section.expression.end.scheme" }, "2": { "name": "meta.expression.scheme" } } }, { "begin": "(')\\s*", "end": "(?=[\\s()])|(?<=\\n)", "comment": "quoted double-quoted string or s-expression", "name": "string.other.quoted-object.scheme", "beginCaptures": { "1": { "name": "punctuation.section.quoted.scheme" } }, "patterns": [{ "include": "#quoted" }] } ] }, "quote-sexp": { "begin": "(?<=\\()\\s*(quote)\\b\\s*", "end": "(?=[\\s)])|(?<=\\n)", "comment": "\n\t\t\t\tSomething quoted with (quote «thing»). In this case «thing»\n\t\t\t\twill not be evaluated, so we are considering it a string.\n\t\t\t", "contentName": "string.other.quote.scheme", "beginCaptures": { "1": { "name": "keyword.control.quote.scheme" } }, "patterns": [{ "include": "#quoted" }] }, "language-functions": { "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\(|\\[)) # preceded by space or ( \n\t\t\t\t\t\t( do|or|and|else|quasiquote|begin|if|case|set!|\n\t\t\t\t\t\t cond|let|unquote|define|let\\*|unquote-splicing|delay|\n\t\t\t\t\t\t letrec)\n\t\t\t\t\t\t(?=(\\s|\\())", "name": "keyword.control.scheme" }, { "comment": "\n\t\t\t\t\t\tThese functions run a test, and return a boolean\n\t\t\t\t\t\tanswer.\n\t\t\t\t\t", "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( char-alphabetic|char-lower-case|char-numeric|\n\t\t\t\t\t\t char-ready|char-upper-case|char-whitespace|\n\t\t\t\t\t\t (?:char|string)(?:-ci)?(?:=|<=?|>=?)|\n\t\t\t\t\t\t atom|boolean|bound-identifier=|char|complex|\n\t\t\t\t\t\t identifier|integer|symbol|free-identifier=|inexact|\n\t\t\t\t\t\t eof-object|exact|list|(?:input|output)-port|pair|\n\t\t\t\t\t\t real|rational|zero|vector|negative|odd|null|string|\n\t\t\t\t\t\t eq|equal|eqv|even|number|positive|procedure\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(\\?)\t\t# name ends with ? sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t", "name": "support.function.boolean-test.scheme" }, { "comment": "\n\t\t\t\t\t\tThese functions change one type into another.\n\t\t\t\t\t", "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( char->integer|exact->inexact|inexact->exact|\n\t\t\t\t\t\t integer->char|symbol->string|list->vector|\n\t\t\t\t\t\t list->string|identifier->symbol|vector->list|\n\t\t\t\t\t\t string->list|string->number|string->symbol|\n\t\t\t\t\t\t number->string\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\t\t\t\t\t\n\t\t\t\t\t", "name": "support.function.convert-type.scheme" }, { "comment": "\n\t\t\t\t\t\tThese functions are potentially dangerous because\n\t\t\t\t\t\tthey have side-effects which could affect other\n\t\t\t\t\t\tparts of the program.\n\t\t\t\t\t", "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( set-(?:car|cdr)|\t\t\t\t # set car/cdr\n\t\t\t\t\t\t (?:vector|string)-(?:fill|set) # fill/set string/vector\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(!)\t\t\t# name ends with ! sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t", "name": "support.function.with-side-effects.scheme" }, { "comment": "\n\t\t\t\t\t\t+, -, *, /, =, >, etc. \n\t\t\t\t\t", "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( >=?|<=?|=|[*/+-])\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t\t", "name": "keyword.operator.arithmetic.scheme" }, { "match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( append|apply|approximate|\n\t\t\t\t\t\t call-with-current-continuation|call/cc|catch|\n\t\t\t\t\t\t construct-identifier|define-syntax|display|foo|\n\t\t\t\t\t\t for-each|force|cd|gen-counter|gen-loser|\n\t\t\t\t\t\t generate-identifier|last-pair|length|let-syntax|\n\t\t\t\t\t\t letrec-syntax|list|list-ref|list-tail|load|log|\n\t\t\t\t\t\t macro|magnitude|map|map-streams|max|member|memq|\n\t\t\t\t\t\t memv|min|newline|nil|not|peek-char|rationalize|\n\t\t\t\t\t\t read|read-char|return|reverse|sequence|substring|\n\t\t\t\t\t\t syntax|syntax-rules|transcript-off|transcript-on|\n\t\t\t\t\t\t truncate|unwrap-syntax|values-list|write|write-char|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # cons, car, cdr, etc\n\t\t\t\t\t\t cons|c(a|d){1,4}r| \n \n\t\t\t\t\t\t # unary math operators\n\t\t\t\t\t\t abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|\n\t\t\t\t\t\t cos|floor|round|sin|sqrt|tan|\n\t\t\t\t\t\t (?:real|imag)-part|numerator|denominator\n \n\t\t\t\t\t\t # other math operators\n\t\t\t\t\t\t modulo|exp|expt|remainder|quotient|lcm|\n \n\t\t\t\t\t\t # ports / files\n\t\t\t\t\t\t call-with-(?:input|output)-file|\n\t\t\t\t\t\t (?:close|current)-(?:input|output)-port|\n\t\t\t\t\t\t with-(?:input|output)-from-file|\n\t\t\t\t\t\t open-(?:input|output)-file|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # char-«foo»\n\t\t\t\t\t\t char-(?:downcase|upcase|ready)|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # make-«foo»\n\t\t\t\t\t\t make-(?:polar|promise|rectangular|string|vector)\n\t\t\t\t\t\t \n\t\t\t\t\t\t # string-«foo», vector-«foo»\n\t\t\t\t\t\t string(?:-(?:append|copy|length|ref))?|\n\t\t\t\t\t\t vector(?:-length|-ref)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t", "name": "support.function.general.scheme" }, { "match": "(?x)\n\t\t\t\t\t\t(?<=(\\()) # preceded by (\n\t\t\t\t\t\t( \n\t\t\t\t\t\t\t# nullary operators\n\t\t\t\t\t\t\tlist|newline\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\))) # followed by )\n\t\t\t\t\t", "name": "support.function.general.scheme.nullary" } ] }, "sexp": { "begin": "(\\()", "endCaptures": { "1": { "name": "punctuation.section.expression.end.scheme" }, "2": { "name": "meta.after-expression.scheme" } }, "end": "(\\))(\\n)?", "patterns": [ { "include": "#comment" }, { "include": "#constants" }, { "begin": "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(define)\\s+ # define\n\t\t\t\t\t\t(\\() # list of parameters\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t\t ((\\s+\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t )*\n\t\t\t\t\t\t )\\s*\n\t\t\t\t\t\t(\\))\n\t\t\t\t\t", "end": "(?=\\))", "patterns": [ { "include": "#comment" }, { "include": "#constants" }, { "include": "#sexp" }, { "include": "#illegal" } ], "name": "meta.declaration.procedure.scheme", "captures": { "3": { "name": "entity.name.function.scheme" }, "1": { "name": "keyword.control.scheme" }, "4": { "name": "variable.parameter.function.scheme" }, "2": { "name": "punctuation.definition.function.scheme" }, "7": { "name": "punctuation.definition.function.scheme" } } }, { "begin": "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(lambda)\\s+\n\t\t\t\t\t\t(\\() # opening paren\n\t\t\t\t\t\t((?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t \\s+\n\t\t\t\t\t\t)*(?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t)?)\n\t\t\t\t\t\t(\\)) # closing paren\n\t\t\t\t\t", "end": "(?=\\))", "comment": "\n\t\t\t\t\t\tNot sure this one is quite correct. That \\s* is\n\t\t\t\t\t\tparticularly troubling\n\t\t\t\t\t", "name": "meta.declaration.procedure.scheme", "captures": { "3": { "name": "variable.parameter.scheme" }, "1": { "name": "keyword.control.scheme" }, "6": { "name": "punctuation.definition.variable.scheme" }, "2": { "name": "punctuation.definition.variable.scheme" } }, "patterns": [ { "include": "#comment" }, { "include": "#constants" }, { "include": "#sexp" }, { "include": "#illegal" } ] }, { "begin": "(?<=\\()(define)\\s([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\\s*.*?", "end": "(?=\\))", "patterns": [ { "include": "#comment" }, { "include": "#constants" }, { "include": "#sexp" }, { "include": "#illegal" } ], "name": "meta.declaration.variable.scheme", "captures": { "1": { "name": "keyword.control.scheme" }, "2": { "name": "variable.other.scheme" } } }, { "include": "#quote-sexp" }, { "include": "#quote" }, { "include": "#language-functions" }, { "include": "#string" }, { "include": "#constants" }, { "match": "(?<=[\\(\\s])(#\\\\)(space|newline|tab)(?=[\\s\\)])", "name": "constant.character.named.scheme" }, { "match": "(?<=[\\(\\s])(#\\\\)x[0-9A-F]{2,4}(?=[\\s\\)])", "name": "constant.character.hex-literal.scheme" }, { "match": "(?<=[\\(\\s])(#\\\\).(?=[\\s\\)])", "name": "constant.character.escape.scheme" }, { "comment": "\n\t\t\t\t\t\tthe . in (a . b) which conses together two elements\n\t\t\t\t\t\ta and b. (a b c) == (a . (b . (c . nil)))\n\t\t\t\t\t", "match": "(?<=[ ()])\\.(?=[ ()])", "name": "punctuation.separator.cons.scheme" }, { "include": "#sexp" }, { "include": "#illegal" } ], "name": "meta.expression.scheme", "beginCaptures": { "1": { "name": "punctuation.section.expression.begin.scheme" } } }, "comment": { "match": "(;).*$\\n?", "name": "comment.line.semicolon.scheme", "captures": { "1": { "name": "punctuation.definition.comment.scheme" } } }, "constants": { "patterns": [ { "match": "#[t|f]", "name": "constant.language.boolean.scheme" }, { "match": "(?<=[\\(\\s])((#e|#i)?[0-9]+(\\.[0-9]+)?|(#x)[0-9a-fA-F]+|(#o)[0-7]+|(#b)[01]+)(?=[\\s;()'\",\\[\\]])", "name": "constant.numeric.scheme" } ] } }, "uuid": "3EC2CFD0-909C-4692-AC29-1A60ADBC161E", "patterns": [ { "include": "#comment" }, { "include": "#sexp" }, { "include": "#string" }, { "include": "#language-functions" }, { "include": "#quote" }, { "include": "#illegal" }, { "include": "#constants" } ], "comment": "\n\t\tThe foldings do not currently work the way I want them to. This\n\t\tmay be a limitation of the way they are applied rather than the\n\t\tregexps in use. Nonetheless, the foldings will end on the last\n\t\tidentically indented blank line following an s-expression. Not\n\t\tideal perhaps, but it works. Also, the #illegal pattern never\n\t\tmatches an unpaired ( as being illegal. Why?! -- Rob Rix\n\t\t\n\t\tOk, hopefully this grammar works better on quoted stuff now. It\n\t\tmay break for fancy macros, but should generally work pretty\n\t\tsmoothly. -- Jacob Rus\n\t\t\n\t\tI have attempted to get this under control but because of the way folding\n\t\tand indentation interact in Textmate, I am not sure if it is possible. In the\n\t\tmeantime, I have implemented Python-style folding anchored at newlines.\n\t\tAdditionally, I have made some minor improvements to the numeric constant\n\t\thighlighting. Next up is square bracket expressions, I guess, but that\n\t\tshould be trivial. -- ozy`\n\t", "name": "Scheme", "scopeName": "source.scheme" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/scrypt.tmLanguage.json ================================================ { "fileTypes": ["scrypt"], "name": "sCrypt", "patterns": [ { "include": "#comment" }, { "include": "#import" }, { "include": "#alias" }, { "include": "#operator" }, { "include": "#control" }, { "include": "#constant" }, { "include": "#number" }, { "include": "#string" }, { "include": "#type" }, { "include": "#global" }, { "include": "#declaration" }, { "include": "#function-call" }, { "include": "#punctuation" }, { "include": "#asm-keywords" }, { "include": "#std-contracts" } ], "repository": { "comment": { "patterns": [ { "include": "#comment-line" }, { "include": "#comment-block" } ] }, "comment-line": { "match": "(?<!tp:)//.*?$", "name": "comment.line.scrypt" }, "comment-block": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.scrypt" }, "operator": { "patterns": [ { "include": "#operator-logic" }, { "include": "#operator-arithmetic" }, { "include": "#operator-binary" }, { "include": "#operator-assignment" } ] }, "operator-logic": { "match": "(==|!=|!(?!=)|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?)", "name": "keyword.operator.logic.scrypt" }, "operator-arithmetic": { "match": "(\\+|\\-|\\/|\\%|(?<!\\*)\\*(?!\\*))", "name": "keyword.operator.arithmetic.scrypt" }, "operator-binary": { "match": "(\\~|\\^|\\&|\\||<<|>>)", "name": "keyword.operator.binary.scrypt" }, "operator-assignment": { "match": "(\\:?=)", "name": "keyword.operator.assignment.scrypt" }, "control": { "patterns": [ { "include": "#control-flow" }, { "include": "#control-new" }, { "include": "#control-seperator" } ] }, "control-flow": { "match": "\\b(if|else|loop|returns?)\\b", "name": "keyword.control.flow.scrypt" }, "control-new": { "match": "\\b(new)\\b", "name": "keyword.control.new.scrypt" }, "control-seperator": { "match": "(\\*{3,})", "name": "keyword.other.seperator.scrypt" }, "constant": { "patterns": [ { "include": "#constant-boolean" } ] }, "constant-boolean": { "match": "\\b(true|false)\\b", "name": "constant.language.boolean.scrypt" }, "number": { "patterns": [ { "include": "#number-decimal" }, { "include": "#number-hex" } ] }, "number-decimal": { "match": "\\b(\\d+(\\.\\d+)?)\\b", "name": "constant.numeric.decimal.scrypt" }, "number-hex": { "match": "\\b(0[xX][a-fA-F0-9]+)\\b", "name": "constant.numeric.hexadecimal.scrypt" }, "string": { "patterns": [ { "include": "#single-byte" }, { "include": "#string-bytes" } ] }, "single-byte": { "match": "('[0-9a-fA-F]*')", "name": "string.quoted.single.bytes.scrypt" }, "string-bytes": { "match": "\\b(b'[0-9a-fA-F]*')", "name": "string.quoted.single.bytes.scrypt" }, "type": { "patterns": [ { "include": "#type-primitive" }, { "include": "#type-const" } ] }, "type-primitive": { "match": "\\b(bool|int|bytes|PrivKey|PubKey|Sig|Ripemd160|Sha1|Sha256|SigHashType|SigHashPreimage|OpCodeType)\\b", "name": "support.type.primitive.scrypt" }, "type-const": { "match": "\\b(const)\\b", "name": "keyword.other.const.scrypt" }, "global": { "patterns": [ { "include": "#global-variables" }, { "include": "#global-functions" } ] }, "global-variables": { "patterns": [ { "match": "\\b(this)\\b", "name": "variable.language.this.scrypt" } ] }, "global-functions": { "patterns": [ { "match": "\\b(require)\\b", "name": "keyword.control.exceptions.scrypt" }, { "match": "\\b(exit)\\b", "name": "keyword.control.exceptions.scrypt" }, { "match": "\\b(abs|min|max|within|ripemd160|sha1|sha256|hash160|hash256|checkSig|checkMultiSig|num2bin|pack|unpack|len|reverseBytes|repeat)\\b", "name": "support.function.math.scrypt" } ] }, "declaration": { "patterns": [ { "include": "#declaration-contract" }, { "include": "#declaration-function" }, { "include": "#declaration-constructor" }, { "include": "#declaration-struct" } ] }, "declaration-contract": { "patterns": [ { "match": "\\b(contract|library)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.contract.scrypt" }, "3": { "name": "entity.name.type.contract.scrypt" } } } ] }, "declaration-struct": { "patterns": [ { "match": "\\b(struct)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.struct.scrypt" }, "3": { "name": "entity.name.type.struct.scrypt" } } } ] }, "declaration-constructor": { "match": "\\b(constructor)\\b", "captures": { "1": { "name": "storage.type.constructor.scrypt" } } }, "declaration-function": { "patterns": [ { "match": "\\b(function)\\s+([A-Za-z_]\\w*)\\b", "captures": { "1": { "name": "storage.type.function.scrypt" }, "2": { "name": "entity.name.function.scrypt" } } }, { "match": "\\b(public|private)\\b", "name": "storage.type.modifier.scrypt" }, { "match": "\\b(static)\\b", "name": "storage.type.modifier.scrypt" } ] }, "function-call": { "match": "\\b\\.\\s*([A-Za-z_]\\w*)\\s*\\(", "captures": { "1": { "name": "entity.name.function.scrypt" } } }, "punctuation": { "patterns": [ { "match": ";", "name": "punctuation.terminator.statement.scrypt" }, { "match": "\\.", "name": "punctuation.accessor.scrypt" }, { "match": ",", "name": "punctuation.separator.scrypt" } ] }, "asm-keywords": { "begin": "(asm)\\s*(?=\\{)", "beginCaptures": { "0": { "name": "keyword.other.scrypt" } }, "end": "(?<=\\s*)\\}", "patterns": [ { "match": "\\s(\\$\\w+)\\b", "name": "variable.other.scrypt" }, { "comment": "Numeric constant", "name": "constant.numeric.hexadecimal.scrypt", "match": "\\b([A-Fa-f0-9]+)\\b" }, { "name": "support.other", "match": "(?i)\\b(OP_PUSHDATA1|OP_PUSHDATA2|OP_PUSHDATA4)\\b" }, { "name": "constant.language", "match": "(?i)\\b(OP_0|OP_FALSE|OP_1NEGATE|OP_1|OP_TRUE|OP_2|OP_3|OP_4|OP_5|OP_6|OP_7|OP_8|OP_9|OP_10|OP_11|OP_12|OP_13|OP_14|OP_15|OP_16)\\b" }, { "name": "support.function", "match": "(?i)\\b(OP_1ADD|OP_1SUB|OP_NEGATE|OP_ABS|OP_NOT|OP_0NOTEQUAL|OP_ADD|OP_SUB|OP_MUL|OP_DIV|OP_MOD|OP_LSHIFT|OP_RSHIFT|OP_BOOLAND|OP_BOOLOR|OP_NUMEQUAL|OP_NUMEQUALVERIFY|OP_NUMNOTEQUAL|OP_LESSTHAN|OP_GREATERTHAN|OP_LESSTHANOREQUAL|OP_GREATERTHANOREQUAL|OP_MIN|OP_MAX|OP_WITHIN)\\b" }, { "name": "support.function", "match": "(?i)\\b(OP_CAT|OP_SPLIT|OP_BIN2NUM|OP_NUM2BIN|OP_SIZE)\\b" }, { "name": "keyword.control", "match": "(?i)\\b(OP_NOP|OP_IF|OP_NOTIF|OP_ELSE|OP_ENDIF|OP_VERIFY|OP_RETURN)\\b" }, { "name": "support.function", "match": "(?i)\\b(OP_TOALTSTACK|OP_FROMALTSTACK|OP_IFDUP|OP_DEPTH|OP_DROP|OP_DUP|OP_NIP|OP_OVER|OP_PICK|OP_ROLL|OP_ROT|OP_SWAP|OP_TUCK|OP_2DROP|OP_2DUP|OP_3DUP|OP_2OVER|OP_2ROT|OP_2SWAP)\\b" }, { "name": "support.function", "match": "(?i)\\b(OP_RIPEMD160|OP_SHA1|OP_SHA256|OP_HASH160|OP_HASH256|OP_CODESEPARATOR|OP_CHECKSIG|OP_CHECKSIGVERIFY|OP_CHECKMULTISIG|OP_CHECKMULTISIGVERIFY)\\b" }, { "name": "support.function", "match": "(?i)\\b(OP_INVERT|OP_AND|OP_OR|OP_XOR|OP_EQUAL|OP_EQUALVERIFY)\\b" }, { "name": "invalid.illegal", "match": "(?i)\\b(OP_VER|OP_VERIF|OP_VERNOTIF|OP_2MUL|OP_2DIV|OP_RESERVED|OP_VER|OP_VERIF|OP_VERNOTIF|OP_RESERVED1|OP_RESERVED2|OP_NOP1|OP_NOP2|OP_NOP3|OP_NOP4|OP_NOP5|OP_NOP6|OP_NOP7|OP_NOP8|OP_NOP9|OP_NOP10)\\b" }, { "include": "#comment-line" }, { "include": "#comment-block" } ] }, "std-contracts": { "patterns": [ { "name": "entity.name.type.contract.scrypt", "match": "\\b(P2PKH|P2PK|Tx|HashPuzzleRipemd160|HashPuzzleSha1|HashPuzzleSha256|HashPuzzleHash160)\\b" } ] }, "import": { "begin": "\\b(import)\\s", "beginCaptures": { "1": { "name": "keyword.other.import.scrypt" } }, "end": "\\s*(;|\n)", "endCaptures": { "1": { "name": "punctuation.terminator.scrypt" } }, "name": "meta.import.scrypt", "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.separator.scrypt" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.separator.scrypt" } }, "contentName": "string.quoted.double.bytes.scrypt" } ] }, "alias": { "begin": "\\b(type)\\s", "beginCaptures": { "1": { "name": "keyword.other.type.scrypt" } }, "end": "\\s*(;)", "endCaptures": { "1": { "name": "punctuation.terminator.scrypt" } }, "name": "meta.alias.scrypt", "contentName": "string.quoted.double.bytes.scrypt", "patterns": [ { "match": "\\b([A-Za-z_]\\w*)\\s*(=)\\s*([A-Za-z_]\\w*)\\b", "captures": { "1": { "name": "entity.name.type.alias.scrypt" }, "2": { "name": "keyword.operator.assignment.scrypt" }, "3": { "name": "support.type.primitive.scrypt" } } } ] } }, "scopeName": "source.scrypt" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/scss.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-sass/blob/master/grammars/scss.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47", "name": "SCSS", "scopeName": "source.css.scss", "patterns": [ { "include": "#variable_setting" }, { "include": "#at_rule_forward" }, { "include": "#at_rule_use" }, { "include": "#at_rule_include" }, { "include": "#at_rule_import" }, { "include": "#general" }, { "include": "#flow_control" }, { "include": "#rules" }, { "include": "#property_list" }, { "include": "#at_rule_mixin" }, { "include": "#at_rule_media" }, { "include": "#at_rule_function" }, { "include": "#at_rule_charset" }, { "include": "#at_rule_option" }, { "include": "#at_rule_namespace" }, { "include": "#at_rule_fontface" }, { "include": "#at_rule_page" }, { "include": "#at_rule_keyframes" }, { "include": "#at_rule_at_root" }, { "include": "#at_rule_supports" }, { "match": ";", "name": "punctuation.terminator.rule.css" } ], "repository": { "at_rule_charset": { "begin": "\\s*((@)charset\\b)\\s*", "captures": { "1": { "name": "keyword.control.at-rule.charset.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*((?=;|$))", "name": "meta.at-rule.charset.scss", "patterns": [ { "include": "#variable" }, { "include": "#string_single" }, { "include": "#string_double" } ] }, "at_rule_content": { "begin": "\\s*((@)content\\b)\\s*", "captures": { "1": { "name": "keyword.control.content.scss" } }, "end": "\\s*((?=;))", "name": "meta.content.scss", "patterns": [ { "include": "#variable" }, { "include": "#selectors" }, { "include": "#property_values" } ] }, "at_rule_each": { "begin": "\\s*((@)each\\b)\\s*", "captures": { "1": { "name": "keyword.control.each.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*((?=}))", "name": "meta.at-rule.each.scss", "patterns": [ { "match": "\\b(in|,)\\b", "name": "keyword.control.operator" }, { "include": "#variable" }, { "include": "#property_values" }, { "include": "$self" } ] }, "at_rule_else": { "begin": "\\s*((@)else(\\s*(if)?))\\s*", "captures": { "1": { "name": "keyword.control.else.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.else.scss", "patterns": [ { "include": "#conditional_operators" }, { "include": "#variable" }, { "include": "#property_values" } ] }, "at_rule_extend": { "begin": "\\s*((@)extend\\b)\\s*", "captures": { "1": { "name": "keyword.control.at-rule.extend.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?=;)", "name": "meta.at-rule.extend.scss", "patterns": [ { "include": "#variable" }, { "include": "#selectors" }, { "include": "#property_values" } ] }, "at_rule_fontface": { "patterns": [ { "begin": "^\\s*((@)font-face\\b)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.fontface.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.fontface.scss", "patterns": [ { "include": "#function_attributes" } ] } ] }, "at_rule_for": { "begin": "\\s*((@)for\\b)\\s*", "captures": { "1": { "name": "keyword.control.for.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.for.scss", "patterns": [ { "match": "(==|!=|<=|>=|<|>|from|to|through)", "name": "keyword.control.operator" }, { "include": "#variable" }, { "include": "#property_values" }, { "include": "$self" } ] }, "at_rule_forward": { "begin": "\\s*((@)forward\\b)\\s*", "captures": { "1": { "name": "keyword.control.at-rule.forward.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?=;)", "name": "meta.at-rule.forward.scss", "patterns": [ { "match": "\\b(as|hide|show)\\b", "name": "keyword.control.operator" }, { "match": "\\b([\\w-]+)(\\*)", "captures": { "1": { "name": "entity.other.attribute-name.module.scss" }, "2": { "name": "punctuation.definition.wildcard.scss" } } }, { "match": "\\b[\\w-]+\\b", "name": "entity.name.function.scss" }, { "include": "#variable" }, { "include": "#string_single" }, { "include": "#string_double" }, { "include": "#comment_line" }, { "include": "#comment_block" } ] }, "at_rule_function": { "patterns": [ { "begin": "\\s*((@)function\\b)\\s*", "captures": { "1": { "name": "keyword.control.at-rule.function.scss" }, "2": { "name": "punctuation.definition.keyword.scss" }, "3": { "name": "entity.name.function.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.function.scss", "patterns": [ { "include": "#function_attributes" } ] }, { "captures": { "1": { "name": "keyword.control.at-rule.function.scss" }, "2": { "name": "punctuation.definition.keyword.scss" }, "3": { "name": "entity.name.function.scss" } }, "match": "\\s*((@)function\\b)\\s*", "name": "meta.at-rule.function.scss" } ] }, "at_rule_if": { "begin": "\\s*((@)if\\b)\\s*", "captures": { "1": { "name": "keyword.control.if.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.if.scss", "patterns": [ { "include": "#conditional_operators" }, { "include": "#variable" }, { "include": "#property_values" } ] }, "at_rule_import": { "begin": "\\s*((@)import\\b)\\s*", "captures": { "1": { "name": "keyword.control.at-rule.import.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*((?=;)|(?=}))", "name": "meta.at-rule.import.scss", "patterns": [ { "include": "#variable" }, { "include": "#string_single" }, { "include": "#string_double" }, { "include": "#functions" }, { "include": "#comment_line" } ] }, "at_rule_include": { "patterns": [ { "begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()", "beginCaptures": { "1": { "name": "variable.scss" }, "2": { "name": "punctuation.access.module.scss" }, "3": { "name": "entity.name.function.scss" }, "4": { "name": "punctuation.definition.parameters.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.scss" } }, "name": "meta.at-rule.include.scss", "patterns": [ { "include": "#function_attributes" } ] }, { "match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)", "captures": { "0": { "name": "meta.at-rule.include.scss" }, "1": { "name": "variable.scss" }, "2": { "name": "punctuation.access.module.scss" }, "3": { "name": "entity.name.function.scss" } } }, { "match": "((@)include)\\b", "captures": { "0": { "name": "meta.at-rule.include.scss" }, "1": { "name": "keyword.control.at-rule.include.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } } } ] }, "at_rule_keyframes": { "begin": "(?<=^|\\s)(@)(?:-(?:webkit|moz)-)?keyframes\\b", "beginCaptures": { "0": { "name": "keyword.control.at-rule.keyframes.scss" }, "1": { "name": "punctuation.definition.keyword.scss" } }, "end": "(?<=})", "name": "meta.at-rule.keyframes.scss", "patterns": [ { "match": "(?<=@keyframes)\\s+((?:[_A-Za-z][-\\w]|-[_A-Za-z])[-\\w]*)", "captures": { "1": { "name": "entity.name.function.scss" } } }, { "begin": "(?<=@keyframes)\\s+(\")", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.scss" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.scss" } }, "name": "string.quoted.double.scss", "contentName": "entity.name.function.scss", "patterns": [ { "match": "\\\\(\\h{1,6}|.)", "name": "constant.character.escape.scss" }, { "include": "#interpolation" } ] }, { "begin": "(?<=@keyframes)\\s+(')", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.scss" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.scss" } }, "name": "string.quoted.single.scss", "contentName": "entity.name.function.scss", "patterns": [ { "match": "\\\\(\\h{1,6}|.)", "name": "constant.character.escape.scss" }, { "include": "#interpolation" } ] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.keyframes.begin.scss" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.keyframes.end.scss" } }, "patterns": [ { "match": "\\b(?:(?:100|[1-9]\\d|\\d)%|from|to)(?=\\s*{)", "name": "entity.other.attribute-name.scss" }, { "include": "#flow_control" }, { "include": "#interpolation" }, { "include": "#property_list" }, { "include": "#rules" } ] } ] }, "at_rule_media": { "patterns": [ { "begin": "^\\s*((@)media)\\b", "beginCaptures": { "1": { "name": "keyword.control.at-rule.media.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.media.scss", "patterns": [ { "include": "#comment_docblock" }, { "include": "#comment_block" }, { "include": "#comment_line" }, { "match": "\\b(only)\\b", "name": "keyword.control.operator.css.scss" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.media-query.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.media-query.end.bracket.round.scss" } }, "name": "meta.property-list.media-query.scss", "patterns": [ { "begin": "(?<![-a-z])(?=[-a-z])", "end": "$|(?![-a-z])", "name": "meta.property-name.media-query.scss", "patterns": [ { "include": "source.css#media-features" }, { "include": "source.css#property-names" } ] }, { "begin": "(:)\\s*(?!(\\s*{))", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.scss" } }, "end": "\\s*(;|(?=}|\\)))", "endCaptures": { "1": { "name": "punctuation.terminator.rule.scss" } }, "contentName": "meta.property-value.media-query.scss", "patterns": [ { "include": "#general" }, { "include": "#property_values" } ] } ] }, { "include": "#variable" }, { "include": "#conditional_operators" }, { "include": "source.css#media-types" } ] } ] }, "at_rule_mixin": { "patterns": [ { "begin": "(?<=@mixin)\\s+([\\w-]+)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.scss" }, "2": { "name": "punctuation.definition.parameters.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.scss" } }, "name": "meta.at-rule.mixin.scss", "patterns": [ { "include": "#function_attributes" } ] }, { "match": "(?<=@mixin)\\s+([\\w-]+)", "captures": { "1": { "name": "entity.name.function.scss" } }, "name": "meta.at-rule.mixin.scss" }, { "match": "((@)mixin)\\b", "captures": { "1": { "name": "keyword.control.at-rule.mixin.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "name": "meta.at-rule.mixin.scss" } ] }, "at_rule_namespace": { "patterns": [ { "begin": "(?<=@namespace)\\s+(?=url)", "end": "(?=;|$)", "name": "meta.at-rule.namespace.scss", "patterns": [ { "include": "#property_values" }, { "include": "#string_single" }, { "include": "#string_double" } ] }, { "begin": "(?<=@namespace)\\s+([\\w-]*)", "captures": { "1": { "name": "entity.name.namespace-prefix.scss" } }, "end": "(?=;|$)", "name": "meta.at-rule.namespace.scss", "patterns": [ { "include": "#variables" }, { "include": "#property_values" }, { "include": "#string_single" }, { "include": "#string_double" } ] }, { "match": "((@)namespace)\\b", "captures": { "1": { "name": "keyword.control.at-rule.namespace.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "name": "meta.at-rule.namespace.scss" } ] }, "at_rule_option": { "captures": { "1": { "name": "keyword.control.at-rule.charset.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "match": "^\\s*((@)option\\b)\\s*", "name": "meta.at-rule.option.scss" }, "at_rule_page": { "patterns": [ { "begin": "^\\s*((@)page)(?=:|\\s)\\s*([-:\\w]*)", "captures": { "1": { "name": "keyword.control.at-rule.page.scss" }, "2": { "name": "punctuation.definition.keyword.scss" }, "3": { "name": "entity.name.function.scss" } }, "end": "\\s*(?={)", "name": "meta.at-rule.page.scss" } ] }, "at_rule_return": { "begin": "\\s*((@)(return)\\b)", "captures": { "1": { "name": "keyword.control.return.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*((?=;))", "name": "meta.at-rule.return.scss", "patterns": [ { "include": "#variable" }, { "include": "#property_values" } ] }, "at_rule_at_root": { "begin": "\\s*((@)(at-root))(\\s+|$)", "end": "\\s*(?={)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.at-root.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "name": "meta.at-rule.at-root.scss", "patterns": [ { "include": "#function_attributes" }, { "include": "#functions" }, { "include": "#selectors" } ] }, "at_rule_supports": { "begin": "(?<=^|\\s)(@)supports\\b", "captures": { "0": { "name": "keyword.control.at-rule.supports.scss" }, "1": { "name": "punctuation.definition.keyword.scss" } }, "end": "(?={)|$", "name": "meta.at-rule.supports.scss", "patterns": [ { "include": "#logical_operators" }, { "include": "#properties" }, { "match": "\\(", "name": "punctuation.definition.condition.begin.bracket.round.scss" }, { "match": "\\)", "name": "punctuation.definition.condition.end.bracket.round.scss" } ] }, "at_rule_use": { "begin": "\\s*((@)use\\b)\\s*", "captures": { "1": { "name": "keyword.control.at-rule.use.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?=;)", "name": "meta.at-rule.use.scss", "patterns": [ { "match": "\\b(as|with)\\b", "name": "keyword.control.operator" }, { "match": "\\b[\\w-]+\\b", "name": "variable.scss" }, { "match": "\\*", "name": "variable.language.expanded-namespace.scss" }, { "include": "#string_single" }, { "include": "#string_double" }, { "include": "#comment_line" }, { "include": "#comment_block" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.scss" } }, "patterns": [ { "include": "#function_attributes" } ] } ] }, "at_rule_warn": { "begin": "\\s*((@)(warn|debug|error)\\b)\\s*", "captures": { "1": { "name": "keyword.control.warn.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?=;)", "name": "meta.at-rule.warn.scss", "patterns": [ { "include": "#variable" }, { "include": "#string_double" }, { "include": "#string_single" } ] }, "at_rule_while": { "begin": "\\s*((@)while\\b)\\s*", "captures": { "1": { "name": "keyword.control.while.scss" }, "2": { "name": "punctuation.definition.keyword.scss" } }, "end": "\\s*(?=})", "name": "meta.at-rule.while.scss", "patterns": [ { "include": "#conditional_operators" }, { "include": "#variable" }, { "include": "#property_values" }, { "include": "$self" } ] }, "comment_docblock": { "name": "comment.block.documentation.scss", "begin": "///", "beginCaptures": { "0": { "name": "punctuation.definition.comment.scss" } }, "end": "(?=$)", "patterns": [ { "include": "source.sassdoc" } ] }, "comment_block": { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.scss" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.scss" } }, "name": "comment.block.scss" }, "comment_line": { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.scss" } }, "end": "\\n", "name": "comment.line.scss" }, "constant_default": { "match": "!default", "name": "keyword.other.default.scss" }, "constant_functions": { "begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()", "beginCaptures": { "1": { "name": "variable.scss" }, "2": { "name": "punctuation.access.module.scss" }, "3": { "name": "support.function.misc.scss" }, "4": { "name": "punctuation.section.function.scss" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.function.scss" } }, "patterns": [ { "include": "#parameters" } ] }, "constant_important": { "match": "!important", "name": "keyword.other.important.scss" }, "constant_mathematical_symbols": { "match": "\\b(\\+|-|\\*|/)\\b", "name": "support.constant.mathematical-symbols.scss" }, "constant_optional": { "match": "!optional", "name": "keyword.other.optional.scss" }, "constant_sass_functions": { "begin": "(headings|stylesheet-url|rgba?|hsla?|ie-hex-str|red|green|blue|alpha|opacity|hue|saturation|lightness|prefixed|prefix|-moz|-svg|-css2|-pie|-webkit|-ms|font-(?:files|url)|grid-image|image-(?:width|height|url|color)|sprites?|sprite-(?:map|map-name|file|url|position)|inline-(?:font-files|image)|opposite-position|grad-point|grad-end-position|color-stops|color-stops-in-percentages|grad-color-stops|(?:radial|linear)-(?:gradient|svg-gradient)|opacify|fade-?in|transparentize|fade-?out|lighten|darken|saturate|desaturate|grayscale|adjust-(?:hue|lightness|saturation|color)|scale-(?:lightness|saturation|color)|change-color|spin|complement|invert|mix|-compass-(?:list|space-list|slice|nth|list-size)|blank|compact|nth|first-value-of|join|length|append|nest|append-selector|headers|enumerate|range|percentage|unitless|unit|if|type-of|comparable|elements-of-type|quote|unquote|escape|e|sin|cos|tan|abs|round|ceil|floor|pi|translate(?:X|Y))(\\()", "beginCaptures": { "1": { "name": "support.function.misc.scss" }, "2": { "name": "punctuation.section.function.scss" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.function.scss" } }, "patterns": [ { "include": "#parameters" } ] }, "flow_control": { "patterns": [ { "include": "#at_rule_if" }, { "include": "#at_rule_else" }, { "include": "#at_rule_warn" }, { "include": "#at_rule_for" }, { "include": "#at_rule_while" }, { "include": "#at_rule_each" }, { "include": "#at_rule_return" } ] }, "function_attributes": { "patterns": [ { "match": ":", "name": "punctuation.separator.key-value.scss" }, { "include": "#general" }, { "include": "#property_values" }, { "match": "[={}\\?;@]", "name": "invalid.illegal.scss" } ] }, "functions": { "patterns": [ { "begin": "([\\w-]{1,})(\\()\\s*", "beginCaptures": { "1": { "name": "support.function.misc.scss" }, "2": { "name": "punctuation.section.function.scss" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.function.scss" } }, "patterns": [ { "include": "#parameters" } ] }, { "match": "([\\w-]{1,})", "name": "support.function.misc.scss" } ] }, "general": { "patterns": [ { "include": "#variable" }, { "include": "#comment_docblock" }, { "include": "#comment_block" }, { "include": "#comment_line" } ] }, "interpolation": { "begin": "#{", "beginCaptures": { "0": { "name": "punctuation.definition.interpolation.begin.bracket.curly.scss" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.interpolation.end.bracket.curly.scss" } }, "name": "variable.interpolation.scss", "patterns": [ { "include": "#variable" }, { "include": "#property_values" } ] }, "conditional_operators": { "patterns": [ { "include": "#comparison_operators" }, { "include": "#logical_operators" } ] }, "comparison_operators": { "match": "==|!=|<=|>=|<|>", "name": "keyword.operator.comparison.scss" }, "logical_operators": { "match": "\\b(not|or|and)\\b", "name": "keyword.operator.logical.scss" }, "map": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.map.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.map.end.bracket.round.scss" } }, "name": "meta.definition.variable.map.scss", "patterns": [ { "include": "#comment_docblock" }, { "include": "#comment_block" }, { "include": "#comment_line" }, { "match": "\\b([\\w-]+)\\s*(:)", "captures": { "1": { "name": "support.type.map.key.scss" }, "2": { "name": "punctuation.separator.key-value.scss" } } }, { "match": ",", "name": "punctuation.separator.delimiter.scss" }, { "include": "#map" }, { "include": "#variable" }, { "include": "#property_values" } ] }, "operators": { "match": "[-+*/](?!\\s*[-+*/])", "name": "keyword.operator.css" }, "parameters": { "patterns": [ { "include": "#variable" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.scss" } }, "patterns": [ { "include": "#function_attributes" } ] }, { "include": "#property_values" }, { "include": "#comment_block" }, { "match": "[^'\",) \\t]+", "name": "variable.parameter.url.scss" }, { "match": ",", "name": "punctuation.separator.delimiter.scss" } ] }, "properties": { "patterns": [ { "begin": "(?<![-a-z])(?=[-a-z])", "end": "$|(?![-a-z])", "name": "meta.property-name.scss", "patterns": [ { "include": "source.css#property-names" }, { "include": "#at_rule_include" } ] }, { "begin": "(:)\\s*(?!(\\s*{))", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.scss" } }, "end": "\\s*(;|(?=}|\\)))", "endCaptures": { "1": { "name": "punctuation.terminator.rule.scss" } }, "contentName": "meta.property-value.scss", "patterns": [ { "include": "#general" }, { "include": "#property_values" } ] } ] }, "property_list": { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.property-list.begin.bracket.curly.scss" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.property-list.end.bracket.curly.scss" } }, "name": "meta.property-list.scss", "patterns": [ { "include": "#flow_control" }, { "include": "#rules" }, { "include": "#properties" }, { "include": "$self" } ] }, "property_values": { "patterns": [ { "include": "#string_single" }, { "include": "#string_double" }, { "include": "#constant_functions" }, { "include": "#constant_sass_functions" }, { "include": "#constant_important" }, { "include": "#constant_default" }, { "include": "#constant_optional" }, { "include": "source.css#numeric-values" }, { "include": "source.css#property-keywords" }, { "include": "source.css#color-keywords" }, { "include": "source.css#property-names" }, { "include": "#constant_mathematical_symbols" }, { "include": "#operators" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.round.scss" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.scss" } }, "patterns": [ { "include": "#general" }, { "include": "#property_values" } ] } ] }, "rules": { "patterns": [ { "include": "#general" }, { "include": "#at_rule_extend" }, { "include": "#at_rule_content" }, { "include": "#at_rule_include" }, { "include": "#at_rule_media" }, { "include": "#selectors" } ] }, "selector_attribute": { "match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])", "name": "meta.attribute-selector.scss", "captures": { "1": { "name": "punctuation.definition.attribute-selector.begin.bracket.square.scss" }, "2": { "name": "entity.other.attribute-name.attribute.scss", "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.scss" } ] }, "3": { "name": "keyword.operator.scss" }, "4": { "name": "string.unquoted.attribute-value.scss", "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.scss" } ] }, "5": { "name": "string.quoted.double.attribute-value.scss" }, "6": { "name": "punctuation.definition.string.begin.scss" }, "7": { "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.scss" } ] }, "8": { "name": "punctuation.definition.string.end.scss" }, "9": { "name": "string.quoted.single.attribute-value.scss" }, "10": { "name": "punctuation.definition.string.begin.scss" }, "11": { "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.scss" } ] }, "12": { "name": "punctuation.definition.string.end.scss" }, "13": { "name": "punctuation.definition.attribute-selector.end.bracket.square.scss" } } }, "selector_class": { "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)", "name": "entity.other.attribute-name.class.css", "captures": { "1": { "name": "punctuation.definition.entity.css" }, "2": { "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.scss" } ] } } }, "selector_custom": { "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,\\[{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)", "name": "entity.name.tag.custom.scss" }, "selector_id": { "match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)", "name": "entity.other.attribute-name.id.css", "captures": { "1": { "name": "punctuation.definition.entity.css" }, "2": { "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.identifier.scss" } ] } } }, "selector_placeholder": { "match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)", "name": "entity.other.attribute-name.placeholder.css", "captures": { "1": { "name": "punctuation.definition.entity.css" }, "2": { "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.identifier.scss" } ] } } }, "parent_selector_suffix": { "match": "(?x)\n(?<=&)\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", "name": "entity.other.attribute-name.parent-selector-suffix.css", "captures": { "1": { "name": "punctuation.definition.entity.css" }, "2": { "patterns": [ { "include": "#interpolation" }, { "match": "\\\\([0-9a-fA-F]{1,6}|.)", "name": "constant.character.escape.scss" }, { "match": "\\$|}", "name": "invalid.illegal.identifier.scss" } ] } } }, "selector_pseudo_class": { "patterns": [ { "begin": "((:)\\bnth-(?:child|last-child|of-type|last-of-type))(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.definition.pseudo-class.begin.bracket.round.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.pseudo-class.end.bracket.round.css" } }, "patterns": [ { "include": "#interpolation" }, { "match": "\\d+", "name": "constant.numeric.css" }, { "match": "(?<=\\d)n\\b|\\b(n|even|odd)\\b", "name": "constant.other.scss" }, { "match": "\\w+", "name": "invalid.illegal.scss" } ] }, { "include": "source.css#pseudo-classes" }, { "include": "source.css#pseudo-elements" }, { "include": "source.css#functional-pseudo-classes" } ] }, "selectors": { "patterns": [ { "include": "source.css#tag-names" }, { "include": "#selector_custom" }, { "include": "#selector_class" }, { "include": "#selector_id" }, { "include": "#selector_pseudo_class" }, { "include": "#tag_wildcard" }, { "include": "#tag_parent_reference" }, { "include": "source.css#pseudo-elements" }, { "include": "#selector_attribute" }, { "include": "#selector_placeholder" }, { "include": "#parent_selector_suffix" } ] }, "string_double": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.scss" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.scss" } }, "name": "string.quoted.double.scss", "patterns": [ { "match": "\\\\(\\h{1,6}|.)", "name": "constant.character.escape.scss" }, { "include": "#interpolation" } ] }, "string_single": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.scss" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.scss" } }, "name": "string.quoted.single.scss", "patterns": [ { "match": "\\\\(\\h{1,6}|.)", "name": "constant.character.escape.scss" }, { "include": "#interpolation" } ] }, "tag_parent_reference": { "match": "&", "name": "entity.name.tag.reference.scss" }, "tag_wildcard": { "match": "\\*", "name": "entity.name.tag.wildcard.scss" }, "variable": { "patterns": [ { "include": "#variables" }, { "include": "#interpolation" } ] }, "variable_setting": { "begin": "(?=\\$[\\w-]+\\s*:)", "end": ";", "endCaptures": { "0": { "name": "punctuation.terminator.rule.scss" } }, "contentName": "meta.definition.variable.scss", "patterns": [ { "match": "\\$[\\w-]+(?=\\s*:)", "name": "variable.scss" }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.key-value.scss" } }, "end": "(?=;)", "patterns": [ { "include": "#comment_docblock" }, { "include": "#comment_block" }, { "include": "#comment_line" }, { "include": "#map" }, { "include": "#property_values" }, { "include": "#variable" }, { "match": ",", "name": "punctuation.separator.delimiter.scss" } ] } ] }, "variables": { "patterns": [ { "match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b", "captures": { "1": { "name": "variable.scss" }, "2": { "name": "punctuation.access.module.scss" }, "3": { "name": "variable.scss" } } }, { "match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b", "name": "variable.scss" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/shell-unix-bash.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-shellscript/blob/master/grammars/shell-unix-bash.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-shellscript/commit/4f8d7bb5cc4d1643674551683df10fe552dd5a6f", "name": "Shell Script", "scopeName": "source.shell", "patterns": [ { "include": "#comment" }, { "include": "#pipeline" }, { "include": "#list" }, { "include": "#compound-command" }, { "include": "#loop" }, { "include": "#string" }, { "include": "#function-definition" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" } ], "repository": { "case-clause": { "patterns": [ { "begin": "(?=\\S)", "end": ";;", "endCaptures": { "0": { "name": "punctuation.terminator.case-clause.shell" } }, "name": "meta.scope.case-clause.shell", "patterns": [ { "begin": "\\(|(?=\\S)", "beginCaptures": { "0": { "name": "punctuation.definition.case-pattern.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.case-pattern.shell" } }, "name": "meta.scope.case-pattern.shell", "patterns": [ { "match": "\\|", "name": "punctuation.separator.pipe-sign.shell" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#pathname" } ] }, { "begin": "(?<=\\))", "end": "(?=;;)", "name": "meta.scope.case-clause-body.shell", "patterns": [ { "include": "$self" } ] } ] } ] }, "comment": { "begin": "(^\\s+)?(?<=^|\\W)(?<!-)(?=#)(?!#{)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.shell" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#!", "beginCaptures": { "0": { "name": "punctuation.definition.comment.shebang.shell" } }, "end": "$", "name": "comment.line.number-sign.shebang.shell" }, { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.shell" } }, "end": "$", "name": "comment.line.number-sign.shell" } ] }, "compound-command": { "patterns": [ { "begin": "\\[{1,2}", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]{1,2}", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [ { "include": "#logical-expression" }, { "include": "$self" } ] }, { "begin": "\\({2}", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\){2}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.other.math.shell", "patterns": [ { "include": "#math" } ] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.subshell.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.subshell.shell" } }, "name": "meta.scope.subshell.shell", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=\\s|^){(?=\\s|$)", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell" } }, "end": "(?<=^|;)\\s*(})", "endCaptures": { "1": { "name": "punctuation.definition.group.shell" } }, "name": "meta.scope.group.shell", "patterns": [ { "include": "$self" } ] } ] }, "function-definition": { "patterns": [ { "begin": "(?<=^|;|&|\\s)(function)\\s+([^\\s\\\\]+)(?:\\s*(\\(\\)))?", "beginCaptures": { "1": { "name": "storage.type.function.shell" }, "2": { "name": "entity.name.function.shell" }, "3": { "name": "punctuation.definition.arguments.shell" } }, "end": ";|&|$", "endCaptures": { "0": { "name": "punctuation.definition.function.shell" } }, "name": "meta.function.shell", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=^|;|&|\\s)([^\\s\\\\=]+)\\s*(\\(\\))", "beginCaptures": { "1": { "name": "entity.name.function.shell" }, "2": { "name": "punctuation.definition.arguments.shell" } }, "end": ";|&|$", "endCaptures": { "0": { "name": "punctuation.definition.function.shell" } }, "name": "meta.function.shell", "patterns": [ { "include": "$self" } ] } ] }, "heredoc": { "patterns": [ { "begin": "(<<)-\\s*(\"|'|)\\s*(RUBY)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(RUBY)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.ruby.shell", "contentName": "source.ruby.embedded.shell", "patterns": [ { "include": "source.ruby" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(RUBY)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(RUBY)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.ruby.shell", "contentName": "source.ruby.embedded.shell", "patterns": [ { "include": "source.ruby" } ] }, { "begin": "(<<)-\\s*(\"|'|)\\s*(PYTHON)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(PYTHON)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.python.shell", "contentName": "source.python.embedded.shell", "patterns": [ { "include": "source.python" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(PYTHON)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(PYTHON)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.python.shell", "contentName": "source.python.embedded.shell", "patterns": [ { "include": "source.python" } ] }, { "begin": "(<<)-\\s*(\"|'|)\\s*(APPLESCRIPT)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(APPLESCRIPT)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.applescript.shell", "contentName": "source.applescript.embedded.shell", "patterns": [ { "include": "source.applescript" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(APPLESCRIPT)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(APPLESCRIPT)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.applescript.shell", "contentName": "source.applescript.embedded.shell", "patterns": [ { "include": "source.applescript" } ] }, { "begin": "(<<)-\\s*(\"|'|)\\s*(HTML)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(HTML)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.html.shell", "contentName": "text.html.embedded.shell", "patterns": [ { "include": "text.html.basic" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(HTML)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(HTML)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.html.shell", "contentName": "text.html.embedded.shell", "patterns": [ { "include": "text.html.basic" } ] }, { "begin": "(<<)-\\s*(\"|'|)\\s*(MARKDOWN)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(MARKDOWN)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.markdown.shell", "contentName": "text.html.markdown.embedded.shell", "patterns": [ { "include": "text.html.markdown" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(MARKDOWN)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(MARKDOWN)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.markdown.shell", "contentName": "text.html.markdown.embedded.shell", "patterns": [ { "include": "text.html.markdown" } ] }, { "begin": "(<<)-\\s*(\"|'|)\\s*(TEXTILE)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(TEXTILE)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.textile.shell", "contentName": "text.html.textile.embedded.shell", "patterns": [ { "include": "text.html.textile" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(TEXTILE)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(TEXTILE)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.textile.shell", "contentName": "text.html.textile.embedded.shell", "patterns": [ { "include": "text.html.textile" } ] }, { "begin": "(<<)-\\s*(\"|'|)\\s*(SHELL)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(\\3)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "contentName": "source.shell.embedded.shell", "name": "string.unquoted.heredoc.no-indent.shell.shell", "patterns": [ { "include": "source.shell" } ] }, { "begin": "(<<)\\s*(\"|'|)\\s*(SHELL)(?=\\s|;|&|<|\"|')\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(\\3)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.shell.shell", "contentName": "source.shell.embedded.shell", "patterns": [ { "include": "source.shell" } ] }, { "begin": "(<<)-\\s*(\"|')\\s*\\\\?([^;&<\\s]+)\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(\\3)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.no-indent.shell" }, { "begin": "(<<)\\s*(\"|')\\s*\\\\?([^;&<\\s]+)\\2", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "3": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(\\3)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.shell" }, { "begin": "(<<)-\\s*\\\\?([^;&<\\s]+)", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^\\t*(\\2)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.expanded.no-indent.shell", "patterns": [ { "match": "\\\\[\\$`\\\\\\n]", "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" } ] }, { "begin": "(<<)\\s*\\\\?([^;&<\\s]+)", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": { "name": "keyword.control.heredoc-token.shell" } }, "end": "^(\\2)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.heredoc-token.shell" } }, "name": "string.unquoted.heredoc.expanded.shell", "patterns": [ { "match": "\\\\[\\$`\\\\\\n]", "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" } ] } ] }, "herestring": { "patterns": [ { "begin": "(<<<)\\s*(('))", "beginCaptures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.quoted.single.shell" }, "3": { "name": "punctuation.definition.string.begin.shell" } }, "end": "(')", "endCaptures": { "0": { "name": "string.quoted.single.shell" }, "1": { "name": "punctuation.definition.string.end.shell" } }, "name": "meta.herestring.shell", "contentName": "string.quoted.single.shell" }, { "begin": "(<<<)\\s*((\"))", "beginCaptures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.quoted.double.shell" }, "3": { "name": "punctuation.definition.string.begin.shell" } }, "end": "(\")", "endCaptures": { "0": { "name": "string.quoted.double.shell" }, "1": { "name": "punctuation.definition.string.end.shell" } }, "name": "meta.herestring.shell", "contentName": "string.quoted.double.shell" }, { "captures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.unquoted.herestring.shell", "patterns": [ { "include": "$self" } ] } }, "match": "(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)", "name": "meta.herestring.shell" } ] }, "interpolation": { "patterns": [ { "begin": "\\$\\({2}", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\){2}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.other.math.shell", "patterns": [ { "include": "#math" } ] }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.interpolated.backtick.shell", "patterns": [ { "match": "\\\\[`\\\\$]", "name": "constant.character.escape.shell" }, { "begin": "(?<=\\W)(?=#)(?!#{)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.shell" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.shell" } }, "end": "(?=`)", "name": "comment.line.number-sign.shell" } ] }, { "include": "$self" } ] }, { "begin": "\\$\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.interpolated.dollar.shell", "patterns": [ { "include": "$self" } ] } ] }, "keyword": { "patterns": [ { "match": "(?<=^|;|&|\\s)(then|else|elif|fi|for|in|do|done|select|case|continue|esac|while|until|return)(?=\\s|;|&|$)", "name": "keyword.control.shell" }, { "match": "(?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$)", "name": "storage.modifier.shell" } ] }, "list": { "patterns": [ { "match": ";|&&|&|\\|\\|", "name": "keyword.operator.list.shell" } ] }, "logical-expression": { "patterns": [ { "comment": "do we want a special rule for ( expr )?", "match": "=[=~]?|!=?|<|>|&&|\\|\\|", "name": "keyword.operator.logical.shell" }, { "match": "(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])", "name": "keyword.operator.logical.shell" } ] }, "loop": { "patterns": [ { "begin": "(?<=^|;|&|\\s)(for)\\s+(?=\\({2})", "beginCaptures": { "1": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.for-loop.shell", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" }, "2": { "name": "variable.other.loop.shell", "patterns": [ { "include": "#string" } ] }, "3": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.for-in-loop.shell", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.while-loop.shell", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" }, "2": { "name": "variable.other.loop.shell" } }, "end": "(?<=^|;|&|\\s)(done)(?=\\s|;|&|$)", "endCaptures": { "1": { "name": "keyword.control.shell" } }, "name": "meta.scope.select-block.shell", "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=^|;|&|\\s)case(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)esac(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.case-block.shell", "patterns": [ { "begin": "(?<=^|;|&|\\s)in(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)(?=esac(\\s|;|&|$))", "name": "meta.scope.case-body.shell", "patterns": [ { "include": "#comment" }, { "include": "#case-clause" }, { "include": "$self" } ] }, { "include": "$self" } ] }, { "begin": "(?<=^|;|&|\\s)if(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)fi(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.if-block.shell", "patterns": [ { "include": "$self" } ] } ] }, "math": { "patterns": [ { "include": "#variable" }, { "match": "\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", "name": "keyword.operator.arithmetic.shell" }, { "match": "0[xX][0-9A-Fa-f]+", "name": "constant.numeric.hex.shell" }, { "match": "0\\d+", "name": "constant.numeric.octal.shell" }, { "match": "\\d{1,2}#[0-9a-zA-Z@_]+", "name": "constant.numeric.other.shell" }, { "match": "\\d+", "name": "constant.numeric.integer.shell" } ] }, "pathname": { "patterns": [ { "match": "(?<=\\s|:|=|^)~", "name": "keyword.operator.tilde.shell" }, { "match": "\\*|\\?", "name": "keyword.operator.glob.shell" }, { "begin": "([?*+@!])(\\()", "beginCaptures": { "1": { "name": "keyword.operator.extglob.shell" }, "2": { "name": "punctuation.definition.extglob.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.extglob.shell" } }, "name": "meta.structure.extglob.shell", "patterns": [ { "include": "$self" } ] } ] }, "pipeline": { "patterns": [ { "match": "(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)", "name": "keyword.other.shell" }, { "match": "[|!]", "name": "keyword.operator.pipe.shell" } ] }, "redirection": { "patterns": [ { "begin": "[><]\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.interpolated.process-substitution.shell", "patterns": [ { "include": "$self" } ] }, { "match": "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])", "name": "keyword.operator.redirect.shell" } ] }, "string": { "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.shell" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.shell" }, { "begin": "\\$?\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.double.shell", "patterns": [ { "match": "\\\\[\\$`\"\\\\\\n]", "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" } ] }, { "begin": "\\$'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.dollar.shell", "patterns": [ { "match": "\\\\(a|b|e|f|n|r|t|v|\\\\|')", "name": "constant.character.escape.ansi-c.shell" }, { "match": "\\\\[0-9]{3}", "name": "constant.character.escape.octal.shell" }, { "match": "\\\\x[0-9a-fA-F]{2}", "name": "constant.character.escape.hex.shell" }, { "match": "\\\\c.", "name": "constant.character.escape.control-char.shell" } ] } ] }, "support": { "patterns": [ { "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", "name": "support.function.builtin.shell" }, { "match": "(?<=^|;|&|\\s)(?:alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|dirs|disown|echo|enable|eval|exec|exit|false|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|times|trap|true|type|ulimit|umask|unalias|unset|wait)(?=\\s|;|&|$)", "name": "support.function.builtin.shell" } ] }, "variable": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.variable.shell" } }, "match": "(\\$)[a-zA-Z_][a-zA-Z0-9_]*", "name": "variable.other.normal.shell" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell" } }, "match": "(\\$)[-*@#?$!0_]", "name": "variable.other.special.shell" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell" } }, "match": "(\\$)[1-9]", "name": "variable.other.positional.shell" }, { "begin": "\\${", "beginCaptures": { "0": { "name": "punctuation.definition.variable.shell" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.variable.shell" } }, "name": "variable.other.bracket.shell", "patterns": [ { "match": "!|:[-=?]?|\\*|@|#{1,2}|%{1,2}|/", "name": "keyword.operator.expansion.shell" }, { "captures": { "1": { "name": "punctuation.section.array.shell" }, "3": { "name": "punctuation.section.array.shell" } }, "match": "(\\[)([^\\]]+)(\\])" }, { "include": "#variable" }, { "include": "#string" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/sjs.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "sjs", "patterns": [ { "include": "source.js" }, { "include": "#strings" }, { "include": "#keywords" } ], "repository": { "keywords": { "patterns": [ { "name": "keyword.control.sjs", "match": "\\b(if|while|for|return)\\b" } ] }, "strings": { "name": "string.quoted.double.sjs", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.sjs", "match": "\\\\." } ] } }, "scopeName": "source.sjs" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/slim.tmLanguage.json ================================================ { "foldingStopMarker": "^\\s*$", "foldingStartMarker": "^\\s*([-%#\\:\\.\\w\\=].*)\\s$", "repository": { "interpolated-ruby": { "begin": "=(?=\\b)", "end": "\\s|\\w$", "name": "source.ruby.embedded.html" }, "tag-stuff": { "patterns": [ { "include": "#tag-attribute" }, { "include": "#interpolated-ruby" }, { "include": "#delimited-ruby-a" }, { "include": "#delimited-ruby-b" }, { "include": "#delimited-ruby-c" }, { "include": "#rubyline" }, { "include": "#embedded-ruby" } ] }, "delimited-ruby-b": { "begin": "=\\[", "end": "\\](?=( \\w|$))", "patterns": [{ "include": "source.ruby" }], "name": "source.ruby.embedded.slim" }, "root-class-id-tag": { "match": "(\\.|#)([\\w\\d\\-]+)", "captures": { "1": { "name": "punctuation.separator.key-value.html" }, "2": { "name": "entity.other.attribute-name.html" } } }, "string-double-quoted": { "end": "\"", "begin": "(\")(?=.*\")", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [{ "include": "#embedded-ruby" }, { "include": "#entities" }], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html" }, "tag-attribute": { "begin": "([\\w.#_-]+)=(?!\\s)(true|false|nil)?(\\s*\\(|\\{)?", "end": "\\}|\\)|$", "patterns": [ { "include": "#tag-stuff" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ], "captures": { "1": { "name": "entity.other.attribute-name.event.slim" }, "2": { "name": "constant.language.slim" } } }, "delimited-ruby-c": { "begin": "=\\{", "end": "\\}(?=( \\w|$))", "patterns": [{ "include": "source.ruby" }], "name": "source.ruby.embedded.slim" }, "delimited-ruby-a": { "begin": "=\\(", "end": "\\)(?=( \\w|$))", "patterns": [{ "include": "source.ruby" }], "name": "source.ruby.embedded.slim" }, "string-single-quoted": { "end": "'", "begin": "(')(?=.*')", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [{ "include": "#embedded-ruby" }, { "include": "#entities" }], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html" }, "continuation": { "match": "([\\\\,])\\s*\\n", "captures": { "1": { "name": "punctuation.separator.continuation.slim" } } }, "embedded-ruby": { "begin": "(?<!\\\\)#\\{{1,2}", "endCaptures": { "0": { "name": "punctuation.section.embedded.ruby" } }, "end": "\\}{1,2}", "patterns": [{ "include": "source.ruby" }], "name": "source.ruby.embedded.html", "beginCaptures": { "0": { "name": "punctuation.section.embedded.ruby" } } }, "entities": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "rubyline": { "begin": "(==|=)(<>|><|<'|'<|<|>)?|-", "end": "(?<!\\\\|,|,\\n|\\\\\\n)$", "patterns": [ { "comment": "Hack to let ruby comments work in this context properly", "match": "#.*$", "name": "comment.line.number-sign.ruby" }, { "include": "#continuation" }, { "include": "source.ruby" } ], "contentName": "source.ruby.embedded.slim", "name": "meta.line.ruby.slim" } }, "keyEquivalent": "^~S", "fileTypes": ["slim", "skim"], "uuid": "36302CC1-1E76-4910-B7B6-F1915EBBA0D3", "patterns": [ { "begin": "^(\\s*)(ruby):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.ruby" }], "name": "text.ruby.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.ruby.filter.slim" } } }, { "begin": "^(\\s*)(javascript):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.js" }], "name": "text.javascript.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.javascript.filter.slim" } } }, { "begin": "^(---)\\s*\\n", "endCaptures": { "1": { "name": "storage.frontmatter.slim" } }, "end": "^(---)\\s*\\n", "patterns": [{ "include": "source.yaml" }], "name": "source.yaml.meta.slim", "beginCaptures": { "1": { "name": "storage.frontmatter.slim" } } }, { "begin": "^(\\s*)(coffee):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.coffee" }], "name": "text.coffeescript.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.coffeescript.filter.slim" } } }, { "begin": "^(\\s*)(markdown):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.md" }], "name": "text.markdown.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.markdown.filter.slim" } } }, { "begin": "^(\\s*)(css):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.css" }], "name": "text.css.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.css.filter.slim" } } }, { "begin": "^(\\s*)(sass):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.sass" }], "name": "text.sass.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.sass.filter.slim" } } }, { "begin": "^(\\s*)(scss):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.scss" }], "name": "text.scss.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.scss.filter.slim" } } }, { "begin": "^(\\s*)(less):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.less" }], "name": "text.less.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.less.filter.slim" } } }, { "begin": "^(\\s*)(erb):$", "end": "^(?!(\\1\\s)|\\s*$)", "patterns": [{ "include": "source.erb" }], "name": "text.erb.filter.slim", "beginCaptures": { "2": { "name": "constant.language.name.erb.filter.slim" } } }, { "match": "^(! )($|\\s.*)", "name": "meta.prolog.slim", "captures": { "1": { "name": "punctuation.definition.prolog.slim" } } }, { "begin": "^(\\s*)(/)\\s*.*$", "end": "^(?!\\1 )", "name": "comment.block.slim", "beginCaptures": { "1": { "name": "punctuation.section.comment.slim" } } }, { "match": "^\\s*(/)\\s*\\S.*$\\n?", "name": "comment.line.slash.slim", "captures": { "1": { "name": "punctuation.section.comment.slim" } } }, { "begin": "^\\s*(?=-)", "end": "$", "patterns": [{ "include": "#rubyline" }] }, { "begin": "(?==+|~)", "end": "$", "patterns": [{ "include": "#rubyline" }] }, { "include": "#tag-attribute" }, { "include": "#embedded-ruby" }, { "begin": "^\\s*(\\.|#|[a-zA-Z0-9]+)([\\w-]+)?", "end": "$|(?!\\.|#|=|:|-|~|/|\\}|\\]|\\*|\\s?[\\*\\{])", "comment": "1 - dot OR hash OR any combination of word, number; 2 - OPTIONAL any combination of word, number, dash or underscore (following a . or", "name": "meta.tag", "captures": { "1": { "name": "entity.name.tag.slim" }, "2": { "name": "entity.other.attribute-name.event.slim" } }, "patterns": [ { "begin": "(:[\\w\\d]+)+", "end": "$|\\s", "comment": "XML", "name": "entity.name.tag.slim" }, { "begin": "(:\\s)(\\.|#|[a-zA-Z0-9]+)([\\w-]+)?", "end": "$|(?!\\.|#|=|-|~|/|\\}|\\]|\\*|\\s?[\\*\\{])", "comment": "Inline HTML / 1 - colon; 2 - dot OR hash OR any combination of word, number; 3 - OPTIONAL any combination of word, number, dash or underscore (following a . or", "patterns": [ { "include": "#root-class-id-tag" }, { "include": "#tag-attribute" } ], "captures": { "1": { "name": "punctuation.definition.tag.end.slim" }, "2": { "name": "entity.name.tag.slim" }, "3": { "name": "entity.other.attribute-name.event.slim" } } }, { "end": "(\\})|$|^(?!.*\\|\\s*$)", "begin": "(\\*\\{)(?=.*\\}|.*\\|\\s*$)", "beginCaptures": { "1": { "name": "punctuation.section.embedded.ruby" } }, "patterns": [{ "include": "#embedded-ruby" }], "comment": "Splat attributes", "endCaptures": { "1": { "name": "punctuation.section.embedded.ruby" } }, "name": "source.ruby.embedded.slim" }, { "include": "#root-class-id-tag" }, { "include": "#rubyline" }, { "match": "/", "name": "punctuation.terminator.tag.slim" } ] }, { "match": "^\\s*(\\\\.)", "captures": { "1": { "name": "meta.escape.slim" } } }, { "begin": "^\\s*(?=\\||')", "end": "$", "patterns": [ { "include": "#embedded-ruby" }, { "include": "text.html.basic" } ] }, { "begin": "(?=<[\\w\\d\\:]+)", "end": "$|\\/\\>", "comment": "Inline and root-level HTML tags", "patterns": [{ "include": "text.html.basic" }] } ], "name": "Slim", "scopeName": "text.slim" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/slm.tmLanguage.json ================================================ { "fileTypes": ["slm"], "foldingStartMarker": "^\\s*([-%#\\:\\.\\w\\=].*)\\s$", "foldingStopMarker": "^\\s*$", "name": "Slm", "patterns": [ { "begin": "^(\\s*)(javascript):$", "beginCaptures": { "2": { "name": "constant.language.name.javascript.filter.slm" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "text.javascript.filter.slm", "patterns": [{ "include": "source.js" }] }, { "begin": "^(\\s*)(coffee):$", "beginCaptures": { "2": { "name": "constant.language.name.coffeescript.filter.slm" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "text.coffeescript.filter.slm", "patterns": [{ "include": "source.coffee" }] }, { "begin": "^(\\s*)(markdown):$", "beginCaptures": { "2": { "name": "constant.language.name.markdown.filter.slm" } }, "end": "^(?!(\\1\\s)|\\s*$)", "name": "text.markdown.filter.slm", "patterns": [{ "include": "source.md" }] }, { "captures": { "1": { "name": "punctuation.definition.prolog.slm" } }, "match": "^(! )($|\\s.*)", "name": "meta.prolog.slm" }, { "captures": { "1": { "name": "punctuation.section.comment.slm" } }, "match": "^\\s*(/)\\s*\\S.*$\\n?", "name": "comment.line.slash.slm" }, { "begin": "^(\\s*)(/)\\s*$", "beginCaptures": { "2": { "name": "punctuation.section.comment.slm" } }, "end": "^(?!\\1 )", "name": "comment.block.slm", "patterns": [{ "include": "text.slm" }] }, { "begin": "^\\s*(?===|=|-|~)", "end": "$", "patterns": [{ "include": "#rubyline" }] }, { "include": "#inline-html-tag" }, { "include": "#normal-html-tag" }, { "include": "#embedded-ruby" }, { "begin": "^\\s*([\\w.#_-]*[\\w]+)\\s*", "captures": { "0": { "name": "entity.name.tag.slm" } }, "end": "$|(?!\\.|#|\\{|\\[|=|-|~|/)", "patterns": [ { "begin": "\\{(?=.*\\}|.*\\|\\s*$)", "end": "\\}|$|^(?!.*\\|\\s*$)", "name": "meta.section.attributes.slm", "patterns": [ { "include": "source.js" }, { "include": "#continuation" } ] }, { "begin": "\\[(?=.*\\]|.*\\|\\s*$)", "end": "\\]|$|^(?!.*\\|\\s*$)", "name": "meta.section.object.slm", "patterns": [ { "include": "source.js" }, { "include": "#continuation" } ] }, { "include": "#rubyline" }, { "match": "/", "name": "punctuation.terminator.tag.slm" } ] }, { "captures": { "1": { "name": "meta.escape.slm" } }, "match": "^\\s*(\\\\.)" }, { "begin": "^\\s*(?=\\||')", "end": "$", "patterns": [ { "include": "#embedded-ruby" }, { "include": "text.html.basic" } ] } ], "repository": { "continuation": { "captures": { "1": { "name": "punctuation.separator.continuation.slm" } }, "match": "([\\\\,])\\s*\\n" }, "delimited-ruby-a": { "begin": "=\\(", "end": "\\)(?=( \\w|$))", "name": "source.js.embedded.slm", "patterns": [{ "include": "source.js" }] }, "delimited-ruby-b": { "begin": "=\\[", "end": "\\](?=( \\w|$))", "name": "source.js.embedded.slm", "patterns": [{ "include": "source.js" }] }, "embedded-ruby": { "begin": "(?<!\\\\)\\${", "end": "}", "name": "source.js.embedded.html", "patterns": [{ "include": "source.js" }] }, "entities": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } }, "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html" }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "inline-html-tag": { "begin": "^(\\s*([\\w.#_-]+( [\\w.#_-]+=(\".*?\"))*: )*)([\\w.#_-]+( [\\w.#_-]+=(\".*?\"))*:)(?=\\s)", "captures": { "1": { "name": "entity.name.tag.slm" }, "2": { "name": "entity.name.tag.slm" }, "3": { "name": "entity.name.tag.slm" }, "4": { "name": "string.quoted.double.html" }, "5": { "name": "entity.name.tag.slm" }, "6": { "name": "entity.name.tag.slm" }, "7": { "name": "string.quoted.double.html" } }, "end": "$", "patterns": [ { "include": "#normal-inline-html-tag" }, { "include": "#tag-stuff" } ] }, "interpolated-ruby": { "begin": "=(?=\\b)", "end": "\\s|\\w$", "name": "source.js.embedded.html" }, "normal-html-tag": { "begin": "([\\w.#_-]+=)", "captures": { "1": { "name": "entity.name.tag.slm" } }, "end": "$", "patterns": [ { "include": "#tag-stuff" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, "normal-inline-html-tag": { "begin": "([\\w.#_-]+)", "captures": { "1": { "name": "entity.name.tag.slm" } }, "end": "$", "patterns": [{ "include": "#tag-stuff" }] }, "rubyline": { "begin": "(==.|=.|==|=|-)", "beginCaptures": { "1": { "name": "keyword.control.slm" } }, "contentName": "source.js.embedded.slm", "end": "$", "endCaptures": { "1": { "name": "source.js.embedded.html" }, "2": { "name": "keyword.control.js.start-block" } }, "name": "meta.line.js.slm", "patterns": [ { "comment": "Hack to let ruby comments work in this context properly", "match": "////.*$", "name": "comment.line.number-sign.js" }, { "include": "#continuation" }, { "include": "source.js" } ] }, "string-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [{ "include": "#embedded-ruby" }, { "include": "#entities" }] }, "string-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [{ "include": "#embedded-ruby" }, { "include": "#entities" }] }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } }, "end": "(?<='|\")", "name": "meta.attribute-with-value.id.html", "patterns": [ { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, "tag-stuff": { "patterns": [ { "include": "#inline-html-tag" }, { "include": "#normal-html-tag" }, { "include": "#tag-id-attribute" }, { "include": "#interpolated-ruby" }, { "include": "#delimited-ruby-a" }, { "include": "#delimited-ruby-b" }, { "include": "#rubyline" }, { "include": "#embedded-ruby" } ] } }, "scopeName": "text.slm" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/smalltalk.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/smalltalk.tmbundle/blob/master/Syntaxes/SmallTalk.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "name": "smalltalk", "foldingStartMarker": "\\[", "foldingStopMarker": "^\\s*\\]|^\\s\\]", "keyEquivalent": "^~S", "fileTypes": ["st"], "patterns": [ { "match": "\\$.", "name": "constant.character.smalltalk" }, { "match": "\\b(class)\\b", "name": "storage.type.$1.smalltalk" }, { "match": "\\b(extend|super|self)\\b", "name": "storage.modifier.$1.smalltalk" }, { "match": "\\b(yourself|new|Smalltalk)\\b", "name": "keyword.control.$1.smalltalk" }, { "match": ":=", "name": "keyword.operator.assignment.smalltalk" }, { "comment": "Parse the variable declaration like: |a b c|", "match": "/^:\\w*\\s*\\|/", "name": "constant.other.block.smalltalk" }, { "captures": { "1": { "name": "punctuation.definition.instance-variables.begin.smalltalk" }, "2": { "patterns": [ { "match": "\\w+", "name": "support.type.variable.declaration.smalltalk" } ] }, "3": { "name": "punctuation.definition.instance-variables.end.smalltalk" } }, "match": "(\\|)(\\s*\\w[\\w ]*)(\\|)" }, { "captures": { "1": { "patterns": [ { "match": ":\\w+", "name": "entity.name.function.block.smalltalk" } ] } }, "comment": "Parse the blocks like: [ :a :b | ...... ]", "match": "\\[((\\s+|:\\w+)*)\\|" }, { "include": "#numeric" }, { "match": "<(?!<|=)|>(?!<|=|>)|<=|>=|=|==|~=|~~|>>|\\^", "name": "keyword.operator.comparison.smalltalk" }, { "match": "(\\*|\\+|\\-|/|\\\\)", "name": "keyword.operator.arithmetic.smalltalk" }, { "match": "(?<=[ \\t])!+|\\bnot\\b|&|\\band\\b|\\||\\bor\\b", "name": "keyword.operator.logical.smalltalk" }, { "comment": "Fake reserved word -> main Smalltalk messages", "match": "(?<!\\.)\\b(ensure|resume|retry|signal)\\b(?![?!])", "name": "keyword.control.smalltalk" }, { "comment": "Fake conditionals. Smalltalk Methods.", "match": "ifCurtailed:|ifTrue:|ifFalse:|whileFalse:|whileTrue:", "name": "keyword.control.conditionals.smalltalk" }, { "captures": { "1": { "name": "entity.other.inherited-class.smalltalk" }, "3": { "name": "keyword.control.smalltalk" }, "4": { "name": "entity.name.type.class.smalltalk" } }, "match": "(\\w+)(\\s+(subclass:))\\s*(\\w*)", "name": "meta.class.smalltalk" }, { "begin": "\"", "beginCaptures": [ { "name": "punctuation.definition.comment.begin.smalltalk" } ], "end": "\"", "endCaptures": [ { "name": "punctuation.definition.comment.end.smalltalk" } ], "name": "comment.block.smalltalk" }, { "match": "\\b(true|false)\\b", "name": "constant.language.boolean.smalltalk" }, { "match": "\\b(nil)\\b", "name": "constant.language.nil.smalltalk" }, { "captures": { "1": { "name": "punctuation.definition.constant.smalltalk" } }, "comment": "messages/methods", "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", "name": "constant.other.messages.smalltalk" }, { "captures": { "1": { "name": "punctuation.definition.constant.smalltalk" } }, "comment": "symbols", "match": "(#)[a-zA-Z_][a-zA-Z0-9_:]*", "name": "constant.other.symbol.smalltalk" }, { "begin": "#\\[", "beginCaptures": [ { "name": "punctuation.definition.constant.begin.smalltalk" } ], "end": "\\]", "endCaptures": [ { "name": "punctuation.definition.constant.end.smalltalk" } ], "name": "meta.array.byte.smalltalk", "patterns": [ { "match": "[0-9]+(r[a-zA-Z0-9]+)?", "name": "constant.numeric.integer.smalltalk" }, { "match": "[^\\s\\]]+", "name": "invalid.illegal.character-not-allowed-here.smalltalk" } ] }, { "begin": "#\\(", "beginCaptures": [ { "name": "punctuation.definition.constant.begin.smalltalk" } ], "comment": "Array Constructor", "end": "\\)", "endCaptures": [ { "name": "punctuation.definition.constant.end.smalltalk" } ], "name": "constant.other.array.smalltalk" }, { "begin": "'", "beginCaptures": [ { "name": "punctuation.definition.string.begin.smalltalk" } ], "end": "'", "endCaptures": [ { "name": "punctuation.definition.string.end.smalltalk" } ], "name": "string.quoted.single.smalltalk" }, { "match": "\\b[A-Z]\\w*\\b", "name": "variable.other.constant.smalltalk" } ], "repository": { "numeric": { "patterns": [ { "match": "(?<!\\w)[0-9]+\\.[0-9]+s[0-9]*", "name": "constant.numeric.float.scaled.smalltalk" }, { "match": "(?<!\\w)[0-9]+\\.[0-9]+([edq]-?[0-9]+)?", "name": "constant.numeric.float.smalltalk" }, { "match": "(?<!\\w)-?[0-9]+r[a-zA-Z0-9]+", "name": "constant.numeric.integer.radix.smalltalk" }, { "match": "(?<!\\w)-?[0-9]+([edq]-?[0-9]+)?", "name": "constant.numeric.integer.smalltalk" } ] } }, "scopeName": "source.smalltalk", "uuid": "1ED64A34-BCB1-44E1-A0FE-84053003E232" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/smarty.tmLanguage.json ================================================ { "fileTypes": ["tpl"], "injections": { "text.html.smarty - (meta.embedded | meta.tag | comment.block | meta.block.literal), L:text.html.smarty meta.tag": { "patterns": [ { "include": "#comments" }, { "include": "#blocks" } ] } }, "keyEquivalent": "^~S", "name": "Smarty", "patterns": [ { "include": "text.html.basic" } ], "repository": { "blocks": { "patterns": [ { "begin": "(\\{)(literal)(\\})", "captures": [ { "name": "meta.embedded.line.tag.literal.smarty" }, { "name": "punctuation.definition.tag.begin.smarty" }, { "name": "support.function.built-in.smarty" }, { "name": "punctuation.definition.tag.end.smarty" } ], "end": "(\\{/)(literal)(\\})", "name": "meta.block.literal.smarty", "patterns": [ { "include": "text.html.basic" } ] }, { "begin": "(\\{%?)", "beginCaptures": [ { "name": "source.smarty" }, { "name": "punctuation.section.embedded.begin.smarty" } ], "contentName": "source.smarty", "end": "(%?\\})", "endCaptures": [ { "name": "source.smarty" }, { "name": "punctuation.section.embedded.end.smarty" } ], "name": "meta.embedded.line.tag.smarty", "patterns": [ { "include": "#strings" }, { "include": "#variables" }, { "include": "#lang" } ] } ] }, "comments": { "patterns": [ { "begin": "(\\{%?)\\*", "beginCaptures": { "1": { "name": "punctuation.definition.comment.smarty" } }, "end": "\\*(%?\\})", "name": "comment.block.smarty", "patterns": [] } ] }, "lang": { "patterns": [ { "match": "(!==|!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b", "name": "keyword.operator.smarty" }, { "match": "\\b(TRUE|FALSE|true|false)\\b", "name": "constant.language.smarty" }, { "match": "\\b(if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b", "name": "keyword.control.smarty" }, { "captures": [ { "name": "variable.parameter.smarty" } ], "match": "\\b([a-zA-Z]+)=", "name": "meta.attribute.smarty" }, { "match": "\\b(capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b", "name": "support.function.built-in.smarty" }, { "match": "\\|(capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)", "name": "support.function.variable-modifier.smarty" } ] }, "strings": { "patterns": [ { "begin": "'", "beginCaptures": [ { "name": "punctuation.definition.string.begin.smarty" } ], "end": "'", "endCaptures": [ { "name": "punctuation.definition.string.end.smarty" } ], "name": "string.quoted.single.smarty", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.smarty" } ] }, { "begin": "\"", "beginCaptures": [ { "name": "punctuation.definition.string.begin.smarty" } ], "end": "\"", "endCaptures": [ { "name": "punctuation.definition.string.end.smarty" } ], "name": "string.quoted.double.smarty", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.smarty" } ] } ] }, "variables": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.variable.smarty" } }, "match": "\\b(\\$)Smarty\\.", "name": "variable.other.global.smarty" }, { "captures": { "1": { "name": "punctuation.definition.variable.smarty" }, "2": { "name": "variable.other.smarty" } }, "match": "(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "variable.other.smarty" }, { "captures": { "1": { "name": "keyword.operator.smarty" }, "2": { "name": "variable.other.property.smarty" } }, "match": "(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "variable.other.smarty" }, { "captures": { "1": { "name": "keyword.operator.smarty" }, "2": { "name": "meta.function-call.object.smarty" }, "3": { "name": "punctuation.definition.variable.smarty" }, "4": { "name": "punctuation.definition.variable.smarty" } }, "match": "(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\().*?(\\))", "name": "variable.other.smarty" } ] } }, "scopeName": "source.smarty", "uuid": "4D6BBA54-E3FC-4296-9CA1-662B2AD537C6" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/smithy.tmLanguage.json ================================================ { "name": "Smithy", "fileTypes": ["smithy"], "scopeName": "source.smithy", "uuid": "9c3e617f-4d4a-4370-9194-2e82173c1610", "foldingStartMarker": "(\\{|\\[)\\s*", "foldingStopMarker": "\\s*(\\}|\\])", "patterns": [ { "include": "#comment" }, { "name": "meta.keyword.statement.control.smithy", "begin": "^(\\$)([A-Z-a-z_][A-Z-a-z0-9_]*)(:)\\s*", "end": "\\n", "beginCaptures": { "1": { "name": "keyword.statement.control.smithy" }, "2": { "name": "support.type.property-name.smithy" }, "3": { "name": "punctuation.separator.dictionary.pair.smithy" } }, "patterns": [ { "include": "#value" }, { "match": "[^\\n]", "name": "invalid.illegal.control.smithy" } ] }, { "name": "meta.keyword.statement.metadata.smithy", "begin": "^(metadata)\\s+(.+)\\s*(=)\\s*", "beginCaptures": { "1": { "name": "keyword.statement.smithy" }, "2": { "name": "variable.other.smithy" }, "3": { "name": "keyword.operator.smithy" } }, "end": "\\n", "patterns": [ { "include": "#value" } ] }, { "name": "meta.keyword.statement.namespace.smithy", "begin": "^(namespace)\\s+", "beginCaptures": { "1": { "name": "keyword.statement.smithy" } }, "end": "\\n", "patterns": [ { "match": "[A-Z-a-z_][A-Z-a-z0-9_]*(\\.[A-Z-a-z_][A-Z-a-z0-9_]*)*", "name": "entity.name.type.smithy" }, { "match": "[^\\n]", "name": "invalid.illegal.namespace.smithy" } ] }, { "name": "meta.keyword.statement.use.smithy", "begin": "^(use)\\s+", "beginCaptures": { "1": { "name": "keyword.statement.smithy" } }, "end": "\\n", "patterns": [ { "match": "[A-Z-a-z_][A-Z-a-z0-9_]*(\\.[A-Z-a-z_][A-Z-a-z0-9_]*)*#[A-Z-a-z_][A-Z-a-z0-9_]*(\\.[A-Z-a-z_][A-Z-a-z0-9_]*)*", "name": "entity.name.type.smithy" }, { "match": "[^\\n]", "name": "invalid.illegal.use.smithy" } ] }, { "include": "#trait" }, { "name": "meta.keyword.statement.shape.smithy", "begin": "^(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|union|service|operation|resource|enum|intEnum)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)\\s+(with)\\s+(\\[)", "beginCaptures": { "1": { "name": "keyword.statement.smithy" }, "2": { "name": "entity.name.type.smithy" }, "3": { "name": "keyword.statement.with.smithy" }, "4": { "name": "punctuation.definition.array.begin.smithy" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.smithy" } }, "patterns": [ { "include": "#identifier", "name": "entity.name.type.smithy" }, { "include": "#comment" }, { "match": ",", "name": "punctuation.separator.array.smithy" } ] }, { "name": "meta.keyword.statement.shape.smithy", "match": "^(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|union|service|operation|resource|enum|intEnum)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)", "captures": { "1": { "name": "keyword.statement.smithy" }, "2": { "name": "entity.name.type.smithy" } } }, { "name": "meta.keyword.statement.shape.smithy", "begin": "^(structure)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)(?:\\s+(for)\\s+([0-9a-zA-Z\\.#-]+))?\\s+(with)\\s+(\\[)", "beginCaptures": { "1": { "name": "keyword.statement.smithy" }, "2": { "name": "entity.name.type.smithy" }, "3": { "name": "keyword.statement.for-resource.smithy" }, "4": { "name": "entity.name.type.smithy" }, "5": { "name": "keyword.statement.with.smithy" }, "6": { "name": "punctuation.definition.array.begin.smithy" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.smithy" } }, "patterns": [ { "include": "#identifier", "name": "entity.name.type.smithy" }, { "include": "#comment" }, { "match": ",", "name": "punctuation.separator.array.smithy" } ] }, { "name": "meta.keyword.statement.shape.smithy", "match": "^(structure)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)(?:\\s+(for)\\s+([0-9a-zA-Z\\.#-]+))?", "captures": { "1": { "name": "keyword.statement.smithy" }, "2": { "name": "entity.name.type.smithy" }, "3": { "name": "keyword.statement.for-resource.smithy" }, "4": { "name": "entity.name.type.smithy" } } }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.dictionary.begin.smithy" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.dictionary.end.smithy" } }, "patterns": [ { "include": "#shape_inner" } ] }, { "name": "meta.keyword.statement.apply.smithy", "begin": "^(apply)\\s+([A-Z-a-z0-9_]+)\\s+", "end": "\\n", "beginCaptures": { "1": { "name": "keyword.statement.smithy" }, "2": { "name": "entity.name.type.smithy" } }, "patterns": [ { "include": "#trait" }, { "match": "[^\\n]", "name": "invalid.illegal.apply.smithy" } ] } ], "repository": { "with_statement": { "begin": "(with)\\s+(\\[)", "beginCaptures": { "1": { "name": "keyword.statement.with.smithy" }, "2": { "name": "punctuation.definition.array.begin.smithy" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.smithy" } }, "patterns": [ { "match": ",", "name": "punctuation.separator.array.smithy" }, { "include": "#identifier" }, { "include": "#comment" } ] }, "comment": { "patterns": [ { "include": "#doc_comment" }, { "include": "#line_comment" } ] }, "doc_comment": { "match": "(///.*)", "name": "comment.block.documentation.smithy" }, "line_comment": { "match": "(//.*)", "name": "comment.line.double-slash.smithy" }, "trait": { "patterns": [ { "name": "meta.keyword.statement.trait.smithy", "begin": "(@)([0-9a-zA-Z\\.#-]+)(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.annotation.smithy" }, "2": { "name": "storage.type.annotation.smithy" }, "3": { "name": "punctuation.definition.dictionary.begin.smithy" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.dictionary.end.smithy" } }, "patterns": [ { "include": "#object_inner" }, { "include": "#value" } ] }, { "name": "meta.keyword.statement.trait.smithy", "match": "(@)([0-9a-zA-Z\\.#-]+)", "captures": { "1": { "name": "punctuation.definition.annotation.smithy" }, "2": { "name": "storage.type.annotation.smithy" } } } ] }, "value": { "patterns": [ { "include": "#comment" }, { "include": "#keywords" }, { "include": "#number" }, { "include": "#string" }, { "include": "#array" }, { "include": "#object" } ] }, "array": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.smithy" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.smithy" } }, "name": "meta.structure.array.smithy", "patterns": [ { "include": "#value" }, { "match": ",", "name": "punctuation.separator.array.smithy" }, { "match": "[^\\s\\]]", "name": "invalid.illegal.array.smithy" } ] }, "keywords": { "match": "\\b(?:true|false|null)\\b", "name": "constant.language.smithy" }, "number": { "match": "(?x: # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional\n )", "name": "constant.numeric.smithy" }, "object": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.dictionary.begin.smithy" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.dictionary.end.smithy" } }, "name": "meta.structure.dictionary.smithy", "patterns": [ { "include": "#object_inner" } ] }, "object_inner": { "patterns": [ { "include": "#comment" }, { "include": "#string_key" }, { "match": ":", "name": "punctuation.separator.dictionary.key-value.smithy" }, { "name": "meta.structure.dictionary.value.smithy", "include": "#value" }, { "match": ",", "name": "punctuation.separator.dictionary.pair.smithy" } ] }, "shape_inner": { "patterns": [ { "include": "#trait" }, { "match": ":=", "name": "punctuation.separator.dictionary.inline-struct.smithy" }, { "include": "#with_statement" }, { "include": "#elided_target" }, { "include": "#object_inner" } ] }, "string_key": { "patterns": [ { "include": "#identifier_key" }, { "include": "#dquote_key" } ] }, "identifier_key": { "name": "support.type.property-name.smithy", "match": "[A-Z-a-z0-9_\\.#$]+(?=\\s*:)" }, "dquote_key": { "name": "support.type.property-name.smithy", "match": "\".*\"(?=\\s*:)" }, "string": { "patterns": [ { "include": "#textblock" }, { "include": "#dquote" }, { "include": "#shapeid" } ] }, "textblock": { "name": "string.quoted.double.smithy", "begin": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.smithy" } }, "end": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.smithy" } }, "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.smithy" } ] }, "dquote": { "name": "string.quoted.double.smithy", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.smithy" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.smithy" } }, "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.smithy" } ] }, "identifier": { "name": "entity.name.type.smithy", "match": "[A-Z-a-z_][A-Z-a-z0-9_]*" }, "shapeid": { "name": "entity.name.type.smithy", "match": "[A-Z-a-z_][A-Z-a-z0-9_\\.#$]*" }, "elided_target": { "match": "(\\$)([A-Z-a-z0-9_\\.#$]+)", "captures": { "1": { "name": "keyword.statement.elision.smithy" }, "2": { "name": "support.type.property-name.smithy" } } } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/solidity.tmLanguage.json ================================================ { "fileTypes": ["sol"], "name": "solidity", "patterns": [ { "include": "#natspec" }, { "include": "#comment" }, { "include": "#operator" }, { "include": "#global" }, { "include": "#control" }, { "include": "#constant" }, { "include": "#primitive" }, { "include": "#type-primitive" }, { "include": "#type-modifier-extended-scope" }, { "include": "#declaration" }, { "include": "#function-call" }, { "include": "#assembly" }, { "include": "#punctuation" } ], "repository": { "natspec": { "patterns": [ { "begin": "/\\*\\*", "end": "\\*/", "name": "comment.block.documentation", "patterns": [ { "include": "#natspec-tags" } ] }, { "begin": "///", "end": "$", "name": "comment.block.documentation", "patterns": [ { "include": "#natspec-tags" } ] } ] }, "natspec-tags": { "patterns": [ { "include": "#comment-todo" }, { "include": "#natspec-tag-title" }, { "include": "#natspec-tag-author" }, { "include": "#natspec-tag-notice" }, { "include": "#natspec-tag-dev" }, { "include": "#natspec-tag-param" }, { "include": "#natspec-tag-return" } ] }, "natspec-tag-title": { "match": "(@title)\\b", "name": "storage.type.title.natspec" }, "natspec-tag-author": { "match": "(@author)\\b", "name": "storage.type.author.natspec" }, "natspec-tag-notice": { "match": "(@notice)\\b", "name": "storage.type.dev.natspec" }, "natspec-tag-dev": { "match": "(@dev)\\b", "name": "storage.type.dev.natspec" }, "natspec-tag-param": { "match": "(@param)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.param.natspec" }, "3": { "name": "variable.other.natspec" } } }, "natspec-tag-return": { "match": "(@return)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.return.natspec" }, "3": { "name": "variable.other.natspec" } } }, "comment": { "patterns": [ { "include": "#comment-line" }, { "include": "#comment-block" } ] }, "comment-todo": { "match": "(?i)\\b(FIXME|TODO|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG|QUESTION|COMBAK|TEMP|SUPPRESS|LINT|\\w+-disable|\\w+-suppress)\\b(?-i)", "name": "keyword.comment.todo" }, "comment-line": { "begin": "(?<!tp:)//", "end": "$", "name": "comment.line", "patterns": [ { "include": "#comment-todo" } ] }, "comment-block": { "begin": "/\\*", "end": "\\*/", "name": "comment.block", "patterns": [ { "include": "#comment-todo" } ] }, "operator": { "patterns": [ { "include": "#operator-logic" }, { "include": "#operator-mapping" }, { "include": "#operator-arithmetic" }, { "include": "#operator-binary" }, { "include": "#operator-assignment" } ] }, "operator-logic": { "match": "(==|\\!=|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|\\!)", "name": "keyword.operator.logic" }, "operator-mapping": { "match": "(=>)", "name": "keyword.operator.mapping" }, "operator-arithmetic": { "match": "(\\+|\\-|\\/|\\*)", "name": "keyword.operator.arithmetic" }, "operator-binary": { "match": "(\\^|\\&|\\||<<|>>)", "name": "keyword.operator.binary" }, "operator-assignment": { "match": "(\\:?=)", "name": "keyword.operator.assignment" }, "control": { "patterns": [ { "include": "#control-flow" }, { "include": "#control-using" }, { "include": "#control-import" }, { "include": "#control-pragma" }, { "include": "#control-underscore" }, { "include": "#control-unchecked" }, { "include": "#control-other" } ] }, "control-flow": { "patterns": [ { "match": "\\b(if|else|for|while|do|break|continue|try|catch|finally|throw|return)\\b", "name": "keyword.control.flow" }, { "begin": "\\b(returns)\\b", "beginCaptures": { "1": { "name": "keyword.control.flow.return" } }, "end": "(?=\\))", "patterns": [ { "include": "#declaration-function-parameters" } ] } ] }, "control-using": { "patterns": [ { "match": "\\b(using)\\b\\s+\\b([A-Za-z\\d_]+)\\b\\s+\\b(for)\\b\\s+\\b([A-Za-z\\d_]+)", "captures": { "1": { "name": "keyword.control.using" }, "2": { "name": "entity.name.type.library" }, "3": { "name": "keyword.control.for" }, "4": { "name": "entity.name.type" } } }, { "match": "\\b(using)\\b", "name": "keyword.control.using" } ] }, "control-import": { "patterns": [ { "begin": "\\b(import)\\b", "beginCaptures": { "1": { "name": "keyword.control.import" } }, "end": "(?=\\;)", "patterns": [ { "begin": "((?=\\{))", "end": "((?=\\}))", "patterns": [ { "match": "\\b(\\w+)\\b", "name": "entity.name.type.interface" } ] }, { "match": "\\b(from)\\b", "name": "keyword.control.import.from" }, { "include": "#string" }, { "include": "#punctuation" } ] }, { "match": "\\b(import)\\b", "name": "keyword.control.import" } ] }, "control-unchecked": { "match": "\\b(unchecked)\\b", "name": "keyword.control.unchecked" }, "control-pragma": { "match": "\\b(pragma)(?:\\s+([A-Za-z_]\\w+)\\s+([^\\s]+))?\\b", "captures": { "1": { "name": "keyword.control.pragma" }, "2": { "name": "entity.name.tag.pragma" }, "3": { "name": "constant.other.pragma" } } }, "control-underscore": { "match": "\\b(_)\\b", "name": "constant.other.underscore" }, "control-other": { "match": "\\b(new|delete|emit)\\b", "name": "keyword.control" }, "constant": { "patterns": [ { "include": "#constant-boolean" }, { "include": "#constant-time" }, { "include": "#constant-currency" } ] }, "constant-boolean": { "match": "\\b(true|false)\\b", "name": "constant.language.boolean" }, "constant-time": { "match": "\\b(seconds|minutes|hours|days|weeks|years)\\b", "name": "constant.language.time" }, "constant-currency": { "match": "\\b(ether|wei|gwei|finney|szabo)\\b", "name": "constant.language.currency" }, "number": { "patterns": [ { "include": "#number-decimal" }, { "include": "#number-hex" }, { "include": "#number-scientific" } ] }, "number-decimal": { "match": "\\b([0-9_]+(\\.[0-9_]+)?)\\b", "name": "constant.numeric.decimal" }, "number-hex": { "match": "\\b(0[xX][a-fA-F0-9]+)\\b", "name": "constant.numeric.hexadecimal" }, "number-scientific": { "match": "\\b(?:0\\.(?:0[1-9]|[1-9][0-9_]?)|[1-9][0-9_]*(?:\\.\\d{1,2})?)(?:e[+-]?[0-9_]+)?", "name": "constant.numeric.scientific" }, "string": { "patterns": [ { "match": "\\\".*?\\\"", "name": "string.quoted.double" }, { "match": "\\'.*?\\'", "name": "string.quoted.single" } ] }, "primitive": { "patterns": [ { "include": "#number-decimal" }, { "include": "#number-hex" }, { "include": "#number-scientific" }, { "include": "#string" } ] }, "type-primitive": { "patterns": [ { "begin": "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*)\\b(?:\\[\\])(\\()", "beginCaptures": { "1": { "name": "support.type.primitive" } }, "end": "(\\))", "patterns": [ { "include": "#primitive" }, { "include": "#punctuation" }, { "include": "#global" }, { "include": "#variable" } ] }, { "match": "\\b(address|string\\d*|bytes\\d*|int\\d*|uint\\d*|bool|hash\\d*)\\b", "name": "support.type.primitive" } ] }, "global": { "patterns": [ { "include": "#global-variables" }, { "include": "#global-functions" } ] }, "global-variables": { "patterns": [ { "match": "\\b(this)\\b", "name": "variable.language.this" }, { "match": "\\b(super)\\b", "name": "variable.language.super" }, { "match": "\\b(abi)\\b", "name": "variable.language.builtin.abi" }, { "match": "\\b(msg\\.sender|msg|block|tx|now)\\b", "name": "variable.language.transaction" }, { "match": "\\b(tx\\.origin|tx\\.gasprice|msg\\.data|msg\\.sig|msg\\.value)\\b", "name": "variable.language.transaction" } ] }, "global-functions": { "patterns": [ { "match": "\\b(require|assert|revert)\\b", "name": "keyword.control.exceptions" }, { "match": "\\b(selfdestruct|suicide)\\b", "name": "keyword.control.contract" }, { "match": "\\b(addmod|mulmod|keccak256|sha256|sha3|ripemd160|ecrecover)\\b", "name": "support.function.math" }, { "match": "\\b(unicode)\\b", "name": "support.function.string" }, { "match": "\\b(blockhash|gasleft)\\b", "name": "variable.language.transaction" }, { "match": "\\b(type)\\b", "name": "variable.language.type" } ] }, "type-modifier-access": { "match": "\\b(internal|external|private|public)\\b", "name": "storage.type.modifier.access" }, "type-modifier-payable": { "match": "\\b(nonpayable|payable)\\b", "name": "storage.type.modifier.payable" }, "type-modifier-constant": { "match": "\\b(constant)\\b", "name": "storage.type.modifier.readonly" }, "type-modifier-immutable": { "match": "\\b(immutable)\\b", "name": "storage.type.modifier.readonly" }, "type-modifier-extended-scope": { "match": "\\b(pure|view|inherited|indexed|storage|memory|virtual|calldata|override|abstract)\\b", "name": "storage.type.modifier.extendedscope" }, "variable": { "patterns": [ { "match": "\\b(\\_\\w+)\\b", "captures": { "1": { "name": "variable.parameter.function" } } }, { "match": "(?:\\.)(\\w+)\\b", "captures": { "1": { "name": "support.variable.property" } } }, { "match": "\\b(\\w+)\\b", "captures": { "1": { "name": "variable.parameter.other" } } } ] }, "modifier-call": { "patterns": [ { "include": "#function-call" }, { "match": "\\b(\\w+)\\b", "name": "entity.name.function.modifier" } ] }, "declaration": { "patterns": [ { "include": "#declaration-contract" }, { "include": "#declaration-interface" }, { "include": "#declaration-library" }, { "include": "#declaration-function" }, { "include": "#declaration-modifier" }, { "include": "#declaration-constructor" }, { "include": "#declaration-event" }, { "include": "#declaration-storage" }, { "include": "#declaration-error" } ] }, "declaration-storage-field": { "patterns": [ { "include": "#comment" }, { "include": "#control" }, { "include": "#type-primitive" }, { "include": "#type-modifier-access" }, { "include": "#type-modifier-immutable" }, { "include": "#type-modifier-extend-scope" }, { "include": "#type-modifier-payable" }, { "include": "#type-modifier-constant" }, { "include": "#primitive" }, { "include": "#constant" }, { "include": "#operator" }, { "include": "#punctuation" } ] }, "declaration-storage": { "patterns": [ { "include": "#declaration-storage-mapping" }, { "include": "#declaration-struct" }, { "include": "#declaration-enum" }, { "include": "#declaration-storage-field" } ] }, "declaration-contract": { "patterns": [ { "begin": "\\b(contract)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b\\s+", "end": "(?=\\{)", "beginCaptures": { "1": { "name": "storage.type.contract" }, "2": { "name": "entity.name.type.contract" }, "3": { "name": "storage.modifier.is" } }, "patterns": [ { "match": "\\b(\\w+)\\b", "name": "entity.name.type.contract.extend" } ] }, { "match": "\\b(contract)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.contract" }, "2": { "name": "entity.name.type.contract" } } } ] }, "declaration-interface": { "patterns": [ { "begin": "\\b(interface)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b\\s+", "end": "(?=\\{)", "beginCaptures": { "1": { "name": "storage.type.interface" }, "2": { "name": "entity.name.type.interface" }, "3": { "name": "storage.modifier.is" } }, "patterns": [ { "match": "\\b(\\w+)\\b", "name": "entity.name.type.interface.extend" } ] }, { "match": "\\b(interface)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.interface" }, "2": { "name": "entity.name.type.interface" } } } ] }, "declaration-library": { "match": "\\b(library)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.library" }, "3": { "name": "entity.name.type.library" } } }, "declaration-struct": { "patterns": [ { "match": "\\b(struct)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.struct" }, "3": { "name": "entity.name.type.struct" } } }, { "begin": "\\b(struct)\\b\\s*(\\w+)?\\b\\s*(?=\\{)", "beginCaptures": { "1": { "name": "storage.type.struct" }, "2": { "name": "entity.name.type.struct" } }, "end": "(?=\\})", "patterns": [ { "include": "#type-primitive" }, { "include": "#variable" }, { "include": "#punctuation" }, { "include": "#comment" } ] } ] }, "declaration-event": { "patterns": [ { "begin": "\\b(event)\\b(?:\\s+(\\w+)\\b)?", "end": "(?=\\))", "beginCaptures": { "1": { "name": "storage.type.event" }, "2": { "name": "entity.name.type.event" } }, "patterns": [ { "include": "#type-primitive" }, { "match": "\\b(?:(indexed)\\s)?(\\w+)(?:,\\s*|)", "captures": { "1": { "name": "storage.type.modifier.indexed" }, "2": { "name": "variable.parameter.event" } } }, { "include": "#punctuation" } ] }, { "match": "\\b(event)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.event" }, "3": { "name": "entity.name.type.event" } } } ] }, "declaration-constructor": { "patterns": [ { "begin": "\\b(constructor)\\b", "beginCaptures": { "1": { "name": "storage.type.constructor" } }, "end": "(?=\\{)", "patterns": [ { "begin": "\\G\\s*(?=\\()", "end": "(?=\\))", "patterns": [ { "include": "#declaration-function-parameters" } ] }, { "begin": "(?<=\\))", "end": "(?=\\{)", "patterns": [ { "include": "#type-modifier-access" }, { "include": "#function-call" } ] } ] }, { "match": "\\b(constructor)\\b", "captures": { "1": { "name": "storage.type.constructor" } } } ] }, "declaration-enum": { "patterns": [ { "begin": "\\b(enum)\\s+(\\w+)\\b", "beginCaptures": { "1": { "name": "storage.type.enum" }, "2": { "name": "entity.name.type.enum" } }, "end": "(?=\\})", "patterns": [ { "match": "\\b(\\w+)\\b", "name": "variable.other.enummember" }, { "include": "#punctuation" } ] }, { "match": "\\b(enum)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.enum" }, "3": { "name": "entity.name.type.enum" } } } ] }, "declaration-function-parameters": { "begin": "\\G\\s*(?=\\()", "end": "(?=\\))", "patterns": [ { "include": "#type-primitive" }, { "include": "#type-modifier-extended-scope" }, { "match": "\\b([A-Z]\\w*)\\b", "captures": { "1": { "name": "storage.type.struct" } } }, { "include": "#variable" }, { "include": "#punctuation" }, { "include": "#comment" } ] }, "declaration-function": { "patterns": [ { "begin": "\\b(function)\\s+(\\w+)\\b", "beginCaptures": { "1": { "name": "storage.type.function" }, "2": { "name": "entity.name.function" } }, "end": "(?=\\{|;)", "patterns": [ { "include": "#natspec" }, { "include": "#global" }, { "include": "#declaration-function-parameters" }, { "include": "#type-modifier-access" }, { "include": "#type-modifier-payable" }, { "include": "#type-modifier-immutable" }, { "include": "#type-modifier-extended-scope" }, { "include": "#control-flow" }, { "include": "#function-call" }, { "include": "#modifier-call" }, { "include": "#punctuation" } ] }, { "match": "\\b(function)\\s+([A-Za-z_]\\w*)\\b", "captures": { "1": { "name": "storage.type.function" }, "2": { "name": "entity.name.function" } } } ] }, "declaration-modifier": { "patterns": [ { "begin": "\\b(modifier)\\b\\s*(\\w+)", "beginCaptures": { "1": { "name": "storage.type.function.modifier" }, "2": { "name": "entity.name.function.modifier" } }, "end": "(?=\\{)", "patterns": [ { "include": "#declaration-function-parameters" }, { "begin": "(?<=\\))", "end": "(?=\\{)", "patterns": [ { "include": "#declaration-function-parameters" }, { "include": "#type-modifier-access" }, { "include": "#type-modifier-payable" }, { "include": "#type-modifier-immutable" }, { "include": "#type-modifier-extended-scope" }, { "include": "#function-call" }, { "include": "#modifier-call" }, { "include": "#control-flow" } ] } ] }, { "match": "\\b(modifier)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.modifier" }, "3": { "name": "entity.name.function" } } } ] }, "declaration-storage-mapping": { "patterns": [ { "begin": "\\b(mapping)\\b", "beginCaptures": { "1": { "name": "storage.type.mapping" } }, "end": "(?=\\))", "patterns": [ { "include": "#declaration-storage-mapping" }, { "include": "#type-primitive" }, { "include": "#punctuation" }, { "include": "#operator" } ] }, { "match": "\\b(mapping)\\b", "name": "storage.type.mapping" } ] }, "declaration-error": { "match": "\\b(error)(\\s+([A-Za-z_]\\w*))?\\b", "captures": { "1": { "name": "storage.type.error" }, "3": { "name": "entity.name.type.error" } } }, "function-call": { "match": "\\b([A-Za-z_]\\w*)\\s*(\\()", "captures": { "1": { "name": "entity.name.function" }, "2": { "name": "punctuation.parameters.begin" } } }, "assembly": { "patterns": [ { "match": "\\b(assembly)\\b", "name": "keyword.control.assembly" }, { "match": "\\b(let)\\b", "name": "storage.type.assembly" } ] }, "punctuation": { "patterns": [ { "match": ";", "name": "punctuation.terminator.statement" }, { "match": "\\.", "name": "punctuation.accessor" }, { "match": ",", "name": "punctuation.separator" }, { "match": "\\{", "name": "punctuation.brace.curly.begin" }, { "match": "\\}", "name": "punctuation.brace.curly.end" }, { "match": "\\[", "name": "punctuation.brace.square.begin" }, { "match": "\\]", "name": "punctuation.brace.square.end" }, { "match": "\\(", "name": "punctuation.parameters.begin" }, { "match": "\\)", "name": "punctuation.parameters.end" } ] } }, "scopeName": "source.solidity", "uuid": "ad87d2cd-8575-4afe-984e-9421a3788933" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/soytemplate.tmLanguage.json ================================================ { "foldingStartMarker": "\\{\\s*template\\s+[^\\}]*\\}", "firstLineMatch": "\\{\\s*namespace\\b", "foldingStopMarker": "\\{\\s*/\\s*template\\s*\\}", "fileTypes": ["soy"], "repository": { "comment-doc": { "begin": "(/\\*\\*)(?!/)", "endCaptures": { "1": { "name": "punctuation.definition.comment.end.soy" } }, "end": "(\\*/)", "patterns": [ { "match": "(@param|@param\\?)\\s+(\\w+)", "captures": { "1": { "name": "support.type.soy" }, "2": { "name": "variable.parameter.soy" } } } ], "name": "comment.block.documentation.soy", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.soy" } } }, "operator": { "match": "==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|(?<!\\{)/|\\?:", "name": "keyword.operator.soy" }, "print-parameter": { "patterns": [ { "match": "\\|", "name": "keyword.operator.soy" }, { "match": "noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate", "name": "variable.parameter.soy" } ] }, "param": { "begin": "(\\{/?)\\s*(param)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#variable" }, { "match": "\\b([\\w]*)\\s*(:)?", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" } } } ], "name": "meta.tag.param.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "comment-line": { "match": "\\s+(//).*$\\n?", "name": "comment.line.double-slash.soy", "captures": { "1": { "name": "punctuation.definition.comment.soy" } } }, "call": { "begin": "(\\{/?)\\s*(call|delcall)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#string-quoted-single" }, { "include": "#string-quoted-double" }, { "match": "(?<=call|delcall)\\s+[\\.\\w]+", "name": "variable.parameter.soy" }, { "match": "\\b(data)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" } } } ], "name": "meta.tag.call.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "print": { "begin": "(\\{/?)\\s*(print)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#variable" }, { "include": "#print-parameter" }, { "include": "#number" }, { "include": "#primitive" }, { "include": "#attribute-lookup" } ], "name": "meta.tag.print.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "template": { "begin": "(\\{/?)\\s*(template|deltemplate)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "match": "(?<=template|deltemplate)\\s+([\\.\\w]+)", "captures": { "1": { "name": "entity.name.function.soy" } } }, { "match": "\\b(private)\\s*(=)\\s*(\"true\"|\"false\")", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" }, "3": { "name": "string.quoted.double.soy" } } }, { "match": "\\b(private)\\s*(=)\\s*('true'|'false')", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" }, "3": { "name": "string.quoted.single.soy" } } }, { "match": "\\b(autoescape)\\s*(=)\\s*(\"true\"|\"false\"|\"contextual\")", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" }, "3": { "name": "string.quoted.double.soy" } } }, { "match": "\\b(autoescape)\\s*(=)\\s*('true'|'false'|'contextual')", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" }, "3": { "name": "string.quoted.single.soy" } } } ], "name": "meta.tag.template.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "primitive": { "match": "\\b(null|false|true)\\b", "name": "constant.language.soy" }, "tag": { "begin": "(\\{)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#namespace" }, { "include": "#variable" }, { "include": "#special-character" }, { "include": "#tag-simple" }, { "include": "#function" }, { "include": "#operator" }, { "include": "#attribute-lookup" }, { "include": "#number" }, { "include": "#primitive" }, { "include": "#print-parameter" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" } } }, "attribute-lookup": { "begin": "(\\[)", "endCaptures": { "1": { "name": "punctuation.definition.attribute-lookup.end.soy" } }, "end": "(\\])", "patterns": [ { "include": "#variable" }, { "include": "#function" }, { "include": "#operator" }, { "include": "#number" }, { "include": "#primitive" }, { "include": "#string-quoted-single" }, { "include": "#string-quoted-double" } ], "beginCaptures": { "1": { "name": "punctuation.definition.attribute-lookup.begin.soy" } } }, "special-character": { "match": "(\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b)", "name": "support.constant.soy" }, "number": { "match": "[\\d]+", "name": "constant.numeric" }, "function": { "match": "\\b(isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b", "name": "support.function.soy" }, "namespace": { "match": "(namespace|delpackage)\\s+([\\w\\.]+)", "captures": { "1": { "name": "entity.name.tag.soy" }, "2": { "name": "variable.parameter.soy" } } }, "comment-block": { "begin": "(/\\*)(?!\\*)", "endCaptures": { "1": { "name": "punctuation.definition.comment.end.soy" } }, "end": "(\\*/)", "name": "comment.block.soy", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.soy" } } }, "switch": { "begin": "(\\{/?)\\s*(switch|case)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#variable" }, { "include": "#function" }, { "include": "#number" }, { "include": "#string-quoted-single" }, { "include": "#string-quoted-double" } ], "name": "meta.tag.switch.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "for": { "begin": "(\\{/?)\\s*(for)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "match": "\\bin\\b", "name": "keyword.operator.soy" }, { "match": "\\brange\\b", "name": "support.function.soy" }, { "include": "#variable" }, { "include": "#number" }, { "include": "#primitive" } ], "name": "meta.tag.for.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "if": { "begin": "(\\{/?)\\s*(if|elseif)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#variable" }, { "include": "#operator" }, { "include": "#function" }, { "include": "#string-quoted-single" }, { "include": "#string-quoted-double" } ], "name": "meta.tag.if.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "foreach": { "begin": "(\\{/?)\\s*(foreach)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "match": "\\bin\\b", "name": "keyword.operator.soy" }, { "include": "#variable" } ], "name": "meta.tag.foreach.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "string-quoted-double": { "match": "\"[^\"]*\"", "name": "string.quoted.double" }, "string-quoted-single": { "match": "'[^']*'", "name": "string.quoted.single" }, "tag-simple": { "match": "(?<=\\{|\\{/)\\s*(literal|else|ifempty|default)\\s*(?=\\})", "name": "entity.name.tag.soy" }, "variable": { "match": "\\$[\\w\\.]+", "name": "variable.other.soy" }, "msg": { "begin": "(\\{/?)\\s*(msg)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "include": "#string-quoted-single" }, { "include": "#string-quoted-double" }, { "match": "\\b(meaning|desc)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.soy" }, "2": { "name": "keyword.operator.soy" } } } ], "name": "meta.tag.msg.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } }, "css": { "begin": "(\\{/?)\\s*(css)\\b", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.soy" } }, "end": "(\\})", "patterns": [ { "match": "\\b(LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b", "name": "support.constant.soy" } ], "name": "meta.tag.css.soy", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.soy" }, "2": { "name": "entity.name.tag.soy" } } } }, "uuid": "C56846DE-CB9A-4DB5-9D38-DC417DEA4D5F", "patterns": [ { "include": "#template" }, { "include": "#if" }, { "include": "#comment-line" }, { "include": "#comment-block" }, { "include": "#comment-doc" }, { "include": "#call" }, { "include": "#css" }, { "include": "#param" }, { "include": "#print" }, { "include": "#msg" }, { "include": "#for" }, { "include": "#foreach" }, { "include": "#switch" }, { "include": "#tag" }, { "include": "text.html.basic" } ], "comment": "SoyTemplate", "name": "SoyTemplate", "scopeName": "source.soy" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/sql.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/microsoft/vscode-mssql/blob/master/syntaxes/SQL.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/microsoft/vscode-mssql/commit/b8b58864526c048002b7c3964bdac8aac3713bd9", "name": "SQL", "scopeName": "source.sql", "patterns": [ { "match": "((?<!@)@)\\b(\\w+)\\b", "name": "text.variable" }, { "match": "(\\[)[^\\]]*(\\])", "name": "text.bracketed" }, { "match": "\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blocksize|bmk|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\s+or\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|days|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hours|http|identity|identity_value|if|ifnull|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minutes|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|schema|schemabinding|scoped|scroll|scroll_locks|sddl|secexpr|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|tran|transaction|transfer|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|waitfor|webmethod|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|window|windows|with|within|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|zone)\\b", "name": "keyword.other.sql" }, { "include": "#comments" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.sql" }, "5": { "name": "entity.name.function.sql" } }, "match": "(?i:^\\s*(create(?:\\s+or\\s+replace)?)\\s+(aggregate|conversion|database|domain|function|group|(unique\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)(['\"`]?)(\\w+)\\4", "name": "meta.create.sql" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.sql" } }, "match": "(?i:^\\s*(drop)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))", "name": "meta.drop.sql" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.table.sql" }, "3": { "name": "entity.name.function.sql" }, "4": { "name": "keyword.other.cascade.sql" } }, "match": "(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)", "name": "meta.drop.sql" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.table.sql" } }, "match": "(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)", "name": "meta.alter.sql" }, { "captures": { "1": { "name": "storage.type.sql" }, "2": { "name": "storage.type.sql" }, "3": { "name": "constant.numeric.sql" }, "4": { "name": "storage.type.sql" }, "5": { "name": "constant.numeric.sql" }, "6": { "name": "storage.type.sql" }, "7": { "name": "constant.numeric.sql" }, "8": { "name": "constant.numeric.sql" }, "9": { "name": "storage.type.sql" }, "10": { "name": "constant.numeric.sql" }, "11": { "name": "storage.type.sql" }, "12": { "name": "storage.type.sql" }, "13": { "name": "storage.type.sql" }, "14": { "name": "constant.numeric.sql" }, "15": { "name": "storage.type.sql" } }, "match": "(?xi)\n\n\t\t\t\t# normal stuff, capture 1\n\t\t\t\t \\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\b\n\n\t\t\t\t# numeric suffix, capture 2 + 3i\n\t\t\t\t|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\t\t\t\t# optional numeric suffix, capture 4 + 5i\n\t\t\t\t|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# special case, capture 6 + 7i + 8i\n\t\t\t\t|\\b(numeric|decimal)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\t\t\t\t# special case, captures 9, 10i, 11\n\t\t\t\t|\\b(times?)\\b(?:\\((\\d+)\\))?(\\swith(?:out)?\\stime\\szone\\b)?\n\n\t\t\t\t# special case, captures 12, 13, 14i, 15\n\t\t\t\t|\\b(timestamp)(?:(s|tz))?\\b(?:\\((\\d+)\\))?(\\s(with|without)\\stime\\szone\\b)?\n\n\t\t\t" }, { "match": "(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|nocheck|check|constraint|collate|default)\\b)", "name": "storage.modifier.sql" }, { "match": "\\b\\d+\\b", "name": "constant.numeric.sql" }, { "match": "(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\s+by|or|like|and|union(\\s+all)?|having|order\\s+by|limit|(inner|cross)\\s+join|join|straight_join|full\\s+outer\\s+join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)", "name": "keyword.other.DML.sql" }, { "match": "(?i:\\b(on|off|((is\\s+)?not\\s+)?null)\\b)", "name": "keyword.other.DDL.create.II.sql" }, { "match": "(?i:\\bvalues\\b)", "name": "keyword.other.DML.II.sql" }, { "match": "(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)", "name": "keyword.other.LUW.sql" }, { "match": "(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)", "name": "keyword.other.authorization.sql" }, { "match": "(?i:\\bin\\b)", "name": "keyword.other.data-integrity.sql" }, { "match": "(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)", "name": "keyword.other.object-comments.sql" }, { "match": "(?i)\\bAS\\b", "name": "keyword.other.alias.sql" }, { "match": "(?i)\\b(DESC|ASC)\\b", "name": "keyword.other.order.sql" }, { "match": "\\*", "name": "keyword.operator.star.sql" }, { "match": "[!<>]?=|<>|<|>", "name": "keyword.operator.comparison.sql" }, { "match": "-|\\+|/", "name": "keyword.operator.math.sql" }, { "match": "\\|\\|", "name": "keyword.operator.concatenator.sql" }, { "match": "(?i)\\b(aggregate|approx_count_distinct|avg|checksum_agg|count|count_big|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\b", "name": "support.function.aggregate.sql" }, { "match": "(?i)\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\b", "name": "support.function.analytic.sql" }, { "match": "(?i)\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\b", "name": "support.function.conversion.sql" }, { "match": "(?i)\\b(collationproperty|tertiary_weights)\\b", "name": "support.function.collation.sql" }, { "match": "(?i)\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\b", "name": "support.function.cryptographic.sql" }, { "match": "(?i)\\b(cursor_status)\\b", "name": "support.function.cursor.sql" }, { "match": "(?i)\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\b", "name": "support.function.datetime.sql" }, { "match": "(?i)\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\b", "name": "support.function.datatype.sql" }, { "match": "(?i)\\b(coalesce|nullif)\\b", "name": "support.function.expression.sql" }, { "match": "(?<!@)@@(?i)\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\b", "name": "support.function.globalvar.sql" }, { "match": "(?i)\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\b", "name": "support.function.json.sql" }, { "match": "(?i)\\b(choose|iif|greatest|least)\\b", "name": "support.function.logical.sql" }, { "match": "(?i)\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\b", "name": "support.function.mathematical.sql" }, { "match": "(?i)\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\b", "name": "support.function.metadata.sql" }, { "match": "(?i)\\b(rank|dense_rank|ntile|row_number)\\b", "name": "support.function.ranking.sql" }, { "match": "(?i)\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\b", "name": "support.function.rowset.sql" }, { "match": "(?i)\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\b", "name": "support.function.security.sql" }, { "match": "(?i)\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\b", "name": "support.function.string.sql" }, { "match": "(?i)\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\b", "name": "support.function.system.sql" }, { "match": "(?i)\\b(patindex|textptr|textvalid)\\b", "name": "support.function.textimage.sql" }, { "captures": { "1": { "name": "constant.other.database-name.sql" }, "2": { "name": "constant.other.table-name.sql" } }, "match": "(\\w+?)\\.(\\w+)" }, { "include": "#strings" }, { "include": "#regexps" }, { "captures": { "1": { "name": "punctuation.section.scope.begin.sql" }, "2": { "name": "punctuation.section.scope.end.sql" } }, "comment": "Allow for special ↩ behavior", "match": "(\\()(\\))", "name": "meta.block.sql" } ], "repository": { "comments": { "patterns": [ { "begin": "(^[ \\t]+)?(?=--)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.sql" } }, "end": "(?!\\G)", "patterns": [ { "begin": "--", "beginCaptures": { "0": { "name": "punctuation.definition.comment.sql" } }, "end": "\\n", "name": "comment.line.double-dash.sql" } ] }, { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.sql" } }, "end": "(?!\\G)", "patterns": [] }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.sql" } }, "end": "\\*/", "name": "comment.block.c" } ] }, "regexps": { "patterns": [ { "begin": "/(?=\\S.*/)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "end": "/", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.regexp.sql", "patterns": [ { "include": "#string_interpolation" }, { "match": "\\\\/", "name": "constant.character.escape.slash.sql" } ] }, { "begin": "%r\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "comment": "We should probably handle nested bracket pairs!?! -- Allan", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.regexp.modr.sql", "patterns": [ { "include": "#string_interpolation" } ] } ] }, "string_escape": { "match": "\\\\.", "name": "constant.character.escape.sql" }, "string_interpolation": { "captures": { "1": { "name": "punctuation.definition.string.begin.sql" }, "3": { "name": "punctuation.definition.string.end.sql" } }, "match": "(#\\{)([^\\}]*)(\\})", "name": "string.interpolated.sql" }, "strings": { "patterns": [ { "captures": { "2": { "name": "punctuation.definition.string.begin.sql" }, "3": { "name": "punctuation.definition.string.end.sql" } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "match": "(N)?(')[^']*(')", "name": "string.quoted.single.sql" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.quoted.single.sql", "patterns": [ { "include": "#string_escape" } ] }, { "captures": { "1": { "name": "punctuation.definition.string.begin.sql" }, "2": { "name": "punctuation.definition.string.end.sql" } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "match": "(`)[^`\\\\]*(`)", "name": "string.quoted.other.backtick.sql" }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.quoted.other.backtick.sql", "patterns": [ { "include": "#string_escape" } ] }, { "captures": { "1": { "name": "punctuation.definition.string.begin.sql" }, "2": { "name": "punctuation.definition.string.end.sql" } }, "comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", "match": "(\")[^\"#]*(\")", "name": "string.quoted.double.sql" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.quoted.double.sql", "patterns": [ { "include": "#string_interpolation" } ] }, { "begin": "%\\{", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sql" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.sql" } }, "name": "string.other.quoted.brackets.sql", "patterns": [ { "include": "#string_interpolation" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/stylus.tmLanguage.json ================================================ { "name": "stylus", "scopeName": "source.stylus", "fileTypes": ["styl", "stylus", "css.styl", "css.stylus"], "patterns": [ { "include": "#comment" }, { "include": "#at_rule" }, { "include": "#language_keywords" }, { "include": "#language_constants" }, { "include": "#variable_declaration" }, { "include": "#function" }, { "include": "#selector" }, { "include": "#declaration" }, { "captures": { "1": { "name": "punctuation.section.property-list.begin.css" }, "2": { "name": "punctuation.section.property-list.end.css" } }, "match": "(\\{)(\\})", "name": "meta.brace.curly.css" }, { "match": "\\{|\\}", "name": "meta.brace.curly.css" }, { "include": "#numeric" }, { "include": "#string" }, { "include": "#operator" } ], "repository": { "comment": { "patterns": [ { "include": "#comment_block" }, { "include": "#comment_line" } ] }, "comment_block": { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.css" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.css" } }, "name": "comment.block.css" }, "comment_line": { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.stylus" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.stylus" } }, "end": "(?=\\n)", "name": "comment.line.double-slash.stylus" } ] }, "selector": { "patterns": [ { "match": "(?:(?=\\w)(?<![\\w-]))(a|abbr|acronym|address|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|main|map|mark|math|menu|menuitem|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rb|rp|rt|rtc|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)(?:(?<=\\w)(?![\\w-]))", "name": "entity.name.tag.css" }, { "match": "(?:(?=\\w)(?<![\\w-]))(vkern|view|use|tspan|tref|title|textPath|text|symbol|switch|svg|style|stop|set|script|rect|radialGradient|polyline|polygon|pattern|path|mpath|missing-glyph|metadata|mask|marker|linearGradient|line|image|hkern|glyphRef|glyph|g|foreignObject|font-face-uri|font-face-src|font-face-name|font-face-format|font-face|font|filter|feTurbulence|feTile|feSpotLight|feSpecularLighting|fePointLight|feOffset|feMorphology|feMergeNode|feMerge|feImage|feGaussianBlur|feFuncR|feFuncG|feFuncB|feFuncA|feFlood|feDistantLight|feDisplacementMap|feDiffuseLighting|feConvolveMatrix|feComposite|feComponentTransfer|feColorMatrix|feBlend|ellipse|desc|defs|cursor|color-profile|clipPath|circle|animateTransform|animateMotion|animateColor|animate|altGlyphItem|altGlyphDef|altGlyph|a)(?:(?<=\\w)(?![\\w-]))", "name": "entity.name.tag.svg.css" }, { "match": "\\s*(\\,)\\s*", "name": "meta.selector.stylus" }, { "match": "\\*", "name": "meta.selector.stylus" }, { "match": "\\s*(\\&)([a-zA-Z0-9_-]+)\\s*", "captures": { "2": { "name": "entity.other.attribute-name.parent-selector-suffix.stylus" } }, "name": "meta.selector.stylus" }, { "match": "\\s*(\\&)\\s*", "name": "meta.selector.stylus" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(\\.)[a-zA-Z0-9_-]+", "name": "entity.other.attribute-name.class.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(#)[a-zA-Z][a-zA-Z0-9_-]*", "name": "entity.other.attribute-name.id.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(:+)(after|before|content|first-letter|first-line|host|(-(moz|webkit|ms)-)?selection)\\b", "name": "entity.other.attribute-name.pseudo-element.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(:)((first|last)-child|(first|last|only)-of-type|empty|root|target|first|left|right)\\b", "name": "entity.other.attribute-name.pseudo-class.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(:)(checked|enabled|default|disabled|indeterminate|invalid|optional|required|valid)\\b", "name": "entity.other.attribute-name.pseudo-class.ui-state.css" }, { "begin": "((:)not)(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.section.function.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.css" } }, "patterns": [ { "include": "#selector" } ] }, { "captures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.section.function.css" }, "4": { "name": "constant.numeric.css" }, "5": { "name": "punctuation.section.function.css" } }, "match": "((:)nth-(?:(?:last-)?child|(?:last-)?of-type))(\\()(\\-?(?:\\d+n?|n)(?:\\+\\d+)?|even|odd)(\\))" }, { "match": "((:)dir)\\s*(?:(\\()(ltr|rtl)?(\\)))?", "captures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "puncutation.definition.entity.css" }, "3": { "name": "punctuation.section.function.css" }, "4": { "name": "constant.language.css" }, "5": { "name": "punctuation.section.function.css" } } }, { "match": "((:)lang)\\s*(?:(\\()(\\w+(-\\w+)?)?(\\)))?", "captures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "puncutation.definition.entity.css" }, "3": { "name": "punctuation.section.function.css" }, "4": { "name": "constant.language.css" }, "6": { "name": "punctuation.section.function.css" } } }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(:)(active|hover|link|visited|focus)\\b", "name": "entity.other.attribute-name.pseudo-class.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" } }, "match": "(::)(shadow)\\b", "name": "entity.other.attribute-name.pseudo-class.css" }, { "captures": { "1": { "name": "punctuation.definition.entity.css" }, "2": { "name": "entity.other.attribute-name.attribute.css" }, "3": { "name": "punctuation.separator.operator.css" }, "4": { "name": "string.unquoted.attribute-value.css" }, "5": { "name": "string.quoted.double.attribute-value.css" }, "6": { "name": "punctuation.definition.string.begin.css" }, "7": { "name": "punctuation.definition.string.end.css" }, "8": { "name": "punctuation.definition.entity.css" } }, "match": "(?i)(\\[)\\s*(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)(?:\\s*([~|^$*]?=)\\s*(?:(-?[_a-z\\\\[[:^ascii:]]][_a-z0-9\\-\\\\[[:^ascii:]]]*)|((?>(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(\\])", "name": "meta.attribute-selector.css" }, { "include": "#interpolation" }, { "include": "#variable" } ] }, "variable_declaration": { "begin": "^[^\\S\\n]*(\\$?[a-zA-Z_-][a-zA-Z0-9_-]*)[^\\S\\n]*(\\=|\\?\\=|\\:\\=)", "beginCaptures": { "1": { "name": "variable.stylus" }, "2": { "name": "keyword.operator.stylus" } }, "end": "(\\n)|(;)|(?=\\})", "endCaptures": { "2": { "name": "punctuation.terminator.rule.css" } }, "patterns": [ { "include": "#property_values" } ] }, "declaration": { "begin": "((?<=^)[^\\S\\n]+)|((?<=;)[^\\S\\n]*)|((?<=\\{)[^\\S\\n]*)", "end": "(?=\\n)|(;)|(?=\\})|(\\n)", "endCaptures": { "2": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.property-list.css", "patterns": [ { "match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", "name": "variable.css" }, { "include": "#language_keywords" }, { "include": "#language_constants" }, { "match": "(?:(?<=^)[^\\S\\n]+(\\n))" }, { "match": "\\G\\s*(counter-reset|counter-increment)(?:(:)|[^\\S\\n])[^\\S\\n]*([a-zA-Z_-][a-zA-Z0-9_-]*)", "captures": { "1": { "name": "support.type.property-name.css" }, "2": { "name": "punctuation.separator.key-value.css" }, "3": { "name": "variable.section.css" } }, "name": "meta.property.counter.css" }, { "begin": "\\G\\s*(filter)(?:(:)|[^\\S\\n])[^\\S\\n]*", "beginCaptures": { "1": { "name": "support.type.property-name.css" }, "2": { "name": "punctuation.separator.key-value.css" } }, "end": "(?=\\n|;|\\}|$)", "name": "meta.property.filter.css", "patterns": [ { "include": "#function" }, { "include": "#property_values" } ] }, { "include": "#property" }, { "include": "#interpolation" }, { "include": "$self" } ] }, "property": { "begin": "(?x:\\G\\s*(?:\n (-webkit-[-A-Za-z]+|-moz-[-A-Za-z]+|-o-[-A-Za-z]+|-ms-[-A-Za-z]+|-khtml-[-A-Za-z]+|zoom|z-index|y|x|wrap|word-wrap|word-spacing|word-break|word|width|widows|white-space-collapse|white-space|white|weight|volume|voice-volume|voice-stress|voice-rate|voice-pitch-range|voice-pitch|voice-family|voice-duration|voice-balance|voice|visibility|vertical-align|variant|user-select|up|unicode-bidi|unicode-range|unicode|trim|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform|touch-action|top-width|top-style|top-right-radius|top-left-radius|top-color|top|timing-function|text-wrap|text-transform|text-shadow|text-replace|text-rendering|text-overflow|text-outline|text-justify|text-indent|text-height|text-emphasis|text-decoration|text-align-last|text-align|text|target-position|target-new|target-name|target|table-layout|tab-size|style-type|style-position|style-image|style|string-set|stretch|stress|stacking-strategy|stacking-shift|stacking-ruby|stacking|src|speed|speech-rate|speech|speak-punctuation|speak-numeral|speak-header|speak|span|spacing|space-collapse|space|sizing|size-adjust|size|shadow|respond-to|rule-width|rule-style|rule-color|rule|ruby-span|ruby-position|ruby-overhang|ruby-align|ruby|rows|rotation-point|rotation|role|right-width|right-style|right-color|right|richness|rest-before|rest-after|rest|resource|resize|reset|replace|repeat|rendering-intent|rate|radius|quotes|punctuation-trim|punctuation|property|profile|presentation-level|presentation|position|pointer-events|point|play-state|play-during|play-count|pitch-range|pitch|phonemes|pause-before|pause-after|pause|page-policy|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|pack|overhang|overflow-y|overflow-x|overflow-style|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|origin|orientation|orient|ordinal-group|order|opacity|offset|numeral|new|nav-up|nav-right|nav-left|nav-index|nav-down|nav|name|move-to|model|mix-blend-mode|min-width|min-height|min|max-width|max-height|max|marquee-style|marquee-speed|marquee-play-count|marquee-direction|marquee|marks|mark-before|mark-after|mark|margin-top|margin-right|margin-left|margin-bottom|margin|mask-image|list-style-type|list-style-position|list-style-image|list-style|list|lines|line-stacking-strategy|line-stacking-shift|line-stacking-ruby|line-stacking|line-height|line-break|level|letter-spacing|length|left-width|left-style|left-color|left|label|justify-content|justify|iteration-count|inline-box-align|initial-value|initial-size|initial-before-align|initial-before-adjust|initial-after-align|initial-after-adjust|index|indent|increment|image-resolution|image-orientation|image|icon|hyphens|hyphenate-resource|hyphenate-lines|hyphenate-character|hyphenate-before|hyphenate-after|hyphenate|height|header|hanging-punctuation|gap|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-start|grid-row|grid-row-end|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|row-gap|gap|font-kerning|font-language-override|font-weight|font-variant-caps|font-variant|font-style|font-synthesis|font-stretch|font-size-adjust|font-size|font-family|font|float-offset|float|flex-wrap|flex-shrink|flex-grow|flex-group|flex-flow|flex-direction|flex-basis|flex|fit-position|fit|fill|filter|family|empty-cells|emphasis|elevation|duration|drop-initial-value|drop-initial-size|drop-initial-before-align|drop-initial-before-adjust|drop-initial-after-align|drop-initial-after-adjust|drop|down|dominant-baseline|display-role|display-model|display|direction|delay|decoration-break|decoration|cursor|cue-before|cue-after|cue|crop|counter-reset|counter-increment|counter|count|content|columns|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|column-break-before|column-break-after|column|color-profile|color|collapse|clip|clear|character|caption-side|break-inside|break-before|break-after|break|box-sizing|box-shadow|box-pack|box-orient|box-ordinal-group|box-lines|box-flex-group|box-flex|box-direction|box-decoration-break|box-align|box|bottom-width|bottom-style|bottom-right-radius|bottom-left-radius|bottom-color|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-length|border-left-width|border-left-style|border-left-color|border-left|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|bookmark-target|bookmark-level|bookmark-label|bookmark|binding|bidi|before|baseline-shift|baseline|balance|background-blend-mode|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-break|background-attachment|background|azimuth|attachment|appearance|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-duration|animation-direction|animation-delay|animation-fill-mode|animation|alignment-baseline|alignment-adjust|alignment|align-self|align-last|align-items|align-content|align|after|adjust|will-change)|\n (writing-mode|text-anchor|stroke-width|stroke-opacity|stroke-miterlimit|stroke-linejoin|stroke-linecap|stroke-dashoffset|stroke-dasharray|stroke|stop-opacity|stop-color|shape-rendering|marker-start|marker-mid|marker-end|lighting-color|kerning|image-rendering|glyph-orientation-vertical|glyph-orientation-horizontal|flood-opacity|flood-color|fill-rule|fill-opacity|fill|enable-background|color-rendering|color-interpolation-filters|color-interpolation|clip-rule|clip-path)|\n ([a-zA-Z_-][a-zA-Z0-9_-]*)\n)(?!([^\\S\\n]*&)|([^\\S\\n]*\\{))(?=:|([^\\S\\n]+[^\\s])))", "beginCaptures": { "1": { "name": "support.type.property-name.css" }, "2": { "name": "support.type.property-name.svg.css" }, "3": { "name": "support.function.mixin.stylus" } }, "end": "(;)|(?=\\n|\\}|$)", "endCaptures": { "1": { "name": "punctuation.terminator.rule.css" } }, "patterns": [ { "include": "#property_value" } ] }, "property_value": { "begin": "\\G(?:(:)|(\\s))(\\s*)(?!&)", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.css" }, "2": { "name": "punctuation.separator.key-value.css" } }, "end": "(?=\\n|;|\\})", "endCaptures": { "1": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.property-value.css", "patterns": [ { "include": "#property_values" }, { "match": "[^\\n]+?" } ] }, "property_values": { "patterns": [ { "include": "#function" }, { "include": "#comment" }, { "include": "#language_keywords" }, { "include": "#language_constants" }, { "match": "(?:(?=\\w)(?<![\\w-]))(wrap-reverse|wrap|whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|unicase|underline|ultra-expanded|ultra-condensed|transparent|transform|top|titling-caps|thin|thick|text-top|text-bottom|text|tb-rl|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table|sw-resize|super|strict|stretch|step-start|step-end|static|square|space-between|space-around|space|solid|soft-light|small-caps|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|saturation|s-resize|running|rtl|row-reverse|row-resize|row|round|right|ridge|reverse|repeat-y|repeat-x|repeat|relative|progressive|progress|pre-wrap|pre-line|pre|pointer|petite-caps|paused|pan-x|pan-left|pan-right|pan-y|pan-up|pan-down|padding-box|overline|overlay|outside|outset|optimizeSpeed|optimizeLegibility|opacity|oblique|nw-resize|nowrap|not-allowed|normal|none|no-repeat|no-drop|newspaper|ne-resize|n-resize|multiply|move|middle|medium|max-height|manipulation|main-size|luminosity|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|local|list-item|linear(?!-)|line-through|line-edge|line|lighter|lighten|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline-block|inline|inherit|infinite|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|hue|horizontal|hidden|help|hard-light|hand|groove|geometricPrecision|forwards|flex-start|flex-end|flex|fixed|extra-expanded|extra-condensed|expanded|exclusion|ellipsis|ease-out|ease-in-out|ease-in|ease|e-resize|double|dotted|distribute-space|distribute-letter|distribute-all-lines|distribute|disc|disabled|difference|default|decimal|dashed|darken|currentColor|crosshair|cover|content-box|contain|condensed|column-reverse|column|color-dodge|color-burn|color|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|border-box|bolder|bold|block|bidi-override|below|baseline|balance|backwards|auto|antialiased|always|alternate-reverse|alternate|all-small-caps|all-scroll|all-petite-caps|all|absolute)(?:(?<=\\w)(?![\\w-]))", "name": "support.constant.property-value.css" }, { "match": "(?:(?=\\w)(?<![\\w-]))(start|sRGB|square|round|optimizeSpeed|optimizeQuality|nonzero|miter|middle|linearRGB|geometricPrecision |evenodd |end |crispEdges|butt|bevel)(?:(?<=\\w)(?![\\w-]))", "name": "support.constant.property-value.svg.css" }, { "include": "#font_name" }, { "include": "#numeric" }, { "include": "#color" }, { "include": "#string" }, { "match": "\\!\\s*important", "name": "keyword.other.important.css" }, { "include": "#operator" }, { "include": "#stylus_keywords" }, { "include": "#property_variable" } ] }, "numeric": { "patterns": [ { "captures": { "1": { "name": "keyword.other.unit.css" } }, "match": "(?x) (?<!\\w|-)(?:(?:-|\\+)?(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+)) ((?:px|pt|ch|cm|mm|in|r?em|ex|pc|deg|g?rad|dpi|dpcm|dppx|fr|ms|s|turn|vh|vmax|vmin|vw)\\b|%)?", "name": "constant.numeric.css" } ] }, "color": { "patterns": [ { "begin": "\\b(rgb|rgba|hsl|hsla)(\\()", "beginCaptures": { "1": { "name": "support.function.color.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.function.css" } }, "name": "meta.function.color.css", "patterns": [ { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#numeric" }, { "include": "#property_variable" } ] }, { "captures": { "1": { "name": "punctuation.definition.constant.css" } }, "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", "name": "constant.other.color.rgb-value.css" }, { "comment": "http://www.w3.org/TR/CSS21/syndata.html#value-def-color", "match": "\\b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\\b", "name": "support.constant.color.w3c-standard-color-name.css" }, { "comment": "http://www.w3.org/TR/css3-color/#svg-color", "match": "\\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\\b", "name": "support.constant.color.w3c-extended-color-name.css" } ] }, "string": { "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.double.css", "patterns": [ { "match": "\\\\([a-fA-F0-9]{1,6}|.)", "name": "constant.character.escape.css" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.single.css", "patterns": [ { "match": "\\\\([a-fA-F0-9]{1,6}|.)", "name": "constant.character.escape.css" } ] } ] }, "at_rule": { "patterns": [ { "begin": "\\s*((@)(import|require))\\b\\s*", "beginCaptures": { "1": { "name": "keyword.control.at-rule.import.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" } }, "end": "\\s*((?=;|$|\\n))", "endCaptures": { "1": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.at-rule.import.css", "patterns": [ { "include": "#string" } ] }, { "begin": "\\s*((@)(extend[s]?)\\b)\\s*", "beginCaptures": { "1": { "name": "keyword.control.at-rule.extend.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" } }, "end": "\\s*((?=;|$|\\n))", "endCaptures": { "1": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.at-rule.extend.css", "patterns": [ { "include": "#selector" } ] }, { "match": "^\\s*((@)font-face)\\b", "captures": { "1": { "name": "keyword.control.at-rule.fontface.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" } }, "name": "meta.at-rule.fontface.stylus" }, { "match": "^\\s*((@)css)\\b", "captures": { "1": { "name": "keyword.control.at-rule.css.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" } }, "name": "meta.at-rule.css.stylus" }, { "begin": "\\s*((@)charset)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.control.at-rule.charset.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" } }, "end": "\\s*((?=;|$|\\n))", "name": "meta.at-rule.charset.stylus", "patterns": [ { "include": "#string" } ] }, { "begin": "\\s*((@)keyframes)\\b\\s+([a-zA-Z_-][a-zA-Z0-9_-]*)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.keyframes.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" }, "3": { "name": "entity.name.function.keyframe.stylus" } }, "end": "\\s*((?=\\{|$|\\n))", "name": "meta.at-rule.keyframes.stylus" }, { "begin": "(?=(\\b(\\d+%|from\\b|to\\b)))", "end": "(?=(\\{|\\n))", "name": "meta.at-rule.keyframes.stylus", "patterns": [ { "match": "(\\b(\\d+%|from\\b|to\\b))", "name": "entity.other.attribute-name.stylus" } ] }, { "match": "^\\s*((@)media)\\b", "captures": { "1": { "name": "keyword.control.at-rule.media.stylus" }, "2": { "name": "punctuation.definition.keyword.stylus" } }, "name": "meta.at-rule.media.stylus" }, { "match": "(?:(?=\\w)(?<![\\w-]))(width|scan|resolution|orientation|monochrome|min-width|min-resolution|min-monochrome|min-height|min-device-width|min-device-height|min-device-aspect-ratio|min-color-index|min-color|min-aspect-ratio|max-width|max-resolution|max-monochrome|max-height|max-device-width|max-device-height|max-device-aspect-ratio|max-color-index|max-color|max-aspect-ratio|height|grid|device-width|device-height|device-aspect-ratio|color-index|color|aspect-ratio)(?:(?<=\\w)(?![\\w-]))", "name": "support.type.property-name.media-feature.media.css" }, { "match": "(?:(?=\\w)(?<![\\w-]))(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)(?:(?<=\\w)(?![\\w-]))", "name": "support.constant.media-type.media.css" }, { "match": "(?:(?=\\w)(?<![\\w-]))(portrait|landscape)(?:(?<=\\w)(?![\\w-]))", "name": "support.constant.property-value.media-property.media.css" } ] }, "operator": { "patterns": [ { "match": "((?:\\?|:|!|~|\\+|(\\s-\\s)|(?:\\*)?\\*|\\/|%|(\\.)?\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=)|\\b(?:in|is(?:nt)?|(?<!:)not|or|and)\\b)", "name": "keyword.operator.stylus" }, { "include": "#char_escape" } ] }, "font_name": { "match": "(\\b(?i:arial|century|comic|courier|cursive|fantasy|futura|garamond|georgia|helvetica|impact|lucida|monospace|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif)\\b)", "name": "support.constant.font-name.css" }, "variable": { "match": "(\\$[a-zA-Z_-][a-zA-Z0-9_-]*)", "name": "variable.stylus" }, "property_variable": { "patterns": [ { "include": "#variable" }, { "match": "(?<!^)(\\@[a-zA-Z_-][a-zA-Z0-9_-]*)", "name": "variable.property.stylus" } ] }, "function": { "begin": "(?=[a-zA-Z_-][a-zA-Z0-9_-]*\\()", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.section.function.css" } }, "patterns": [ { "begin": "(format|url|local)(\\()", "beginCaptures": { "1": { "name": "support.function.misc.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.misc.css", "patterns": [ { "match": "(?<=\\()[^\\)\\s]*(?=\\))", "name": "string.css" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#operator" }, { "match": "\\s*" } ] }, { "match": "(counter)(\\()([a-zA-Z_-][a-zA-Z0-9_-]*)(?=\\))", "captures": { "1": { "name": "support.function.misc.counter.css" }, "2": { "name": "punctuation.section.function.css" }, "3": { "name": "variable.section.css" } }, "name": "meta.function.misc.counter.css" }, { "begin": "(counters)(\\()", "beginCaptures": { "1": { "name": "support.function.misc.counters.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.misc.counters.css", "patterns": [ { "match": "\\G[a-zA-Z_-][a-zA-Z0-9_-]*", "name": "variable.section.css" }, { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#string" }, { "include": "#interpolation" } ] }, { "begin": "(attr)(\\()", "beginCaptures": { "1": { "name": "support.function.misc.attr.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.misc.attr.css", "patterns": [ { "match": "\\G[a-zA-Z_-][a-zA-Z0-9_-]*", "name": "entity.other.attribute-name.attribute.css" }, { "match": "(?<=[a-zA-Z0-9_-])\\s*\\b(string|color|url|integer|number|length|em|ex|px|rem|vw|vh|vmin|vmax|mm|cm|in|pt|pc|angle|deg|grad|rad|time|s|ms|frequency|Hz|kHz|%)\\b", "name": "support.type.attr.css" }, { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#string" }, { "include": "#interpolation" } ] }, { "begin": "(calc)(\\()", "beginCaptures": { "1": { "name": "support.function.misc.calc.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.misc.calc.css", "patterns": [ { "include": "#property_values" } ] }, { "begin": "(cubic-bezier)(\\()", "beginCaptures": { "1": { "name": "support.function.timing.cubic-bezier.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.timing.cubic-bezier.css", "patterns": [ { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#numeric" }, { "include": "#interpolation" } ] }, { "begin": "(steps)(\\()", "beginCaptures": { "1": { "name": "support.function.timing.steps.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.timing.steps.css", "patterns": [ { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#numeric" }, { "match": "\\b(start|end)\\b", "name": "support.constant.timing.steps.direction.css" }, { "include": "#interpolation" } ] }, { "begin": "(linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient)(\\()", "beginCaptures": { "1": { "name": "support.function.gradient.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.gradient.css", "patterns": [ { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#numeric" }, { "include": "#color" }, { "match": "\\b(to|bottom|right|left|top|circle|ellipse|center|closest-side|closest-corner|farthest-side|farthest-corner|at)\\b", "name": "support.constant.gradient.css" }, { "include": "#interpolation" } ] }, { "begin": "(blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)(\\()", "beginCaptures": { "1": { "name": "support.function.filter.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.filter.css", "patterns": [ { "include": "#numeric" }, { "include": "#property_variable" }, { "include": "#interpolation" } ] }, { "begin": "(drop-shadow)(\\()", "beginCaptures": { "1": { "name": "support.function.filter.drop-shadow.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.filter.drop-shadow.css", "patterns": [ { "include": "#numeric" }, { "include": "#color" }, { "include": "#property_variable" }, { "include": "#interpolation" } ] }, { "begin": "(matrix|matrix3d|perspective|rotate|rotate3d|rotate[Xx]|rotate[yY]|rotate[zZ]|scale|scale3d|scale[xX]|scale[yY]|scale[zZ]|skew|skew[xX]|skew[yY]|translate|translate3d|translate[xX]|translate[yY]|translate[zZ])(\\()", "beginCaptures": { "1": { "name": "support.function.transform.css" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.transform.css", "patterns": [ { "include": "#numeric" }, { "include": "#property_variable" }, { "include": "#interpolation" } ] }, { "match": "(url|local|format|counter|counters|attr|calc)(?=\\()", "name": "support.function.misc.css" }, { "match": "(cubic-bezier|steps)(?=\\()", "name": "support.function.timing.css" }, { "match": "(linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient)(?=\\()", "name": "support.function.gradient.css" }, { "match": "(blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)(?=\\()", "name": "support.function.filter.css" }, { "match": "(matrix|matrix3d|perspective|rotate|rotate3d|rotate[Xx]|rotate[yY]|rotate[zZ]|scale|scale3d|scale[xX]|scale[yY]|scale[zZ]|skew|skew[xX]|skew[yY]|translate|translate3d|translate[xX]|translate[yY]|translate[zZ])(?=\\()", "name": "support.function.transform.css" }, { "begin": "([a-zA-Z_-][a-zA-Z0-9_-]*)(\\()", "beginCaptures": { "1": { "name": "entity.name.function.stylus" }, "2": { "name": "punctuation.section.function.css" } }, "end": "(?=\\))", "name": "meta.function.stylus", "patterns": [ { "name": "variable.argument.stylus", "match": "(?x)\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F]) # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] # Remainder of identifier\n |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*" }, { "match": "\\s*(,)\\s*", "name": "punctuation.separator.parameter.css" }, { "include": "#interpolation" }, { "include": "#property_values" } ] }, { "match": "\\(", "name": "punctuation.section.function.css" } ] }, "interpolation": { "name": "meta.interpolation.stylus", "begin": "(?:(\\{)[^\\S\\n]*)(?=[^;=]*[^\\S\\n]*\\})", "beginCaptures": { "1": { "name": "meta.brace.curly" } }, "end": "(?:[^\\S\\n]*(\\}))|\\n|$", "endCaptures": { "1": { "name": "meta.brace.curly" } }, "patterns": [ { "include": "#variable" }, { "include": "#numeric" }, { "include": "#string" }, { "include": "#operator" } ] }, "char_escape": { "name": "constant.character.escape.stylus", "match": "\\\\(.)" }, "language_constants": { "match": "\\b(true|false|null)\\b", "name": "constant.language.stylus" }, "language_keywords": { "patterns": [ { "match": "(\\b|\\s)(return|else|for|unless|if|else)\\b", "name": "keyword.control.stylus" }, { "match": "(\\b|\\s)(!important|in|is defined|is a)\\b", "name": "keyword.other.stylus" }, { "match": "\\barguments\\b", "name": "variable.language.stylus" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/svg.tmLanguage.json ================================================ { "foldingStopMarker": "^\\s*(</[^>]+>|[/%]>|-->)\\s*$", "foldingStartMarker": "^\\s*(<[^!?%/](?!.+?(/>|</.+?>))|<[!%]--(?!.+?--%?>)|<%[!]?(?!.+?%>))", "keyEquivalent": "^~S", "fileTypes": ["svg"], "uuid": "60E1A653-2588-410D-8F89-9DA05E8BF163", "patterns": [ { "match": "\\b(if|while|for|return)\\b", "name": "keyword.control.untitled" }, { "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escaped.untitled" } ], "name": "string.quoted.double.untitled" }, { "include": "text.xml" }, { "begin": "(?:^\\s+)?<((?i:style))\\b(?![^>]*/>)", "end": "</((?i:style))>(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": ">", "end": "(?=</(?i:style))", "patterns": [ { "include": "#embedded-code" }, { "include": "source.css" } ] } ], "name": "source.css.embedded.svg", "captures": { "1": { "name": "entity.name.tag.style.svg" } } }, { "begin": "(?:^\\s+)?<((?i:script))\\b(?![^>]*/>)", "end": "(?<=</(script))>(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script))>", "end": "</((?i:script))", "patterns": [{ "include": "source.js" }] } ], "name": "source.js.embedded.svg", "captures": { "1": { "name": "entity.name.tag.script.svg" } } }, { "begin": "(?:^\\s+)?<((?i:handler))\\b(?![^>]*/>)", "end": "(?<=</(script))>(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:handler))>", "end": "</((?i:handler))", "patterns": [{ "include": "source.js" }] } ], "name": "source.js.embedded.svg", "captures": { "1": { "name": "entity.name.tag.handler.svg" } } } ], "name": "SVG", "scopeName": "text.xml.svg" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/swift.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/swift.tmbundle/blob/master/Syntaxes/Swift.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/swift.tmbundle/commit/7a35637eb70aef3114b091c4ff6fbf6a2faa881b", "name": "swift", "scopeName": "source.swift", "comment": "See swift.tmbundle/grammar-test.swift for test cases.", "patterns": [ { "include": "#root" } ], "repository": { "async-throws": { "captures": { "1": { "name": "invalid.illegal.await-must-precede-throws.swift" }, "2": { "name": "keyword.control.exception.swift" }, "3": { "name": "keyword.control.async.swift" } }, "match": "\\b(?:(throws\\s+async|rethrows\\s+async)|(throws|rethrows)|(async))\\b" }, "attributes": { "patterns": [ { "begin": "((@)available)(\\()", "beginCaptures": { "1": { "name": "storage.modifier.attribute.swift" }, "2": { "name": "punctuation.definition.attribute.swift" }, "3": { "name": "punctuation.definition.arguments.begin.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "name": "meta.attribute.available.swift", "patterns": [ { "captures": { "1": { "name": "keyword.other.platform.os.swift" }, "2": { "name": "constant.numeric.swift" } }, "match": "\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?" }, { "begin": "\\b(introduced|deprecated|obsoleted)\\s*(:)\\s*", "beginCaptures": { "1": { "name": "keyword.other.swift" }, "2": { "name": "punctuation.separator.key-value.swift" } }, "end": "(?!\\G)", "patterns": [ { "match": "\\b[0-9]+(?:\\.[0-9]+)*\\b", "name": "constant.numeric.swift" } ] }, { "begin": "\\b(message|renamed)\\s*(:)\\s*(?=\")", "beginCaptures": { "1": { "name": "keyword.other.swift" }, "2": { "name": "punctuation.separator.key-value.swift" } }, "end": "(?!\\G)", "patterns": [ { "include": "#literals" } ] }, { "captures": { "1": { "name": "keyword.other.platform.all.swift" }, "2": { "name": "keyword.other.swift" }, "3": { "name": "invalid.illegal.character-not-allowed-here.swift" } }, "match": "(?:(\\*)|\\b(deprecated|unavailable|noasync)\\b)\\s*(.*?)(?=[,)])" } ] }, { "begin": "((@)objc)(\\()", "beginCaptures": { "1": { "name": "storage.modifier.attribute.swift" }, "2": { "name": "punctuation.definition.attribute.swift" }, "3": { "name": "punctuation.definition.arguments.begin.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "name": "meta.attribute.objc.swift", "patterns": [ { "captures": { "1": { "name": "invalid.illegal.missing-colon-after-selector-piece.swift" } }, "match": "\\w*(?::(?:\\w*:)*(\\w*))?", "name": "entity.name.function.swift" } ] }, { "begin": "(@)(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)", "beginCaptures": { "0": { "name": "storage.modifier.attribute.swift" }, "1": { "name": "punctuation.definition.attribute.swift" }, "2": { "name": "punctuation.definition.identifier.swift" }, "3": { "name": "punctuation.definition.identifier.swift" } }, "comment": "any other attribute", "end": "(?!\\G\\()", "name": "meta.attribute.swift", "patterns": [ { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.arguments.begin.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "name": "meta.arguments.attribute.swift", "patterns": [ { "include": "#expressions" } ] } ] } ] }, "builtin-functions": { "patterns": [ { "comment": "Member functions in the standard library in Swift 3 which may be used with trailing closures and no parentheses", "match": "(?<=\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a(?:p|x)))(?=\\s*[({])\\b", "name": "support.function.swift" }, { "comment": "Member functions in the standard library in Swift 3", "match": "(?<=\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:Reference|OrPinnedReference)|as(?:Suffix|Prefix))|ne(?:gate(?:d)?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:RetainedValue|UnretainedValue)|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:Retained|Unretained)|re(?:decessor|fix))|e(?:scape(?:d)?|n(?:code|umerate(?:d)?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:BackwardFrom|From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:Range|Subrange)?|verse(?:d)?|quest(?:NativeBuffer|UniqueMutableBackingBuffer)|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\s*\\()", "name": "support.function.swift" }, { "comment": "Member functions in the standard library in Swift 2 only", "match": "(?<=\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\s*\\()", "name": "support.function.swift" } ] }, "builtin-global-functions": { "patterns": [ { "begin": "\\b(type)(\\()\\s*(of)(:)", "beginCaptures": { "1": { "name": "support.function.dynamic-type.swift" }, "2": { "name": "punctuation.definition.arguments.begin.swift" }, "3": { "name": "support.variable.parameter.swift" }, "4": { "name": "punctuation.separator.argument-label.begin.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "patterns": [ { "include": "#expressions" } ] }, { "comment": "Global functions available in Swift 3 which may be used with trailing closures and no parentheses", "match": "\\b(?:anyGenerator|autoreleasepool)(?=\\s*[({])\\b", "name": "support.function.swift" }, { "comment": "Global functions available in Swift 3", "match": "\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:MutablePointer|Pointer)|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\s*\\()", "name": "support.function.swift" }, { "comment": "Global functions available in Swift 2 only", "match": "\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:MutablePointers|Pointers)|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\s*\\()", "name": "support.function.swift" } ] }, "builtin-properties": { "patterns": [ { "comment": "The simpler (?<=\\bProcess\\.|\\bCommandLine\\.) breaks VS Code / Atom, see https://github.com/textmate/swift.tmbundle/issues/29", "match": "(?<=^Process\\.|\\WProcess\\.|^CommandLine\\.|\\WCommandLine\\.)(arguments|argc|unsafeArgv)", "name": "support.variable.swift" }, { "comment": "Properties in the standard library in Swift 3", "match": "(?<=\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:scription|bugDescription)|u(?:n(?:safelyUnwrapped|icodeScalar(?:s)?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|value(?:s)?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzeroMagnitude|rmalMagnitude)|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\b", "name": "support.variable.swift" }, { "comment": "Properties in the standard library in Swift 2 only", "match": "(?<=\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\b", "name": "support.variable.swift" }, { "comment": "Enum cases in the standard library - note that there is some overlap between these and the properties", "match": "(?<=\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\b", "name": "support.variable.swift" } ] }, "builtin-types": { "comment": "Types provided in the standard library", "patterns": [ { "include": "#builtin-class-type" }, { "include": "#builtin-enum-type" }, { "include": "#builtin-protocol-type" }, { "include": "#builtin-struct-type" }, { "include": "#builtin-typealias" }, { "match": "\\bAny\\b", "name": "support.type.any.swift" } ], "repository": { "builtin-class-type": { "comment": "Builtin class types", "match": "\\b(Managed(Buffer|ProtoBuffer)|NonObjectiveCBase|AnyGenerator)\\b", "name": "support.class.swift" }, "builtin-enum-type": { "patterns": [ { "comment": "CommandLine is an enum, but it acts like a constant", "match": "\\b(?:CommandLine|Process(?=\\.))\\b", "name": "support.constant.swift" }, { "comment": "The return type of a function that never returns", "match": "\\bNever\\b", "name": "support.constant.never.swift" }, { "comment": "Enum types in the standard library in Swift 3", "match": "\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\b", "name": "support.type.swift" }, { "comment": "Enum types in the standard library in Swift 2 only", "match": "\\b(?:MirrorDisposition|QuickLookObject)\\b", "name": "support.type.swift" } ] }, "builtin-protocol-type": { "patterns": [ { "comment": "Protocols in the standard library in Swift 3", "match": "\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ideable|eamable)|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflectable|StringConvertible|DebugStringConvertible|PlaygroundQuickLookable|LeafReflectable)|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:SequenceProtocol|CollectionProtocol))|A(?:nyObject|bsoluteValuable))\\b", "name": "support.type.swift" }, { "comment": "Protocols in the standard library in Swift 2 only", "match": "\\b(?:Ran(?:domAccessIndexType|geReplaceableCollectionType)|GeneratorType|M(?:irror(?:Type|PathType)|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperationsType|directionalIndexType)|oolean(?:Type|LiteralConvertible))|S(?:tring(?:InterpolationConvertible|LiteralConvertible)|i(?:nkType|gned(?:NumberType|IntegerType))|e(?:tAlgebraType|quenceType)|liceable)|NilLiteralConvertible|C(?:ollectionType|VarArgType)|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStreamType|ptionSetType)|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\b", "name": "support.type.swift" } ] }, "builtin-struct-type": { "patterns": [ { "comment": "Structs in the standard library in Swift 3", "match": "\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccessSlice|BidirectionalSlice|Slice)|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccessSlice|geReplaceable(?:RandomAccessSlice|BidirectionalSlice|Slice))|BidirectionalSlice|Slice)|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:Generator|Iterator)?|o(?:Generator|Iterator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:Range|ClosedRange)|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Generator|Iterator))?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccessIndices|BidirectionalIndices|Indices))|U(?:n(?:safe(?:RawPointer|Mutable(?:RawPointer|BufferPointer|Pointer)|BufferPointer(?:Generator|Iterator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\b", "name": "support.type.swift" }, { "comment": "Structs in the standard library in Swift 2 only", "match": "\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\b", "name": "support.type.swift" } ] }, "builtin-typealias": { "patterns": [ { "comment": "Typealiases in the standard library in Swift 3", "match": "\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam(?:1|2)))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lement(?:s)?|x(?:tendedGraphemeCluster(?:Type|LiteralType)|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\b", "name": "support.type.swift" }, { "comment": "Typealiases in the standard library in Swift 2 only", "match": "\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\b", "name": "support.type.swift" } ] } } }, "code-block": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.scope.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.scope.end.swift" } }, "patterns": [ { "include": "$self" } ] }, "comments": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.swift" } }, "match": "\\A^(#!).*$\\n?", "name": "comment.line.number-sign.swift" }, { "begin": "/\\*\\*(?!/)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.swift" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.swift" } }, "name": "comment.block.documentation.swift", "patterns": [ { "include": "#nested" } ] }, { "begin": "/\\*:", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.swift" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.swift" } }, "name": "comment.block.documentation.playground.swift", "patterns": [ { "include": "#nested" } ] }, { "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.swift" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.swift" } }, "name": "comment.block.swift", "patterns": [ { "include": "#nested" } ] }, { "match": "\\*/", "name": "invalid.illegal.unexpected-end-of-block-comment.swift" }, { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.swift" } }, "end": "(?!\\G)", "patterns": [ { "begin": "///", "beginCaptures": { "0": { "name": "punctuation.definition.comment.swift" } }, "end": "^", "name": "comment.line.triple-slash.documentation.swift" }, { "begin": "//:", "beginCaptures": { "0": { "name": "punctuation.definition.comment.swift" } }, "end": "^", "name": "comment.line.double-slash.documentation.swift" }, { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.swift" } }, "end": "^", "name": "comment.line.double-slash.swift" } ] } ], "repository": { "nested": { "begin": "/\\*", "end": "\\*/", "patterns": [ { "include": "#nested" } ] } } }, "compiler-control": { "patterns": [ { "begin": "^\\s*(#)(if|elseif)\\s+(false)\\b.*?(?=$|//|/\\*)", "beginCaptures": { "0": { "name": "meta.preprocessor.conditional.swift" }, "1": { "name": "punctuation.definition.preprocessor.swift" }, "2": { "name": "keyword.control.preprocessor.conditional.swift" }, "3": { "name": "constant.language.boolean.swift" } }, "contentName": "comment.block.preprocessor.swift", "end": "(?=^\\s*(#(elseif|else|endif)\\b))" }, { "begin": "^\\s*(#)(if|elseif)\\s+", "captures": { "1": { "name": "punctuation.definition.preprocessor.swift" }, "2": { "name": "keyword.control.preprocessor.conditional.swift" } }, "end": "(?=\\s*(?://|/\\*))|$", "name": "meta.preprocessor.conditional.swift", "patterns": [ { "match": "(&&|\\|\\|)", "name": "keyword.operator.logical.swift" }, { "match": "\\b(true|false)\\b", "name": "constant.language.boolean.swift" }, { "captures": { "1": { "name": "keyword.other.condition.swift" }, "2": { "name": "punctuation.definition.parameters.begin.swift" }, "3": { "name": "support.constant.platform.architecture.swift" }, "4": { "name": "punctuation.definition.parameters.end.swift" } }, "match": "\\b(arch)\\s*(\\()\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\w+)\\s*(\\))" }, { "captures": { "1": { "name": "keyword.other.condition.swift" }, "2": { "name": "punctuation.definition.parameters.begin.swift" }, "3": { "name": "support.constant.platform.os.swift" }, "4": { "name": "punctuation.definition.parameters.end.swift" } }, "match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))" }, { "captures": { "1": { "name": "keyword.other.condition.swift" }, "2": { "name": "punctuation.definition.parameters.begin.swift" }, "3": { "name": "entity.name.type.module.swift" }, "4": { "name": "punctuation.definition.parameters.end.swift" } }, "match": "\\b(canImport)\\s*(\\()([\\p{L}_][\\p{L}_\\p{N}\\p{M}]*)(\\))" }, { "begin": "\\b(targetEnvironment)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.condition.swift" }, "2": { "name": "punctuation.definition.parameters.begin.swift" } }, "end": "(\\))|$", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.swift" } }, "patterns": [ { "match": "\\b(simulator|UIKitForMac)\\b", "name": "support.constant.platform.environment.swift" } ] }, { "begin": "\\b(swift|compiler)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.other.condition.swift" }, "2": { "name": "punctuation.definition.parameters.begin.swift" } }, "end": "(\\))|$", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.swift" } }, "patterns": [ { "match": ">=|<", "name": "keyword.operator.comparison.swift" }, { "match": "\\b[0-9]+(?:\\.[0-9]+)*\\b", "name": "constant.numeric.swift" } ] } ] }, { "captures": { "1": { "name": "punctuation.definition.preprocessor.swift" }, "2": { "name": "keyword.control.preprocessor.conditional.swift" }, "3": { "patterns": [ { "match": "\\S+", "name": "invalid.illegal.character-not-allowed-here.swift" } ] } }, "match": "^\\s*(#)(else|endif)(.*?)(?=$|//|/\\*)", "name": "meta.preprocessor.conditional.swift" }, { "captures": { "1": { "name": "punctuation.definition.preprocessor.swift" }, "2": { "name": "keyword.control.preprocessor.sourcelocation.swift" }, "4": { "name": "punctuation.definition.parameters.begin.swift" }, "5": { "patterns": [ { "begin": "(file)\\s*(:)\\s*(?=\")", "beginCaptures": { "1": { "name": "support.variable.parameter.swift" }, "2": { "name": "punctuation.separator.key-value.swift" } }, "end": "(?!\\G)", "patterns": [ { "include": "#literals" } ] }, { "captures": { "1": { "name": "support.variable.parameter.swift" }, "2": { "name": "punctuation.separator.key-value.swift" }, "3": { "name": "constant.numeric.integer.swift" } }, "match": "(line)\\s*(:)\\s*([0-9]+)" }, { "match": ",", "name": "punctuation.separator.parameters.swift" }, { "match": "\\S+", "name": "invalid.illegal.character-not-allowed-here.swift" } ] }, "6": { "name": "punctuation.definition.parameters.begin.swift" }, "7": { "patterns": [ { "match": "\\S+", "name": "invalid.illegal.character-not-allowed-here.swift" } ] } }, "match": "^\\s*(#)(sourceLocation)((\\()([^)]*)(\\)))(.*?)(?=$|//|/\\*)", "name": "meta.preprocessor.sourcelocation.swift" } ] }, "declarations": { "patterns": [ { "include": "#function" }, { "include": "#function-initializer" }, { "include": "#typed-variable-declaration" }, { "include": "#import" }, { "include": "#operator" }, { "include": "#precedencegroup" }, { "include": "#protocol" }, { "include": "#type" }, { "include": "#extension" }, { "include": "#typealias" } ], "repository": { "available-types": { "patterns": [ { "include": "#comments" }, { "include": "#builtin-types" }, { "include": "#attributes" }, { "match": "\\basync\\b", "name": "keyword.control.async.swift" }, { "match": "\\b(?:throws|rethrows)\\b", "name": "keyword.control.exception.swift" }, { "match": "\\bsome\\b", "name": "keyword.operator.type.opaque.swift" }, { "match": "\\bany\\b", "name": "keyword.operator.type.existential.swift" }, { "match": "\\b(?:inout|isolated)\\b", "name": "storage.modifier.swift" }, { "match": "\\bSelf\\b", "name": "variable.language.swift" }, { "captures": { "1": { "name": "keyword.operator.type.function.swift" } }, "match": "(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])" }, { "captures": { "1": { "name": "keyword.operator.type.composition.swift" } }, "comment": "Swift 3: A & B", "match": "(?<![/=\\-+!*%<>&|\\^~.])(&)(?![/=\\-+!*%<>&|\\^~.])" }, { "match": "[?!]", "name": "keyword.operator.type.optional.swift" }, { "match": "\\.\\.\\.", "name": "keyword.operator.function.variadic-parameter.swift" }, { "comment": "Swift 2: protocol<A, B>", "match": "\\bprotocol\\b", "name": "keyword.operator.type.composition.swift" }, { "match": "(?<=\\.)(?:Protocol|Type)\\b", "name": "keyword.operator.type.metatype.swift" }, { "include": "#tuple-type" }, { "include": "#collection-type" }, { "include": "#generic-argument-clause" } ], "repository": { "collection-type": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.collection-type.begin.swift" } }, "comment": "array and dictionary types [Value] and [Key: Value]", "end": "\\]|(?=[>){}])", "endCaptures": { "0": { "name": "punctuation.section.collection-type.end.swift" } }, "patterns": [ { "include": "#available-types" }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.key-value.swift" } }, "end": "(?=\\]|[>){}])", "patterns": [ { "match": ":", "name": "invalid.illegal.extra-colon-in-dictionary-type.swift" }, { "include": "#available-types" } ] } ] }, "tuple-type": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.tuple-type.begin.swift" } }, "end": "\\)|(?=[>\\]{}])", "endCaptures": { "0": { "name": "punctuation.section.tuple-type.end.swift" } }, "patterns": [ { "include": "#available-types" } ] } } }, "extension": { "begin": "\\b(extension)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", "beginCaptures": { "1": { "name": "storage.type.$1.swift" }, "2": { "name": "entity.name.type.swift", "patterns": [ { "include": "#available-types" } ] }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?<=\\})", "name": "meta.definition.type.$1.swift", "patterns": [ { "include": "#comments" }, { "comment": "SE-0143: Conditional Conformances", "include": "#generic-where-clause" }, { "include": "#inheritance-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.type.end.swift" } }, "name": "meta.definition.type.body.swift", "patterns": [ { "include": "$self" } ] } ] }, "function": { "begin": "(?x)\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(?:(nonisolated)\\s+)?\n\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t\t\t\t\t | (?:\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t(?=\\(|<)\n\t\t\t\t\t", "beginCaptures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "storage.type.function.swift" }, "3": { "name": "entity.name.function.swift" }, "4": { "name": "punctuation.definition.identifier.swift" }, "5": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?<=\\})|$(?# functions in protocol declarations or generated interfaces have no body)", "name": "meta.definition.function.swift", "patterns": [ { "include": "#comments" }, { "include": "#generic-parameter-clause" }, { "include": "#parameter-clause" }, { "include": "#function-result" }, { "include": "#async-throws" }, { "comment": "Swift 3: generic constraints after the parameters and return type", "include": "#generic-where-clause" }, { "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.section.function.begin.swift" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.function.end.swift" } }, "name": "meta.definition.function.body.swift", "patterns": [ { "include": "$self" } ] } ] }, "function-initializer": { "begin": "(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)", "beginCaptures": { "1": { "name": "storage.type.function.swift", "patterns": [ { "match": "(?<=[?!])[?!]+", "name": "invalid.illegal.character-not-allowed-here.swift" } ] } }, "end": "(?<=\\})|$", "name": "meta.definition.function.initializer.swift", "patterns": [ { "include": "#comments" }, { "include": "#generic-parameter-clause" }, { "include": "#parameter-clause" }, { "include": "#async-throws" }, { "comment": "Swift 3: generic constraints after the parameters and return type", "include": "#generic-where-clause" }, { "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.section.function.begin.swift" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.section.function.end.swift" } }, "name": "meta.definition.function.body.swift", "patterns": [ { "include": "$self" } ] } ] }, "function-result": { "begin": "(?<![/=\\-+!*%<>&|\\^~.])(->)(?![/=\\-+!*%<>&|\\^~.])\\s*", "beginCaptures": { "1": { "name": "keyword.operator.function-result.swift" } }, "end": "(?!\\G)(?=\\{|\\bwhere\\b|;)|$", "name": "meta.function-result.swift", "patterns": [ { "include": "#available-types" } ] }, "generic-argument-clause": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.separator.generic-argument-clause.begin.swift" } }, "end": ">|(?=[)\\]{}])", "endCaptures": { "0": { "name": "punctuation.separator.generic-argument-clause.end.swift" } }, "name": "meta.generic-argument-clause.swift", "patterns": [ { "include": "#available-types" } ] }, "generic-parameter-clause": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.separator.generic-parameter-clause.begin.swift" } }, "end": ">|(?=[^\\w\\d:<>\\s,=&`])(?# characters besides these are never valid in a generic param list -- even if it's not really a valid clause, we should stop trying to parse it if we see one of them.)", "endCaptures": { "0": { "name": "punctuation.separator.generic-parameter-clause.end.swift" } }, "name": "meta.generic-parameter-clause.swift", "patterns": [ { "include": "#comments" }, { "comment": "Swift 2: constraints inside the generic param list", "include": "#generic-where-clause" }, { "captures": { "1": { "name": "variable.language.generic-parameter.swift" } }, "match": "\\b((?!\\d)\\w[\\w\\d]*)\\b" }, { "match": ",", "name": "punctuation.separator.generic-parameters.swift" }, { "begin": "(:)\\s*", "beginCaptures": { "1": { "name": "punctuation.separator.generic-parameter-constraint.swift" } }, "end": "(?=[,>]|(?!\\G)\\bwhere\\b)", "name": "meta.generic-parameter-constraint.swift", "patterns": [ { "begin": "\\G", "end": "(?=[,>]|(?!\\G)\\bwhere\\b)", "name": "entity.other.inherited-class.swift", "patterns": [ { "include": "#type-identifier" } ] } ] } ] }, "generic-where-clause": { "begin": "\\b(where)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.other.generic-constraint-introducer.swift" } }, "end": "(?!\\G)$|(?=[>{};\\n]|//|/\\*)", "name": "meta.generic-where-clause.swift", "patterns": [ { "include": "#comments" }, { "include": "#requirement-list" } ], "repository": { "requirement-list": { "begin": "\\G|,\\s*", "end": "(?=[,>{};\\n]|//|/\\*)", "patterns": [ { "include": "#comments" }, { "include": "#constraint" }, { "include": "#available-types" }, { "begin": "(?<![/=\\-+!*%<>&|\\^~.])(==)(?![/=\\-+!*%<>&|\\^~.])", "beginCaptures": { "1": { "name": "keyword.operator.generic-constraint.same-type.swift" } }, "end": "(?=\\s*[,>{};\\n]|//|/\\*)", "name": "meta.generic-where-clause.same-type-requirement.swift", "patterns": [ { "include": "#available-types" } ] }, { "begin": "(?<![/=\\-+!*%<>&|\\^~.])(:)(?![/=\\-+!*%<>&|\\^~.])", "beginCaptures": { "1": { "name": "keyword.operator.generic-constraint.conforms-to.swift" } }, "end": "(?=\\s*[,>{};\\n]|//|/\\*)", "name": "meta.generic-where-clause.conformance-requirement.swift", "patterns": [ { "begin": "\\G\\s*", "contentName": "entity.other.inherited-class.swift", "end": "(?=\\s*[,>{};\\n]|//|/\\*)", "patterns": [ { "include": "#available-types" } ] } ] } ] } } }, "import": { "begin": "(?<!\\.)\\b(import)\\s+", "beginCaptures": { "1": { "name": "keyword.control.import.swift" } }, "end": "(;)|$\\n?|(?=//|/\\*)", "endCaptures": { "1": { "name": "punctuation.terminator.statement.swift" } }, "name": "meta.import.swift", "patterns": [ { "begin": "\\G(?!;|$|//|/\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\s+)?", "beginCaptures": { "1": { "name": "storage.modifier.swift" } }, "end": "(?=;|$|//|/\\*)", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.identifier.swift" }, "2": { "name": "punctuation.definition.identifier.swift" } }, "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t\t\t\t\t\t\t\t", "name": "entity.name.type.swift" }, { "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t\\$[0-9]+\n\t\t\t\t\t\t\t\t\t", "name": "entity.name.type.swift" }, { "captures": { "1": { "patterns": [ { "match": "\\.", "name": "invalid.illegal.dot-not-allowed-here.swift" } ] } }, "match": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?<=\\G|\\.)\n\t\t\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)*\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t(?=\\.|;|$|//|/\\*|\\s)\n\t\t\t\t\t\t\t\t\t", "name": "entity.name.type.swift" }, { "match": "\\.", "name": "punctuation.separator.import.swift" }, { "begin": "(?!\\s*(;|$|//|/\\*))", "end": "(?=\\s*(;|$|//|/\\*))", "name": "invalid.illegal.character-not-allowed-here.swift" } ] } ] }, "inheritance-clause": { "begin": "(:)(?=\\s*\\{)|(:)\\s*", "beginCaptures": { "1": { "name": "invalid.illegal.empty-inheritance-clause.swift" }, "2": { "name": "punctuation.separator.inheritance-clause.swift" } }, "end": "(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)", "name": "meta.inheritance-clause.swift", "patterns": [ { "begin": "\\bclass\\b", "beginCaptures": { "0": { "name": "storage.type.class.swift" } }, "end": "(?=[={}]|(?!\\G)\\bwhere\\b)", "patterns": [ { "include": "#comments" }, { "include": "#more-types" } ] }, { "begin": "\\G", "end": "(?!\\G)$|(?=[={}]|(?!\\G)\\bwhere\\b)", "patterns": [ { "include": "#comments" }, { "include": "#inherited-type" }, { "include": "#more-types" } ] } ], "repository": { "inherited-type": { "begin": "(?=[`\\p{L}_])", "end": "(?!\\G)", "name": "entity.other.inherited-class.swift", "patterns": [ { "include": "#type-identifier" } ] }, "more-types": { "begin": ",\\s*", "end": "(?!\\G)(?!//|/\\*)|(?=[,={}]|(?!\\G)\\bwhere\\b)", "name": "meta.inheritance-list.more-types", "patterns": [ { "include": "#comments" }, { "include": "#inherited-type" }, { "include": "#more-types" } ] } } }, "operator": { "begin": "(?x)\n\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\\b(prefix|infix|postfix)\n\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t\\b\n\t\t\t\t\t\t(operator)\n\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t\t\t\t\t\t\t | \\.\t\t\t\t\t\t\t\t\t# Invalid dot\n\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)*+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )++ )\t\t\t# Dot operators\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*\n\t\t\t\t\t", "beginCaptures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "storage.type.function.operator.swift" }, "3": { "name": "entity.name.function.operator.swift" }, "4": { "patterns": [ { "match": "\\.", "name": "invalid.illegal.dot-not-allowed-here.swift" } ] } }, "end": "(;)|$\\n?|(?=//|/\\*)", "endCaptures": { "1": { "name": "punctuation.terminator.statement.swift" } }, "name": "meta.definition.operator.swift", "patterns": [ { "include": "#swift2" }, { "include": "#swift3" }, { "match": "((?!$|;|//|/\\*)\\S)+", "name": "invalid.illegal.character-not-allowed-here.swift" } ], "repository": { "swift2": { "begin": "\\G(\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.operator.begin.swift" } }, "end": "(\\})", "endCaptures": { "1": { "name": "punctuation.definition.operator.end.swift" } }, "patterns": [ { "include": "#comments" }, { "captures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "keyword.other.operator.associativity.swift" } }, "match": "\\b(associativity)\\s+(left|right)\\b" }, { "captures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "constant.numeric.integer.swift" } }, "match": "\\b(precedence)\\s+([0-9]+)\\b" }, { "captures": { "1": { "name": "storage.modifier.swift" } }, "match": "\\b(assignment)\\b" } ] }, "swift3": { "captures": { "2": { "name": "entity.other.inherited-class.swift", "patterns": [ { "include": "#types-precedencegroup" } ] }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "match": "\\G(:)\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))" } } }, "parameter-clause": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.swift" } }, "end": "(\\))(?:\\s*(async)\\b)?", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.swift" }, "2": { "name": "keyword.control.async.swift" } }, "name": "meta.parameter-clause.swift", "patterns": [ { "include": "#parameter-list" } ] }, "parameter-list": { "patterns": [ { "captures": { "1": { "name": "entity.name.function.swift" }, "2": { "name": "punctuation.definition.identifier.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "variable.parameter.function.swift" }, "5": { "name": "punctuation.definition.identifier.swift" }, "6": { "name": "punctuation.definition.identifier.swift" } }, "comment": "External parameter labels are considered part of the function name", "match": "((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>))\\s+((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>))(?=\\s*:)" }, { "captures": { "1": { "name": "variable.parameter.function.swift" }, "2": { "name": "entity.name.function.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "comment": "If no external label is given, the name is both the external label and the internal variable name", "match": "(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)))(?=\\s*:)" }, { "begin": ":\\s*(?!\\s)", "end": "(?=[,)])", "patterns": [ { "include": "#available-types" }, { "match": ":", "name": "invalid.illegal.extra-colon-in-parameter-list.swift" }, { "begin": "=", "beginCaptures": { "0": { "name": "keyword.operator.assignment.swift" } }, "comment": "a parameter's default value", "end": "(?=[,)])", "patterns": [ { "include": "#expressions" } ] } ] } ] }, "precedencegroup": { "begin": "\\b(precedencegroup)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(?=\\{)", "beginCaptures": { "1": { "name": "storage.type.precedencegroup.swift" }, "2": { "name": "entity.name.type.precedencegroup.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?!\\G)", "name": "meta.definition.precedencegroup.swift", "patterns": [ { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.precedencegroup.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.precedencegroup.end.swift" } }, "patterns": [ { "include": "#comments" }, { "captures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "entity.other.inherited-class.swift", "patterns": [ { "include": "#types-precedencegroup" } ] }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "match": "\\b(higherThan|lowerThan)\\s*:\\s*((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))" }, { "captures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "keyword.other.operator.associativity.swift" } }, "match": "\\b(associativity)\\b(?:\\s*:\\s*(right|left|none)\\b)?" }, { "captures": { "1": { "name": "storage.modifier.swift" }, "2": { "name": "constant.language.boolean.swift" } }, "match": "\\b(assignment)\\b(?:\\s*:\\s*(true|false)\\b)?" } ] } ] }, "protocol": { "begin": "\\b(protocol)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", "beginCaptures": { "1": { "name": "storage.type.$1.swift" }, "2": { "name": "entity.name.type.$1.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?<=\\})", "name": "meta.definition.type.protocol.swift", "patterns": [ { "include": "#comments" }, { "include": "#inheritance-clause" }, { "comment": "SE-0142: Permit where clauses to constrain associated types", "include": "#generic-where-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.type.end.swift" } }, "name": "meta.definition.type.body.swift", "patterns": [ { "include": "#protocol-method" }, { "include": "#protocol-initializer" }, { "include": "#associated-type" }, { "include": "$self" } ] } ], "repository": { "associated-type": { "begin": "\\b(associatedtype)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", "beginCaptures": { "1": { "name": "keyword.other.declaration-specifier.swift" }, "2": { "name": "variable.language.associatedtype.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?!\\G)$|(?=[;}]|$)", "name": "meta.definition.associatedtype.swift", "patterns": [ { "include": "#inheritance-clause" }, { "comment": "SE-0142: Permit where clauses to constrain associated types", "include": "#generic-where-clause" }, { "include": "#typealias-assignment" } ] }, "protocol-initializer": { "begin": "(?<!\\.)\\b(init[?!]*(?# only one is valid, but we want the in⇥ snippet to produce something that looks good))\\s*(?=\\(|<)", "beginCaptures": { "1": { "name": "storage.type.function.swift", "patterns": [ { "match": "(?<=[?!])[?!]+", "name": "invalid.illegal.character-not-allowed-here.swift" } ] } }, "end": "$|(?=;|//|/\\*|\\})", "name": "meta.definition.function.initializer.swift", "patterns": [ { "include": "#comments" }, { "include": "#generic-parameter-clause" }, { "include": "#parameter-clause" }, { "include": "#async-throws" }, { "comment": "Swift 3: generic constraints after the parameters and return type", "include": "#generic-where-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.function.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.function.end.swift" } }, "name": "invalid.illegal.function-body-not-allowed-in-protocol.swift", "patterns": [ { "include": "$self" } ] } ] }, "protocol-method": { "begin": "(?x)\n\t\t\t\t\t\t\t\t\\b\n\t\t\t\t\t\t\t\t(func)\n\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\n\t\t \t\t\t\t\t\t | (?:\n\t\t \t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t \t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t \t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t \t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t(\n\t\t \t\t\t\t\t\t\t\t\t\t\\g<oph>\n\t\t \t\t\t\t\t\t\t\t\t | (?<opc>\t\t\t\t\t\t\t\t# operator-character\n\t\t \t\t\t\t\t\t\t\t\t\t\t[\\x{0300}-\\x{036F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t \t\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t \t\t\t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t\t\t)*\n\t\t \t\t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t\t | ( \\. ( \\g<oph> | \\g<opc> | \\. )+ )\t\t\t# Dot operators\n\t\t \t\t\t\t\t\t\t)\n\t\t \t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\\s*\n\t\t\t\t\t\t\t\t(?=\\(|<)\n\t\t\t\t\t\t\t", "beginCaptures": { "1": { "name": "storage.type.function.swift" }, "2": { "name": "entity.name.function.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "$|(?=;|//|/\\*|\\})", "name": "meta.definition.function.swift", "patterns": [ { "include": "#comments" }, { "include": "#generic-parameter-clause" }, { "include": "#parameter-clause" }, { "include": "#function-result" }, { "include": "#async-throws" }, { "comment": "Swift 3: generic constraints after the parameters and return type", "include": "#generic-where-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.function.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.function.end.swift" } }, "name": "invalid.illegal.function-body-not-allowed-in-protocol.swift", "patterns": [ { "include": "$self" } ] } ] } } }, "type": { "patterns": [ { "begin": "\\b(class(?!\\s+(?:func|var|let)\\b)|struct|actor)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", "beginCaptures": { "1": { "name": "storage.type.$1.swift" }, "2": { "name": "entity.name.type.$1.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?<=\\})", "name": "meta.definition.type.$1.swift", "patterns": [ { "include": "#comments" }, { "include": "#generic-parameter-clause" }, { "comment": "Swift 3: generic constraints after the generic param list", "include": "#generic-where-clause" }, { "include": "#inheritance-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.type.end.swift" } }, "name": "meta.definition.type.body.swift", "patterns": [ { "include": "$self" } ] } ] }, { "include": "#type-enum" } ] }, "type-enum": { "begin": "\\b(enum)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))", "beginCaptures": { "1": { "name": "storage.type.$1.swift" }, "2": { "name": "entity.name.type.$1.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?<=\\})", "name": "meta.definition.type.$1.swift", "patterns": [ { "include": "#comments" }, { "include": "#generic-parameter-clause" }, { "comment": "Swift 3: generic constraints after the generic param list", "include": "#generic-where-clause" }, { "include": "#inheritance-clause" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.type.begin.swift" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.type.end.swift" } }, "name": "meta.definition.type.body.swift", "patterns": [ { "include": "#enum-case-clause" }, { "include": "$self" } ] } ], "repository": { "associated-values": { "begin": "\\G\\(", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.swift" } }, "patterns": [ { "include": "#comments" }, { "begin": "(?x)\n\t\t\t\t\t\t\t\t\t\t(?:(_)|((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q1>))\n\t\t\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t\t\t(((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q2>))\n\t\t\t\t\t\t\t\t\t\t\\s*(:)", "beginCaptures": { "1": { "name": "entity.name.function.swift" }, "2": { "name": "invalid.illegal.distinct-labels-not-allowed.swift" }, "5": { "name": "variable.parameter.function.swift" }, "7": { "name": "punctuation.separator.argument-label.swift" } }, "end": "(?=[,)\\]])", "patterns": [ { "include": "#available-types" } ] }, { "begin": "(((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*\\k<q>))\\s*(:)", "beginCaptures": { "1": { "name": "entity.name.function.swift" }, "2": { "name": "variable.parameter.function.swift" }, "4": { "name": "punctuation.separator.argument-label.swift" } }, "end": "(?=[,)\\]])", "patterns": [ { "include": "#available-types" } ] }, { "begin": "(?![,)\\]])(?=\\S)", "comment": "an element without a label (i.e. anything else)", "end": "(?=[,)\\]])", "patterns": [ { "include": "#available-types" }, { "match": ":", "name": "invalid.illegal.extra-colon-in-parameter-list.swift" } ] } ] }, "enum-case": { "begin": "(?x)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", "beginCaptures": { "1": { "name": "constant.other.swift" } }, "end": "(?<=\\))|(?![=(])", "patterns": [ { "include": "#comments" }, { "include": "#associated-values" }, { "include": "#raw-value-assignment" } ] }, "enum-case-clause": { "begin": "\\b(case)\\b\\s*", "beginCaptures": { "1": { "name": "storage.type.enum.case.swift" } }, "end": "(?=[;}])|(?!\\G)(?!//|/\\*)(?=[^\\s,])", "patterns": [ { "include": "#comments" }, { "include": "#enum-case" }, { "include": "#more-cases" } ] }, "more-cases": { "begin": ",\\s*", "end": "(?!\\G)(?!//|/\\*)(?=[;}]|[^\\s,])", "name": "meta.enum-case.more-cases", "patterns": [ { "include": "#comments" }, { "include": "#enum-case" }, { "include": "#more-cases" } ] }, "raw-value-assignment": { "begin": "(=)\\s*", "beginCaptures": { "1": { "name": "keyword.operator.assignment.swift" } }, "end": "(?!\\G)", "patterns": [ { "include": "#comments" }, { "include": "#literals" } ] } } }, "type-identifier": { "begin": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", "beginCaptures": { "1": { "name": "meta.type-name.swift", "patterns": [ { "include": "#builtin-types" } ] }, "2": { "name": "punctuation.definition.identifier.swift" }, "3": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?!<)", "patterns": [ { "begin": "(?=<)", "end": "(?!\\G)", "patterns": [ { "include": "#generic-argument-clause" } ] } ] }, "typealias": { "begin": "\\b(typealias)\\s+((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*", "beginCaptures": { "1": { "name": "keyword.other.declaration-specifier.swift" }, "2": { "name": "entity.name.type.typealias.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.identifier.swift" } }, "end": "(?!\\G)$|(?=;|//|/\\*|$)", "name": "meta.definition.typealias.swift", "patterns": [ { "begin": "\\G(?=<)", "end": "(?!\\G)", "patterns": [ { "include": "#generic-parameter-clause" } ] }, { "include": "#typealias-assignment" } ] }, "typealias-assignment": { "begin": "(=)\\s*", "beginCaptures": { "1": { "name": "keyword.operator.assignment.swift" } }, "end": "(?!\\G)$|(?=;|//|/\\*|$)", "patterns": [ { "include": "#available-types" } ] }, "typed-variable-declaration": { "begin": "(?x)\n\t\t\t\t\t\t\\b(?:(async)\\s+)?(let|var)\\b\\s+\n\t\t\t\t\t\t(?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>)\\s*\n\t\t\t\t\t\t:\n\t\t\t\t\t", "beginCaptures": { "1": { "name": "keyword.control.async.swift" }, "2": { "name": "keyword.other.declaration-specifier.swift" } }, "end": "(?=$|[={])", "patterns": [ { "include": "#available-types" } ] }, "types-precedencegroup": { "patterns": [ { "comment": "Precedence groups in the standard library", "match": "\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\b", "name": "support.type.swift" } ] } } }, "expressions": { "patterns": [ { "include": "#comments" }, { "include": "#code-block" }, { "include": "#attributes" }, { "include": "#closure-parameter" }, { "include": "#literals" }, { "include": "#operators" }, { "include": "#builtin-types" }, { "include": "#builtin-functions" }, { "include": "#builtin-global-functions" }, { "include": "#builtin-properties" }, { "include": "#compound-name" }, { "include": "#keywords" }, { "include": "#function-call-expression" }, { "include": "#subscript-expression" }, { "include": "#parenthesized-expression" }, { "include": "#member-reference" }, { "include": "#availability-condition" }, { "match": "\\b_\\b", "name": "support.variable.discard-value.swift" } ], "repository": { "availability-condition": { "begin": "\\B(#(?:un)?available)(\\()", "beginCaptures": { "1": { "name": "support.function.availability-condition.swift" }, "2": { "name": "punctuation.definition.arguments.begin.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "patterns": [ { "captures": { "1": { "name": "keyword.other.platform.os.swift" }, "2": { "name": "constant.numeric.swift" } }, "match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))" }, { "captures": { "1": { "name": "keyword.other.platform.all.swift" }, "2": { "name": "invalid.illegal.character-not-allowed-here.swift" } }, "match": "(\\*)\\s*(.*?)(?=[,)])" }, { "match": "[^\\s,)]+", "name": "invalid.illegal.character-not-allowed-here.swift" } ] }, "closure-parameter": { "match": "\\$[0-9]+", "name": "variable.language.closure-parameter.swift" }, "compound-name": { "captures": { "1": { "name": "entity.name.function.compound-name.swift" }, "2": { "name": "punctuation.definition.entity.swift" }, "3": { "name": "punctuation.definition.entity.swift" }, "4": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.entity.swift" }, "2": { "name": "punctuation.definition.entity.swift" } }, "match": "(?<q>`?)(?!_:)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>):", "name": "entity.name.function.compound-name.swift" } ] } }, "comment": "a reference to a function with disambiguating argument labels, such as foo(_:), foo(bar:), etc.", "match": "(?x)\n\t\t\t\t\t\t((?<q1>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q1>)) \t\t# function name\n\t\t\t\t\t\t\\(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t((?<q2>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q2>)) \t# argument label\n\t\t\t\t\t\t\t\t\t:\t\t\t\t\t\t\t\t\t\t\t\t# colon\n\t\t\t\t\t\t\t\t)+\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\\)\n\t\t\t\t\t" }, "expression-element-list": { "patterns": [ { "include": "#comments" }, { "begin": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(:)", "beginCaptures": { "1": { "name": "support.function.any-method.swift" }, "2": { "name": "punctuation.definition.identifier.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.separator.argument-label.swift" } }, "comment": "an element with a label", "end": "(?=[,)\\]])", "patterns": [ { "include": "#expressions" } ] }, { "begin": "(?![,)\\]])(?=\\S)", "comment": "an element without a label (i.e. anything else)", "end": "(?=[,)\\]])", "patterns": [ { "include": "#expressions" } ] } ] }, "function-call-expression": { "patterns": [ { "begin": "((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))\\s*(\\()", "beginCaptures": { "1": { "name": "support.function.any-method.swift" }, "2": { "name": "punctuation.definition.identifier.swift" }, "3": { "name": "punctuation.definition.identifier.swift" }, "4": { "name": "punctuation.definition.arguments.begin.swift" } }, "comment": "foo(args) -- a call whose callee is a highlightable name", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "name": "meta.function-call.swift", "patterns": [ { "include": "#expression-element-list" } ] }, { "begin": "(?<=[`\\])}>\\p{L}_\\p{N}\\p{M}])\\s*(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.swift" } }, "comment": "[Int](args) -- a call whose callee is a more complicated expression", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "name": "meta.function-call.swift", "patterns": [ { "include": "#expression-element-list" } ] } ] }, "member-reference": { "patterns": [ { "captures": { "1": { "name": "variable.other.swift" }, "2": { "name": "punctuation.definition.identifier.swift" }, "3": { "name": "punctuation.definition.identifier.swift" } }, "match": "(?<=\\.)((?<q>`?)[\\p{L}_][\\p{L}_\\p{N}\\p{M}]*(\\k<q>))" } ] }, "parenthesized-expression": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.tuple.begin.swift" } }, "comment": "correctly matching closure expressions is too hard (depends on trailing \"in\") so we just tack on some basics to the end of parenthesized-expression", "end": "(\\))\\s*((?:\\b(?:async|throws|rethrows)\\s)*)", "endCaptures": { "1": { "name": "punctuation.section.tuple.end.swift" }, "2": { "patterns": [ { "match": "\\brethrows\\b", "name": "invalid.illegal.rethrows-only-allowed-on-function-declarations.swift" }, { "include": "#async-throws" } ] } }, "patterns": [ { "include": "#expression-element-list" } ] }, "subscript-expression": { "begin": "(?<=[`\\p{L}_\\p{N}\\p{M}])\\s*(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.arguments.begin.swift" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "name": "meta.subscript-expression.swift", "patterns": [ { "include": "#expression-element-list" } ] } } }, "keywords": { "patterns": [ { "match": "(?<!\\.)\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\b", "name": "keyword.control.branch.swift" }, { "match": "(?<!\\.)\\b(?:continue|break|fallthrough|return)\\b", "name": "keyword.control.transfer.swift" }, { "match": "(?<!\\.)\\b(?:while|for|in)\\b", "name": "keyword.control.loop.swift" }, { "captures": { "1": { "name": "keyword.control.loop.swift" }, "2": { "name": "punctuation.whitespace.trailing.repeat.swift" } }, "comment": "extra scopes for repeat-while snippet", "match": "(?<!\\.)\\b(repeat)\\b(\\s*)" }, { "match": "(?<!\\.)\\bdefer\\b", "name": "keyword.control.defer.swift" }, { "captures": { "1": { "name": "invalid.illegal.try-must-precede-await.swift" }, "2": { "name": "keyword.control.await.swift" } }, "match": "(?<!\\.)\\b(?:(await\\s+try)|(await)\\b)" }, { "match": "(?<!\\.)\\b(?:catch|throws?|rethrows|try)\\b|\\btry[?!]\\B", "name": "keyword.control.exception.swift" }, { "captures": { "1": { "name": "keyword.control.exception.swift" }, "2": { "name": "punctuation.whitespace.trailing.do.swift" } }, "comment": "extra scopes for do-catch snippet", "match": "(?<!\\.)\\b(do)\\b(\\s*)" }, { "captures": { "1": { "name": "keyword.control.async.swift" }, "2": { "name": "storage.modifier.swift" }, "3": { "name": "keyword.other.declaration-specifier.swift" } }, "match": "(?<!\\.)\\b(?:(?:(async)|(nonisolated))\\s+)?(let|var)\\b" }, { "match": "(?<!\\.)\\b(?:associatedtype|operator|typealias)\\b", "name": "keyword.other.declaration-specifier.swift" }, { "match": "(?<!\\.)\\b(class|enum|extension|precedencegroup|protocol|struct|actor)\\b", "name": "storage.type.$1.swift" }, { "match": "(?<!\\.)\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix)\\b", "name": "storage.modifier.swift" }, { "match": "\\binit[?!]|\\binit\\b|(?<!\\.)\\b(?:func|deinit|subscript|didSet|get|set|willSet)\\b", "name": "storage.type.function.swift" }, { "match": "(?<!\\.)\\b(?:fileprivate|private|internal|public|open)\\b", "name": "keyword.other.declaration-specifier.accessibility.swift" }, { "comment": "matches weak, unowned, unowned(safe), unowned(unsafe)", "match": "(?<!\\.)\\bunowned\\((?:safe|unsafe)\\)|(?<!\\.)\\b(?:weak|unowned)\\b", "name": "keyword.other.capture-specifier.swift" }, { "captures": { "1": { "name": "keyword.operator.type.swift" }, "2": { "name": "keyword.operator.type.metatype.swift" } }, "match": "(?<=\\.)(?:(dynamicType|self)|(Protocol|Type))\\b" }, { "match": "(?<!\\.)\\b(?:super|self|Self)\\b", "name": "variable.language.swift" }, { "match": "\\B(?:#file|#filePath|#fileID|#line|#column|#function|#dsohandle)\\b|\\b(?:__FILE__|__LINE__|__COLUMN__|__FUNCTION__|__DSO_HANDLE__)\\b", "name": "support.variable.swift" }, { "match": "(?<!\\.)\\bimport\\b", "name": "keyword.control.import.swift" } ] }, "literals": { "patterns": [ { "include": "#boolean" }, { "include": "#numeric" }, { "include": "#string" }, { "match": "\\bnil\\b", "name": "constant.language.nil.swift" }, { "comment": "object \"literals\" used in playgrounds", "match": "\\B#(colorLiteral|imageLiteral|fileLiteral)\\b", "name": "support.function.object-literal.swift" }, { "match": "\\B#keyPath\\b", "name": "support.function.key-path.swift" }, { "begin": "\\B(#selector)(\\()(?:\\s*(getter|setter)\\s*(:))?", "beginCaptures": { "1": { "name": "support.function.selector-reference.swift" }, "2": { "name": "punctuation.definition.arguments.begin.swift" }, "3": { "name": "support.variable.parameter.swift" }, "4": { "name": "punctuation.separator.argument-label.swift" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.swift" } }, "patterns": [ { "include": "#expressions" } ] } ], "repository": { "boolean": { "match": "\\b(true|false)\\b", "name": "constant.language.boolean.swift" }, "numeric": { "patterns": [ { "comment": "0.1, -4_2.5, 6.022e23, 10E-5", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*(?=\\.[0-9]|[eE])(?:\\.[0-9][0-9_]*)?(?:[eE][-+]?[0-9][0-9_]*)?\\b(?!\\.[0-9])", "name": "constant.numeric.float.decimal.swift" }, { "comment": "-0x1.ap2_3, 0x31p-4", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?[pP][-+]?[0-9][0-9_]*\\b(?!\\.[0-9])", "name": "constant.numeric.float.hexadecimal.swift" }, { "comment": "0x1p, 0x1p_2, 0x1.5pa, 0x1.1p+1f, 0x1pz", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)(?:\\.[0-9a-fA-F][0-9a-fA-F_]*)?(?:[pP][-+]?\\w*)\\b(?!\\.[0-9])", "name": "invalid.illegal.numeric.float.invalid-exponent.swift" }, { "comment": "0x1.5w (note that 0x1.f may be a valid expression)", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)(0x[0-9a-fA-F][0-9a-fA-F_]*)\\.[0-9][\\w.]*", "name": "invalid.illegal.numeric.float.missing-exponent.swift" }, { "comment": "-.5, .2f (note that 1.-.5 may be a valid expression)", "match": "(?<=\\s|^)\\-?\\.[0-9][\\w.]*", "name": "invalid.illegal.numeric.float.missing-leading-zero.swift" }, { "comment": "0b_0_1, 0x_1p+3q", "match": "(\\B\\-|\\b)0[box]_[0-9a-fA-F_]*(?:[pPeE][+-]?\\w+)?[\\w.]+", "name": "invalid.illegal.numeric.leading-underscore.swift" }, { "comment": "tuple positional member: not really a numeric literal, but not invalid", "match": "(?<=[\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9]+\\b" }, { "comment": "0b010, 0b1_0", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0b[01][01_]*\\b(?!\\.[0-9])", "name": "constant.numeric.integer.binary.swift" }, { "comment": "0o1, 0o7_3", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0o[0-7][0-7_]*\\b(?!\\.[0-9])", "name": "constant.numeric.integer.octal.swift" }, { "comment": "02, 3_456", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)[0-9][0-9_]*\\b(?!\\.[0-9])", "name": "constant.numeric.integer.decimal.swift" }, { "comment": "0x4, 0xF_7", "match": "(\\B\\-|\\b)(?<![\\[\\](){}\\p{L}_\\p{N}\\p{M}]\\.)0x[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\.[0-9])", "name": "constant.numeric.integer.hexadecimal.swift" }, { "match": "(\\B\\-|\\b)[0-9][\\w.]*", "name": "invalid.illegal.numeric.other.swift" } ] }, "string": { "patterns": [ { "begin": "\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.swift" } }, "comment": "SE-0168: Multi-Line String Literals", "end": "\"\"\"(#*)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.swift" }, "1": { "name": "invalid.illegal.extra-closing-delimiter.swift" } }, "name": "string.quoted.double.block.swift", "patterns": [ { "match": "\\G.+(?=\"\"\")|\\G.+", "name": "invalid.illegal.content-after-opening-delimiter.swift" }, { "match": "\\\\\\s*\\n", "name": "constant.character.escape.newline.swift" }, { "include": "#string-guts" }, { "comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string", "match": "\\S((?!\\\\\\().)*(?=\"\"\")", "name": "invalid.illegal.content-before-closing-delimiter.swift" } ] }, { "begin": "#\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.swift" } }, "end": "\"\"\"#(#*)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.swift" }, "1": { "name": "invalid.illegal.extra-closing-delimiter.swift" } }, "name": "string.quoted.double.block.raw.swift", "patterns": [ { "match": "\\G.+(?=\"\"\")|\\G.+", "name": "invalid.illegal.content-after-opening-delimiter.swift" }, { "match": "\\\\#\\s*\\n", "name": "constant.character.escape.newline.swift" }, { "include": "#raw-string-guts" }, { "comment": "Allow \\(\"\"\"...\"\"\") to appear inside a block string", "match": "\\S((?!\\\\#\\().)*(?=\"\"\")", "name": "invalid.illegal.content-before-closing-delimiter.swift" } ] }, { "begin": "(##+)\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.swift" } }, "end": "\"\"\"\\1(#*)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.swift" }, "1": { "name": "invalid.illegal.extra-closing-delimiter.swift" } }, "name": "string.quoted.double.block.raw.swift", "patterns": [ { "match": "\\G.+(?=\"\"\")|\\G.+", "name": "invalid.illegal.content-after-opening-delimiter.swift" } ] }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.swift" } }, "end": "\"(#*)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.swift" }, "1": { "name": "invalid.illegal.extra-closing-delimiter.swift" } }, "name": "string.quoted.double.single-line.swift", "patterns": [ { "match": "\\r|\\n", "name": "invalid.illegal.returns-not-allowed.swift" }, { "include": "#string-guts" } ] }, { "begin": "(##+)\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.raw.swift" } }, "comment": "SE-0168: raw string literals (more than one #, grammar limitations prevent us from supporting escapes)", "end": "\"\\1(#*)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.raw.swift" }, "1": { "name": "invalid.illegal.extra-closing-delimiter.swift" } }, "name": "string.quoted.double.single-line.raw.swift", "patterns": [ { "match": "\\r|\\n", "name": "invalid.illegal.returns-not-allowed.swift" } ] }, { "begin": "#\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.raw.swift" } }, "comment": "SE-0168: raw string literals (one #, escapes supported)", "end": "\"#(#*)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.raw.swift" }, "1": { "name": "invalid.illegal.extra-closing-delimiter.swift" } }, "name": "string.quoted.double.single-line.raw.swift", "patterns": [ { "match": "\\r|\\n", "name": "invalid.illegal.returns-not-allowed.swift" }, { "include": "#raw-string-guts" } ] } ], "repository": { "raw-string-guts": { "comment": "the same as #string-guts but with # in escapes", "patterns": [ { "match": "\\\\#[0\\\\tnr\"']", "name": "constant.character.escape.swift" }, { "match": "\\\\#u\\{[0-9a-fA-F]{1,8}\\}", "name": "constant.character.escape.unicode.swift" }, { "begin": "\\\\#\\(", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.swift" } }, "contentName": "source.swift", "end": "(\\))", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.swift" }, "1": { "name": "source.swift" } }, "name": "meta.embedded.line.swift", "patterns": [ { "include": "$self" }, { "begin": "\\(", "comment": "Nested parens", "end": "\\)" } ] }, { "match": "\\\\#.", "name": "invalid.illegal.escape-not-recognized" } ] }, "string-guts": { "patterns": [ { "match": "\\\\[0\\\\tnr\"']", "name": "constant.character.escape.swift" }, { "match": "\\\\u\\{[0-9a-fA-F]{1,8}\\}", "name": "constant.character.escape.unicode.swift" }, { "begin": "\\\\\\(", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.swift" } }, "contentName": "source.swift", "end": "(\\))", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.swift" }, "1": { "name": "source.swift" } }, "name": "meta.embedded.line.swift", "patterns": [ { "include": "$self" }, { "begin": "\\(", "comment": "Nested parens", "end": "\\)" } ] }, { "match": "\\\\.", "name": "invalid.illegal.escape-not-recognized" } ] } } } } }, "operators": { "patterns": [ { "comment": "Type casting", "match": "\\b(is\\b|as([!?]\\B|\\b))", "name": "keyword.operator.type-casting.swift" }, { "begin": "(?x)\n\t\t\t\t\t\t(?=\n\t\t\t\t\t\t\t(?<oph>\t\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\n\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\\g<oph>\t\t\t\t\t\t\t# operator-head\n\t\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", "comment": "This rule helps us speed up the matching.", "end": "(?!\\G)", "patterns": [ { "captures": { "0": { "patterns": [ { "match": "\\G(\\+\\+|\\-\\-)$", "name": "keyword.operator.increment-or-decrement.swift" }, { "match": "\\G(\\+|\\-)$", "name": "keyword.operator.arithmetic.unary.swift" }, { "match": "\\G!$", "name": "keyword.operator.logical.not.swift" }, { "match": "\\G~$", "name": "keyword.operator.bitwise.not.swift" }, { "match": ".+", "name": "keyword.operator.custom.prefix.swift" } ] } }, "comment": "Prefix unary operator", "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" }, { "captures": { "0": { "patterns": [ { "match": "\\G(\\+\\+|\\-\\-)$", "name": "keyword.operator.increment-or-decrement.swift" }, { "match": "\\G!$", "name": "keyword.operator.increment-or-decrement.swift" }, { "match": ".+", "name": "keyword.operator.custom.postfix.swift" } ] } }, "comment": "Postfix unary operator", "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" }, { "captures": { "0": { "patterns": [ { "match": "\\G=$", "name": "keyword.operator.assignment.swift" }, { "match": "\\G(\\+|\\-|\\*|/|%|<<|>>|&|\\^|\\||&&|\\|\\|)=$", "name": "keyword.operator.assignment.compound.swift" }, { "match": "\\G(\\+|\\-|\\*|/)$", "name": "keyword.operator.arithmetic.swift" }, { "match": "\\G&(\\+|\\-|\\*)$", "name": "keyword.operator.arithmetic.overflow.swift" }, { "match": "\\G%$", "name": "keyword.operator.arithmetic.remainder.swift" }, { "match": "\\G(==|!=|>|<|>=|<=|~=)$", "name": "keyword.operator.comparison.swift" }, { "match": "\\G\\?\\?$", "name": "keyword.operator.coalescing.swift" }, { "match": "\\G(&&|\\|\\|)$", "name": "keyword.operator.logical.swift" }, { "match": "\\G(&|\\||\\^|<<|>>)$", "name": "keyword.operator.bitwise.swift" }, { "match": "\\G(===|!==)$", "name": "keyword.operator.bitwise.swift" }, { "match": "\\G\\?$", "name": "keyword.operator.ternary.swift" }, { "match": ".+", "name": "keyword.operator.custom.infix.swift" } ] } }, "comment": "Infix operator", "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t[/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t" }, { "captures": { "0": { "patterns": [ { "match": ".+", "name": "keyword.operator.custom.prefix.dot.swift" } ] } }, "comment": "Dot prefix unary operator", "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<=^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?![\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" }, { "captures": { "0": { "patterns": [ { "match": ".+", "name": "keyword.operator.custom.postfix.dot.swift" } ] } }, "comment": "Dot postfix unary operator", "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t(?<!^|[\\s(\\[{,;:])\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t\t(?=[\\s)\\]},;:]|\\z)\n\t\t\t\t\t\t\t" }, { "captures": { "0": { "patterns": [ { "match": "\\G\\.\\.[.<]$", "name": "keyword.operator.range.swift" }, { "match": ".+", "name": "keyword.operator.custom.infix.dot.swift" } ] } }, "comment": "Dot infix operator", "match": "(?x)\n\t\t\t\t\t\t\t\t\\G\t\t\t\t\t\t\t\t\t\t# Matching from the beginning ensures\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# that we start with operator-head\n\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(?!(//|/\\*|\\*/))\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\\.\t\t\t\t\t\t\t\t# dot\n\t\t\t\t\t\t\t\t\t | [/=\\-+!*%<>&|^~?]\t\t\t\t# operator-head\n\t\t\t\t\t\t\t\t\t | [\\x{00A1}-\\x{00A7}]\n\t\t\t\t\t\t\t\t\t | [\\x{00A9}\\x{00AB}]\n\t\t\t\t\t\t\t\t\t | [\\x{00AC}\\x{00AE}]\n\t\t\t\t\t\t\t\t\t | [\\x{00B0}-\\x{00B1}\\x{00B6}\\x{00BB}\\x{00BF}\\x{00D7}\\x{00F7}]\n\t\t\t\t\t\t\t\t\t | [\\x{2016}-\\x{2017}\\x{2020}-\\x{2027}]\n\t\t\t\t\t\t\t\t\t | [\\x{2030}-\\x{203E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2041}-\\x{2053}]\n\t\t\t\t\t\t\t\t\t | [\\x{2055}-\\x{205E}]\n\t\t\t\t\t\t\t\t\t | [\\x{2190}-\\x{23FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2500}-\\x{2775}]\n\t\t\t\t\t\t\t\t\t | [\\x{2794}-\\x{2BFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{2E00}-\\x{2E7F}]\n\t\t\t\t\t\t\t\t\t | [\\x{3001}-\\x{3003}]\n\t\t\t\t\t\t\t\t\t | [\\x{3008}-\\x{3030}]\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t | [\\x{0300}-\\x{036F}]\t\t\t\t# operator-character\n\t\t\t\t\t\t\t\t\t | [\\x{1DC0}-\\x{1DFF}]\n\t\t\t\t\t\t\t\t\t | [\\x{20D0}-\\x{20FF}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE00}-\\x{FE0F}]\n\t\t\t\t\t\t\t\t\t | [\\x{FE20}-\\x{FE2F}]\n\t\t\t\t\t\t\t\t\t | [\\x{E0100}-\\x{E01EF}]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)++\n\t\t\t\t\t\t\t" } ] }, { "match": ":", "name": "keyword.operator.ternary.swift" } ] }, "root": { "patterns": [ { "include": "#compiler-control" }, { "include": "#declarations" }, { "include": "#expressions" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/syon.tmLanguage.json ================================================ { "name": "SyON", "scopeName": "source.sy", "fileTypes": ["sy"], "patterns": [ { "include": "#blockInnards" } ], "repository": { "main": { "patterns": [ { "include": "#signature" }, { "include": "#comment" }, { "include": "#regexp" }, { "include": "#fieldQuotedEarly" }, { "include": "#heredoc" }, { "include": "#string" }, { "include": "#stringJunk" }, { "include": "#block" }, { "include": "#field" }, { "include": "#array" }, { "include": "#byteArray" }, { "include": "#brackets" }, { "include": "#boolean" }, { "include": "#null" }, { "include": "#date" }, { "include": "#number" }, { "include": "#comma" }, { "include": "#operator" } ] }, "array": { "name": "meta.array.sy", "begin": "\\[", "end": "\\]", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.bracket.square.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.square.sy" } }, "patterns": [ { "include": "#main" }, { "match": "(?:[^,\\[\\]{}<>\"'`\\s:]|:(?=\\S))+", "name": "string.unquoted.sy" } ] }, "block": { "patterns": [ { "name": "meta.block.tagged.sy", "begin": "((?:[^{}\\[\\]:\\s,]|[:#](?=\\S))(?:[^:{}]|:(?=\\S)|\\\\[{:])*?)({)", "end": "}", "beginCaptures": { "1": { "name": "entity.name.block.tag.label.sy" }, "2": { "name": "punctuation.section.scope.block.begin.bracket.curly.sy" } }, "endCaptures": { "0": { "name": "punctuation.section.scope.block.end.bracket.curly.sy" } }, "patterns": [ { "include": "#blockInnards" } ] }, { "name": "meta.block.sy", "begin": "{", "end": "}", "beginCaptures": { "0": { "name": "punctuation.section.scope.block.begin.bracket.curly.sy" } }, "endCaptures": { "0": { "name": "punctuation.section.scope.block.end.bracket.curly.sy" } }, "patterns": [ { "include": "#blockInnards" } ] } ] }, "blockInnards": { "patterns": [ { "include": "#fieldQuotedEarly" }, { "include": "#main" }, { "match": "((?:[^{}\\[\\]:\\s,]|[:#](?=\\S))(?:[^:{}]|:(?=\\S)|\\\\[{:])*?)", "captures": { "1": { "name": "entity.name.tag.property.sy" } } } ] }, "brackets": { "name": "meta.expression.sy", "begin": "\\(", "end": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.scope.block.begin.bracket.round.sy" } }, "endCaptures": { "0": { "name": "punctuation.section.scope.block.end.bracket.round.sy" } }, "patterns": [ { "include": "#operator" }, { "include": "#main" } ] }, "boolean": { "patterns": [ { "name": "constant.language.boolean.true.sy", "match": "(?x)\n(?:\\G|^|(?<=[\\s\\[{,]))\n(?:true|yes|on|TRUE|YES|ON)\n(?=$|[\\s\\]},])" }, { "name": "constant.language.boolean.false.sy", "match": "(?x)\n(?:\\G|^|(?<=[\\s\\[{,]))\n(?:false|no|off|TRUE|YES|ON)\n(?=$|[\\s\\]},])" } ] }, "byteArray": { "patterns": [ { "name": "meta.byte-array.base64.sy", "begin": "(<)(base64)(:)", "end": "(>)\\s*([^:,}\\]]+)", "beginCaptures": { "1": { "name": "punctuation.section.byte-array.begin.bracket.angle.sy" }, "2": { "name": "storage.modifier.encoding.base64.sy" }, "3": { "name": "punctuation.separator.key-value.sy" } }, "endCaptures": { "1": { "name": "punctuation.section.byte-array.end.bracket.angle.sy" }, "2": { "name": "invalid.illegal.characters.sy" } }, "patterns": [ { "name": "constant.character.encoded.base64.sy", "match": "[A-Za-z0-9+/=]+" }, { "include": "#comment" }, { "name": "invalid.illegal.character.sy", "match": "[^\\s>]+" } ] }, { "name": "meta.byte-array.base85.sy", "begin": "<~", "end": "~>", "beginCaptures": { "0": { "name": "punctuation.section.byte-array.begin.bracket.angle.sy" } }, "endCaptures": { "0": { "name": "punctuation.section.byte-array.end.bracket.angle.sy" } }, "patterns": [ { "match": "[!-uz]+", "name": "constant.character.encoded.base85.sy" }, { "match": "[^!-uz\\s~]", "name": "invalid.illegal.character.sy" } ] }, { "name": "meta.byte-array.sy", "begin": "<", "end": "(>)\\s*([^:,}\\]]+)", "beginCaptures": { "0": { "name": "punctuation.section.byte-array.begin.bracket.angle.sy" } }, "endCaptures": { "1": { "name": "punctuation.section.byte-array.end.bracket.angle.sy" }, "2": { "name": "invalid.illegal.characters.sy" } }, "patterns": [ { "name": "constant.numeric.integer.int.hexadecimal.hex.sy", "match": "[A-Fa-f0-9]+" }, { "include": "#comment" }, { "name": "invalid.illegal.character.sy", "match": "[^\\s>]+" } ] } ] }, "comma": { "name": "punctuation.separator.delimiter.comma.sy", "match": "," }, "comment": { "patterns": [ { "name": "comment.block.sy", "begin": "(?:\\G|^|(?<=\\s|\\xC2\\xAD|\\xAD))(#{3,})(?=\\s|$)", "end": "\\1", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.sy" } } }, { "name": "comment.line.number-sign.sy", "begin": "(?:\\G|^|(?<=\\s|\\xC2\\xAD|\\xAD))#(?=\\s|$)", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.sy" } } } ] }, "date": { "name": "constant.other.date.sy", "match": "(?x)\n# Date\n[0-9]{4} - # Year\n[0-9]{2} - # Month\n[0-9]{2} # Day\n\n# Time\n(?:\n\t(?:T|\\s+)\n\t[0-9]{1,2} : # Hours\n\t[0-9]{1,2} : # Minutes\n\t[0-9]{1,2} # Seconds\n\t(?:\\.[0-9]+)? # Milliseconds\n\t(\\+[0-9]{4}|Z)? # Timezone\n)?\n\n# Followed by delimiter, EOL, or comment\n(?= \\s* (?:$|[,\\]}])\n| \\s+ \\#(?:$|\\s)\n)" }, "escape": { "patterns": [ { "name": "constant.character.escape.newline.sy", "begin": "\\\\$\\s*", "end": "^", "beginCaptures": { "0": { "name": "punctuation.backslash.definition.escape.sy" } } }, { "name": "constant.character.escape.unicode.sy", "match": "(\\\\)x[A-Fa-f0-9]{2}", "captures": { "1": { "name": "punctuation.backslash.definition.escape.sy" } } }, { "name": "constant.character.escape.unicode.sy", "match": "(\\\\)u[A-Fa-f0-9]{4}", "captures": { "1": { "name": "punctuation.backslash.definition.escape.sy" } } }, { "name": "constant.character.escape.unicode.sy", "match": "(\\\\)u({)[A-Fa-f0-9]+(})", "captures": { "1": { "name": "punctuation.backslash.definition.escape.sy" }, "2": { "name": "punctuation.definition.unicode-escape.begin.bracket.curly.sy" }, "3": { "name": "punctuation.definition.unicode-escape.end.bracket.curly.sy" } } }, { "name": "invalid.illegal.unicode-escape.sy", "match": "\\\\u{[^}\"]*}" }, { "name": "invalid.illegal.unicode-escape.sy", "match": "\\\\u(?![A-Fa-f0-9]{4})[^\"]*" }, { "name": "constant.character.escape.sy", "match": "(\\\\).", "captures": { "0": { "name": "punctuation.backslash.definition.escape.sy" } } } ] }, "escapeVerbatim": { "name": "constant.character.escape.backtick.sy", "match": "``" }, "expression": { "name": "meta.expression.sy", "match": "(?x)\n\\G\n(\n\t(?:\\s*\\()*\n\t\\s*\n\t~? [-+]? ~?\n\t\\d\n\t[-+*/%~^&|\\(\\)eE\\s.oOxXbB\\d]*\n)\n(?=\n\t\\s*\n\t(?: $\n\t| ,\n\t| \\]\n\t| \\}\n\t| (?<=\\s)\\#(?=\\s|$)\n\t)\n)", "captures": { "1": { "patterns": [ { "include": "#brackets" }, { "include": "#number" }, { "include": "#operator" } ] } } }, "field": { "name": "meta.field.sy", "begin": "(?x)\n(?:\n\t# Quoted property name\n\t(?<=[:{\\[]) \\s*\n\t(?: (\"(?:[^\"\\\\]|\\\\.)*\")\n\t| ('(?:[^'\\\\]|\\\\.)*')\n\t| (`(?:[^`]|``)*+`(?!`))\n\t) \\s* (:)\n\t\n\t|\n\t\n\t# Unquoted property name\n\t([^{}\\[\\]<>\\s][^,]*?)\n\t(?<!\\\\) (:)\n\t\n\t|\n\t\n\t# Presumably one following a multiline string\n\t(?<=[\"'`]) \\s* (:)\n)\n(?=\\s|$)\n\\s*", "end": "(?=\\s*})|^(?!\\G)", "beginCaptures": { "1": { "name": "entity.name.tag.property.quoted.double.sy", "patterns": [ { "include": "#escape" } ] }, "2": { "name": "entity.name.tag.property.quoted.single.sy", "patterns": [ { "include": "#escape" } ] }, "3": { "name": "entity.name.tag.property.quoted.backtick.sy", "patterns": [ { "include": "#escapeVerbatim" } ] }, "4": { "name": "punctuation.separator.key-value.sy" }, "5": { "name": "entity.name.tag.property.sy", "patterns": [ { "include": "#escape" } ] }, "6": { "name": "punctuation.separator.key-value.sy" }, "7": { "name": "punctuation.separator.key-value.sy" } }, "patterns": [ { "include": "#fieldInnards" } ] }, "fieldQuotedEarly": { "name": "meta.field.sy", "begin": "(?x) (?:\\G|^) \\s*\n(?: (\"(?:[^\"\\\\]|\\\\.)*\")\n| ('(?:[^'\\\\]|\\\\.)*')\n| (`(?:[^`]|``)*+`(?!`))\n) \\s* (:)\n(?=\\s|$)\n\\s*", "end": "(?=\\s*})|^(?!\\G)", "beginCaptures": { "1": { "name": "entity.name.tag.property.quoted.double.sy", "patterns": [ { "include": "#escape" } ] }, "2": { "name": "entity.name.tag.property.quoted.single.sy", "patterns": [ { "include": "#escape" } ] }, "3": { "name": "entity.name.tag.property.quoted.backtick.sy", "patterns": [ { "include": "#escapeVerbatim" } ] }, "4": { "name": "punctuation.separator.key-value.sy" } }, "patterns": [ { "include": "#fieldInnards" } ] }, "fieldInnards": { "patterns": [ { "include": "#date" }, { "include": "#expression" }, { "include": "#main" }, { "name": "string.unquoted.sy", "match": "(?x) \\G\n(?! ~?[-+]?[0-9]\n| (?<=\\s)\\#(?=\\s|$)\n)\n[^\\s{}\\[\\]<:\"'`]\n\n(?: [^\\#,}\\]:]\n| (?<=\\S) [\\#:]\n| [:\\#] (?=\\S)\n)*\n(?!\n\t\\s*\n\t(?:[\\{:])\n)", "captures": { "0": { "patterns": [ { "include": "#url" } ] } } } ] }, "heredoc": { "patterns": [ { "include": "#heredocDouble" }, { "include": "#heredocSingle" }, { "include": "#heredocVerbatim" } ] }, "heredocDouble": { "patterns": [ { "name": "string.quoted.double.heredoc.hinted.${1:/scopify}.sy", "begin": "([-\\w]+)[ \\t]+(\"{3,})", "end": "\\2", "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "contentName": "embedded.${1:/scopify}" }, { "name": "string.quoted.double.heredoc.sy", "begin": "(\"{3,})", "end": "\\1", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "patterns": [ { "include": "#stringInnards" } ] } ] }, "heredocSingle": { "patterns": [ { "name": "string.quoted.single.heredoc.hinted.${1:/scopify}.sy", "begin": "([-\\w]+)[ \\t]+('{3,})", "end": "\\2", "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "contentName": "embedded.${1:/scopify}" }, { "name": "string.quoted.single.heredoc.sy", "begin": "('{3,})", "end": "\\1", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "patterns": [ { "include": "#stringInnards" } ] } ] }, "heredocVerbatim": { "patterns": [ { "name": "string.quoted.verbatim.backtick.heredoc.hinted.${1:/scopify}.sy", "begin": "([-\\w]+)[ \\t]+(`{3,})", "end": "\\2", "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "contentName": "embedded.${1:/scopify}" }, { "name": "string.quoted.verbatim.backtick.heredoc.sy", "begin": "(`{3,})", "end": "\\1", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } } } ] }, "injection": { "begin": "\\A(?:\\xC2\\xAD|\\xAD){2}", "end": "(?=A)B", "beginCaptures": { "0": { "patterns": [ { "include": "#signature" } ] } }, "patterns": [ { "include": "#blockInnards" } ] }, "null": { "name": "constant.language.null.sy", "match": "(?x)\n(?:\\G|^|(?<=[\\s\\[{,]))\n(?:null|NULL)\n(?=$|[\\s\\]},])" }, "number": { "match": "(?x)\n(?:^|(?<=[\\s\\[\\({,~])|\\G)\n(?: ([-+]?0[xX][A-Fa-f0-9_]+) # Hexadecimal\n| ([-+]?0[oO][0-7_]+) # Octal\n| ([-+]?0[bB][0-1_]+) # Binary\n| ([-+]?[0-9_]+\\.(?:[0-9_]*[eE][+-]?[0-9_]+|[0-9_]+)) # Float\n| ([-+]?[0-9_]+(?:[eE][+-]?[0-9_]+)?) # Integer\n)\n\\s*\n(?= $\n| [-+*/%^&|\\)<>\\s\\]},]\n| (?<=\\s)\\#(?=\\s|$)\n)", "captures": { "1": { "name": "constant.numeric.integer.int.hexadecimal.hex.sy" }, "2": { "name": "constant.numeric.integer.int.octal.oct.sy" }, "3": { "name": "constant.numeric.integer.int.binary.bin.sy" }, "4": { "name": "constant.numeric.float.decimal.dec.sy" }, "5": { "name": "constant.numeric.integer.int.decimal.dec.sy" } } }, "operator": { "patterns": [ { "name": "keyword.operator.arithmetic.sy", "match": "\\*\\*|[-+*/%]" }, { "name": "keyword.operator.bitwise.sy", "match": "(<<|>>|>>>|[~&|^])" } ] }, "regexp": { "patterns": [ { "name": "string.regexp.multiline.sy", "begin": "(?:([-\\w]+)[ \\t]+)?(/{3,})", "end": "(\\2)([A-Za-z]*)", "patterns": [ { "include": "source.regexp#main" } ], "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "patterns": [ { "match": "(?:\\G|^)/{3}$", "name": "punctuation.definition.string.begin.triple-slash.sy" }, { "match": ".+", "name": "punctuation.definition.string.begin.sy" } ] } }, "endCaptures": { "1": { "patterns": [ { "match": "(?:\\G|^)/{3}$", "name": "punctuation.definition.string.end.triple-slash.sy" }, { "match": ".+", "name": "punctuation.definition.string.end.sy" } ] }, "2": { "patterns": [ { "include": "source.regexp#scopedModifiers" } ] } } }, { "name": "string.regexp.sy", "begin": "(?:([-\\w]+)[ \\t]+)?(/)", "end": "(/)([A-Za-z]*)", "patterns": [ { "include": "source.regexp#main" } ], "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.sy" }, "2": { "patterns": [ { "include": "source.regexp#scopedModifiers" } ] } } } ] }, "signature": { "name": "punctuation.whitespace.shy-hyphens.signature.sy", "match": "^(?:\\xC2\\xAD|\\xAD){2,}" }, "string": { "patterns": [ { "include": "#stringDouble" }, { "include": "#stringSingle" }, { "include": "#stringVerbatim" } ] }, "stringDouble": { "patterns": [ { "name": "string.quoted.double.hinted.${1:/scopify}.sy", "begin": "([-\\w]+)[ \\t]+(\")", "end": "\"", "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "contentName": "embedded.${1:/scopify}" }, { "name": "string.quoted.double.sy", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "patterns": [ { "include": "#stringInnards" } ] } ] }, "stringSingle": { "patterns": [ { "name": "string.quoted.single.hinted.${1:/scopify}.sy", "begin": "([-\\w]+)[ \\t]+(')", "end": "'", "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "contentName": "embedded.${1:/scopify}" }, { "name": "string.quoted.single.sy", "begin": "'", "end": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "patterns": [ { "include": "#stringInnards" } ] } ] }, "stringVerbatim": { "patterns": [ { "name": "string.quoted.verbatim.backtick.hinted.${1:/scopify}.sy", "begin": "([-\\w]+)[ \\t]+(`)", "end": "`", "beginCaptures": { "1": { "name": "storage.modifier.type.parse-hint.sy" }, "2": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "contentName": "embedded.${1:/scopify}" }, { "name": "string.quoted.verbatim.backtick.sy", "begin": "`", "end": "`(?!`)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.sy" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.sy" } }, "patterns": [ { "include": "#escapeVerbatim" } ] } ] }, "stringJunk": { "name": "invalid.illegal.syntax.sy", "begin": "(?<=[\"'`])(?!\\s*$)(?=\\s*[^:,}\\]])", "end": "(?=[:,}\\]])" }, "stringInnards": { "patterns": [ { "include": "#url" }, { "include": "#escape" } ] }, "url": { "patterns": [ { "name": "constant.other.reference.link.underline.sy", "match": "(?x) \\b\n# Protocol\n( https?\n| s?ftp\n| ftps\n| file\n| wss?\n| smb\n| git (?:\\+https?)\n| ssh\n| rsync\n| afp\n| nfs\n| (?:x-)?man(?:-page)?\n| gopher\n| txmt\n| issue\n| atom\n) ://\n\n# Path specifier\n(?:\n\t(?! \\#\\w*\\#)\n\t(?: [-:\\@\\w.,~%+_/?=&\\#;|!])\n)+\n\n# Don't include trailing punctuation\n(?<![-.,?:\\#;])" }, { "name": "markup.underline.link.mailto.sy", "match": "(?x) \\b\nmailto: (?:\n\t(?! \\#\\w*\\#)\n\t(?: [-:@\\w.,~%+_/?=&\\#;|!])\n)+\n(?<![-.,?:\\#;])" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/systemverilog.tmLanguage.json ================================================ { "hidden": true, "foldingStartMarker": "(begin)\\s*(//.*)?$", "foldingStopMarker": "^\\s*(begin)$", "repository": { "comments": { "patterns": [ { "begin": "/\\*", "end": "\\*/", "name": "comment.block.systemverilog", "captures": { "0": { "name": "punctuation.definition.comment.systemverilog" } } }, { "match": "(//).*$\\n?", "name": "comment.line.double-slash.systemverilog", "captures": { "1": { "name": "punctuation.definition.comment.systemverilog" } } } ] }, "all-types": { "patterns": [ { "include": "#storage-type-systemverilog" }, { "include": "#storage-modifier-systemverilog" } ] }, "storage-scope-systemverilog": { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(::)", "name": "meta.scope.systemverilog", "captures": { "1": { "name": "support.type.systemverilog" }, "2": { "name": "keyword.operator.scope.systemverilog" } } }, "ifmodport": { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b", "captures": { "1": { "name": "storage.type.interface.systemverilog" }, "2": { "name": "support.modport.systemverilog" } } }, "functions": { "match": "\\b(\\w+)(?=\\s*\\()", "name": "support.function.generic.systemverilog" }, "struct-anonymous": { "begin": "\\s*\\b(struct|union)\\s*(packed)?\\s*", "endCaptures": { "1": { "name": "keyword.operator.other.systemverilog" } }, "end": "(})\\s*([a-zA-Z_]\\w*)\\s*;", "patterns": [{ "include": "#base-grammar" }], "name": "meta.struct.anonymous.systemverilog", "beginCaptures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "keyword.control.systemverilog" } } }, "module-binding": { "begin": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(", "match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*", "end": "\\)", "patterns": [ { "include": "#constants" }, { "include": "#comments" }, { "include": "#operators" }, { "include": "#strings" }, { "include": "#constants" }, { "match": "\\b([a-zA-Z_]\\w*)(::)", "captures": { "1": { "name": "support.type.scope.systemverilog" }, "2": { "name": "keyword.operator.scope.systemverilog" } } }, { "match": "\\b([a-zA-Z_]\\w*)(')", "captures": { "1": { "name": "storage.type.interface.systemverilog" }, "2": { "name": "keyword.operator.cast.systemverilog" } } }, { "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "support.function.systemverilog" }, { "match": "\\b(virtual)\\b", "name": "keyword.control.systemverilog" } ], "beginCaptures": { "1": { "name": "support.function.port.systemverilog" } }, "captures": { "1": { "name": "support.function.port.implicit.systemverilog" } } }, "port-dir": { "patterns": [ { "match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=\\[[a-zA-Z0-9_\\-\\+]*:[a-zA-Z0-9_\\-\\+]*\\]\\s+[a-zA-Z_][a-zA-Z0-9_\\s]*)", "captures": { "3": { "name": "support.type.scope.systemverilog" }, "1": { "name": "support.type.systemverilog" }, "4": { "name": "keyword.operator.scope.systemverilog" }, "5": { "name": "storage.type.interface.systemverilog" } } }, { "match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=[a-zA-Z_][a-zA-Z0-9_\\s]*)", "captures": { "3": { "name": "support.type.scope.systemverilog" }, "1": { "name": "support.type.systemverilog" }, "4": { "name": "keyword.operator.scope.systemverilog" }, "5": { "name": "storage.type.interface.systemverilog" } } }, { "match": "\\s*\\b(output|input|inout|ref)\\b", "name": "support.type.systemverilog" } ] }, "storage-type-systemverilog": { "patterns": [ { "match": "\\s*\\b(var|wire|tri|tri[01]|supply[01]|wand|triand|wor|trior|trireg|reg|integer|int|longint|shortint|logic|bit|byte|shortreal|string|time|realtime|real|process|void)\\b", "name": "storage.type.systemverilog" }, { "match": "\\s*\\b(uvm_transaction|uvm_component|uvm_monitor|uvm_driver|uvm_test|uvm_env|uvm_object|uvm_agent|uvm_sequence_base|uvm_sequence|uvm_sequence_item|uvm_sequence_state|uvm_sequencer|uvm_sequencer_base|uvm_component_registry|uvm_analysis_imp|uvm_analysis_port|uvm_analysis_export|uvm_config_db|uvm_active_passive_enum|uvm_phase|uvm_verbosity|uvm_tlm_analysis_fifo|uvm_tlm_fifo|uvm_report_server|uvm_objection|uvm_recorder|uvm_domain|uvm_reg_field|uvm_reg|uvm_reg_block|uvm_bitstream_t|uvm_radix_enum|uvm_printer|uvm_packer|uvm_comparer|uvm_scope_stack)\\b", "name": "storage.type.uvm.systemverilog" } ] }, "constants": { "patterns": [ { "match": "(\\b\\d+)?'(s?[bB]\\s*[0-1xXzZ?][0-1_xXzZ?]*|s?[oO]\\s*[0-7xXzZ?][0-7_xXzZ?]*|s?[dD]\\s*[0-9xXzZ?][0-9_xXzZ?]*|s?[hH]\\s*[0-9a-fA-FxXzZ?][0-9a-fA-F_xXzZ?]*)((e|E)(\\+|-)?[0-9]+)?(?!'|\\w)", "name": "constant.numeric.systemverilog" }, { "match": "'[01xXzZ]", "name": "constant.numeric.bit.systemverilog" }, { "match": "\\b((\\d[\\d_]*)(e|E)(\\+|-)?[0-9]+)\\b", "name": "constant.numeric.exp.systemverilog" }, { "match": "\\b(\\d[\\d_]*)\\b", "name": "constant.numeric.decimal.systemverilog" }, { "match": "\\b(\\d+(fs|ps|ns|us|ms|s)?)\\b", "name": "constant.numeric.time.systemverilog" }, { "match": "\\b([A-Z][A-Z0-9_]*)\\b", "name": "constant.other.net.systemverilog" }, { "match": "(`ifdef|`ifndef|`default_nettype)\\s+(\\w+)", "captures": { "1": { "name": "constant.other.preprocessor.systemverilog" }, "2": { "name": "support.variable.systemverilog" } } }, { "match": "`(celldefine|else|elsif|endcelldefine|endif|include|line|nounconnected_drive|resetall|timescale|unconnected_drive|undef|begin_\\w+|end_\\w+|remove_\\w+|restore_\\w+)\\b", "name": "constant.other.preprocessor.systemverilog" }, { "match": "`\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "constant.other.define.systemverilog" }, { "match": "\\b(null)\\b", "name": "support.constant.systemverilog" } ] }, "strings": { "patterns": [ { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.systemverilog" } }, "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.systemverilog" }, { "match": "(?x)%\r\n\t\t\t\t\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\r\n\t\t\t\t\t\t\t\t\t\t[#0\\- +']* # flags\r\n\t\t\t\t\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\r\n\t\t\t\t\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\r\n\t\t\t\t\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\r\n\t\t\t\t\t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\r\n\t\t\t\t\t\t\t\t\t\t[bdiouxXhHDOUeEfFgGaACcSspnmt%] # conversion type\r\n\t\t\t\t\t\t\t\t\t", "name": "constant.other.placeholder.systemverilog" }, { "match": "%", "name": "invalid.illegal.placeholder.systemverilog" } ], "name": "string.quoted.double.systemverilog", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.systemverilog" } } } ] }, "operators": { "patterns": [ { "match": "(=|==|===|!=|!==|<=|>=|<|>)", "name": "keyword.operator.comparison.systemverilog" }, { "match": "(\\-|\\+|\\*|\\/|%)", "name": "keyword.operator.arithmetic.systemverilog" }, { "match": "(!|&&|\\|\\||\\bor\\b)", "name": "keyword.operator.logical.systemverilog" }, { "match": "(&|\\||\\^|~|{|'{|}|<<|>>|\\?|:)", "name": "keyword.operator.bitwise.systemverilog" }, { "match": "(#|@)", "name": "keyword.operator.other.systemverilog" } ] }, "base-grammar": { "patterns": [ { "include": "#all-types" }, { "include": "#comments" }, { "include": "#operators" }, { "include": "#constants" }, { "include": "#strings" }, { "match": "^\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s+[a-zA-Z_][a-zA-Z0-9_,=\\s]*", "captures": { "1": { "name": "storage.type.interface.systemverilog" } } }, { "include": "#storage-scope-systemverilog" } ] }, "storage-modifier-systemverilog": { "match": "\\b(signed|unsigned|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b", "name": "storage.modifier.systemverilog" }, "module-param": { "begin": "(#)\\s*\\(", "end": "\\)", "patterns": [ { "include": "#comments" }, { "include": "#constants" }, { "include": "#operators" }, { "include": "#strings" }, { "include": "#module-binding" }, { "match": "\\b(virtual)\\b", "name": "keyword.control.systemverilog" } ], "name": "meta.module-param.systemverilog", "beginCaptures": { "1": { "name": "keyword.operator.param.systemverilog" } } } }, "fileTypes": ["sv", "SV", "v", "V", "svh", "SVH", "vh", "VH"], "uuid": "789be04c-8b74-352e-8f37-63d336001277", "patterns": [ { "begin": "\\s*\\b(function|task)\\b(\\s+automatic)?", "end": ";", "patterns": [ { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\s+)?([a-zA-Z_][a-zA-Z0-9_:]*)\\s*(?=\\(|;)", "captures": { "1": { "name": "storage.type.systemverilog" }, "2": { "name": "entity.name.function.systemverilog" } } }, { "include": "#port-dir" }, { "include": "#base-grammar" } ], "name": "meta.function.systemverilog", "beginCaptures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "keyword.control.systemverilog" } } }, { "match": "\\s*\\b(task)\\s+(automatic)?\\s*(\\w+)\\s*;", "name": "meta.task.simple.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "keyword.control.systemverilog" }, "3": { "name": "entity.name.function.systemverilog" } } }, { "begin": "\\s*\\b(typedef\\s+(struct|enum|union)\\b)\\s*(packed)?\\s*([a-zA-Z_][a-zA-Z0-9_]*)?", "endCaptures": { "1": { "name": "keyword.operator.other.systemverilog" }, "2": { "name": "entity.name.function.systemverilog" } }, "end": "(})\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", "patterns": [ { "include": "#struct-anonymous" }, { "include": "#base-grammar" } ], "name": "meta.typedef.struct.systemverilog", "beginCaptures": { "3": { "name": "keyword.control.systemverilog" }, "1": { "name": "keyword.control.systemverilog" }, "4": { "name": "storage.type.systemverilog" }, "2": { "name": "keyword.control.systemverilog" } } }, { "match": "\\s*\\b(typedef\\s+class)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", "name": "meta.typedef.class.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "entity.name.declaration.systemverilog" } } }, { "begin": "\\s*\\b(typedef)\\b", "endCaptures": { "1": { "name": "entity.name.function.systemverilog" } }, "end": "([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=(\\[[a-zA-Z0-9_:\\$\\-\\+]*\\])?;)", "patterns": [ { "match": "\\b([a-zA-Z_]\\w*)\\s*(#)\\(", "name": "meta.typedef.class.systemverilog", "captures": { "1": { "name": "storage.type.userdefined.systemverilog" }, "2": { "name": "keyword.operator.param.systemverilog" } } }, { "include": "#base-grammar" }, { "include": "#module-binding" } ], "name": "meta.typedef.simple.systemverilog", "beginCaptures": { "1": { "name": "keyword.control.systemverilog" } } }, { "begin": "\\s*(module)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "endCaptures": { "1": { "name": "entity.name.function.systemverilog" } }, "end": ";", "patterns": [ { "include": "#port-dir" }, { "match": "\\s*(parameter)", "name": "keyword.other.systemverilog" }, { "include": "#base-grammar" }, { "include": "#ifmodport" } ], "name": "meta.module.systemverilog", "beginCaptures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "entity.name.type.module.systemverilog" } } }, { "match": "\\b(sequence)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "name": "meta.sequence.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "entity.name.function.systemverilog" } } }, { "match": "\\b(bind)\\s+([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b", "captures": { "1": { "name": "keyword.control.systemverilog" } } }, { "match": "\\s*(begin|fork)\\s*((:)\\s*([a-zA-Z_][a-zA-Z0-9_]*))\\b", "name": "meta.definition.systemverilog", "captures": { "3": { "name": "keyword.operator.systemverilog" }, "1": { "name": "keyword.other.block.systemverilog" }, "4": { "name": "entity.name.section.systemverilog" }, "0": { "name": "meta.section.begin.systemverilog" } } }, { "match": "\\b(property)\\s+(\\w+)", "captures": { "1": { "name": "keyword.sva.systemverilog" }, "2": { "name": "entity.name.sva.systemverilog" } } }, { "match": "\\b(\\w+)\\s*(:)\\s*(assert)\\b", "captures": { "1": { "name": "entity.name.sva.systemverilog" }, "2": { "name": "keyword.operator.systemverilog" }, "3": { "name": "keyword.sva.systemverilog" } } }, { "begin": "\\s*(//)\\s*(psl)\\s+((\\w+)\\s*(:))?\\s*(default|assert|assume)", "end": ";", "patterns": [ { "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge)\\b", "name": "keyword.psl.systemverilog" }, { "include": "#operators" }, { "include": "#functions" }, { "include": "#constants" } ], "name": "meta.psl.systemverilog", "beginCaptures": { "1": { "name": "comment.line.double-slash.systemverilog" }, "6": { "name": "keyword.psl.systemverilog" }, "4": { "name": "entity.psl.name.systemverilog" }, "2": { "name": "keyword.psl.systemverilog" }, "0": { "name": "meta.psl.systemverilog" }, "5": { "name": "keyword.operator.systemverilog" } } }, { "begin": "\\s*(/\\*)\\s*(psl)", "endCaptures": { "1": { "name": "comment.block.systemverilog" } }, "end": "(\\*/)", "patterns": [ { "match": "^\\s*((\\w+)\\s*(:))?\\s*(default|assert|assume)", "captures": { "3": { "name": "keyword.operator.systemverilog" }, "4": { "name": "keyword.psl.systemverilog" }, "2": { "name": "entity.psl.name.systemverilog" }, "0": { "name": "meta.psl.systemverilog" } } }, { "match": "\\b(property)\\s+(\\w+)", "captures": { "1": { "name": "keyword.psl.systemverilog" }, "2": { "name": "entity.psl.name.systemverilog" } } }, { "match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge|negedge)\\b", "name": "keyword.psl.systemverilog" }, { "include": "#operators" }, { "include": "#functions" }, { "include": "#constants" } ], "name": "meta.psl.systemverilog", "beginCaptures": { "0": { "name": "meta.psl.systemverilog" }, "1": { "name": "comment.block.systemverilog" }, "2": { "name": "keyword.psl.systemverilog" } } }, { "match": "\\s*\\b(automatic|cell|config|deassign|defparam|design|disable|edge|endconfig|endgenerate|endspecify|endtable|event|generate|genvar|ifnone|incdir|instance|liblist|library|macromodule|negedge|noshowcancelled|posedge|pulsestyle_onevent|pulsestyle_ondetect|scalared|showcancelled|specify|specparam|table|use|vectored)\\b", "captures": { "1": { "name": "keyword.other.systemverilog" } } }, { "match": "\\s*\\b(initial|always|wait|force|release|assign|always_comb|always_ff|always_latch|forever|repeat|while|for|if|iff|else|case|casex|casez|default|endcase|return|break|continue|do|foreach|with|inside|dist|clocking|cover|coverpoint|property|bins|binsof|illegal_bins|ignore_bins|randcase|modport|matches|solve|static|assert|assume|before|expect|cross|ref|first_match|srandom|struct|packed|final|chandle|alias|tagged|extern|throughout|timeprecision|timeunit|priority|type|union|uwire|wait_order|triggered|randsequence|import|export|context|pure|intersect|wildcard|within|new|typedef|enum|this|super|begin|fork|forkjoin|unique|unique0|priority)\\b", "captures": { "1": { "name": "keyword.control.systemverilog" } } }, { "match": "\\s*\\b(end|endtask|endmodule|endfunction|endprimitive|endclass|endpackage|endsequence|endprogram|endclocking|endproperty|endgroup|endinterface|join|join_any|join_none)\\b(\\s*(:)\\s*(\\w+))?", "name": "meta.object.end.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "3": { "name": "keyword.operator.systemverilog" }, "4": { "name": "entity.label.systemverilog" } } }, { "match": "\\b(std)\\b::", "name": "support.class.systemverilog" }, { "match": "^\\s*(`define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "name": "meta.define.systemverilog", "captures": { "1": { "name": "constant.other.define.systemverilog" }, "2": { "name": "entity.name.type.define.systemverilog" } } }, { "include": "#comments" }, { "match": "\\s*(primitive|package|constraint|interface|covergroup|program)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "meta.definition.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "entity.name.type.class.systemverilog" } } }, { "match": "(([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:))?\\s*(coverpoint|cross)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "name": "meta.definition.systemverilog", "captures": { "2": { "name": "entity.name.type.class.systemverilog" }, "3": { "name": "keyword.operator.other.systemverilog" }, "4": { "name": "keyword.control.systemverilog" } } }, { "match": "\\b(virtual\\s+)?(class)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "meta.definition.class.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "keyword.control.systemverilog" }, "3": { "name": "entity.name.type.class.systemverilog" } } }, { "match": "\\b(extends)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "meta.definition.systemverilog", "captures": { "1": { "name": "keyword.control.systemverilog" }, "2": { "name": "entity.other.inherited-class.systemverilog" } } }, { "include": "#all-types" }, { "include": "#operators" }, { "include": "#port-dir" }, { "match": "\\b(and|nand|nor|or|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|tran|r?tranif[01]|pullup|pulldown)\\b", "name": "support.type.systemverilog" }, { "include": "#strings" }, { "match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "support.function.systemverilog" }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(')(?=\\()", "name": "meta.cast.systemverilog", "captures": { "1": { "name": "storage.type.systemverilog" }, "2": { "name": "keyword.operator.cast.systemverilog" } } }, { "match": "^\\s*(localparam|parameter)\\s+([A-Z_][A-Z0-9_]*)\\b\\s*(?=(=))", "name": "meta.param.systemverilog", "captures": { "1": { "name": "keyword.other.systemverilog" }, "2": { "name": "constant.other.systemverilog" } } }, { "match": "^\\s*(localparam|parameter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(=))", "name": "meta.param.systemverilog", "captures": { "1": { "name": "keyword.other.systemverilog" } } }, { "match": "^\\s*(local\\s+|protected\\s+|localparam\\s+|parameter\\s+)?(const\\s+|virtual\\s+)?(rand\\s+|randc\\s+)?(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(#\\s*\\([\\w,]+\\)\\s*)?([a-zA-Z][a-zA-Z0-9_\\s\\[\\]']*)(;|,|=|'\\{))", "name": "meta.userdefined.systemverilog", "captures": { "3": { "name": "storage.type.rand.systemverilog" }, "1": { "name": "keyword.other.systemverilog" }, "6": { "name": "keyword.operator.scope.systemverilog" }, "2": { "name": "keyword.other.systemverilog" }, "7": { "name": "storage.type.userdefined.systemverilog" }, "5": { "name": "support.type.scope.systemverilog" } } }, { "match": "\\s*\\b(option)\\.", "captures": { "1": { "name": "keyword.cover.systemverilog" } } }, { "match": "\\s*\\b(local|const|protected|virtual|localparam|parameter)\\b", "captures": { "1": { "name": "keyword.other.systemverilog" } } }, { "match": "\\s*\\b(rand|randc)\\b", "name": "storage.type.rand.systemverilog" }, { "begin": "^(\\s*(bind)\\s+([a-zA-Z_][\\w\\.]*))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=#[^#])", "end": "(?=;|=|:)", "patterns": [ { "include": "#module-binding" }, { "include": "#module-param" }, { "include": "#comments" }, { "include": "#operators" }, { "include": "#constants" }, { "include": "#strings" }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(\\(|$))", "name": "entity.name.type.module.systemverilog" } ], "name": "meta.module.inst.param.systemverilog", "beginCaptures": { "2": { "name": "keyword.control.systemverilog" }, "4": { "name": "storage.module.systemverilog" } } }, { "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+(?!intersect|and|or|throughout|within)([a-zA-Z_][a-zA-Z0-9_]*)\\s*(\\[(\\d+)(\\:(\\d+))?\\])?\\s*(\\(|$)", "end": ";", "patterns": [ { "include": "#module-binding" }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#operators" }, { "include": "#constants" } ], "name": "meta.module.inst.systemverilog", "beginCaptures": { "1": { "name": "storage.module.systemverilog" }, "6": { "name": "constant.numeric.systemverilog" }, "4": { "name": "constant.numeric.systemverilog" }, "2": { "name": "entity.name.type.module.systemverilog" } } }, { "begin": "\\b\\s+(<?=)\\s*(\\'{)", "end": ";", "patterns": [ { "match": "\\b(\\w+)\\s*(:)(?!:)", "captures": { "1": { "name": "support.function.field.systemverilog" }, "2": { "name": "keyword.operator.other.systemverilog" } } }, { "include": "#comments" }, { "include": "#strings" }, { "include": "#operators" }, { "include": "#constants" }, { "include": "#storage-scope-systemverilog" } ], "name": "meta.struct.assign.systemverilog", "beginCaptures": { "1": { "name": "keyword.operator.other.systemverilog" }, "2": { "name": "keyword.operator.other.systemverilog" }, "3": { "name": "keyword.operator.other.systemverilog" } } }, { "include": "#storage-scope-systemverilog" }, { "include": "#functions" }, { "include": "#constants" } ], "name": "SystemVerilog", "scopeName": "source.systemverilog" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/tcl.tmLanguage.json ================================================ { "foldingStopMarker": "^\\s*\\}", "foldingStartMarker": "\\{\\s*$", "repository": { "braces": { "begin": "(?:^|(?<=\\s))\\{", "endCaptures": { "1": { "name": "invalid.illegal.tcl" } }, "end": "\\}([^\\s\\]]*)", "comment": "matches a single brace-enclosed word", "patterns": [ { "match": "\\\\[{}\\n]", "name": "constant.character.escape.tcl" }, { "include": "#inner-braces" } ] }, "escape": { "match": "\\\\(\\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\\n)", "name": "constant.character.escape.tcl" }, "regexp": { "begin": "(?=\\S)(?![\\n;\\]])", "end": "(?=[\\n;\\]])", "comment": "matches a single word, named as a regexp, then swallows the rest of the command", "patterns": [ { "begin": "(?=[^ \\t\\n;])", "end": "(?=[ \\t\\n;])", "patterns": [ { "include": "#braces" }, { "include": "#bare-string" }, { "include": "#escape" }, { "include": "#variable" } ], "name": "string.regexp.tcl" }, { "begin": "[ \\t]", "end": "(?=[\\n;\\]])", "comment": "swallow the rest of the command", "patterns": [ { "include": "#variable" }, { "include": "#embedded" }, { "include": "#escape" }, { "include": "#braces" }, { "include": "#string" } ] } ] }, "string": { "begin": "(?:^|(?<=\\s))(?=\")", "applyEndPatternLast": 1, "end": "", "comment": "matches a single quote-enclosed word with scoping", "name": "string.quoted.double.tcl", "patterns": [{ "include": "#bare-string" }] }, "operator": { "match": "(?<= |\\d)(-|\\+|~|&{1,2}|\\|{1,2}|<{1,2}|>{1,2}|\\*{1,2}|!|%|\\/|<=|>=|={1,2}|!=|\\^)(?= |\\d)", "name": "keyword.operator.tcl" }, "embedded": { "begin": "\\[", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.tcl" } }, "end": "\\]", "patterns": [{ "include": "source.tcl" }], "name": "source.tcl.embedded", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.tcl" } } }, "variable": { "match": "(\\$)((?:[a-zA-Z0-9_]|::)+(\\([^\\)]+\\))?|\\{[^\\}]*\\})", "name": "support.function.tcl", "captures": { "1": { "name": "punctuation.definition.variable.tcl" } } }, "numeric": { "match": "(?<![a-zA-Z])([+-]?([0-9]*[.])?[0-9]+f?)(?![\\.a-zA-Z])", "name": "constant.numeric.tcl" }, "bare-string": { "begin": "(?:^|(?<=\\s))\"", "endCaptures": { "1": { "name": "invalid.illegal.tcl" } }, "end": "\"([^\\s\\]]*)", "comment": "matches a single quote-enclosed word without scoping", "patterns": [{ "include": "#escape" }, { "include": "#variable" }] }, "inner-braces": { "begin": "\\{", "end": "\\}", "comment": "matches a nested brace in a brace-enclosed word", "patterns": [ { "match": "\\\\[{}\\n]", "name": "constant.character.escape.tcl" }, { "include": "#inner-braces" } ] } }, "keyEquivalent": "^~T", "fileTypes": ["tcl"], "uuid": "62E11136-D9E5-461C-BE98-54E3A2A9E5E3", "patterns": [ { "begin": "(?<=^|;)\\s*((#))", "end": "\\n", "patterns": [{ "match": "(\\\\\\\\|\\\\\\n)" }], "contentName": "comment.line.number-sign.tcl", "beginCaptures": { "1": { "name": "comment.line.number-sign.tcl" }, "2": { "name": "punctuation.definition.comment.tcl" } } }, { "match": "(?<=^|[\\[{;])\\s*(if|while|for|catch|default|return|break|continue|switch|exit|foreach|try|throw)\\b", "captures": { "1": { "name": "keyword.control.tcl" } } }, { "match": "(?<=^|})\\s*(then|elseif|else)\\b", "captures": { "1": { "name": "keyword.control.tcl" } } }, { "match": "(?<=^|{)\\s*(proc)\\s+([^\\s]+)", "captures": { "1": { "name": "keyword.other.tcl" }, "2": { "name": "entity.name.function.tcl" } } }, { "match": "(?<=^|[\\[{;])\\s*(after|append|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_mkindex_old|auto_qualify|auto_reset|bgerror|binary|cd|clock|close|concat|dde|encoding|eof|error|eval|exec|expr|fblocked|fconfigure|fcopy|file|fileevent|filename|flush|format|gets|glob|global|history|http|incr|info|interp|join|lappend|library|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|memory|msgcat|namespace|open|package|parray|pid|pkg::create|pkg_mkIndex|proc|puts|pwd|re_syntax|read|registry|rename|resource|scan|seek|set|socket|SafeBase|source|split|string|subst|Tcl|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tcltest|tclvars|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait)\\b", "captures": { "1": { "name": "keyword.other.tcl" } } }, { "begin": "(?<=^|[\\[{;])\\s*(regexp|regsub)\\b\\s*", "end": "[\\n;\\]]", "comment": "special-case regexp/regsub keyword in order to handle the expression", "patterns": [ { "match": "\\\\(?:.|\\n)", "name": "constant.character.escape.tcl" }, { "comment": "switch for regexp", "match": "-\\w+\\s*" }, { "begin": "--\\s*", "applyEndPatternLast": 1, "end": "", "comment": "end of switches", "patterns": [{ "include": "#regexp" }] }, { "include": "#regexp" } ], "beginCaptures": { "1": { "name": "keyword.other.tcl" } } }, { "include": "#escape" }, { "include": "#variable" }, { "include": "#operator" }, { "include": "#numeric" }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.tcl" } }, "end": "\"", "patterns": [ { "include": "#escape" }, { "include": "#variable" }, { "include": "#embedded" } ], "name": "string.quoted.double.tcl", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tcl" } } } ], "name": "Tcl", "scopeName": "source.tcl" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/terraform.tmLanguage.json ================================================ { "scopeName": "source.terraform", "fileTypes": ["tf", "tfvars", "hcl"], "patterns": [ { "include": "#comments" }, { "include": "#top_level_attribute_definition" }, { "include": "#imports" }, { "include": "#block" }, { "include": "#expressions" } ], "repository": { "imports": { "begin": "\\s*(terraform)\\s*(import)\\s*", "end": "$\\n?", "comment": "Terraform imports", "patterns": [ { "include": "#string_literals" }, { "comment": "Identifier label", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "entity.name.label.terraform" }, { "include": "#numeric_literals" }, { "include": "#attribute_access" } ], "beginCaptures": { "1": { "name": "support.constant.terraform" }, "2": { "name": "keyword.control.import.terraform" } } }, "main": { "patterns": [ { "include": "#comments" }, { "include": "#block" }, { "include": "#expressions" } ] }, "comma": { "comment": "Commas - used in certain expressions", "match": "\\,", "name": "punctuation.separator.terraform" }, "block_comments": { "begin": "/\\*", "endCaptures": { "0": { "name": "punctuation.definition.comment.terraform" } }, "end": "\\*/", "comment": "Block comments", "name": "comment.block.terraform", "beginCaptures": { "0": { "name": "punctuation.definition.comment.terraform" } } }, "object_key_values": { "patterns": [{ "include": "#comments" }, { "include": "#expressions" }] }, "string_literals": { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.terraform" } }, "patterns": [ { "include": "#string_interpolation" }, { "comment": "Character Escapes", "match": "\\\\[nrt\"\\\\]|\\\\u(\\h{8}|\\h{4})", "name": "constant.character.escape.terraform" } ], "comment": "Strings", "endCaptures": { "0": { "name": "punctuation.definition.string.end.terraform" } }, "name": "string.quoted.double.terraform" }, "tuple_for_expression": { "begin": "\\bfor\\b", "end": "(?=\\])", "comment": "Tuple for-expression", "patterns": [ { "match": "\\bin\\b", "name": "keyword.operator.word.terraform" }, { "match": "\\bif\\b", "name": "keyword.control.conditional.terraform" }, { "match": "\\:", "name": "keyword.operator.terraform" }, { "include": "#expressions" }, { "include": "#comments" }, { "include": "#comma" }, { "comment": "Local Identifiers", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "variable.other.readwrite.terraform" } ], "beginCaptures": { "0": { "name": "keyword.control.terraform" } } }, "block": { "begin": "(\\b(resource|provider|variable|output|locals|module|data|terraform)\\b|(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b))(?=[\\s\\\"\\-[:word:]]*(\\{))", "end": "(?=\\{)", "comment": "Blocks", "name": "meta.type.terraform", "beginCaptures": { "2": { "name": "storage.type.terraform" }, "3": { "name": "entity.name.type.terraform" } }, "patterns": [ { "begin": "\\\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.terraform" } }, "end": "\\\"", "comment": "String literal label", "name": "string.quoted.double.terraform", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.terraform" } } }, { "comment": "Identifer label", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "entity.name.label.terraform" } ] }, "objects": { "end": "\\}", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.terraform" } }, "patterns": [ { "include": "#object_for_expression" }, { "include": "#comments" }, { "begin": "\\s*(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)\\s*(\\=)\\s*", "endCaptures": { "1": { "name": "punctuation.separator.terraform" }, "3": { "name": "punctuation.section.braces.end.terraform" } }, "end": "((\\,)|($\\n?)|(?=\\}))", "comment": "Literal, named object key", "patterns": [{ "include": "#object_key_values" }], "beginCaptures": { "1": { "name": "meta.mapping.key.terraform string.unquoted.terraform" }, "2": { "name": "keyword.operator.terraform" } } }, { "begin": "((\\\").*(\\\"))\\s*(\\=)\\s*", "endCaptures": { "1": { "name": "punctuation.separator.terraform" }, "3": { "name": "punctuation.section.braces.end.terraform" } }, "end": "((\\,)|($\\n?)|(?=\\}))", "comment": "String object key", "patterns": [{ "include": "#object_key_values" }], "beginCaptures": { "3": { "name": "punctuation.definition.string.end.terraform" }, "1": { "name": "meta.mapping.key.terraform string.quoted.double.terraform" }, "4": { "name": "keyword.operator.terraform" }, "2": { "name": "punctuation.definition.string.begin.terraform" } } }, { "end": "(\\))\\s*(\\=)\\s*", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.terraform" } }, "patterns": [{ "include": "#expressions" }], "comment": "Begin computed object key", "endCaptures": { "1": { "name": "punctuation.section.parens.end.terraform" }, "2": { "name": "keyword.operator.terraform" } }, "name": "meta.mapping.key.terraform" }, { "comment": "Random Expression, for matching after computed keys", "patterns": [{ "include": "#main" }] } ], "comment": "Map collection values", "endCaptures": { "0": { "name": "punctuation.section.braces.end.terraform" } }, "name": "meta.braces.terraform" }, "top_level_attribute_definition": { "match": "(\\()?(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)(\\))?\\s*(\\=[^\\=|\\>])\\s*", "comment": "Attribute Definition - Identifier \"=\" Expression Newline", "name": "variable.declaration.terraform", "captures": { "3": { "name": "punctuation.section.parens.end.terraform" }, "1": { "name": "punctuation.section.parens.begin.terraform" }, "4": { "name": "keyword.operator.assignment.terraform" }, "2": { "name": "variable.other.readwrite.terraform" } } }, "string_interpolation": { "end": "\\}", "begin": "(\\$|\\%)\\{", "beginCaptures": { "0": { "name": "keyword.other.interpolation.begin.terraform" } }, "patterns": [ { "comment": "Trim left whitespace", "match": "\\~\\s", "name": "keyword.operator.template.left.trim.terraform" }, { "comment": "Trim right whitespace", "match": "\\s\\~", "name": "keyword.operator.template.right.trim.terraform" }, { "comment": "if/else/endif and for/in/endfor directives", "match": "\\b(if|else|endif|for|in|endfor)\\b", "name": "keyword.control.terraform" }, { "include": "#expressions" } ], "comment": "String interpolation", "endCaptures": { "0": { "name": "keyword.other.interpolation.end.terraform" } }, "name": "meta.interpolation.terraform" }, "attribute_access": { "begin": "\\.", "endCaptures": { "1": { "name": "variable.other.member.terraform" }, "2": { "name": "keyword.operator.splat.terraform" }, "3": { "name": "constant.numeric.integer.terraform" } }, "end": "(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)|(\\*)|(\\d+)", "comment": "Attribute Access - \".\" Identifier", "beginCaptures": { "0": { "name": "keyword.operator.accessor.terraform" } } }, "functions": { "end": "\\)", "begin": "((abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)|\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b))(\\()", "beginCaptures": { "2": { "name": "support.function.builtin.terraform" }, "3": { "name": "variable.function.terraform" }, "4": { "name": "punctuation.section.parens.begin.terraform" } }, "patterns": [ { "include": "#comments" }, { "include": "#expressions" }, { "include": "#comma" } ], "comment": "Functions calls- Terraform builtins and unknown", "endCaptures": { "0": { "name": "punctuation.section.parens.end.terraform" } }, "name": "meta.function-call.terraform" }, "literal_values": { "patterns": [ { "include": "#numeric_literals" }, { "include": "#language_constants" }, { "include": "#string_literals" }, { "include": "#heredoc" }, { "include": "#type_keywords" }, { "include": "#named_value_references" } ] }, "named_value_references": { "comment": "Terraform built-in variables", "match": "\\b(var|local|module|data|path|terraform)\\b", "name": "support.constant.terraform" }, "operators": { "patterns": [ { "match": "\\>\\=", "name": "keyword.operator.terraform" }, { "match": "\\<\\=", "name": "keyword.operator.terraform" }, { "match": "\\=\\=", "name": "keyword.operator.terraform" }, { "match": "\\!\\=", "name": "keyword.operator.terraform" }, { "match": "\\+", "name": "keyword.operator.arithmetic.terraform" }, { "match": "\\-", "name": "keyword.operator.arithmetic.terraform" }, { "match": "\\*", "name": "keyword.operator.arithmetic.terraform" }, { "match": "\\/", "name": "keyword.operator.arithmetic.terraform" }, { "match": "\\%", "name": "keyword.operator.arithmetic.terraform" }, { "match": "\\&\\&", "name": "keyword.operator.logical.terraform" }, { "match": "\\|\\|", "name": "keyword.operator.logical.terraform" }, { "match": "\\!", "name": "keyword.operator.logical.terraform" }, { "match": "\\>", "name": "keyword.operator.terraform" }, { "match": "\\<", "name": "keyword.operator.terraform" }, { "match": "\\?", "name": "keyword.operator.terraform" }, { "match": "\\.\\.\\.", "name": "keyword.operator.terraform" }, { "match": "\\:", "name": "keyword.operator.terraform" } ] }, "heredoc": { "end": "^\\s*\\2\\s*$", "begin": "(\\<\\<\\-?)\\s*(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)\\s*$", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.terraform" }, "2": { "name": "keyword.control.heredoc.terraform" } }, "patterns": [{ "include": "#string_interpolation" }], "comment": "Heredocs", "endCaptures": { "0": { "name": "keyword.control.heredoc.terraform" } }, "name": "string.unquoted.heredoc.terraform" }, "brackets": { "begin": "\\[", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.terraform" }, "1": { "name": "keyword.operator.splat.terraform" } }, "end": "(\\*)?\\]", "comment": "Tuples & subscript notation", "patterns": [ { "include": "#comma" }, { "include": "#comments" }, { "include": "#expressions" }, { "include": "#tuple_for_expression" } ], "beginCaptures": { "0": { "name": "punctuation.section.brackets.begin.terraform" } } }, "comments": { "patterns": [ { "include": "#inline_comments" }, { "include": "#block_comments" } ] }, "expressions": { "patterns": [ { "include": "#literal_values" }, { "include": "#operators" }, { "include": "#brackets" }, { "include": "#objects" }, { "include": "#attribute_access" }, { "include": "#functions" }, { "include": "#parens" } ] }, "numeric_literals": { "patterns": [ { "match": "\\b\\d+(([Ee][+-]?))\\d+\\b", "comment": "Integer, no fraction, optional exponent", "name": "constant.numeric.float.terraform", "captures": { "1": { "name": "punctuation.separator.exponent.terraform" } } }, { "match": "\\b\\d+(\\.)\\d+(?:(([Ee][+-]?))\\d+)?\\b", "comment": "Integer, fraction, optional exponent", "name": "constant.numeric.float.terraform", "captures": { "1": { "name": "punctuation.separator.decimal.terraform" }, "2": { "name": "punctuation.separator.exponent.terraform" } } }, { "comment": "Integers", "match": "\\b\\d+\\b", "name": "constant.numeric.integer.terraform" } ] }, "object_for_expression": { "begin": "\\bfor\\b", "end": "(?=\\})", "comment": "Object for-expression", "patterns": [ { "match": "\\=\\>", "name": "storage.type.function.terraform" }, { "match": "\\bin\\b", "name": "keyword.operator.word.terraform" }, { "match": "\\bif\\b", "name": "keyword.control.conditional.terraform" }, { "match": "\\:", "name": "keyword.operator.terraform" }, { "include": "#expressions" }, { "include": "#comments" }, { "include": "#comma" }, { "comment": "Local Identifiers", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "variable.other.readwrite.terraform" } ], "beginCaptures": { "0": { "name": "keyword.control.terraform" } } }, "inline_comments": { "begin": "#|//", "end": "$\n?", "comment": "Inline comments", "name": "comment.line.terraform", "beginCaptures": { "0": { "name": "punctuation.definition.comment.terraform" } } }, "parens": { "begin": "\\(", "endCaptures": { "0": { "name": "punctuation.section.parens.end.terraform" } }, "end": "\\)", "comment": "Parens - matched *after* function syntax", "patterns": [ { "include": "#expressions" }, { "comment": "Local Identifiers", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "variable.other.readwrite.terraform" } ], "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.terraform" } } }, "type_keywords": { "comment": "Type keywords known to Terraform.", "match": "\\b(any|string|number|bool)\\b", "name": "storage.type.terraform" }, "language_constants": { "comment": "Language Constants", "match": "\\b(true|false|null)\\b", "name": "constant.language.terraform" } }, "name": "Terraform", "uuid": "9060ca81-906d-4f19-a91a-159f4eb119d6" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/tex.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/jlelong/vscode-latex-basics/blob/master/syntaxes/TeX.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/jlelong/vscode-latex-basics/commit/b98c2d4911652824fc990f4b26c9c30be59b78a2", "name": "tex", "scopeName": "text.tex", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.keyword.tex" } }, "match": "(\\\\)(backmatter|else|fi|frontmatter|mainmatter|if(case|cat|dim|eof|false|hbox|hmode|inner|mmode|num|odd|true|undefined|vbox|vmode|void|x)?)(?![a-zA-Z@])", "name": "keyword.control.tex" }, { "captures": { "1": { "name": "keyword.control.catcode.tex" }, "2": { "name": "punctuation.definition.keyword.tex" }, "3": { "name": "punctuation.separator.key-value.tex" }, "4": { "name": "constant.numeric.category.tex" } }, "match": "((\\\\)catcode)`(?:\\\\)?.(=)(\\d+)", "name": "meta.catcode.tex" }, { "begin": "(^[ \\t]+)?(?=%)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tex" } }, "end": "(?!\\G)", "patterns": [ { "begin": "%:", "beginCaptures": { "0": { "name": "punctuation.definition.comment.tex" } }, "end": "$\\n?", "name": "comment.line.percentage.tex" }, { "begin": "^(%!TEX) (\\S*) =", "beginCaptures": { "1": { "name": "punctuation.definition.comment.tex" } }, "end": "$\\n?", "name": "comment.line.percentage.directive.tex" }, { "begin": "%", "beginCaptures": { "0": { "name": "punctuation.definition.comment.tex" } }, "end": "$\\n?", "name": "comment.line.percentage.tex" } ] }, { "match": "[\\[\\]]", "name": "punctuation.definition.brackets.tex" }, { "begin": "(\\$\\$|\\$)", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.tex" } }, "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tex" } }, "name": "meta.math.block.tex support.class.math.block.tex", "patterns": [ { "match": "\\\\\\$", "name": "constant.character.escape.tex" }, { "include": "#math" }, { "include": "$self" } ] }, { "match": "\\\\\\\\", "name": "keyword.control.newline.tex" }, { "captures": { "1": { "name": "punctuation.definition.function.tex" } }, "match": "(\\\\)(?:[A-Za-z@]+|[,;])", "name": "support.function.general.tex" }, { "captures": { "1": { "name": "punctuation.definition.keyword.tex" } }, "match": "(\\\\)[^a-zA-Z@]", "name": "constant.character.escape.tex" } ], "repository": { "math": { "patterns": [ { "begin": "((\\\\)(?:text|mbox))(\\{)", "beginCaptures": { "1": { "name": "constant.other.math.tex" }, "2": { "name": "punctuation.definition.function.tex" }, "3": { "name": "punctuation.definition.arguments.begin.tex meta.text.normal.tex" } }, "contentName": "meta.text.normal.tex", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.tex meta.text.normal.tex" } }, "patterns": [ { "include": "#math" }, { "include": "$base" } ] }, { "match": "\\\\{|\\\\}", "name": "punctuation.math.bracket.pair.tex" }, { "match": "\\\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\\(\\[\\<\\>\\]\\)\\.\\|]|\\\\[{}|]|\\\\[lr]?[Vv]ert|\\\\[lr]angle|\\\\\\|)", "name": "punctuation.math.bracket.pair.big.tex" }, { "captures": { "1": { "name": "punctuation.definition.constant.math.tex" } }, "match": "(\\\\)(s(s(earrow|warrow|lash)|h(ort(downarrow|uparrow|parallel|leftarrow|rightarrow|mid)|arp)|tar|i(gma|m(eq)?)|u(cc(sim|n(sim|approx)|curlyeq|eq|approx)?|pset(neq(q)?|plus(eq)?|eq(q)?)?|rd|m|bset(neq(q)?|plus(eq)?|eq(q)?)?)|p(hericalangle|adesuit)|e(tminus|arrow)|q(su(pset(eq)?|bset(eq)?)|c(up|ap)|uare)|warrow|m(ile|all(s(etminus|mile)|frown)))|h(slash|ook(leftarrow|rightarrow)|eartsuit|bar)|R(sh|ightarrow|e|bag)|Gam(e|ma)|n(s(hort(parallel|mid)|im|u(cc(eq)?|pseteq(q)?|bseteq))|Rightarrow|n(earrow|warrow)|cong|triangle(left(eq(slant)?)?|right(eq(slant)?)?)|i(plus)?|u|p(lus|arallel|rec(eq)?)|e(q|arrow|g|xists)|v(dash|Dash)|warrow|le(ss|q(slant|q)?|ft(arrow|rightarrow))|a(tural|bla)|VDash|rightarrow|g(tr|eq(slant|q)?)|mid|Left(arrow|rightarrow))|c(hi|irc(eq|le(d(circ|S|dash|ast)|arrow(left|right)))?|o(ng|prod|lon|mplement)|dot(s|p)?|u(p|r(vearrow(left|right)|ly(eq(succ|prec)|vee(downarrow|uparrow)?|wedge(downarrow|uparrow)?)))|enterdot|lubsuit|ap)|Xi|Maps(to(char)?|from(char)?)|B(ox|umpeq|bbk)|t(h(ick(sim|approx)|e(ta|refore))|imes|op|wohead(leftarrow|rightarrow)|a(u|lloblong)|riangle(down|q|left(eq(slant)?)?|right(eq(slant)?)?)?)|i(n(t(er(cal|leave))?|plus|fty)?|ota|math)|S(igma|u(pset|bset))|zeta|o(slash|times|int|dot|plus|vee|wedge|lessthan|greaterthan|m(inus|ega)|b(slash|long|ar))|d(i(v(ideontimes)?|a(g(down|up)|mond(suit)?)|gamma)|o(t(plus|eq(dot)?)|ublebarwedge|wn(harpoon(left|right)|downarrows|arrow))|d(ots|agger)|elta|a(sh(v|leftarrow|rightarrow)|leth|gger))|Y(down|up|left|right)|C(up|ap)|u(n(lhd|rhd)|p(silon|harpoon(left|right)|downarrow|uparrows|lus|arrow)|lcorner|rcorner)|jmath|Theta|Im|p(si|hi|i(tchfork)?|erp|ar(tial|allel)|r(ime|o(d|pto)|ec(sim|n(sim|approx)|curlyeq|eq|approx)?)|m)|e(t(h|a)|psilon|q(slant(less|gtr)|circ|uiv)|ll|xists|mptyset)|Omega|D(iamond|ownarrow|elta)|v(d(ots|ash)|ee(bar)?|Dash|ar(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|curly(vee|wedge)|t(heta|imes|riangle(left|right)?)|o(slash|circle|times|dot|plus|vee|wedge|lessthan|ast|greaterthan|minus|b(slash|ar))|p(hi|i|ropto)|epsilon|kappa|rho|bigcirc))|kappa|Up(silon|downarrow|arrow)|Join|f(orall|lat|a(t(s(emi|lash)|bslash)|llingdotseq)|rown)|P(si|hi|i)|w(p|edge|r)|l(hd|n(sim|eq(q)?|approx)|ceil|times|ightning|o(ng(left(arrow|rightarrow)|rightarrow|maps(to|from))|zenge|oparrow(left|right))|dot(s|p)|e(ss(sim|dot|eq(qgtr|gtr)|approx|gtr)|q(slant|q)?|ft(slice|harpoon(down|up)|threetimes|leftarrows|arrow(t(ail|riangle))?|right(squigarrow|harpoons|arrow(s|triangle|eq)?))|adsto)|vertneqq|floor|l(c(orner|eil)|floor|l|bracket)?|a(ngle|mbda)|rcorner|bag)|a(s(ymp|t)|ngle|pprox(eq)?|l(pha|eph)|rrownot|malg)|V(dash|vdash)|r(h(o|d)|ceil|times|i(singdotseq|ght(s(quigarrow|lice)|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(t(ail|riangle))?|rightarrows))|floor|angle|r(ceil|parenthesis|floor|bracket)|bag)|g(n(sim|eq(q)?|approx)|tr(sim|dot|eq(qless|less)|less|approx)|imel|eq(slant|q)?|vertneqq|amma|g(g)?)|Finv|xi|m(ho|i(nuso|d)|o(o|dels)|u(ltimap)?|p|e(asuredangle|rge)|aps(to|from(char)?))|b(i(n(dnasrepma|ampersand)|g(s(tar|qc(up|ap))|nplus|c(irc|u(p|rly(vee|wedge))|ap)|triangle(down|up)|interleave|o(times|dot|plus)|uplus|parallel|vee|wedge|box))|o(t|wtie|x(slash|circle|times|dot|plus|empty|ast|minus|b(slash|ox|ar)))|u(llet|mpeq)|e(cause|t(h|ween|a))|lack(square|triangle(down|left|right)?|lozenge)|a(ck(s(im(eq)?|lash)|prime|epsilon)|r(o|wedge))|bslash)|L(sh|ong(left(arrow|rightarrow)|rightarrow|maps(to|from))|eft(arrow|rightarrow)|leftarrow|ambda|bag)|Arrownot)(?=\\b|_)", "name": "constant.character.math.tex" }, { "captures": { "1": { "name": "punctuation.definition.constant.math.tex" } }, "match": "(\\\\)(sum|prod|coprod|int|oint|bigcap|bigcup|bigsqcup|bigvee|bigwedge|bigodot|bigotimes|bogoplus|biguplus)\\b", "name": "constant.character.math.tex" }, { "captures": { "1": { "name": "punctuation.definition.constant.math.tex" } }, "match": "(\\\\)(arccos|arcsin|arctan|arg|cos|cosh|cot|coth|csc|deg|det|dim|exp|gcd|hom|inf|ker|lg|lim|liminf|limsup|ln|log|max|min|pr|sec|sin|sinh|sup|tan|tanh)\\b", "name": "constant.other.math.tex" }, { "begin": "((\\\\)Sexpr(\\{))", "beginCaptures": { "1": { "name": "support.function.sexpr.math.tex" }, "2": { "name": "punctuation.definition.function.math.tex" }, "3": { "name": "punctuation.section.embedded.begin.math.tex" } }, "contentName": "support.function.sexpr.math.tex", "end": "(((\\})))", "endCaptures": { "1": { "name": "support.function.sexpr.math.tex" }, "2": { "name": "punctuation.section.embedded.end.math.tex" }, "3": { "name": "source.r" } }, "name": "meta.embedded.line.r", "patterns": [ { "begin": "\\G(?!\\})", "end": "(?=\\})", "name": "source.r", "patterns": [ { "include": "source.r" } ] } ] }, { "captures": { "1": { "name": "punctuation.definition.constant.math.tex" } }, "match": "(\\\\)(?!begin\\{|verb)([A-Za-z]+)", "name": "constant.other.general.math.tex" }, { "match": "(?<!\\\\)\\{", "name": "punctuation.math.begin.bracket.curly.tex" }, { "match": "(?<!\\\\)\\}", "name": "punctuation.math.end.bracket.curly.tex" }, { "match": "(?<!\\\\)\\(", "name": "punctuation.math.begin.bracket.round.tex" }, { "match": "(?<!\\\\)\\)", "name": "punctuation.math.end.bracket.round.tex" }, { "match": "(([0-9]*[\\.][0-9]+)|[0-9]+)", "name": "constant.numeric.math.tex" }, { "match": "[\\+\\*/_\\^-]", "name": "punctuation.math.operator.tex" } ] }, "braces": { "begin": "(?<!\\\\)\\{", "beginCaptures": { "0": { "name": "punctuation.group.begin.tex" } }, "end": "(?<!\\\\)\\}", "endCaptures": { "0": { "name": "punctuation.group.end.tex" } }, "name": "meta.group.braces.tex", "patterns": [ { "include": "#braces" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/textile.tmLanguage.json ================================================ { "fileTypes": ["textile"], "firstLineMatch": "textile", "repository": { "inline": { "patterns": [ { "comment": "& is handled automagically by textile, so we match it to avoid text.html.basic from flagging it", "match": "&(?![A-Za-z0-9]+;)", "name": "text.html.textile" }, { "match": "^\\*+(\\([^)]*\\)|{[^}]*})*(\\s+|$)", "name": "markup.list.unnumbered.textile", "captures": { "1": { "name": "entity.name.type.textile" } } }, { "match": "^#+(\\([^)]*\\)|{[^}]*})*\\s+", "name": "markup.list.numbered.textile", "captures": { "1": { "name": "entity.name.type.textile" } } }, { "match": "(?x)\n\t\t\t\t\t\t\t\t\"\t\t\t\t\t\t\t\t# Start name, etc\n\t\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t# Attributes\n\t\t\t\t\t\t\t\t\t\t# I swear, this is how the language is defined,\n\t\t\t\t\t\t\t\t\t\t# couldnt make it up if I tried.\n\t\t\t\t\t\t\t\t\t\t(?:\\([^)]+\\))?(?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?\n\t\t\t\t\t\t\t\t\t\t\t# Class, Style, Lang\n\t\t\t\t\t\t\t\t\t | (?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?(?:\\([^)]+\\))?\n\t\t\t\t\t\t\t\t\t\t\t# Style, Lang, Class\n\t\t\t\t\t\t\t\t\t | (?:\\[[^\\]]+\\])?(?:\\{[^}]+\\})?(?:\\([^)]+\\))?\n\t\t\t\t\t\t\t\t\t\t\t# Lang, Style, Class\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t([^\"]+?)\t\t\t\t\t# Link name\n\t\t\t\t\t\t\t\t\t\\s?\t\t\t\t\t\t\t# Optional whitespace\n\t\t\t\t\t\t\t\t\t(?:\\(([^)]+?)\\))?\n\t\t\t\t\t\t\t\t\":\t\t\t\t\t\t\t\t# End name\n\t\t\t\t\t\t\t\t(\\w[-\\w_]*)\t\t\t\t\t\t# Linkref\n\t\t\t\t\t\t\t\t(?=[^\\w\\/;]*?(<|\\s|$))\t\t\t# Catch closing punctuation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# and end of meta.link\n\t\t\t\t\t", "name": "meta.link.reference.textile", "captures": { "1": { "name": "string.other.link.title.textile" }, "2": { "name": "string.other.link.description.title.textile" }, "3": { "name": "constant.other.reference.link.textile" } } }, { "match": "(?x)\n\t\t\t\t\t\t\t\t\"\t\t\t\t\t\t\t\t# Start name, etc\n\t\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t# Attributes\n\t\t\t\t\t\t\t\t\t\t# I swear, this is how the language is defined,\n\t\t\t\t\t\t\t\t\t\t# couldnt make it up if I tried.\n\t\t\t\t\t\t\t\t\t\t(?:\\([^)]+\\))?(?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?\n\t\t\t\t\t\t\t\t\t\t\t# Class, Style, Lang\n\t\t\t\t\t\t\t\t\t | (?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?(?:\\([^)]+\\))?\n\t\t\t\t\t\t\t\t\t\t\t# Style, Lang, Class\n\t\t\t\t\t\t\t\t\t | (?:\\[[^\\]]+\\])?(?:\\{[^}]+\\})?(?:\\([^)]+\\))?\n\t\t\t\t\t\t\t\t\t\t\t# Lang, Style, Class\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t([^\"]+?)\t\t\t\t\t# Link name\n\t\t\t\t\t\t\t\t\t\\s?\t\t\t\t\t\t\t# Optional whitespace\n\t\t\t\t\t\t\t\t\t(?:\\(([^)]+?)\\))?\n\t\t\t\t\t\t\t\t\":\t\t\t\t\t\t\t\t# End Name\n\t\t\t\t\t\t\t\t(\\S*?(?:\\w|\\/|;))\t\t\t\t# URL\n\t\t\t\t\t\t\t\t(?=[^\\w\\/;]*?(<|\\s|$))\t\t\t# Catch closing punctuation\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# and end of meta.link\n\t\t\t\t\t", "name": "meta.link.inline.textile", "captures": { "1": { "name": "string.other.link.title.textile" }, "2": { "name": "string.other.link.description.title.textile" }, "3": { "name": "markup.underline.link.textile" } } }, { "match": "(?x)\n\t\t\t\t\t\t\t\t\\!\t\t\t\t\t\t\t\t\t\t# Open image\n\t\t\t\t\t\t\t\t(\\<|\\=|\\>)?\t\t\t\t\t\t\t\t# Optional alignment\n\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t\t\t\t# Attributes\n\t\t\t\t\t\t\t\t\t# I swear, this is how the language is defined,\n\t\t\t\t\t\t\t\t\t# couldnt make it up if I tried.\n\t\t\t\t\t\t\t\t\t(?:\\([^)]+\\))?(?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?\n\t\t\t\t\t\t\t\t\t\t# Class, Style, Lang\n\t\t\t\t\t\t\t\t | (?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?(?:\\([^)]+\\))?\n\t\t\t\t\t\t\t\t\t\t# Style, Lang, Class\n\t\t\t\t\t\t\t\t | (?:\\[[^\\]]+\\])?(?:\\{[^}]+\\})?(?:\\([^)]+\\))?\n\t\t\t\t\t\t\t\t\t\t# Lang, Style, Class\n\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t(?:\\.[ ])? \t\t\t\t\t# Optional\n\t\t\t\t\t\t\t\t([^\\s(!]+?) \t\t\t\t\t# Image URL\n\t\t\t\t\t\t\t\t\\s? \t\t\t\t\t\t# Optional space\n\t\t\t\t\t\t\t\t(?:\\(((?:[^\\(\\)]|\\([^\\)]+\\))+?)\\))? \t# Optional title\n\t\t\t\t\t\t\t\t\\!\t\t\t\t\t\t\t\t\t\t# Close image\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t\t(\\S*?(?:\\w|\\/|;))\t\t\t\t\t# URL\n\t\t\t\t\t\t\t\t\t(?=[^\\w\\/;]*?(<|\\s|$))\t\t\t\t# Catch closing punctuation\n\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t", "name": "meta.image.inline.textile", "captures": { "2": { "name": "markup.underline.link.image.textile" }, "3": { "name": "string.other.link.description.textile" }, "4": { "name": "markup.underline.link.textile" } } }, { "match": "\\|(\\([^)]*\\)|{[^}]*})*(\\\\\\||.)+\\|", "name": "markup.other.table.cell.textile", "captures": { "1": { "name": "entity.name.type.textile" } } }, { "match": "\\B(\\*\\*?)((\\([^)]*\\)|{[^}]*}|\\[[^]]+\\]){0,3})(\\S.*?\\S|\\S)\\1\\B", "name": "markup.bold.textile", "captures": { "3": { "name": "entity.name.type.textile" } } }, { "match": "\\B-((\\([^)]*\\)|{[^}]*}|\\[[^]]+\\]){0,3})(\\S.*?\\S|\\S)-\\B", "name": "markup.deleted.textile", "captures": { "2": { "name": "entity.name.type.textile" } } }, { "match": "\\B\\+((\\([^)]*\\)|{[^}]*}|\\[[^]]+\\]){0,3})(\\S.*?\\S|\\S)\\+\\B", "name": "markup.inserted.textile", "captures": { "2": { "name": "entity.name.type.textile" } } }, { "match": "(?:\\b|\\s)_((\\([^)]*\\)|{[^}]*}|\\[[^]]+\\]){0,3})(\\S.*?\\S|\\S)_(?:\\b|\\s)", "name": "markup.italic.textile", "captures": { "2": { "name": "entity.name.type.textile" } } }, { "match": "\\B([@\\^~%]|\\?\\?)((\\([^)]*\\)|{[^}]*}|\\[[^]]+\\]){0,3})(\\S.*?\\S|\\S)\\1", "name": "markup.italic.phrasemodifiers.textile", "captures": { "3": { "name": "entity.name.type.textile" } } }, { "comment": "Footnotes", "match": "(?<!w)\\[[0-9+]\\]", "name": "entity.name.tag.textile" } ] } }, "keyEquivalent": "^~T", "uuid": "68F0B1A5-3274-4E85-8B3A-A481C5F5B194", "patterns": [ { "begin": "(^h[1-6]([<>=()]+)?)(\\([^)]*\\)|{[^}]*})*(\\.)", "end": "^$", "patterns": [{ "include": "#inline" }, { "include": "text.html.basic" }], "name": "markup.heading.textile", "captures": { "1": { "name": "entity.name.tag.heading.textile" }, "3": { "name": "entity.name.type.textile" }, "4": { "name": "entity.name.tag.heading.textile" } } }, { "begin": "(^bq([<>=()]+)?)(\\([^)]*\\)|{[^}]*})*(\\.)", "end": "^$", "patterns": [{ "include": "#inline" }, { "include": "text.html.basic" }], "name": "markup.quote.textile", "captures": { "1": { "name": "entity.name.tag.blockquote.textile" }, "3": { "name": "entity.name.type.textile" }, "4": { "name": "entity.name.tag.blockquote.textile" } } }, { "begin": "(^fn[0-9]+([<>=()]+)?)(\\([^)]*\\)|{[^}]*})*(\\.)", "end": "^$", "patterns": [{ "include": "#inline" }, { "include": "text.html.basic" }], "name": "markup.other.footnote.textile", "captures": { "1": { "name": "entity.name.tag.footnote.textile" }, "3": { "name": "entity.name.type.textile" }, "4": { "name": "entity.name.tag.footnote.textile" } } }, { "begin": "(^table([<>=()]+)?)(\\([^)]*\\)|{[^}]*})*(\\.)", "end": "^$", "patterns": [{ "include": "#inline" }, { "include": "text.html.basic" }], "name": "markup.other.table.textile", "captures": { "1": { "name": "entity.name.tag.footnote.textile" }, "3": { "name": "entity.name.type.textile" }, "4": { "name": "entity.name.tag.footnote.textile" } } }, { "begin": "^(?=\\S)", "end": "^$", "patterns": [ { "match": "(^p([<>=()]+)?)(\\([^)]*\\)|{[^}]*})*(\\.)", "name": "entity.name.section.paragraph.textile", "captures": { "1": { "name": "entity.name.tag.paragraph.textile" }, "3": { "name": "entity.name.type.textile" }, "4": { "name": "entity.name.tag.paragraph.textile" } } }, { "include": "#inline" }, { "include": "text.html.basic" } ], "name": "meta.paragraph.textile" }, { "comment": "Since html is valid in Textile include the html patterns", "include": "text.html.basic" } ], "name": "Textile", "scopeName": "text.html.textile" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/toml.tmLanguage.json ================================================ { "fileTypes": ["toml"], "keyEquivalent": "^~T", "name": "toml", "patterns": [ { "include": "#comments" }, { "include": "#groups" }, { "include": "#key_pair" }, { "include": "#invalid" } ], "repository": { "comments": { "begin": "(^[ \\t]+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.toml" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.toml" } }, "end": "\\n", "name": "comment.line.number-sign.toml" } ] }, "groups": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.section.begin.toml" }, "2": { "patterns": [ { "match": "[^\\s.]+", "name": "entity.name.section.toml" } ] }, "3": { "name": "punctuation.definition.section.begin.toml" } }, "match": "^\\s*(\\[)([^\\[\\]]*)(\\])", "name": "meta.group.toml" }, { "captures": { "1": { "name": "punctuation.definition.section.begin.toml" }, "2": { "patterns": [ { "match": "[^\\s.]+", "name": "entity.name.section.toml" } ] }, "3": { "name": "punctuation.definition.section.begin.toml" } }, "match": "^\\s*(\\[\\[)([^\\[\\]]*)(\\]\\])", "name": "meta.group.double.toml" } ] }, "invalid": { "match": "\\S+(\\s*(?=\\S))?", "name": "invalid.illegal.not-allowed-here.toml" }, "key_pair": { "patterns": [ { "begin": "([A-Za-z0-9_-]+)\\s*(=)\\s*", "captures": { "1": { "name": "variable.other.key.toml" }, "2": { "name": "punctuation.separator.key-value.toml" } }, "end": "(?<=\\S)(?<!=)|$", "patterns": [ { "include": "#primatives" } ] }, { "begin": "((\")(.*?)(\"))\\s*(=)\\s*", "captures": { "1": { "name": "variable.other.key.toml" }, "2": { "name": "punctuation.definition.variable.begin.toml" }, "3": { "patterns": [ { "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", "name": "constant.character.escape.toml" }, { "match": "\\\\[^btnfr\"\\\\]", "name": "invalid.illegal.escape.toml" }, { "match": "\"", "name": "invalid.illegal.not-allowed-here.toml" } ] }, "4": { "name": "punctuation.definition.variable.end.toml" }, "5": { "name": "punctuation.separator.key-value.toml" } }, "end": "(?<=\\S)(?<!=)|$", "patterns": [ { "include": "#primatives" } ] }, { "begin": "((')([^']*)('))\\s*(=)\\s*", "captures": { "1": { "name": "variable.other.key.toml" }, "2": { "name": "punctuation.definition.variable.begin.toml" }, "4": { "name": "punctuation.definition.variable.end.toml" }, "5": { "name": "punctuation.separator.key-value.toml" } }, "end": "(?<=\\S)(?<!=)|$", "patterns": [ { "include": "#primatives" } ] }, { "begin": "(?x)\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t[A-Za-z0-9_-]+\t\t\t\t# Bare key\n\t\t\t\t\t\t\t\t | \" (?:[^\"\\\\]|\\\\.)* \"\t\t# Double quoted key\n\t\t\t\t\t\t\t\t | ' [^']* '\t\t# Sindle quoted key\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\\s* \\. \\s*\t\t\t\t\t# Dot\n\t\t\t\t\t\t\t\t | (?= \\s* =)\t\t\t\t\t# or look-ahead for equals\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t){2,}\t\t\t\t\t\t\t\t# Ensure at least one dot\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\\s*(=)\\s*\n\t\t\t\t\t", "captures": { "1": { "name": "variable.other.key.toml", "patterns": [ { "match": "\\.", "name": "punctuation.separator.variable.toml" }, { "captures": { "1": { "name": "punctuation.definition.variable.begin.toml" }, "2": { "patterns": [ { "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", "name": "constant.character.escape.toml" }, { "match": "\\\\[^btnfr\"\\\\]", "name": "invalid.illegal.escape.toml" } ] }, "3": { "name": "punctuation.definition.variable.end.toml" } }, "match": "(\")((?:[^\"\\\\]|\\\\.)*)(\")" }, { "captures": { "1": { "name": "punctuation.definition.variable.begin.toml" }, "2": { "name": "punctuation.definition.variable.end.toml" } }, "match": "(')[^']*(')" } ] }, "3": { "name": "punctuation.separator.key-value.toml" } }, "comment": "Dotted key", "end": "(?<=\\S)(?<!=)|$", "patterns": [ { "include": "#primatives" } ] } ] }, "primatives": { "patterns": [ { "begin": "\\G\"\"\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.toml" } }, "end": "\"{3,5}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.toml" } }, "name": "string.quoted.triple.double.toml", "patterns": [ { "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", "name": "constant.character.escape.toml" }, { "match": "\\\\[^btnfr\"\\\\\\n]", "name": "invalid.illegal.escape.toml" } ] }, { "begin": "\\G\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.toml" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.toml" } }, "name": "string.quoted.double.toml", "patterns": [ { "match": "\\\\([btnfr\"\\\\]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", "name": "constant.character.escape.toml" }, { "match": "\\\\[^btnfr\"\\\\]", "name": "invalid.illegal.escape.toml" } ] }, { "begin": "\\G'''", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.toml" } }, "end": "'{3,5}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.toml" } }, "name": "string.quoted.triple.single.toml" }, { "begin": "\\G'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.toml" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.toml" } }, "name": "string.quoted.single.toml" }, { "match": "\\G(?x)\n\t\t\t\t\t\t[0-9]{4}\n\t\t\t\t\t\t-\n\t\t\t\t\t\t(0[1-9]|1[012])\n\t\t\t\t\t\t-\n\t\t\t\t\t\t(?!00|3[2-9])[0-3][0-9]\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t[Tt ]\n\t\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t[0-5][0-9]\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\n\t\t\t\t\t\t\t(\\.[0-9]+)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tZ\n\t\t\t\t\t\t\t | [+-](?!2[5-9])[0-2][0-9]:[0-5][0-9]\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t)?\n\t\t\t\t\t", "name": "constant.other.date.toml" }, { "match": "\\G(?x)\n\t\t\t\t\t\t(?!2[5-9])[0-2][0-9]\n\t\t\t\t\t\t:\n\t\t\t\t\t\t[0-5][0-9]\n\t\t\t\t\t\t:\n\t\t\t\t\t\t(?!6[1-9])[0-6][0-9]\n\t\t\t\t\t\t(\\.[0-9]+)?\n\t\t\t\t\t", "name": "constant.other.time.toml" }, { "match": "\\G(true|false)", "name": "constant.language.boolean.toml" }, { "match": "\\G0x\\h(\\h|_\\h)*", "name": "constant.numeric.hex.toml" }, { "match": "\\G0o[0-7]([0-7]|_[0-7])*", "name": "constant.numeric.octal.toml" }, { "match": "\\G0b[01]([01]|_[01])*", "name": "constant.numeric.binary.toml" }, { "match": "\\G[+-]?(inf|nan)", "name": "constant.numeric.toml" }, { "match": "(?x)\n\t\t\t\t\t\t\\G\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [+-]?\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t | ([1-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=[.eE])\n\t\t\t\t\t\t(\n\t\t\t\t\t\t \\.\n\t\t\t\t\t\t ([0-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [eE]\n\t\t\t\t\t\t ([+-]?[0-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t)?\n\t\t\t\t\t", "name": "constant.numeric.float.toml" }, { "match": "(?x)\n\t\t\t\t\t\t\\G\n\t\t\t\t\t\t(\n\t\t\t\t\t\t [+-]?\n\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t | ([1-9](([0-9]|_[0-9])+)?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", "name": "constant.numeric.integer.toml" }, { "begin": "\\G\\[", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.toml" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.toml" } }, "name": "meta.array.toml", "patterns": [ { "begin": "(?=[\"'']|[+-]?[0-9]|[+-]?(inf|nan)|true|false|\\[|\\{)", "end": ",|(?=])", "endCaptures": { "0": { "name": "punctuation.separator.array.toml" } }, "patterns": [ { "include": "#primatives" }, { "include": "#comments" }, { "include": "#invalid" } ] }, { "include": "#comments" }, { "include": "#invalid" } ] }, { "begin": "\\G\\{", "beginCaptures": { "0": { "name": "punctuation.definition.inline-table.begin.toml" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.inline-table.end.toml" } }, "name": "meta.inline-table.toml", "patterns": [ { "begin": "(?=\\S)", "end": ",|(?=})", "endCaptures": { "0": { "name": "punctuation.separator.inline-table.toml" } }, "patterns": [ { "include": "#key_pair" } ] }, { "include": "#comments" } ] } ] } }, "scopeName": "source.toml", "uuid": "7DEF2EDB-5BB7-4DD2-9E78-3541A26B7923" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/tsx.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/0dfae8cc4807fecfbf8f1add095d9817df824c95", "name": "tsx", "scopeName": "source.tsx", "patterns": [ { "include": "#directives" }, { "include": "#statements" }, { "include": "#shebang" } ], "repository": { "shebang": { "name": "comment.line.shebang.tsx", "match": "\\A(#!).*(?=$)", "captures": { "1": { "name": "punctuation.definition.comment.tsx" } } }, "statements": { "patterns": [ { "include": "#declaration" }, { "include": "#control-statement" }, { "include": "#after-operator-block-as-object-literal" }, { "include": "#decl-block" }, { "include": "#label" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" }, { "include": "#string" }, { "include": "#comment" } ] }, "declaration": { "patterns": [ { "include": "#decorator" }, { "include": "#var-expr" }, { "include": "#function-declaration" }, { "include": "#class-declaration" }, { "include": "#interface-declaration" }, { "include": "#enum-declaration" }, { "include": "#namespace-declaration" }, { "include": "#type-alias-declaration" }, { "include": "#import-equals-declaration" }, { "include": "#import-declaration" }, { "include": "#export-declaration" }, { "name": "storage.modifier.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "control-statement": { "patterns": [ { "include": "#switch-statement" }, { "include": "#for-loop" }, { "name": "keyword.control.trycatch.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "captures": { "1": { "name": "keyword.control.loop.tsx" }, "2": { "name": "entity.name.label.tsx" } } }, { "name": "keyword.control.loop.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "0": { "name": "keyword.control.flow.tsx" } }, "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#expression" } ] }, { "name": "keyword.control.switch.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "include": "#if-statement" }, { "name": "keyword.control.conditional.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.with.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.other.debugger.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "label": { "patterns": [ { "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)", "beginCaptures": { "1": { "name": "entity.name.label.tsx" }, "2": { "name": "punctuation.separator.label.tsx" } }, "end": "(?<=\\})", "patterns": [ { "include": "#decl-block" } ] }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)", "captures": { "1": { "name": "entity.name.label.tsx" }, "2": { "name": "punctuation.separator.label.tsx" } } } ] }, "expression": { "patterns": [ { "include": "#expressionWithoutIdentifiers" }, { "include": "#identifiers" }, { "include": "#expressionPunctuations" } ] }, "expressionWithoutIdentifiers": { "patterns": [ { "include": "#jsx" }, { "include": "#string" }, { "include": "#regex" }, { "include": "#comment" }, { "include": "#function-expression" }, { "include": "#class-expression" }, { "include": "#arrow-function" }, { "include": "#paren-expression-possibly-arrow" }, { "include": "#cast" }, { "include": "#ternary-expression" }, { "include": "#new-expr" }, { "include": "#instanceof-expr" }, { "include": "#object-literal" }, { "include": "#expression-operators" }, { "include": "#function-call" }, { "include": "#literal" }, { "include": "#support-objects" }, { "include": "#paren-expression" } ] }, "expressionPunctuations": { "patterns": [ { "include": "#punctuation-comma" }, { "include": "#punctuation-accessor" } ] }, "decorator": { "name": "meta.decorator.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@", "beginCaptures": { "0": { "name": "punctuation.decorator.tsx" } }, "end": "(?=\\s)", "patterns": [ { "include": "#expression" } ] }, "var-expr": { "patterns": [ { "name": "meta.var.expr.tsx", "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))", "patterns": [ { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.type.tsx" } }, "end": "(?=\\S)" }, { "include": "#destructuring-variable" }, { "include": "#var-single-variable" }, { "include": "#variable-initializer" }, { "include": "#comment" }, { "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))", "beginCaptures": { "1": { "name": "punctuation.separator.comma.tsx" } }, "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", "patterns": [ { "include": "#single-line-comment-consuming-line-ending" }, { "include": "#comment" }, { "include": "#destructuring-variable" }, { "include": "#var-single-variable" }, { "include": "#punctuation-comma" } ] }, { "include": "#punctuation-comma" } ] }, { "name": "meta.var.expr.tsx", "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.type.tsx" } }, "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))", "patterns": [ { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.type.tsx" } }, "end": "(?=\\S)" }, { "include": "#destructuring-const" }, { "include": "#var-single-const" }, { "include": "#variable-initializer" }, { "include": "#comment" }, { "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))", "beginCaptures": { "1": { "name": "punctuation.separator.comma.tsx" } }, "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", "patterns": [ { "include": "#single-line-comment-consuming-line-ending" }, { "include": "#comment" }, { "include": "#destructuring-const" }, { "include": "#var-single-const" }, { "include": "#punctuation-comma" } ] }, { "include": "#punctuation-comma" } ] } ] }, "var-single-variable": { "patterns": [ { "name": "meta.var-single-variable.expr.tsx", "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx entity.name.function.tsx" }, "2": { "name": "keyword.operator.definiteassignment.tsx" } }, "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] }, { "name": "meta.var-single-variable.expr.tsx", "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx variable.other.constant.tsx" }, "2": { "name": "keyword.operator.definiteassignment.tsx" } }, "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] }, { "name": "meta.var-single-variable.expr.tsx", "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" }, "2": { "name": "keyword.operator.definiteassignment.tsx" } }, "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] } ] }, "var-single-const": { "patterns": [ { "name": "meta.var-single-variable.expr.tsx", "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx" } }, "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] }, { "name": "meta.var-single-variable.expr.tsx", "begin": "([_$[:alpha:]][_$[:alnum:]]*)", "beginCaptures": { "1": { "name": "meta.definition.variable.tsx variable.other.constant.tsx" } }, "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] } ] }, "var-single-variable-type-annotation": { "patterns": [ { "include": "#type-annotation" }, { "include": "#string" }, { "include": "#comment" } ] }, "destructuring-variable": { "patterns": [ { "name": "meta.object-binding-pattern-variable.tsx", "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#object-binding-pattern" }, { "include": "#type-annotation" }, { "include": "#comment" } ] }, { "name": "meta.array-binding-pattern-variable.tsx", "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#array-binding-pattern" }, { "include": "#type-annotation" }, { "include": "#comment" } ] } ] }, "destructuring-const": { "patterns": [ { "name": "meta.object-binding-pattern-variable.tsx", "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#object-binding-pattern-const" }, { "include": "#type-annotation" }, { "include": "#comment" } ] }, { "name": "meta.array-binding-pattern-variable.tsx", "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#array-binding-pattern-const" }, { "include": "#type-annotation" }, { "include": "#comment" } ] } ] }, "object-binding-element": { "patterns": [ { "include": "#comment" }, { "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(?=,|\\})", "patterns": [ { "include": "#object-binding-element-propertyName" }, { "include": "#binding-element" } ] }, { "include": "#object-binding-pattern" }, { "include": "#destructuring-variable-rest" }, { "include": "#variable-initializer" }, { "include": "#punctuation-comma" } ] }, "object-binding-element-const": { "patterns": [ { "include": "#comment" }, { "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(?=,|\\})", "patterns": [ { "include": "#object-binding-element-propertyName" }, { "include": "#binding-element-const" } ] }, { "include": "#object-binding-pattern-const" }, { "include": "#destructuring-variable-rest-const" }, { "include": "#variable-initializer" }, { "include": "#punctuation-comma" } ] }, "object-binding-element-propertyName": { "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(:)", "endCaptures": { "0": { "name": "punctuation.destructuring.tsx" } }, "patterns": [ { "include": "#string" }, { "include": "#array-literal" }, { "include": "#numeric-literal" }, { "name": "variable.object.property.tsx", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] }, "binding-element": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#numeric-literal" }, { "include": "#regex" }, { "include": "#object-binding-pattern" }, { "include": "#array-binding-pattern" }, { "include": "#destructuring-variable-rest" }, { "include": "#variable-initializer" } ] }, "binding-element-const": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#numeric-literal" }, { "include": "#regex" }, { "include": "#object-binding-pattern-const" }, { "include": "#array-binding-pattern-const" }, { "include": "#destructuring-variable-rest-const" }, { "include": "#variable-initializer" } ] }, "destructuring-variable-rest": { "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" } } }, "destructuring-variable-rest-const": { "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "meta.definition.variable.tsx variable.other.constant.tsx" } } }, "object-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "patterns": [ { "include": "#object-binding-element" } ] }, "object-binding-pattern-const": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "patterns": [ { "include": "#object-binding-element-const" } ] }, "array-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "patterns": [ { "include": "#binding-element" }, { "include": "#punctuation-comma" } ] }, "array-binding-pattern-const": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "patterns": [ { "include": "#binding-element-const" }, { "include": "#punctuation-comma" } ] }, "parameter-name": { "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", "captures": { "1": { "name": "storage.modifier.tsx" } } }, { "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.operator.rest.tsx" }, "3": { "name": "entity.name.function.tsx variable.language.this.tsx" }, "4": { "name": "entity.name.function.tsx" }, "5": { "name": "keyword.operator.optional.tsx" } } }, { "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)", "captures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.operator.rest.tsx" }, "3": { "name": "variable.parameter.tsx variable.language.this.tsx" }, "4": { "name": "variable.parameter.tsx" }, "5": { "name": "keyword.operator.optional.tsx" } } } ] }, "destructuring-parameter": { "patterns": [ { "name": "meta.parameter.object-binding-pattern.tsx", "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "patterns": [ { "include": "#parameter-object-binding-element" } ] }, { "name": "meta.paramter.array-binding-pattern.tsx", "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "patterns": [ { "include": "#parameter-binding-element" }, { "include": "#punctuation-comma" } ] } ] }, "parameter-object-binding-element": { "patterns": [ { "include": "#comment" }, { "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(?=,|\\})", "patterns": [ { "include": "#object-binding-element-propertyName" }, { "include": "#parameter-binding-element" } ] }, { "include": "#parameter-object-binding-pattern" }, { "include": "#destructuring-parameter-rest" }, { "include": "#variable-initializer" }, { "include": "#punctuation-comma" } ] }, "parameter-binding-element": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#numeric-literal" }, { "include": "#regex" }, { "include": "#parameter-object-binding-pattern" }, { "include": "#parameter-array-binding-pattern" }, { "include": "#destructuring-parameter-rest" }, { "include": "#variable-initializer" } ] }, "destructuring-parameter-rest": { "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "variable.parameter.tsx" } } }, "parameter-object-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.tsx" } }, "patterns": [ { "include": "#parameter-object-binding-element" } ] }, "parameter-array-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.rest.tsx" }, "2": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.tsx" } }, "patterns": [ { "include": "#parameter-binding-element" }, { "include": "#punctuation-comma" } ] }, "field-declaration": { "name": "meta.field.declaration.tsx", "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))", "beginCaptures": { "1": { "name": "storage.modifier.tsx" } }, "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})", "patterns": [ { "include": "#variable-initializer" }, { "include": "#type-annotation" }, { "include": "#string" }, { "include": "#array-literal" }, { "include": "#numeric-literal" }, { "include": "#comment" }, { "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "meta.definition.property.tsx entity.name.function.tsx" }, "2": { "name": "keyword.operator.optional.tsx" }, "3": { "name": "keyword.operator.definiteassignment.tsx" } } }, { "name": "meta.definition.property.tsx variable.object.property.tsx", "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*" }, { "name": "keyword.operator.optional.tsx", "match": "\\?" }, { "name": "keyword.operator.definiteassignment.tsx", "match": "\\!" } ] }, "variable-initializer": { "patterns": [ { "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)", "beginCaptures": { "1": { "name": "keyword.operator.assignment.tsx" } }, "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", "patterns": [ { "include": "#expression" } ] }, { "begin": "(?<!=|!)(=)(?!=)", "beginCaptures": { "1": { "name": "keyword.operator.assignment.tsx" } }, "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)", "patterns": [ { "include": "#expression" } ] } ] }, "function-declaration": { "name": "meta.function.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.async.tsx" }, "4": { "name": "storage.type.function.tsx" }, "5": { "name": "keyword.generator.asterisk.tsx" }, "6": { "name": "meta.definition.function.tsx entity.name.function.tsx" } }, "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))|(?<=\\})", "patterns": [ { "include": "#function-name" }, { "include": "#function-body" } ] }, "function-expression": { "name": "meta.function.expression.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" }, "2": { "name": "storage.type.function.tsx" }, "3": { "name": "keyword.generator.asterisk.tsx" }, "4": { "name": "meta.definition.function.tsx entity.name.function.tsx" } }, "end": "(?=;)|(?<=\\})", "patterns": [ { "include": "#function-name" }, { "include": "#single-line-comment-consuming-line-ending" }, { "include": "#function-body" } ] }, "function-name": { "name": "meta.definition.function.tsx entity.name.function.tsx", "match": "[_$[:alpha:]][_$[:alnum:]]*" }, "function-body": { "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" }, { "include": "#function-parameters" }, { "include": "#return-type" }, { "include": "#type-function-return-type" }, { "include": "#decl-block" }, { "name": "keyword.generator.asterisk.tsx", "match": "\\*" } ] }, "method-declaration": { "patterns": [ { "name": "meta.method.declaration.tsx", "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.tsx" }, "4": { "name": "storage.modifier.async.tsx" }, "5": { "name": "storage.type.tsx" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" } ] }, { "name": "meta.method.declaration.tsx", "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.tsx" }, "4": { "name": "storage.modifier.async.tsx" }, "5": { "name": "keyword.operator.new.tsx" }, "6": { "name": "keyword.generator.asterisk.tsx" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" } ] }, { "name": "meta.method.declaration.tsx", "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.tsx" }, "4": { "name": "storage.modifier.async.tsx" }, "5": { "name": "storage.type.property.tsx" }, "6": { "name": "keyword.generator.asterisk.tsx" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" } ] } ] }, "object-literal-method-declaration": { "name": "meta.method.declaration.tsx", "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" }, "2": { "name": "storage.type.property.tsx" }, "3": { "name": "keyword.generator.asterisk.tsx" } }, "end": "(?=\\}|;|,)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" }, { "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" }, "2": { "name": "storage.type.property.tsx" }, "3": { "name": "keyword.generator.asterisk.tsx" } }, "end": "(?=\\(|\\<)", "patterns": [ { "include": "#method-declaration-name" } ] } ] }, "method-declaration-name": { "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])", "end": "(?=\\(|\\<)", "patterns": [ { "include": "#string" }, { "include": "#array-literal" }, { "include": "#numeric-literal" }, { "name": "meta.definition.method.tsx entity.name.function.tsx", "match": "[_$[:alpha:]][_$[:alnum:]]*" }, { "name": "keyword.operator.optional.tsx", "match": "\\?" } ] }, "arrow-function": { "patterns": [ { "name": "meta.arrow.tsx", "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)", "captures": { "1": { "name": "storage.modifier.async.tsx" }, "2": { "name": "variable.parameter.tsx" } } }, { "name": "meta.arrow.tsx", "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" } }, "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))", "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" }, { "include": "#function-parameters" }, { "include": "#arrow-return-type" }, { "include": "#possibly-arrow-return-type" } ] }, { "name": "meta.arrow.tsx", "begin": "=>", "beginCaptures": { "0": { "name": "storage.type.function.arrow.tsx" } }, "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])", "patterns": [ { "include": "#single-line-comment-consuming-line-ending" }, { "include": "#decl-block" }, { "include": "#expression" } ] } ] }, "indexer-declaration": { "name": "meta.indexer.declaration.tsx", "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", "beginCaptures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "meta.brace.square.tsx" }, "3": { "name": "variable.parameter.tsx" } }, "end": "(\\])\\s*(\\?\\s*)?|$", "endCaptures": { "1": { "name": "meta.brace.square.tsx" }, "2": { "name": "keyword.operator.optional.tsx" } }, "patterns": [ { "include": "#type-annotation" } ] }, "indexer-mapped-type-declaration": { "name": "meta.indexer.mappedtype.declaration.tsx", "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+", "beginCaptures": { "1": { "name": "keyword.operator.type.modifier.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "meta.brace.square.tsx" }, "4": { "name": "entity.name.type.tsx" }, "5": { "name": "keyword.operator.expression.in.tsx" } }, "end": "(\\])([+-])?\\s*(\\?\\s*)?|$", "endCaptures": { "1": { "name": "meta.brace.square.tsx" }, "2": { "name": "keyword.operator.type.modifier.tsx" }, "3": { "name": "keyword.operator.optional.tsx" } }, "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", "captures": { "1": { "name": "keyword.control.as.tsx" } } }, { "include": "#type" } ] }, "function-parameters": { "name": "meta.parameters.tsx", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.tsx" } }, "patterns": [ { "include": "#function-parameters-body" } ] }, "function-parameters-body": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#decorator" }, { "include": "#destructuring-parameter" }, { "include": "#parameter-name" }, { "include": "#parameter-type-annotation" }, { "include": "#variable-initializer" }, { "name": "punctuation.separator.parameter.tsx", "match": "," } ] }, "class-declaration": { "name": "meta.class.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.tsx" }, "4": { "name": "storage.type.class.tsx" } }, "end": "(?<=\\})", "patterns": [ { "include": "#class-declaration-or-expression-patterns" } ] }, "class-expression": { "name": "meta.class.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])", "beginCaptures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "storage.type.class.tsx" } }, "end": "(?<=\\})", "patterns": [ { "include": "#class-declaration-or-expression-patterns" } ] }, "class-declaration-or-expression-patterns": { "patterns": [ { "include": "#comment" }, { "include": "#class-or-interface-heritage" }, { "match": "[_$[:alpha:]][_$[:alnum:]]*", "captures": { "0": { "name": "entity.name.type.class.tsx" } } }, { "include": "#type-parameters" }, { "include": "#class-or-interface-body" } ] }, "interface-declaration": { "name": "meta.interface.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.tsx" }, "4": { "name": "storage.type.interface.tsx" } }, "end": "(?<=\\})", "patterns": [ { "include": "#comment" }, { "include": "#class-or-interface-heritage" }, { "match": "[_$[:alpha:]][_$[:alnum:]]*", "captures": { "0": { "name": "entity.name.type.interface.tsx" } } }, { "include": "#type-parameters" }, { "include": "#class-or-interface-body" } ] }, "class-or-interface-heritage": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "storage.modifier.tsx" } }, "end": "(?=\\{)", "patterns": [ { "include": "#comment" }, { "include": "#class-or-interface-heritage" }, { "include": "#type-parameters" }, { "include": "#expressionWithoutIdentifiers" }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)", "captures": { "1": { "name": "entity.name.type.module.tsx" }, "2": { "name": "punctuation.accessor.tsx" }, "3": { "name": "punctuation.accessor.optional.tsx" } } }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "entity.other.inherited-class.tsx" } } }, { "include": "#expressionPunctuations" } ] }, "class-or-interface-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#comment" }, { "include": "#decorator" }, { "begin": "(?<=:)\\s*", "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#expression" } ] }, { "include": "#method-declaration" }, { "include": "#indexer-declaration" }, { "include": "#field-declaration" }, { "include": "#string" }, { "include": "#type-annotation" }, { "include": "#variable-initializer" }, { "include": "#access-modifier" }, { "include": "#property-accessor" }, { "include": "#async-modifier" }, { "include": "#after-operator-block-as-object-literal" }, { "include": "#decl-block" }, { "include": "#expression" }, { "include": "#punctuation-comma" }, { "include": "#punctuation-semicolon" } ] }, "access-modifier": { "name": "storage.modifier.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "property-accessor": { "name": "storage.type.property.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "async-modifier": { "name": "storage.modifier.async.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "enum-declaration": { "name": "meta.enum.declaration.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.modifier.tsx" }, "4": { "name": "storage.type.enum.tsx" }, "5": { "name": "entity.name.type.enum.tsx" } }, "end": "(?<=\\})", "patterns": [ { "include": "#comment" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#comment" }, { "begin": "([_$[:alpha:]][_$[:alnum:]]*)", "beginCaptures": { "0": { "name": "variable.other.enummember.tsx" } }, "end": "(?=,|\\}|$)", "patterns": [ { "include": "#comment" }, { "include": "#variable-initializer" } ] }, { "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))", "end": "(?=,|\\}|$)", "patterns": [ { "include": "#string" }, { "include": "#array-literal" }, { "include": "#comment" }, { "include": "#variable-initializer" } ] }, { "include": "#punctuation-comma" } ] } ] }, "namespace-declaration": { "name": "meta.namespace.declaration.tsx", "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.type.namespace.tsx" } }, "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "name": "entity.name.type.module.tsx", "match": "([_$[:alpha:]][_$[:alnum:]]*)" }, { "include": "#punctuation-accessor" }, { "include": "#decl-block" } ] }, "type-alias-declaration": { "name": "meta.type.declaration.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "storage.type.type.tsx" }, "4": { "name": "entity.name.type.alias.tsx" } }, "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" }, { "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.operator.assignment.tsx" }, "2": { "name": "keyword.control.intrinsic.tsx" } }, "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#type" } ] }, { "begin": "(=)\\s*", "beginCaptures": { "1": { "name": "keyword.operator.assignment.tsx" } }, "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#type" } ] } ] }, "import-equals-declaration": { "patterns": [ { "name": "meta.import-equals.external.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "keyword.control.import.tsx" }, "4": { "name": "keyword.control.type.tsx" }, "5": { "name": "variable.other.readwrite.alias.tsx" }, "6": { "name": "keyword.operator.assignment.tsx" }, "7": { "name": "keyword.control.require.tsx" }, "8": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#comment" }, { "include": "#string" } ] }, { "name": "meta.import-equals.internal.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "keyword.control.import.tsx" }, "4": { "name": "keyword.control.type.tsx" }, "5": { "name": "variable.other.readwrite.alias.tsx" }, "6": { "name": "keyword.operator.assignment.tsx" } }, "end": "(?=;|$|^)", "patterns": [ { "include": "#single-line-comment-consuming-line-ending" }, { "include": "#comment" }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", "captures": { "1": { "name": "entity.name.type.module.tsx" }, "2": { "name": "punctuation.accessor.tsx" }, "3": { "name": "punctuation.accessor.optional.tsx" } } }, { "name": "variable.other.readwrite.tsx", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] } ] }, "import-declaration": { "name": "meta.import.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "storage.modifier.tsx" }, "3": { "name": "keyword.control.import.tsx" }, "4": { "name": "keyword.control.type.tsx" } }, "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)", "patterns": [ { "include": "#single-line-comment-consuming-line-ending" }, { "include": "#comment" }, { "include": "#string" }, { "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])", "end": "\\bfrom\\b", "endCaptures": { "0": { "name": "keyword.control.from.tsx" } }, "patterns": [ { "include": "#import-export-declaration" } ] }, { "include": "#import-export-declaration" } ] }, "export-declaration": { "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "keyword.control.as.tsx" }, "3": { "name": "storage.type.namespace.tsx" }, "4": { "name": "entity.name.type.module.tsx" } } }, { "name": "meta.export.default.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "keyword.control.type.tsx" }, "3": { "name": "keyword.operator.assignment.tsx" }, "4": { "name": "keyword.control.default.tsx" } }, "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#interface-declaration" }, { "include": "#expression" } ] }, { "name": "meta.export.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b)))", "beginCaptures": { "1": { "name": "keyword.control.export.tsx" }, "2": { "name": "keyword.control.type.tsx" } }, "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#import-export-declaration" } ] } ] }, "import-export-declaration": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#import-export-block" }, { "name": "keyword.control.from.tsx", "match": "\\bfrom\\b" }, { "include": "#import-export-assert-clause" }, { "include": "#import-export-clause" } ] }, "import-export-assert-clause": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)", "beginCaptures": { "1": { "name": "keyword.control.assert.tsx" }, "2": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "name": "meta.object-literal.key.tsx", "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)" }, { "name": "punctuation.separator.key-value.tsx", "match": ":" } ] }, "import-export-block": { "name": "meta.block.tsx", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#import-export-clause" } ] }, "import-export-clause": { "patterns": [ { "include": "#comment" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))", "captures": { "1": { "name": "keyword.control.type.tsx" }, "2": { "name": "keyword.control.default.tsx" }, "3": { "name": "constant.language.import-export-all.tsx" }, "4": { "name": "variable.other.readwrite.tsx" }, "5": { "name": "keyword.control.as.tsx" }, "6": { "name": "keyword.control.default.tsx" }, "7": { "name": "variable.other.readwrite.alias.tsx" } } }, { "include": "#punctuation-comma" }, { "name": "constant.language.import-export-all.tsx", "match": "\\*" }, { "name": "keyword.control.default.tsx", "match": "\\b(default)\\b" }, { "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.control.type.tsx" }, "2": { "name": "variable.other.readwrite.alias.tsx" } } } ] }, "switch-statement": { "name": "switch-statement.expr.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#comment" }, { "name": "switch-expression.expr.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.switch.tsx" }, "2": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression" } ] }, { "name": "switch-block.expr.tsx", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "(?=\\})", "patterns": [ { "name": "case-clause.expr.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.control.switch.tsx" } }, "end": "(?=:)", "patterns": [ { "include": "#expression" } ] }, { "begin": "(:)\\s*(\\{)", "beginCaptures": { "1": { "name": "case-clause.expr.tsx punctuation.definition.section.case-statement.tsx" }, "2": { "name": "meta.block.tsx punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "meta.block.tsx punctuation.definition.block.tsx" } }, "contentName": "meta.block.tsx", "patterns": [ { "include": "#statements" } ] }, { "match": "(:)", "captures": { "0": { "name": "case-clause.expr.tsx punctuation.definition.section.case-statement.tsx" } } }, { "include": "#statements" } ] } ] }, "for-loop": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())", "beginCaptures": { "0": { "name": "keyword.control.loop.tsx" } }, "end": "(?<=\\))", "patterns": [ { "include": "#comment" }, { "name": "keyword.control.loop.tsx", "match": "await" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#var-expr" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" } ] } ] }, "if-statement": { "patterns": [ { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))", "end": "(?=;|$|\\})", "patterns": [ { "include": "#comment" }, { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.conditional.tsx" }, "2": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression" } ] }, { "name": "string.regexp.tsx", "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tsx" } }, "end": "(/)([dgimsuy]*)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tsx" }, "2": { "name": "keyword.other.tsx" } }, "patterns": [ { "include": "#regexp" } ] }, { "include": "#statements" } ] } ] }, "decl-block": { "name": "meta.block.tsx", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#statements" } ] }, "after-operator-block-as-object-literal": { "name": "meta.objectliteral.tsx", "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#object-member" } ] }, "object-literal": { "name": "meta.objectliteral.tsx", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#object-member" } ] }, "object-member": { "patterns": [ { "include": "#comment" }, { "include": "#object-literal-method-declaration" }, { "name": "meta.object.member.tsx meta.object-literal.key.tsx", "begin": "(?=\\[)", "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", "patterns": [ { "include": "#comment" }, { "include": "#array-literal" } ] }, { "name": "meta.object.member.tsx meta.object-literal.key.tsx", "begin": "(?=[\\'\\\"\\`])", "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as)\\s+))))", "patterns": [ { "include": "#comment" }, { "include": "#string" } ] }, { "name": "meta.object.member.tsx meta.object-literal.key.tsx", "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))", "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as\\s+))", "patterns": [ { "include": "#comment" }, { "include": "#numeric-literal" } ] }, { "name": "meta.method.declaration.tsx", "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])", "end": "(?=\\}|;|,)|(?<=\\})", "patterns": [ { "include": "#function-body" } ] }, { "name": "meta.object.member.tsx", "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", "captures": { "0": { "name": "meta.object-literal.key.tsx" }, "1": { "name": "constant.numeric.decimal.tsx" } } }, { "name": "meta.object.member.tsx", "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.tsx" }, "1": { "name": "entity.name.function.tsx" } } }, { "name": "meta.object.member.tsx", "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", "captures": { "0": { "name": "meta.object-literal.key.tsx" } } }, { "name": "meta.object.member.tsx", "begin": "\\.\\.\\.", "beginCaptures": { "0": { "name": "keyword.operator.spread.tsx" } }, "end": "(?=,|\\})", "patterns": [ { "include": "#expression" } ] }, { "name": "meta.object.member.tsx", "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", "captures": { "1": { "name": "variable.other.readwrite.tsx" } } }, { "name": "meta.object.member.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))", "captures": { "1": { "name": "keyword.control.as.tsx" }, "2": { "name": "storage.modifier.tsx" } } }, { "name": "meta.object.member.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", "beginCaptures": { "1": { "name": "keyword.control.as.tsx" } }, "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))", "patterns": [ { "include": "#type" } ] }, { "name": "meta.object.member.tsx", "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)", "end": "(?=,|\\}|$|\\/\\/|\\/\\*)", "patterns": [ { "include": "#expression" } ] }, { "name": "meta.object.member.tsx", "begin": ":", "beginCaptures": { "0": { "name": "meta.object-literal.key.tsx punctuation.separator.key-value.tsx" } }, "end": "(?=,|\\})", "patterns": [ { "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" } }, "end": "(?<=\\))", "patterns": [ { "include": "#type-parameters" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression-inside-possibly-arrow-parens" } ] } ] }, { "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" }, "2": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression-inside-possibly-arrow-parens" } ] }, { "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" } }, "end": "(?<=\\>)", "patterns": [ { "include": "#type-parameters" } ] }, { "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", "beginCaptures": { "1": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression-inside-possibly-arrow-parens" } ] }, { "include": "#possibly-arrow-return-type" }, { "include": "#expression" } ] }, { "include": "#punctuation-comma" } ] }, "ternary-expression": { "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", "beginCaptures": { "1": { "name": "keyword.operator.ternary.tsx" } }, "end": "\\s*(:)", "endCaptures": { "1": { "name": "keyword.operator.ternary.tsx" } }, "patterns": [ { "include": "#expression" } ] }, "function-call": { "patterns": [ { "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", "patterns": [ { "name": "meta.function-call.tsx", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", "patterns": [ { "include": "#function-call-target" } ] }, { "include": "#comment" }, { "include": "#function-call-optionals" }, { "include": "#type-arguments" }, { "include": "#paren-expression" } ] }, { "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", "patterns": [ { "name": "meta.function-call.tsx", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))", "patterns": [ { "include": "#function-call-target" } ] }, { "include": "#comment" }, { "include": "#function-call-optionals" }, { "include": "#type-arguments" } ] } ] }, "function-call-target": { "patterns": [ { "include": "#support-function-call-identifiers" }, { "name": "entity.name.function.tsx", "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)" } ] }, "function-call-optionals": { "patterns": [ { "name": "meta.function-call.tsx punctuation.accessor.optional.tsx", "match": "\\?\\." }, { "name": "meta.function-call.tsx keyword.operator.definiteassignment.tsx", "match": "\\!" } ] }, "support-function-call-identifiers": { "patterns": [ { "include": "#literal" }, { "include": "#support-objects" }, { "include": "#object-identifiers" }, { "include": "#punctuation-accessor" }, { "name": "keyword.operator.expression.import.tsx", "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))" } ] }, "new-expr": { "name": "new.expr.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.operator.new.tsx" } }, "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", "patterns": [ { "include": "#expression" } ] }, "instanceof-expr": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.operator.expression.instanceof.tsx" } }, "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", "patterns": [ { "include": "#type" } ] }, "paren-expression-possibly-arrow": { "patterns": [ { "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" } }, "end": "(?<=\\))", "patterns": [ { "include": "#paren-expression-possibly-arrow-with-typeparameters" } ] }, { "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<))\\s*$)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" } }, "end": "(?<=\\))", "patterns": [ { "include": "#paren-expression-possibly-arrow-with-typeparameters" } ] }, { "include": "#possibly-arrow-return-type" } ] }, "paren-expression-possibly-arrow-with-typeparameters": { "patterns": [ { "include": "#type-parameters" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression-inside-possibly-arrow-parens" } ] } ] }, "expression-inside-possibly-arrow-parens": { "patterns": [ { "include": "#expressionWithoutIdentifiers" }, { "include": "#comment" }, { "include": "#string" }, { "include": "#decorator" }, { "include": "#destructuring-parameter" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", "captures": { "1": { "name": "storage.modifier.tsx" } } }, { "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.operator.rest.tsx" }, "3": { "name": "entity.name.function.tsx variable.language.this.tsx" }, "4": { "name": "entity.name.function.tsx" }, "5": { "name": "keyword.operator.optional.tsx" } } }, { "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)", "captures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.operator.rest.tsx" }, "3": { "name": "variable.parameter.tsx variable.language.this.tsx" }, "4": { "name": "variable.parameter.tsx" }, "5": { "name": "keyword.operator.optional.tsx" } } }, { "include": "#type-annotation" }, { "include": "#variable-initializer" }, { "name": "punctuation.separator.parameter.tsx", "match": "," }, { "include": "#identifiers" }, { "include": "#expressionPunctuations" } ] }, "paren-expression": { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "include": "#expression" } ] }, "cast": { "patterns": [ { "include": "#jsx" } ] }, "expression-operators": { "patterns": [ { "name": "keyword.control.flow.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)", "beginCaptures": { "1": { "name": "keyword.control.flow.tsx" } }, "end": "\\*", "endCaptures": { "0": { "name": "keyword.generator.asterisk.tsx" } }, "patterns": [ { "include": "#comment" } ] }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?", "captures": { "1": { "name": "keyword.control.flow.tsx" }, "2": { "name": "keyword.generator.asterisk.tsx" } } }, { "name": "keyword.operator.expression.delete.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.expression.in.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" }, { "name": "keyword.operator.expression.of.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" }, { "name": "keyword.operator.expression.instanceof.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.new.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "include": "#typeof-operator" }, { "name": "keyword.operator.expression.void.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))", "captures": { "1": { "name": "keyword.control.as.tsx" }, "2": { "name": "storage.modifier.tsx" } } }, { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", "beginCaptures": { "1": { "name": "keyword.control.as.tsx" } }, "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+)|(\\s+\\<))", "patterns": [ { "include": "#type" } ] }, { "name": "keyword.operator.spread.tsx", "match": "\\.\\.\\." }, { "name": "keyword.operator.assignment.compound.tsx", "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=" }, { "name": "keyword.operator.assignment.compound.bitwise.tsx", "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|=" }, { "name": "keyword.operator.bitwise.shift.tsx", "match": "<<|>>>|>>" }, { "name": "keyword.operator.comparison.tsx", "match": "===|!==|==|!=" }, { "name": "keyword.operator.relational.tsx", "match": "<=|>=|<>|<|>" }, { "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", "captures": { "1": { "name": "keyword.operator.logical.tsx" }, "2": { "name": "keyword.operator.assignment.compound.tsx" }, "3": { "name": "keyword.operator.arithmetic.tsx" } } }, { "name": "keyword.operator.logical.tsx", "match": "\\!|&&|\\|\\||\\?\\?" }, { "name": "keyword.operator.bitwise.tsx", "match": "\\&|~|\\^|\\|" }, { "name": "keyword.operator.assignment.tsx", "match": "\\=" }, { "name": "keyword.operator.decrement.tsx", "match": "--" }, { "name": "keyword.operator.increment.tsx", "match": "\\+\\+" }, { "name": "keyword.operator.arithmetic.tsx", "match": "%|\\*|/|-|\\+" }, { "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))", "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))", "endCaptures": { "1": { "name": "keyword.operator.assignment.compound.tsx" }, "2": { "name": "keyword.operator.arithmetic.tsx" } }, "patterns": [ { "include": "#comment" } ] }, { "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))", "captures": { "1": { "name": "keyword.operator.assignment.compound.tsx" }, "2": { "name": "keyword.operator.arithmetic.tsx" } } } ] }, "typeof-operator": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "0": { "name": "keyword.operator.expression.typeof.tsx" } }, "end": "(?=[,);}\\]=>:&|{\\?]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\\b))", "patterns": [ { "include": "#expression" } ] }, "literal": { "patterns": [ { "include": "#numeric-literal" }, { "include": "#boolean-literal" }, { "include": "#null-literal" }, { "include": "#undefined-literal" }, { "include": "#numericConstant-literal" }, { "include": "#array-literal" }, { "include": "#this-literal" }, { "include": "#super-literal" } ] }, "array-literal": { "name": "meta.array.literal.tsx", "begin": "\\s*(\\[)", "beginCaptures": { "1": { "name": "meta.brace.square.tsx" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.tsx" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "numeric-literal": { "patterns": [ { "name": "constant.numeric.hex.tsx", "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)", "captures": { "1": { "name": "storage.type.numeric.bigint.tsx" } } }, { "name": "constant.numeric.binary.tsx", "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)", "captures": { "1": { "name": "storage.type.numeric.bigint.tsx" } } }, { "name": "constant.numeric.octal.tsx", "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)", "captures": { "1": { "name": "storage.type.numeric.bigint.tsx" } } }, { "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)", "captures": { "0": { "name": "constant.numeric.decimal.tsx" }, "1": { "name": "meta.delimiter.decimal.period.tsx" }, "2": { "name": "storage.type.numeric.bigint.tsx" }, "3": { "name": "meta.delimiter.decimal.period.tsx" }, "4": { "name": "storage.type.numeric.bigint.tsx" }, "5": { "name": "meta.delimiter.decimal.period.tsx" }, "6": { "name": "storage.type.numeric.bigint.tsx" }, "7": { "name": "storage.type.numeric.bigint.tsx" }, "8": { "name": "meta.delimiter.decimal.period.tsx" }, "9": { "name": "storage.type.numeric.bigint.tsx" }, "10": { "name": "meta.delimiter.decimal.period.tsx" }, "11": { "name": "storage.type.numeric.bigint.tsx" }, "12": { "name": "meta.delimiter.decimal.period.tsx" }, "13": { "name": "storage.type.numeric.bigint.tsx" }, "14": { "name": "storage.type.numeric.bigint.tsx" } } } ] }, "boolean-literal": { "patterns": [ { "name": "constant.language.boolean.true.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "constant.language.boolean.false.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "null-literal": { "name": "constant.language.null.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "this-literal": { "name": "variable.language.this.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)" }, "super-literal": { "name": "variable.language.super.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)" }, "undefined-literal": { "name": "constant.language.undefined.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "numericConstant-literal": { "patterns": [ { "name": "constant.language.nan.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "constant.language.infinity.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "support-objects": { "patterns": [ { "name": "variable.language.arguments.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)" }, { "name": "support.class.promise.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)", "captures": { "1": { "name": "keyword.control.import.tsx" }, "2": { "name": "punctuation.accessor.tsx" }, "3": { "name": "punctuation.accessor.optional.tsx" }, "4": { "name": "support.variable.property.importmeta.tsx" } } }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)", "captures": { "1": { "name": "keyword.operator.new.tsx" }, "2": { "name": "punctuation.accessor.tsx" }, "3": { "name": "punctuation.accessor.optional.tsx" }, "4": { "name": "support.variable.property.target.tsx" } } }, { "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", "captures": { "1": { "name": "punctuation.accessor.tsx" }, "2": { "name": "punctuation.accessor.optional.tsx" }, "3": { "name": "support.variable.property.tsx" }, "4": { "name": "support.constant.tsx" } } }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)", "captures": { "1": { "name": "support.type.object.module.tsx" }, "2": { "name": "support.type.object.module.tsx" }, "3": { "name": "punctuation.accessor.tsx" }, "4": { "name": "punctuation.accessor.optional.tsx" }, "5": { "name": "support.type.object.module.tsx" } } } ] }, "identifiers": { "patterns": [ { "include": "#object-identifiers" }, { "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.tsx" }, "2": { "name": "punctuation.accessor.optional.tsx" }, "3": { "name": "entity.name.function.tsx" } } }, { "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", "captures": { "1": { "name": "punctuation.accessor.tsx" }, "2": { "name": "punctuation.accessor.optional.tsx" }, "3": { "name": "variable.other.constant.property.tsx" } } }, { "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.tsx" }, "2": { "name": "punctuation.accessor.optional.tsx" }, "3": { "name": "variable.other.property.tsx" } } }, { "name": "variable.other.constant.tsx", "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" }, { "name": "variable.other.readwrite.tsx", "match": "[_$[:alpha:]][_$[:alnum:]]*" } ] }, "object-identifiers": { "patterns": [ { "name": "support.class.tsx", "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" }, { "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.tsx" }, "2": { "name": "punctuation.accessor.optional.tsx" }, "3": { "name": "variable.other.constant.object.property.tsx" }, "4": { "name": "variable.other.object.property.tsx" } } }, { "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "variable.other.constant.object.tsx" }, "2": { "name": "variable.other.object.tsx" } } } ] }, "type-annotation": { "patterns": [ { "name": "meta.type.annotation.tsx", "begin": "(:)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.tsx" } }, "end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", "patterns": [ { "include": "#type" } ] }, { "name": "meta.type.annotation.tsx", "begin": "(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.tsx" } }, "end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", "patterns": [ { "include": "#type" } ] } ] }, "parameter-type-annotation": { "patterns": [ { "name": "meta.type.annotation.tsx", "begin": "(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.tsx" } }, "end": "(?=[,)])|(?==[^>])", "patterns": [ { "include": "#type" } ] } ] }, "return-type": { "patterns": [ { "name": "meta.return.type.tsx", "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.tsx" } }, "end": "(?<![:|&])(?=$|^|[{};,]|//)", "patterns": [ { "include": "#return-type-core" } ] }, { "name": "meta.return.type.tsx", "begin": "(?<=\\))\\s*(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.tsx" } }, "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", "patterns": [ { "include": "#return-type-core" } ] } ] }, "return-type-core": { "patterns": [ { "include": "#comment" }, { "begin": "(?<=[:|&])(?=\\s*\\{)", "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "include": "#type-predicate-operator" }, { "include": "#type" } ] }, "arrow-return-type": { "name": "meta.return.type.arrow.tsx", "begin": "(?<=\\))\\s*(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.tsx" } }, "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))", "patterns": [ { "include": "#arrow-return-type-body" } ] }, "possibly-arrow-return-type": { "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", "beginCaptures": { "1": { "name": "meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx" } }, "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))", "contentName": "meta.arrow.tsx meta.return.type.arrow.tsx", "patterns": [ { "include": "#arrow-return-type-body" } ] }, "arrow-return-type-body": { "patterns": [ { "begin": "(?<=[:])(?=\\s*\\{)", "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "include": "#type-predicate-operator" }, { "include": "#type" } ] }, "type-parameters": { "name": "meta.type.parameters.tsx", "begin": "(<)", "beginCaptures": { "1": { "name": "punctuation.definition.typeparameters.begin.tsx" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.tsx" } }, "patterns": [ { "include": "#comment" }, { "name": "storage.modifier.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "include": "#type" }, { "include": "#punctuation-comma" }, { "name": "keyword.operator.assignment.tsx", "match": "(=)(?!>)" } ] }, "type-arguments": { "name": "meta.type.parameters.tsx", "begin": "\\<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.tsx" } }, "end": "\\>", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.tsx" } }, "patterns": [ { "include": "#type-arguments-body" } ] }, "type-arguments-body": { "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "captures": { "0": { "name": "keyword.operator.type.tsx" } } }, { "include": "#type" }, { "include": "#punctuation-comma" } ] }, "type": { "patterns": [ { "include": "#comment" }, { "include": "#type-string" }, { "include": "#numeric-literal" }, { "include": "#type-primitive" }, { "include": "#type-builtin-literals" }, { "include": "#type-parameters" }, { "include": "#type-tuple" }, { "include": "#type-object" }, { "include": "#type-operators" }, { "include": "#type-conditional" }, { "include": "#type-fn-type-parameters" }, { "include": "#type-paren-or-function-parameters" }, { "include": "#type-function-return-type" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", "captures": { "1": { "name": "storage.modifier.tsx" } } }, { "include": "#type-name" } ] }, "type-primitive": { "name": "support.type.primitive.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "type-builtin-literals": { "name": "support.type.builtin.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "type-tuple": { "name": "meta.type.tuple.tsx", "begin": "\\[", "beginCaptures": { "0": { "name": "meta.brace.square.tsx" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.tsx" } }, "patterns": [ { "name": "keyword.operator.rest.tsx", "match": "\\.\\.\\." }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)", "captures": { "1": { "name": "entity.name.label.tsx" }, "2": { "name": "keyword.operator.optional.tsx" }, "3": { "name": "punctuation.separator.label.tsx" } } }, { "include": "#type" }, { "include": "#punctuation-comma" } ] }, "type-object": { "name": "meta.object.type.tsx", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.tsx" } }, "patterns": [ { "include": "#comment" }, { "include": "#method-declaration" }, { "include": "#indexer-declaration" }, { "include": "#indexer-mapped-type-declaration" }, { "include": "#field-declaration" }, { "include": "#type-annotation" }, { "begin": "\\.\\.\\.", "beginCaptures": { "0": { "name": "keyword.operator.spread.tsx" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#type" } ] }, { "include": "#punctuation-comma" }, { "include": "#punctuation-semicolon" }, { "include": "#type" } ] }, "type-conditional": { "patterns": [ { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.tsx" } }, "end": "(?<=:)", "patterns": [ { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.ternary.tsx" } }, "end": ":", "endCaptures": { "0": { "name": "keyword.operator.ternary.tsx" } }, "patterns": [ { "include": "#type" } ] }, { "include": "#type" } ] } ] }, "type-paren-or-function-parameters": { "name": "meta.type.paren.cover.tsx", "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.tsx" } }, "patterns": [ { "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))", "captures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.operator.rest.tsx" }, "3": { "name": "entity.name.function.tsx variable.language.this.tsx" }, "4": { "name": "entity.name.function.tsx" }, "5": { "name": "keyword.operator.optional.tsx" } } }, { "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)", "captures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.operator.rest.tsx" }, "3": { "name": "variable.parameter.tsx variable.language.this.tsx" }, "4": { "name": "variable.parameter.tsx" }, "5": { "name": "keyword.operator.optional.tsx" } } }, { "include": "#type-annotation" }, { "name": "punctuation.separator.parameter.tsx", "match": "," }, { "include": "#type" } ] }, "type-fn-type-parameters": { "patterns": [ { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)", "beginCaptures": { "1": { "name": "meta.type.constructor.tsx storage.modifier.tsx" }, "2": { "name": "meta.type.constructor.tsx keyword.control.new.tsx" } }, "end": "(?<=>)", "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" } ] }, { "name": "meta.type.constructor.tsx", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()", "beginCaptures": { "1": { "name": "storage.modifier.tsx" }, "2": { "name": "keyword.control.new.tsx" } }, "end": "(?<=\\))", "patterns": [ { "include": "#function-parameters" } ] }, { "name": "meta.type.function.tsx", "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)", "end": "(?<=\\))", "patterns": [ { "include": "#function-parameters" } ] } ] }, "type-function-return-type": { "patterns": [ { "name": "meta.type.function.return.tsx", "begin": "(=>)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "storage.type.function.arrow.tsx" } }, "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)", "patterns": [ { "include": "#type-function-return-type-core" } ] }, { "name": "meta.type.function.return.tsx", "begin": "=>", "beginCaptures": { "0": { "name": "storage.type.function.arrow.tsx" } }, "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", "patterns": [ { "include": "#type-function-return-type-core" } ] } ] }, "type-function-return-type-core": { "patterns": [ { "include": "#comment" }, { "begin": "(?<==>)(?=\\s*\\{)", "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "include": "#type-predicate-operator" }, { "include": "#type" } ] }, "type-operators": { "patterns": [ { "include": "#typeof-operator" }, { "include": "#type-infer" }, { "begin": "([&|])(?=\\s*\\{)", "beginCaptures": { "0": { "name": "keyword.operator.type.tsx" } }, "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "begin": "[&|]", "beginCaptures": { "0": { "name": "keyword.operator.type.tsx" } }, "end": "(?=\\S)" }, { "name": "keyword.operator.expression.keyof.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.ternary.tsx", "match": "(\\?|\\:)" }, { "name": "keyword.operator.expression.import.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()" } ] }, "type-infer": { "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?", "name": "meta.type.infer.tsx", "captures": { "1": { "name": "keyword.operator.expression.infer.tsx" }, "2": { "name": "entity.name.type.tsx" }, "3": { "name": "keyword.operator.expression.extends.tsx" } } } ] }, "type-predicate-operator": { "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "captures": { "1": { "name": "keyword.operator.type.asserts.tsx" }, "2": { "name": "variable.parameter.tsx variable.language.this.tsx" }, "3": { "name": "variable.parameter.tsx" }, "4": { "name": "keyword.operator.expression.is.tsx" } } }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "captures": { "1": { "name": "keyword.operator.type.asserts.tsx" }, "2": { "name": "variable.parameter.tsx variable.language.this.tsx" }, "3": { "name": "variable.parameter.tsx" } } }, { "name": "keyword.operator.type.asserts.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.expression.is.tsx", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "type-name": { "patterns": [ { "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)", "captures": { "1": { "name": "entity.name.type.module.tsx" }, "2": { "name": "punctuation.accessor.tsx" }, "3": { "name": "punctuation.accessor.optional.tsx" }, "4": { "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx" } }, "end": "(>)", "endCaptures": { "1": { "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx" } }, "contentName": "meta.type.parameters.tsx", "patterns": [ { "include": "#type-arguments-body" } ] }, { "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)", "beginCaptures": { "1": { "name": "entity.name.type.tsx" }, "2": { "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.begin.tsx" } }, "end": "(>)", "endCaptures": { "1": { "name": "meta.type.parameters.tsx punctuation.definition.typeparameters.end.tsx" } }, "contentName": "meta.type.parameters.tsx", "patterns": [ { "include": "#type-arguments-body" } ] }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", "captures": { "1": { "name": "entity.name.type.module.tsx" }, "2": { "name": "punctuation.accessor.tsx" }, "3": { "name": "punctuation.accessor.optional.tsx" } } }, { "name": "entity.name.type.tsx", "match": "[_$[:alpha:]][_$[:alnum:]]*" } ] }, "punctuation-comma": { "name": "punctuation.separator.comma.tsx", "match": "," }, "punctuation-semicolon": { "name": "punctuation.terminator.statement.tsx", "match": ";" }, "punctuation-accessor": { "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", "captures": { "1": { "name": "punctuation.accessor.tsx" }, "2": { "name": "punctuation.accessor.optional.tsx" } } }, "string": { "patterns": [ { "include": "#qstring-single" }, { "include": "#qstring-double" }, { "include": "#template" } ] }, "qstring-double": { "name": "string.quoted.double.tsx", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tsx" } }, "end": "(\")|((?:[^\\\\\\n])$)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tsx" }, "2": { "name": "invalid.illegal.newline.tsx" } }, "patterns": [ { "include": "#string-character-escape" } ] }, "qstring-single": { "name": "string.quoted.single.tsx", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tsx" } }, "end": "(\\')|((?:[^\\\\\\n])$)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tsx" }, "2": { "name": "invalid.illegal.newline.tsx" } }, "patterns": [ { "include": "#string-character-escape" } ] }, "string-character-escape": { "name": "constant.character.escape.tsx", "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" }, "template": { "patterns": [ { "include": "#template-call" }, { "name": "string.template.tsx", "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", "beginCaptures": { "1": { "name": "entity.name.function.tagged-template.tsx" }, "2": { "name": "punctuation.definition.string.template.begin.tsx" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.template.end.tsx" } }, "patterns": [ { "include": "#template-substitution-element" }, { "include": "#string-character-escape" } ] } ] }, "template-call": { "patterns": [ { "name": "string.template.tsx", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", "end": "(?=`)", "patterns": [ { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", "patterns": [ { "include": "#support-function-call-identifiers" }, { "name": "entity.name.function.tagged-template.tsx", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] }, { "include": "#type-arguments" } ] }, { "name": "string.template.tsx", "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)", "beginCaptures": { "1": { "name": "entity.name.function.tagged-template.tsx" } }, "end": "(?=`)", "patterns": [ { "include": "#type-arguments" } ] } ] }, "template-substitution-element": { "name": "meta.template.expression.tsx", "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.tsx" } }, "patterns": [ { "include": "#expression" } ], "contentName": "meta.embedded.line.tsx" }, "type-string": { "patterns": [ { "include": "#qstring-single" }, { "include": "#qstring-double" }, { "include": "#template-type" } ] }, "template-type": { "patterns": [ { "include": "#template-call" }, { "name": "string.template.tsx", "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", "beginCaptures": { "1": { "name": "entity.name.function.tagged-template.tsx" }, "2": { "name": "punctuation.definition.string.template.begin.tsx" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.template.end.tsx" } }, "patterns": [ { "include": "#template-type-substitution-element" }, { "include": "#string-character-escape" } ] } ] }, "template-type-substitution-element": { "name": "meta.template.expression.tsx", "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.tsx" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.tsx" } }, "patterns": [ { "include": "#type" } ], "contentName": "meta.embedded.line.tsx" }, "regex": { "patterns": [ { "name": "string.regexp.tsx", "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.tsx" } }, "end": "(/)([dgimsuy]*)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tsx" }, "2": { "name": "keyword.other.tsx" } }, "patterns": [ { "include": "#regexp" } ] }, { "name": "string.regexp.tsx", "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tsx" } }, "end": "(/)([dgimsuy]*)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tsx" }, "2": { "name": "keyword.other.tsx" } }, "patterns": [ { "include": "#regexp" } ] } ] }, "regexp": { "patterns": [ { "name": "keyword.control.anchor.regexp", "match": "\\\\[bB]|\\^|\\$" }, { "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>", "captures": { "0": { "name": "keyword.other.back-reference.regexp" }, "1": { "name": "variable.other.regexp" } } }, { "name": "keyword.operator.quantifier.regexp", "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" }, { "name": "keyword.operator.or.regexp", "match": "\\|" }, { "name": "meta.group.assertion.regexp", "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))", "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "2": { "name": "punctuation.definition.group.assertion.regexp" }, "3": { "name": "meta.assertion.look-ahead.regexp" }, "4": { "name": "meta.assertion.negative-look-ahead.regexp" }, "5": { "name": "meta.assertion.look-behind.regexp" }, "6": { "name": "meta.assertion.negative-look-behind.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } }, "patterns": [ { "include": "#regexp" } ] }, { "name": "meta.group.regexp", "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?", "beginCaptures": { "0": { "name": "punctuation.definition.group.regexp" }, "1": { "name": "punctuation.definition.group.no-capture.regexp" }, "2": { "name": "variable.other.regexp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.regexp" } }, "patterns": [ { "include": "#regexp" } ] }, { "name": "constant.other.character-class.set.regexp", "begin": "(\\[)(\\^)?", "beginCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" }, "2": { "name": "keyword.operator.negation.regexp" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" } }, "patterns": [ { "name": "constant.other.character-class.range.regexp", "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", "captures": { "1": { "name": "constant.character.numeric.regexp" }, "2": { "name": "constant.character.control.regexp" }, "3": { "name": "constant.character.escape.backslash.regexp" }, "4": { "name": "constant.character.numeric.regexp" }, "5": { "name": "constant.character.control.regexp" }, "6": { "name": "constant.character.escape.backslash.regexp" } } }, { "include": "#regex-character-class" } ] }, { "include": "#regex-character-class" } ] }, "regex-character-class": { "patterns": [ { "name": "constant.other.character-class.regexp", "match": "\\\\[wWsSdDtrnvf]|\\." }, { "name": "constant.character.numeric.regexp", "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" }, { "name": "constant.character.control.regexp", "match": "\\\\c[A-Z]" }, { "name": "constant.character.escape.backslash.regexp", "match": "\\\\." } ] }, "comment": { "patterns": [ { "name": "comment.block.documentation.tsx", "begin": "/\\*\\*(?!/)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.tsx" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.tsx" } }, "patterns": [ { "include": "#docblock" } ] }, { "name": "comment.block.tsx", "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", "beginCaptures": { "1": { "name": "punctuation.definition.comment.tsx" }, "2": { "name": "storage.type.internaldeclaration.tsx" }, "3": { "name": "punctuation.decorator.internaldeclaration.tsx" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.tsx" } } }, { "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tsx" }, "2": { "name": "comment.line.double-slash.tsx" }, "3": { "name": "punctuation.definition.comment.tsx" }, "4": { "name": "storage.type.internaldeclaration.tsx" }, "5": { "name": "punctuation.decorator.internaldeclaration.tsx" } }, "end": "(?=$)", "contentName": "comment.line.double-slash.tsx" } ] }, "single-line-comment-consuming-line-ending": { "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tsx" }, "2": { "name": "comment.line.double-slash.tsx" }, "3": { "name": "punctuation.definition.comment.tsx" }, "4": { "name": "storage.type.internaldeclaration.tsx" }, "5": { "name": "punctuation.decorator.internaldeclaration.tsx" } }, "end": "(?=^)", "contentName": "comment.line.double-slash.tsx" }, "directives": { "name": "comment.line.triple-slash.directive.tsx", "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.tsx" } }, "end": "(?=$)", "patterns": [ { "name": "meta.tag.tsx", "begin": "(<)(reference|amd-dependency|amd-module)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.directive.tsx" }, "2": { "name": "entity.name.tag.directive.tsx" } }, "end": "/>", "endCaptures": { "0": { "name": "punctuation.definition.tag.directive.tsx" } }, "patterns": [ { "name": "entity.other.attribute-name.directive.tsx", "match": "path|types|no-default-lib|lib|name|resolution-mode" }, { "name": "keyword.operator.assignment.tsx", "match": "=" }, { "include": "#string" } ] } ] }, "docblock": { "patterns": [ { "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "constant.language.access-type.jsdoc" } } }, { "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" }, "4": { "name": "punctuation.definition.bracket.angle.begin.jsdoc" }, "5": { "name": "constant.other.email.link.underline.jsdoc" }, "6": { "name": "punctuation.definition.bracket.angle.end.jsdoc" } } }, { "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" }, "4": { "name": "keyword.operator.control.jsdoc" }, "5": { "name": "entity.name.type.instance.jsdoc" } } }, { "name": "meta.example.jsdoc", "begin": "((@)example)\\s+", "end": "(?=@|\\*/)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "patterns": [ { "match": "^\\s\\*\\s+" }, { "contentName": "constant.other.description.jsdoc", "begin": "\\G(<)caption(>)", "beginCaptures": { "0": { "name": "entity.name.tag.inline.jsdoc" }, "1": { "name": "punctuation.definition.bracket.angle.begin.jsdoc" }, "2": { "name": "punctuation.definition.bracket.angle.end.jsdoc" } }, "end": "(</)caption(>)|(?=\\*/)", "endCaptures": { "0": { "name": "entity.name.tag.inline.jsdoc" }, "1": { "name": "punctuation.definition.bracket.angle.begin.jsdoc" }, "2": { "name": "punctuation.definition.bracket.angle.end.jsdoc" } } }, { "match": "[^\\s@*](?:[^*]|\\*[^/])*", "captures": { "0": { "name": "source.embedded.tsx" } } } ] }, { "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "constant.language.symbol-type.jsdoc" } } }, { "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.link.underline.jsdoc" }, "4": { "name": "entity.name.type.instance.jsdoc" } } }, { "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } } }, { "begin": "(?x)((@)template)\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" }, { "name": "variable.other.jsdoc", "match": "([A-Za-z_$][\\w$.\\[\\]]*)" } ] }, { "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } } }, { "begin": "((@)typedef)\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" }, { "name": "entity.name.type.instance.jsdoc", "match": "(?:[^@\\s*/]|\\*[^/])+" } ] }, { "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" }, { "name": "variable.other.jsdoc", "match": "([A-Za-z_$][\\w$.\\[\\]]*)" }, { "name": "variable.other.jsdoc", "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", "captures": { "1": { "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" }, "2": { "name": "keyword.operator.assignment.jsdoc" }, "3": { "name": "source.embedded.tsx" }, "4": { "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" }, "5": { "name": "invalid.illegal.syntax.jsdoc" } } } ] }, { "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" } ] }, { "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" } } }, { "contentName": "variable.other.jsdoc", "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" }, "4": { "name": "punctuation.definition.string.begin.jsdoc" } }, "end": "(\\3)|(?=$|\\*/)", "endCaptures": { "0": { "name": "variable.other.jsdoc" }, "1": { "name": "punctuation.definition.string.end.jsdoc" } } }, { "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } } }, { "name": "storage.type.class.jsdoc", "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", "captures": { "1": { "name": "punctuation.definition.block.tag.jsdoc" } } }, { "include": "#inline-tags" }, { "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } } } ] }, "brackets": { "patterns": [ { "begin": "{", "end": "}|(?=\\*/)", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\[", "end": "\\]|(?=\\*/)", "patterns": [ { "include": "#brackets" } ] } ] }, "inline-tags": { "patterns": [ { "name": "constant.other.description.jsdoc", "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", "captures": { "1": { "name": "punctuation.definition.bracket.square.begin.jsdoc" }, "2": { "name": "punctuation.definition.bracket.square.end.jsdoc" } } }, { "name": "entity.name.type.instance.jsdoc", "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", "beginCaptures": { "1": { "name": "punctuation.definition.bracket.curly.begin.jsdoc" }, "2": { "name": "storage.type.class.jsdoc" }, "3": { "name": "punctuation.definition.inline.tag.jsdoc" } }, "end": "}|(?=\\*/)", "endCaptures": { "0": { "name": "punctuation.definition.bracket.curly.end.jsdoc" } }, "patterns": [ { "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", "captures": { "1": { "name": "variable.other.link.underline.jsdoc" }, "2": { "name": "punctuation.separator.pipe.jsdoc" } } }, { "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", "captures": { "1": { "name": "variable.other.description.jsdoc" }, "2": { "name": "punctuation.separator.pipe.jsdoc" } } } ] } ] }, "jsdoctype": { "patterns": [ { "contentName": "entity.name.type.instance.jsdoc", "begin": "\\G({)", "beginCaptures": { "0": { "name": "entity.name.type.instance.jsdoc" }, "1": { "name": "punctuation.definition.bracket.curly.begin.jsdoc" } }, "end": "((}))\\s*|(?=\\*/)", "endCaptures": { "1": { "name": "entity.name.type.instance.jsdoc" }, "2": { "name": "punctuation.definition.bracket.curly.end.jsdoc" } }, "patterns": [ { "include": "#brackets" } ] } ] }, "jsx": { "patterns": [ { "include": "#jsx-tag-without-attributes-in-expression" }, { "include": "#jsx-tag-in-expression" } ] }, "jsx-tag-without-attributes-in-expression": { "begin": "(?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", "patterns": [ { "include": "#jsx-tag-without-attributes" } ] }, "jsx-tag-without-attributes": { "name": "meta.tag.without-attributes.tsx", "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)", "end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" }, "2": { "name": "entity.name.tag.namespace.tsx" }, "3": { "name": "punctuation.separator.namespace.tsx" }, "4": { "name": "entity.name.tag.tsx" }, "5": { "name": "support.class.component.tsx" }, "6": { "name": "punctuation.definition.tag.end.tsx" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" }, "2": { "name": "entity.name.tag.namespace.tsx" }, "3": { "name": "punctuation.separator.namespace.tsx" }, "4": { "name": "entity.name.tag.tsx" }, "5": { "name": "support.class.component.tsx" }, "6": { "name": "punctuation.definition.tag.end.tsx" } }, "contentName": "meta.jsx.children.tsx", "patterns": [ { "include": "#jsx-children" } ] }, "jsx-tag-in-expression": { "begin": "(?x)\n (?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", "patterns": [ { "include": "#jsx-tag" } ] }, "jsx-tag": { "name": "meta.tag.tsx", "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", "end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.tsx" }, "2": { "name": "punctuation.definition.tag.begin.tsx" }, "3": { "name": "entity.name.tag.namespace.tsx" }, "4": { "name": "punctuation.separator.namespace.tsx" }, "5": { "name": "entity.name.tag.tsx" }, "6": { "name": "support.class.component.tsx" }, "7": { "name": "punctuation.definition.tag.end.tsx" } }, "patterns": [ { "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" }, "2": { "name": "entity.name.tag.namespace.tsx" }, "3": { "name": "punctuation.separator.namespace.tsx" }, "4": { "name": "entity.name.tag.tsx" }, "5": { "name": "support.class.component.tsx" } }, "end": "(?=[/]?>)", "patterns": [ { "include": "#comment" }, { "include": "#type-arguments" }, { "include": "#jsx-tag-attributes" } ] }, { "begin": "(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.tsx" } }, "end": "(?=</)", "contentName": "meta.jsx.children.tsx", "patterns": [ { "include": "#jsx-children" } ] } ] }, "jsx-children": { "patterns": [ { "include": "#jsx-tag-without-attributes" }, { "include": "#jsx-tag" }, { "include": "#jsx-evaluated-code" }, { "include": "#jsx-entities" } ] }, "jsx-evaluated-code": { "contentName": "meta.embedded.expression.tsx", "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.tsx" } }, "endCaptures": { "0": { "name": "punctuation.section.embedded.end.tsx" } }, "patterns": [ { "include": "#expression" } ] }, "jsx-entities": { "patterns": [ { "name": "constant.character.entity.tsx", "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "captures": { "1": { "name": "punctuation.definition.entity.tsx" }, "3": { "name": "punctuation.definition.entity.tsx" } } }, { "name": "invalid.illegal.bad-ampersand.tsx", "match": "&" } ] }, "jsx-tag-attributes": { "name": "meta.tag.attributes.tsx", "begin": "\\s+", "end": "(?=[/]?>)", "patterns": [ { "include": "#comment" }, { "include": "#jsx-tag-attribute-name" }, { "include": "#jsx-tag-attribute-assignment" }, { "include": "#jsx-string-double-quoted" }, { "include": "#jsx-string-single-quoted" }, { "include": "#jsx-evaluated-code" }, { "include": "#jsx-tag-attributes-illegal" } ] }, "jsx-tag-attribute-name": { "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)", "captures": { "1": { "name": "entity.other.attribute-name.namespace.tsx" }, "2": { "name": "punctuation.separator.namespace.tsx" }, "3": { "name": "entity.other.attribute-name.tsx" } } }, "jsx-tag-attribute-assignment": { "name": "keyword.operator.assignment.tsx", "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))" }, "jsx-string-double-quoted": { "name": "string.quoted.double.tsx", "begin": "\"", "end": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tsx" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.tsx" } }, "patterns": [ { "include": "#jsx-entities" } ] }, "jsx-string-single-quoted": { "name": "string.quoted.single.tsx", "begin": "'", "end": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.tsx" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.tsx" } }, "patterns": [ { "include": "#jsx-entities" } ] }, "jsx-tag-attributes-illegal": { "name": "invalid.illegal.attribute.tsx", "match": "\\S+" } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/twig.tmLanguage.json ================================================ { "fileTypes": ["twig", "html.twig"], "firstLineMatch": "<!(?i:DOCTYPE)|<(?i:html)|<\\?(?i:php)|\\{\\{|\\{%|\\{#", "foldingStartMarker": "(?x)\r\n (<(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)\\b.*?>\r\n |<!--(?!.*--\\s*>)\r\n |^<!--\\ \\#tminclude\\ (?>.*?-->)$\r\n |\\{%\\s+(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)\r\n )", "foldingStopMarker": "(?x)\r\n (</(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)>\r\n |^(?!.*?<!--).*?--\\s*>\r\n |^<!--\\ end\\ tminclude\\ -->$\r\n |\\{%\\s+end(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)\r\n )", "keyEquivalent": "^~T", "name": "twig", "patterns": [ { "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*></\\2>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(>(<)/)(\\2)(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "meta.scope.between-tag-pair.html" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.html" } }, "name": "meta.tag.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(<\\?)(xml)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } }, "end": "(\\?>)", "name": "meta.tag.preprocessor.xml.html", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, { "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "end": "--\\s*>", "name": "comment.block.html", "patterns": [ { "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" }, { "include": "#embedded-code" } ] }, { "begin": "<!", "captures": { "0": { "name": "punctuation.definition.tag.html" } }, "end": ">", "name": "meta.tag.sgml.html", "patterns": [ { "begin": "(?i:DOCTYPE)", "captures": { "1": { "name": "entity.name.tag.doctype.html" } }, "end": "(?=>)", "name": "meta.tag.sgml.doctype.html", "patterns": [ { "match": "\"[^\">]*\"", "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" } ] }, { "begin": "\\[CDATA\\[", "end": "]](?=>)", "name": "constant.other.inline-data.html" }, { "match": "(\\s*)(?!--|>)\\S(\\s*)", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ] }, { "include": "#embedded-code" }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } }, "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "name": "source.css.embedded.html", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" } }, "end": "(?=</(?i:style))", "patterns": [ { "include": "#embedded-code" }, { "include": "source.css" } ] } ] }, { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "name": "source.js.embedded.html", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "end": "(</)((?i:script))", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.js" } }, "match": "(//).*?((?=</script)|$\\n?)", "name": "comment.line.double-slash.js" }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.js" } }, "end": "\\*/|(?=</script)", "name": "comment.block.js" }, { "include": "#php" }, { "include": "#twig-print-tag" }, { "include": "#twig-statement-tag" }, { "include": "#twig-comment-tag" }, { "include": "source.js" } ] } ] }, { "begin": "(</?)((?i:body|head|html)\\b)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.structure.any.html" } }, "end": "(>)", "name": "meta.tag.structure.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.block.any.html" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.block.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.inline.any.html" } }, "end": "((?: ?/)?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.inline.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)([a-zA-Z0-9:]+)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.other.html" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.other.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "include": "#entities" }, { "match": "<>", "name": "invalid.illegal.incomplete.html" }, { "match": "<", "name": "invalid.illegal.bad-angle-bracket.html" }, { "include": "#twig-print-tag" }, { "include": "#twig-statement-tag" }, { "include": "#twig-comment-tag" } ], "repository": { "embedded-code": { "patterns": [ { "include": "#ruby" }, { "include": "#php" }, { "include": "#twig-print-tag" }, { "include": "#twig-statement-tag" }, { "include": "#twig-comment-tag" }, { "include": "#python" } ] }, "entities": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } }, "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html" }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "twig-print-tag": { "begin": "\\{\\{-?", "beginCaptures": { "0": { "name": "punctuation.section.tag.twig" } }, "end": "-?\\}\\}", "endCaptures": { "0": { "name": "punctuation.section.tag.twig" } }, "name": "meta.tag.template.value.twig", "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-operators" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" }, { "include": "#twig-hashes" } ] }, "twig-statement-tag": { "begin": "\\{%-?", "beginCaptures": { "0": { "name": "punctuation.section.tag.twig" } }, "end": "-?%\\}", "endCaptures": { "0": { "name": "punctuation.section.tag.twig" } }, "name": "meta.tag.template.block.twig", "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-keywords" }, { "include": "#twig-operators" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" }, { "include": "#twig-hashes" } ] }, "twig-comment-tag": { "begin": "\\{#-?", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.twig" } }, "end": "-?#\\}", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.twig" } }, "name": "comment.block.twig" }, "twig-constants": { "patterns": [ { "match": "(?i)(?<=[\\s\\[\\(\\{:,])(?:true|false|null|none)(?=[\\s\\)\\]\\}\\,])", "name": "constant.language.twig" }, { "match": "(?<=[\\s\\[\\(\\{:,]|\\.\\.|\\*\\*)[0-9]+(?:\\.[0-9]+)?(?=[\\s\\)\\]\\}\\,]|\\.\\.|\\*\\*)", "name": "constant.numeric.twig" } ] }, "twig-operators": { "patterns": [ { "captures": { "1": { "name": "keyword.operator.arithmetic.twig" } }, "match": "(?<=\\s)(\\+|-|//?|%|\\*\\*?)(?=\\s)" }, { "captures": { "1": { "name": "keyword.operator.assignment.twig" } }, "match": "(?<=\\s)(=|~)(?=\\s)" }, { "captures": { "1": { "name": "keyword.operator.bitwise.twig" } }, "match": "(?<=\\s)(b-(?:and|or|xor))(?=\\s)" }, { "captures": { "1": { "name": "keyword.operator.comparison.twig" } }, "match": "(?<=\\s)((?:!|=)=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\\s)|%" }, { "captures": { "1": { "name": "keyword.operator.logical.twig" } }, "match": "(?<=\\s)(\\?|:|and|not|or)(?=\\s)" }, { "captures": { "0": { "name": "keyword.operator.other.twig" } }, "match": "(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)'\"])\\.\\.(?=[a-zA-Z0-9_\\x{7f}-\\x{ff}'\"])" }, { "captures": { "0": { "name": "keyword.operator.other.twig" } }, "match": "(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\}\\)'\"])\\|(?=[a-zA-Z_\\x{7f}-\\x{ff}])" } ] }, "twig-objects": { "captures": { "1": { "name": "variable.other.twig" } }, "match": "(?<=[\\s\\{\\[\\(:,])([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?=[\\s\\}\\[\\]\\(\\)\\.\\|,:])" }, "twig-properties": { "patterns": [ { "captures": { "1": { "name": "punctuation.separator.property.twig" }, "2": { "name": "variable.other.property.twig" } }, "match": "(?x) (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\r\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*) (?=[\\.\\s\\|\\[\\)\\]\\}:,])\r\n " }, { "begin": "(?x) (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\r\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\r\n (\\()\r\n ", "beginCaptures": { "1": { "name": "punctuation.separator.property.twig" }, "2": { "name": "variable.other.property.twig" }, "3": { "name": "punctuation.definition.parameters.begin.twig" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.twig" } }, "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" } ], "contentName": "meta.function.arguments.twig" }, { "captures": { "1": { "name": "punctuation.section.array.begin.twig" }, "2": { "name": "variable.other.property.twig" }, "3": { "name": "punctuation.section.array.end.twig" }, "4": { "name": "punctuation.section.array.begin.twig" }, "5": { "name": "variable.other.property.twig" }, "6": { "name": "punctuation.section.array.end.twig" }, "7": { "name": "punctuation.section.array.begin.twig" }, "8": { "name": "variable.other.property.twig" }, "9": { "name": "punctuation.section.array.end.twig" } }, "match": "(?x) (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]])\r\n (?:\r\n (\\[)('[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*')(\\])\r\n |(\\[)(\"[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\")(\\])\r\n |(\\[)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\])\r\n )\r\n " } ] }, "twig-strings": { "patterns": [ { "begin": "(?:(?<!\\\\)|(?<=\\\\\\\\))'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.twig" } }, "end": "(?:(?<!\\\\)|(?<=\\\\\\\\))'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.twig" } }, "name": "string.quoted.single.twig" }, { "begin": "(?:(?<!\\\\)|(?<=\\\\\\\\))\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.twig" } }, "end": "(?:(?<!\\\\)|(?<=\\\\\\\\))\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.twig" } }, "name": "string.quoted.double.twig" } ] }, "twig-arrays": { "begin": "(?<=[\\s\\(\\{\\[:,])\\[", "beginCaptures": { "0": { "name": "punctuation.section.array.begin.twig" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.array.end.twig" } }, "patterns": [ { "include": "#twig-arrays" }, { "include": "#twig-hashes" }, { "include": "#twig-constants" }, { "include": "#twig-strings" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "match": ",", "name": "punctuation.separator.object.twig" } ], "name": "meta.array.twig" }, "twig-hashes": { "begin": "(?<=[\\s\\(\\{\\[:,])\\{", "beginCaptures": { "0": { "name": "punctuation.section.hash.begin.twig" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.hash.end.twig" } }, "patterns": [ { "include": "#twig-hashes" }, { "include": "#twig-arrays" }, { "include": "#twig-constants" }, { "include": "#twig-strings" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "match": ":", "name": "punctuation.separator.key-value.twig" }, { "match": ",", "name": "punctuation.separator.object.twig" } ], "name": "meta.hash.twig" }, "twig-keywords": { "match": "(?<=\\s)((?:end)?(?:autoescape|form_theme|humanize|yaml_encode|yaml_dump|abbr_class|abbr_method|format_args|format_args_as_text|absolute_url|relative_path|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with|path|render|csrf_token|url|controller|form_errors|form_rest|form_start|form_end|form_widget|form_row|asset|encore_entry_link_tags|encore_entry_script_tags)(?=\\s)", "name": "keyword.control.twig" }, "twig-functions-warg": { "begin": "(?<=[\\s\\(\\[\\{:,])(attribute|form_theme|humanize|yaml_encode|yaml_dump|abbr_class|abbr_method|format_args|format_args_as_text|absolute_url|relative_path|block|constant|cycle|date|divisible by|dump|include|max|min|parent|path|render|csrf_token|url|controller|form_errors|form_rest|form_start|form_end|form_widget|form_row|asset|encore_entry_link_tags|encore_entry_script_tags|random|range|same as|source|template_from_string)(\\()", "beginCaptures": { "1": { "name": "support.function.twig" }, "2": { "name": "punctuation.definition.parameters.begin.twig" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.twig" } }, "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" } ], "contentName": "meta.function.arguments.twig" }, "twig-functions": { "captures": { "1": { "name": "support.function.twig" } }, "match": "(?<=is\\s)(defined|empty|even|iterable|odd)" }, "twig-macros": { "begin": "(?x) (?<=[\\s\\(\\[\\{:,])\r\n ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\r\n (?:\r\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\r\n )?\r\n (\\()\r\n ", "beginCaptures": { "1": { "name": "meta.function-call.twig" }, "2": { "name": "punctuation.separator.property.twig" }, "3": { "name": "variable.other.property.twig" }, "4": { "name": "punctuation.definition.parameters.begin.twig" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.twig" } }, "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-operators" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" }, { "include": "#twig-hashes" } ], "contentName": "meta.function.arguments.twig" }, "twig-filters-warg": { "begin": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\\()", "beginCaptures": { "1": { "name": "support.function.twig" }, "2": { "name": "punctuation.definition.parameters.begin.twig" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.twig" } }, "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" }, { "include": "#twig-hashes" } ], "contentName": "meta.function.arguments.twig" }, "twig-filters": { "captures": { "1": { "name": "support.function.twig" } }, "match": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[\\s\\|\\]\\}\\):,]|\\.\\.|\\*\\*)" }, "twig-filters-warg-ud": { "begin": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\()", "beginCaptures": { "1": { "name": "meta.function-call.other.twig" }, "2": { "name": "punctuation.definition.parameters.begin.twig" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.twig" } }, "patterns": [ { "include": "#twig-constants" }, { "include": "#twig-functions-warg" }, { "include": "#twig-functions" }, { "include": "#twig-macros" }, { "include": "#twig-objects" }, { "include": "#twig-properties" }, { "include": "#twig-filters-warg" }, { "include": "#twig-filters" }, { "include": "#twig-filters-warg-ud" }, { "include": "#twig-filters-ud" }, { "include": "#twig-strings" }, { "include": "#twig-arrays" }, { "include": "#twig-hashes" } ], "contentName": "meta.function.arguments.twig" }, "twig-filters-ud": { "captures": { "1": { "name": "meta.function-call.other.twig" } }, "match": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)" }, "php": { "begin": "(?=(^\\s*)?<\\?)", "end": "(?!(^\\s*)?<\\?)", "patterns": [ { "include": "source.php" } ] }, "python": { "begin": "(?:^\\s*)<\\?python(?!.*\\?>)", "end": "\\?>(?:\\s*$\\n)?", "name": "source.python.embedded.html", "patterns": [ { "include": "source.python" } ] }, "ruby": { "patterns": [ { "begin": "<%+#", "captures": { "0": { "name": "punctuation.definition.comment.erb" } }, "end": "%>", "name": "comment.block.erb" }, { "begin": "<%+(?!>)=?", "captures": { "0": { "name": "punctuation.section.embedded.ruby" } }, "end": "-?%>", "name": "source.ruby.embedded.html", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.ruby" } }, "match": "(#).*?(?=-?%>)", "name": "comment.line.number-sign.ruby" }, { "include": "source.ruby" } ] }, { "begin": "<\\?r(?!>)=?", "captures": { "0": { "name": "punctuation.section.embedded.ruby.nitro" } }, "end": "-?\\?>", "name": "source.ruby.nitro.embedded.html", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.ruby.nitro" } }, "match": "(#).*?(?=-?\\?>)", "name": "comment.line.number-sign.ruby.nitro" }, { "include": "source.ruby" } ] } ] }, "string-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, "string-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, "tag-generic-attribute": { "match": "\\b([a-zA-Z\\-:]+)", "name": "entity.other.attribute-name.html" }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } }, "end": "(?<='|\")", "name": "meta.attribute-with-value.id.html", "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] } ] }, "tag-stuff": { "patterns": [ { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#embedded-code" } ] } }, "scopeName": "text.html.twig", "uuid": "C220B028-86FF-44CB-8A59-27937FC83730" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/typescript.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScript.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/77d21fd8d3f750fcf67bdf7436f4e46565cba350", "name": "TypeScript", "scopeName": "source.ts", "patterns": [ { "include": "#directives" }, { "include": "#statements" }, { "name": "comment.line.shebang.ts", "match": "\\A(#!).*(?=$)", "captures": { "1": { "name": "punctuation.definition.comment.ts" } } } ], "repository": { "statements": { "patterns": [ { "include": "#string" }, { "include": "#template" }, { "include": "#comment" }, { "include": "#declaration" }, { "include": "#control-statement" }, { "include": "#after-operator-block-as-object-literal" }, { "include": "#decl-block" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" } ] }, "declaration": { "patterns": [ { "include": "#decorator" }, { "include": "#var-expr" }, { "include": "#function-declaration" }, { "include": "#class-declaration" }, { "include": "#interface-declaration" }, { "include": "#enum-declaration" }, { "include": "#namespace-declaration" }, { "include": "#type-alias-declaration" }, { "include": "#import-equals-declaration" }, { "include": "#import-declaration" }, { "include": "#export-declaration" } ] }, "control-statement": { "patterns": [ { "include": "#switch-statement" }, { "include": "#for-loop" }, { "name": "keyword.control.trycatch.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.loop.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.flow.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.switch.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.conditional.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.control.with.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.other.debugger.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "storage.modifier.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "expression": { "patterns": [ { "include": "#expressionWithoutIdentifiers" }, { "include": "#identifiers" }, { "include": "#expressionPunctuations" } ] }, "expressionWithoutIdentifiers": { "patterns": [ { "include": "#string" }, { "include": "#regex" }, { "include": "#template" }, { "include": "#comment" }, { "include": "#function-expression" }, { "include": "#class-expression" }, { "include": "#arrow-function" }, { "include": "#cast" }, { "include": "#ternary-expression" }, { "include": "#new-expr" }, { "include": "#object-literal" }, { "include": "#expression-operators" }, { "include": "#function-call" }, { "include": "#literal" }, { "include": "#support-objects" }, { "include": "#paren-expression" } ] }, "expressionPunctuations": { "patterns": [ { "include": "#punctuation-comma" }, { "include": "#punctuation-accessor" } ] }, "decorator": { "name": "meta.decorator.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@", "beginCaptures": { "0": { "name": "punctuation.decorator.ts" } }, "end": "(?=\\s)", "patterns": [ { "include": "#expression" } ] }, "var-expr": { "name": "meta.var.expr.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.type.ts" } }, "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" }, { "include": "#var-single-variable" }, { "include": "#variable-initializer" }, { "include": "#comment" }, { "begin": "(,)\\s*(?!\\S)", "beginCaptures": { "1": { "name": "punctuation.separator.comma.ts" } }, "end": "(?<!,)((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$))", "patterns": [ { "include": "#comment" }, { "include": "#destructuring-variable" }, { "include": "#var-single-variable" }, { "include": "#punctuation-comma" } ] }, { "include": "#punctuation-comma" } ] }, "var-single-variable": { "patterns": [ { "name": "meta.var-single-variable.expr.ts", "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "beginCaptures": { "1": { "name": "meta.definition.variable.ts entity.name.function.ts" } }, "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] }, { "name": "meta.var-single-variable.expr.ts", "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", "beginCaptures": { "1": { "name": "meta.definition.variable.ts variable.other.constant.ts" } }, "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] }, { "name": "meta.var-single-variable.expr.ts", "begin": "([_$[:alpha:]][_$[:alnum:]]*)", "beginCaptures": { "1": { "name": "meta.definition.variable.ts variable.other.readwrite.ts" } }, "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" } ] } ] }, "var-single-variable-type-annotation": { "patterns": [ { "include": "#type-annotation" }, { "include": "#string" }, { "include": "#comment" } ] }, "destructuring-variable": { "patterns": [ { "name": "meta.object-binding-pattern-variable.ts", "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#object-binding-pattern" }, { "include": "#type-annotation" }, { "include": "#comment" } ] }, { "name": "meta.array-binding-pattern-variable.ts", "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#array-binding-pattern" }, { "include": "#type-annotation" }, { "include": "#comment" } ] } ] }, "object-binding-element": { "patterns": [ { "include": "#comment" }, { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(?=,|\\})", "patterns": [ { "include": "#object-binding-element-propertyName" }, { "include": "#binding-element" } ] }, { "include": "#object-binding-pattern" }, { "include": "#destructuring-variable-rest" }, { "include": "#variable-initializer" }, { "include": "#punctuation-comma" } ] }, "object-binding-element-propertyName": { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(:)", "endCaptures": { "0": { "name": "punctuation.destructuring.ts" } }, "patterns": [ { "include": "#string" }, { "include": "#array-literal" }, { "name": "variable.object.property.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] }, "binding-element": { "patterns": [ { "include": "#comment" }, { "include": "#object-binding-pattern" }, { "include": "#array-binding-pattern" }, { "include": "#destructuring-variable-rest" }, { "include": "#variable-initializer" } ] }, "destructuring-variable-rest": { "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.operator.rest.ts" }, "2": { "name": "meta.definition.variable.ts variable.other.readwrite.ts" } } }, "object-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", "beginCaptures": { "1": { "name": "keyword.operator.rest.ts" }, "2": { "name": "punctuation.definition.binding-pattern.object.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.ts" } }, "patterns": [ { "include": "#object-binding-element" } ] }, "array-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.rest.ts" }, "2": { "name": "punctuation.definition.binding-pattern.array.ts" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.ts" } }, "patterns": [ { "include": "#binding-element" }, { "include": "#punctuation-comma" } ] }, "parameter-name": { "patterns": [ { "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)", "captures": { "1": { "name": "storage.modifier.ts" } } }, { "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "1": { "name": "storage.modifier.ts" }, "2": { "name": "keyword.operator.rest.ts" }, "3": { "name": "entity.name.function.ts variable.language.this.ts" }, "4": { "name": "entity.name.function.ts" }, "5": { "name": "keyword.operator.optional.ts" } } }, { "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)", "captures": { "1": { "name": "storage.modifier.ts" }, "2": { "name": "keyword.operator.rest.ts" }, "3": { "name": "variable.parameter.ts variable.language.this.ts" }, "4": { "name": "variable.parameter.ts" }, "5": { "name": "keyword.operator.optional.ts" } } } ] }, "destructuring-parameter": { "patterns": [ { "name": "meta.parameter.object-binding-pattern.ts", "begin": "(?<!=|:)\\s*(\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.binding-pattern.object.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.ts" } }, "patterns": [ { "include": "#parameter-object-binding-element" } ] }, { "name": "meta.paramter.array-binding-pattern.ts", "begin": "(?<!=|:)\\s*(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.binding-pattern.array.ts" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.ts" } }, "patterns": [ { "include": "#parameter-binding-element" }, { "include": "#punctuation-comma" } ] } ] }, "parameter-object-binding-element": { "patterns": [ { "include": "#comment" }, { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", "end": "(?=,|\\})", "patterns": [ { "include": "#object-binding-element-propertyName" }, { "include": "#parameter-binding-element" } ] }, { "include": "#parameter-object-binding-pattern" }, { "include": "#destructuring-parameter-rest" }, { "include": "#variable-initializer" }, { "include": "#punctuation-comma" } ] }, "parameter-binding-element": { "patterns": [ { "include": "#comment" }, { "include": "#parameter-object-binding-pattern" }, { "include": "#parameter-array-binding-pattern" }, { "include": "#destructuring-parameter-rest" }, { "include": "#variable-initializer" } ] }, "destructuring-parameter-rest": { "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.operator.rest.ts" }, "2": { "name": "variable.parameter.ts" } } }, "parameter-object-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", "beginCaptures": { "1": { "name": "keyword.operator.rest.ts" }, "2": { "name": "punctuation.definition.binding-pattern.object.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.object.ts" } }, "patterns": [ { "include": "#parameter-object-binding-element" } ] }, "parameter-array-binding-pattern": { "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", "beginCaptures": { "1": { "name": "keyword.operator.rest.ts" }, "2": { "name": "punctuation.definition.binding-pattern.array.ts" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.binding-pattern.array.ts" } }, "patterns": [ { "include": "#parameter-binding-element" }, { "include": "#punctuation-comma" } ] }, "field-declaration": { "name": "meta.field.declaration.ts", "begin": "(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))", "beginCaptures": { "1": { "name": "storage.modifier.ts" } }, "end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})", "patterns": [ { "include": "#variable-initializer" }, { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))", "end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})", "patterns": [ { "include": "#type-annotation" }, { "include": "#string" }, { "include": "#array-literal" }, { "include": "#comment" }, { "name": "meta.definition.property.ts entity.name.function.ts", "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(=>|(\\([^\\(\\)]*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))" }, { "name": "meta.definition.property.ts variable.object.property.ts", "match": "[_$[:alpha:]][_$[:alnum:]]*" }, { "name": "keyword.operator.optional.ts", "match": "\\?" } ] } ] }, "variable-initializer": { "patterns": [ { "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "keyword.operator.assignment.ts" } }, "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" } ] }, { "begin": "(?<!=|!)(=)(?!=)", "beginCaptures": { "1": { "name": "keyword.operator.assignment.ts" } }, "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)(?=\\s*$)", "patterns": [ { "include": "#expression" } ] } ] }, "function-declaration": { "name": "meta.function.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.modifier.async.ts" }, "3": { "name": "storage.type.function.ts" }, "4": { "name": "keyword.generator.asterisk.ts" }, "5": { "name": "meta.definition.function.ts entity.name.function.ts" } }, "end": "(?=$|^|;)|(?<=\\})", "patterns": [ { "include": "#function-body" } ] }, "function-expression": { "name": "meta.function.expression.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" }, "2": { "name": "storage.type.function.ts" }, "3": { "name": "keyword.generator.asterisk.ts" }, "4": { "name": "meta.definition.function.ts entity.name.function.ts" } }, "end": "(?<=\\})", "patterns": [ { "include": "#function-body" } ] }, "function-body": { "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" }, { "include": "#function-parameters" }, { "include": "#return-type" }, { "include": "#decl-block" } ] }, "method-declaration": { "patterns": [ { "name": "meta.method.declaration.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])", "beginCaptures": { "1": { "name": "storage.modifier.ts" }, "2": { "name": "storage.modifier.ts" }, "3": { "name": "storage.modifier.async.ts" }, "4": { "name": "storage.type.property.ts" }, "5": { "name": "keyword.generator.asterisk.ts" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" } ] }, { "name": "meta.method.declaration.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))", "beginCaptures": { "1": { "name": "storage.modifier.ts" }, "2": { "name": "storage.modifier.ts" }, "3": { "name": "storage.modifier.async.ts" }, "4": { "name": "keyword.operator.new.ts" }, "5": { "name": "storage.type.ts" }, "6": { "name": "keyword.generator.asterisk.ts" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" } ] } ] }, "object-literal-method-declaration": { "name": "meta.method.declaration.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" }, "2": { "name": "storage.type.property.ts" }, "3": { "name": "keyword.generator.asterisk.ts" } }, "end": "(?=\\}|;|,)|(?<=\\})", "patterns": [ { "include": "#method-declaration-name" }, { "include": "#function-body" }, { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" }, "2": { "name": "storage.type.property.ts" }, "3": { "name": "keyword.generator.asterisk.ts" } }, "end": "(?=\\(|\\<)", "patterns": [ { "include": "#method-declaration-name" } ] } ] }, "method-declaration-name": { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])", "end": "(?=\\(|\\<)", "patterns": [ { "include": "#string" }, { "include": "#array-literal" }, { "name": "meta.definition.method.ts entity.name.function.ts", "match": "[_$[:alpha:]][_$[:alnum:]]*" }, { "name": "keyword.operator.optional.ts", "match": "\\?" } ] }, "arrow-function": { "patterns": [ { "name": "meta.arrow.ts", "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)", "captures": { "1": { "name": "storage.modifier.async.ts" }, "2": { "name": "variable.parameter.ts" } } }, { "name": "meta.arrow.ts", "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" } }, "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))", "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" }, { "include": "#function-parameters" }, { "include": "#arrow-return-type" } ] }, { "name": "meta.arrow.ts", "begin": "=>", "beginCaptures": { "0": { "name": "storage.type.function.arrow.ts" } }, "end": "(?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" }, { "include": "#expression" } ] } ] }, "indexer-declaration": { "name": "meta.indexer.declaration.ts", "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", "beginCaptures": { "1": { "name": "storage.modifier.ts" }, "2": { "name": "meta.brace.square.ts" }, "3": { "name": "variable.parameter.ts" } }, "end": "(\\])\\s*(\\?\\s*)?|$", "endCaptures": { "1": { "name": "meta.brace.square.ts" }, "2": { "name": "keyword.operator.optional.ts" } }, "patterns": [ { "include": "#type-annotation" } ] }, "indexer-mapped-type-declaration": { "name": "meta.indexer.mappedtype.declaration.ts", "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+", "beginCaptures": { "1": { "name": "storage.modifier.ts" }, "2": { "name": "meta.brace.square.ts" }, "3": { "name": "entity.name.type.ts" }, "4": { "name": "keyword.operator.expression.in.ts" } }, "end": "(\\])\\s*(\\?\\s*)?|$", "endCaptures": { "1": { "name": "meta.brace.square.ts" }, "2": { "name": "keyword.operator.optional.ts" } }, "patterns": [ { "include": "#type" } ] }, "function-parameters": { "name": "meta.parameters.ts", "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.ts" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.ts" } }, "patterns": [ { "include": "#comment" }, { "include": "#decorator" }, { "include": "#destructuring-parameter" }, { "include": "#parameter-name" }, { "include": "#type-annotation" }, { "include": "#variable-initializer" }, { "name": "punctuation.separator.parameter.ts", "match": "," } ] }, "class-declaration": { "name": "meta.class.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.modifier.ts" }, "3": { "name": "storage.type.class.ts" } }, "end": "(?<=\\})", "patterns": [ { "include": "#class-declaration-or-expression-patterns" } ] }, "class-expression": { "name": "meta.class.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(class)\\b(?=\\s+|[<{]|/[/*])", "beginCaptures": { "1": { "name": "storage.type.class.ts" } }, "end": "(?<=\\})", "patterns": [ { "include": "#class-declaration-or-expression-patterns" } ] }, "class-declaration-or-expression-patterns": { "patterns": [ { "include": "#comment" }, { "include": "#class-or-interface-heritage" }, { "match": "[_$[:alpha:]][_$[:alnum:]]*", "captures": { "0": { "name": "entity.name.type.class.ts" } } }, { "include": "#type-parameters" }, { "include": "#class-or-interface-body" } ] }, "interface-declaration": { "name": "meta.interface.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.modifier.ts" }, "3": { "name": "storage.type.interface.ts" } }, "end": "(?<=\\})", "patterns": [ { "include": "#comment" }, { "include": "#class-or-interface-heritage" }, { "match": "[_$[:alpha:]][_$[:alnum:]]*", "captures": { "0": { "name": "entity.name.type.interface.ts" } } }, { "include": "#type-parameters" }, { "include": "#class-or-interface-body" } ] }, "class-or-interface-heritage": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "storage.modifier.ts" } }, "end": "(?=\\{)", "patterns": [ { "include": "#comment" }, { "include": "#class-or-interface-heritage" }, { "include": "#type-parameters" }, { "include": "#expressionWithoutIdentifiers" }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)", "captures": { "1": { "name": "entity.name.type.module.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" } } }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "entity.other.inherited-class.ts" } } }, { "include": "#expressionPunctuations" } ] }, "class-or-interface-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#string" }, { "include": "#comment" }, { "include": "#decorator" }, { "include": "#method-declaration" }, { "include": "#indexer-declaration" }, { "include": "#field-declaration" }, { "include": "#type-annotation" }, { "include": "#variable-initializer" }, { "include": "#access-modifier" }, { "include": "#property-accessor" }, { "include": "#after-operator-block-as-object-literal" }, { "include": "#decl-block" }, { "include": "#expression" }, { "include": "#punctuation-comma" }, { "include": "#punctuation-semicolon" } ] }, "access-modifier": { "name": "storage.modifier.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "property-accessor": { "name": "storage.type.property.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "enum-declaration": { "name": "meta.enum.declaration.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.modifier.ts" }, "3": { "name": "storage.type.enum.ts" }, "4": { "name": "entity.name.type.enum.ts" } }, "end": "(?<=\\})", "patterns": [ { "include": "#comment" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#comment" }, { "begin": "([_$[:alpha:]][_$[:alnum:]]*)", "beginCaptures": { "0": { "name": "variable.other.enummember.ts" } }, "end": "(?=,|\\}|$)", "patterns": [ { "include": "#comment" }, { "include": "#variable-initializer" } ] }, { "begin": "(?=((\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))", "end": "(?=,|\\}|$)", "patterns": [ { "include": "#string" }, { "include": "#array-literal" }, { "include": "#comment" }, { "include": "#variable-initializer" } ] }, { "include": "#punctuation-comma" } ] } ] }, "namespace-declaration": { "name": "meta.namespace.declaration.ts", "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.type.namespace.ts" } }, "end": "(?<=\\})|(?=;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)", "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "name": "entity.name.type.module.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)" }, { "include": "#punctuation-accessor" }, { "include": "#decl-block" } ] }, "type-alias-declaration": { "name": "meta.type.declaration.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "storage.type.type.ts" }, "3": { "name": "entity.name.type.alias.ts" } }, "end": "(?=[};]|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)", "patterns": [ { "include": "#comment" }, { "include": "#type-parameters" }, { "include": "#type" }, { "match": "(=)\\s*", "captures": { "1": { "name": "keyword.operator.assignment.ts" } } } ] }, "import-equals-declaration": { "patterns": [ { "name": "meta.import-equals.external.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "keyword.control.import.ts" }, "3": { "name": "variable.other.readwrite.alias.ts" }, "4": { "name": "keyword.operator.assignment.ts" }, "5": { "name": "keyword.control.require.ts" }, "6": { "name": "meta.brace.round.ts" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.ts" } }, "patterns": [ { "include": "#comment" }, { "include": "#string" } ] }, { "name": "meta.import-equals.internal.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "keyword.control.import.ts" }, "3": { "name": "variable.other.readwrite.alias.ts" }, "4": { "name": "keyword.operator.assignment.ts" } }, "end": "(?=;|$|^)", "patterns": [ { "include": "#comment" }, { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", "captures": { "1": { "name": "entity.name.type.module.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" } } }, { "name": "variable.other.readwrite.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] } ] }, "import-declaration": { "name": "meta.import.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(import)(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "keyword.control.import.ts" } }, "end": "(?=;|$|^)", "patterns": [ { "include": "#import-export-declaration" } ] }, "export-declaration": { "patterns": [ { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "keyword.control.as.ts" }, "3": { "name": "storage.type.namespace.ts" }, "4": { "name": "entity.name.type.module.ts" } } }, { "name": "meta.export.default.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))", "beginCaptures": { "1": { "name": "keyword.control.export.ts" }, "2": { "name": "keyword.operator.assignment.ts" }, "3": { "name": "keyword.control.default.ts" } }, "end": "(?=;|$|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)", "patterns": [ { "include": "#expression" } ] }, { "name": "meta.export.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?!\\s*:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "0": { "name": "keyword.control.export.ts" } }, "end": "(?=;|$|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\btype\\b|\\bvar\\b)", "patterns": [ { "include": "#import-export-declaration" } ] } ] }, "import-export-declaration": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#import-export-block" }, { "name": "keyword.control.from.ts", "match": "\\bfrom\\b" }, { "include": "#import-export-clause" } ] }, "import-export-block": { "name": "meta.block.ts", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#import-export-clause" } ] }, "import-export-clause": { "patterns": [ { "include": "#comment" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*))\\s+(as)\\s+(?:(\\bdefault(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(\\b[_$[:alpha:]][_$[:alnum:]]*))", "captures": { "1": { "name": "keyword.control.default.ts" }, "2": { "name": "constant.language.import-export-all.ts" }, "3": { "name": "variable.other.readwrite.ts" }, "4": { "name": "keyword.control.as.ts" }, "5": { "name": "keyword.control.default.ts" }, "6": { "name": "variable.other.readwrite.alias.ts" } } }, { "include": "#punctuation-comma" }, { "name": "constant.language.import-export-all.ts", "match": "\\*" }, { "name": "keyword.control.default.ts", "match": "\\b(default)\\b" }, { "name": "variable.other.readwrite.alias.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] }, "switch-statement": { "name": "switch-statement.expr.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "name": "switch-expression.expr.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.switch.ts" }, "2": { "name": "meta.brace.round.ts" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.ts" } }, "patterns": [ { "include": "#expression" } ] }, { "name": "switch-block.expr.ts", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "(?=\\})", "patterns": [ { "name": "case-clause.expr.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.control.switch.ts" } }, "end": ":", "endCaptures": { "0": { "name": "punctuation.definition.section.case-statement.ts" } }, "patterns": [ { "include": "#expression" } ] }, { "include": "#statements" } ] } ] }, "for-loop": { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(for)(?:\\s+(await))?\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.loop.ts" }, "2": { "name": "keyword.control.loop.ts" }, "3": { "name": "meta.brace.round.ts" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.ts" } }, "patterns": [ { "include": "#var-expr" }, { "include": "#expression" }, { "include": "#punctuation-semicolon" } ] }, "decl-block": { "name": "meta.block.ts", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#statements" } ] }, "after-operator-block-as-object-literal": { "name": "meta.objectliteral.ts", "begin": "(?<=[=(,\\[?+!]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#object-member" } ] }, "object-literal": { "name": "meta.objectliteral.ts", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#object-member" } ] }, "object-member": { "patterns": [ { "include": "#comment" }, { "include": "#object-literal-method-declaration" }, { "name": "meta.object.member.ts meta.object-literal.key.ts", "begin": "(?=\\[)", "end": "(?=:)", "patterns": [ { "include": "#array-literal" } ] }, { "name": "meta.object.member.ts meta.object-literal.key.ts", "begin": "(?=[\\'\\\"])", "end": "(?=:)", "patterns": [ { "include": "#string" } ] }, { "name": "meta.object.member.ts", "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=:)", "captures": { "0": { "name": "meta.object-literal.key.ts" }, "1": { "name": "constant.numeric.decimal.ts" } } }, { "name": "meta.object.member.ts", "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", "captures": { "0": { "name": "meta.object-literal.key.ts" }, "1": { "name": "entity.name.function.ts" } } }, { "name": "meta.object.member.ts", "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", "captures": { "0": { "name": "meta.object-literal.key.ts" } } }, { "name": "meta.object.member.ts", "begin": "\\.\\.\\.", "beginCaptures": { "0": { "name": "keyword.operator.spread.ts" } }, "end": "(?=,|\\})", "patterns": [ { "include": "#expression" } ] }, { "name": "meta.object.member.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)", "captures": { "1": { "name": "variable.other.readwrite.ts" } } }, { "name": "meta.object.member.ts", "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)", "end": "(?=,|\\}|$)", "patterns": [ { "include": "#expression" } ] }, { "name": "meta.object.member.ts", "begin": ":", "beginCaptures": { "0": { "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts" } }, "end": "(?=,|\\})", "patterns": [ { "include": "#expression" } ] }, { "include": "#punctuation-comma" } ] }, "ternary-expression": { "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)", "beginCaptures": { "1": { "name": "keyword.operator.ternary.ts" } }, "end": "(:)", "endCaptures": { "0": { "name": "keyword.operator.ternary.ts" } }, "patterns": [ { "include": "#expression" } ] }, "function-call": { "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()", "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()", "patterns": [ { "name": "meta.function-call.ts", "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", "end": "(?=\\s*(\\?\\.\\s*)?(<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>|\\<\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))([^<>\\(]|(\\([^\\(\\)]*\\))|(?<==)\\>)*(?!=)\\>)*(?!=)>\\s*)?\\()", "patterns": [ { "include": "#literal" }, { "include": "#support-objects" }, { "include": "#object-identifiers" }, { "include": "#punctuation-accessor" }, { "name": "keyword.operator.expression.import.ts", "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))" }, { "name": "entity.name.function.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)" } ] }, { "include": "#comment" }, { "name": "meta.function-call.ts punctuation.accessor.optional.ts", "match": "\\?\\." }, { "name": "meta.type.parameters.ts", "begin": "\\<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.ts" } }, "end": "\\>", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.ts" } }, "patterns": [ { "include": "#type" }, { "include": "#punctuation-comma" } ] }, { "include": "#paren-expression" } ] }, "new-expr": { "name": "new.expr.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "beginCaptures": { "1": { "name": "keyword.operator.new.ts" } }, "end": "(?<=\\))|(?=[;),}\\]]|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", "patterns": [ { "include": "#paren-expression" }, { "include": "#class-declaration" }, { "include": "#type" } ] }, "paren-expression": { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.ts" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.ts" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "cast": { "patterns": [ { "name": "cast.expr.ts", "begin": "(?:(?<=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)", "beginCaptures": { "1": { "name": "meta.brace.angle.ts" } }, "end": "(\\>)\\s*", "endCaptures": { "1": { "name": "meta.brace.angle.ts" } }, "patterns": [ { "include": "#type" } ] }, { "name": "cast.expr.ts", "begin": "(?:(?<=^))\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*>)", "beginCaptures": { "1": { "name": "meta.brace.angle.ts" } }, "end": "(\\>)\\s*", "endCaptures": { "1": { "name": "meta.brace.angle.ts" } }, "patterns": [ { "include": "#type" } ] } ] }, "expression-operators": { "patterns": [ { "name": "keyword.control.flow.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?", "captures": { "1": { "name": "keyword.control.flow.ts" }, "2": { "name": "keyword.generator.asterisk.ts" } } }, { "name": "keyword.operator.expression.delete.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.expression.in.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.expression.of.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.expression.instanceof.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.new.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "include": "#typeof-operator" }, { "name": "keyword.operator.expression.void.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", "beginCaptures": { "1": { "name": "keyword.control.as.ts" } }, "end": "(?=$|^|[;,:})\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+))", "patterns": [ { "include": "#type" } ] }, { "name": "keyword.operator.spread.ts", "match": "\\.\\.\\." }, { "name": "keyword.operator.assignment.compound.ts", "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=" }, { "name": "keyword.operator.assignment.compound.bitwise.ts", "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|=" }, { "name": "keyword.operator.bitwise.shift.ts", "match": "<<|>>>|>>" }, { "name": "keyword.operator.comparison.ts", "match": "===|!==|==|!=" }, { "name": "keyword.operator.relational.ts", "match": "<=|>=|<>|<|>" }, { "name": "keyword.operator.logical.ts", "match": "\\!|&&|\\|\\|" }, { "name": "keyword.operator.bitwise.ts", "match": "\\&|~|\\^|\\|" }, { "name": "keyword.operator.assignment.ts", "match": "\\=" }, { "name": "keyword.operator.decrement.ts", "match": "--" }, { "name": "keyword.operator.increment.ts", "match": "\\+\\+" }, { "name": "keyword.operator.arithmetic.ts", "match": "%|\\*|/|-|\\+" }, { "match": "(?<=[_$[:alnum:])])\\s*(/)(?![/*])", "captures": { "1": { "name": "keyword.operator.arithmetic.ts" } } } ] }, "typeof-operator": { "name": "keyword.operator.expression.typeof.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "literal": { "patterns": [ { "include": "#numeric-literal" }, { "include": "#boolean-literal" }, { "include": "#null-literal" }, { "include": "#undefined-literal" }, { "include": "#numericConstant-literal" }, { "include": "#array-literal" }, { "include": "#this-literal" }, { "include": "#super-literal" } ] }, "array-literal": { "name": "meta.array.literal.ts", "begin": "\\[", "beginCaptures": { "0": { "name": "meta.brace.square.ts" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.ts" } }, "patterns": [ { "include": "#expression" }, { "include": "#punctuation-comma" } ] }, "numeric-literal": { "patterns": [ { "name": "constant.numeric.hex.ts", "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$)" }, { "name": "constant.numeric.binary.ts", "match": "\\b(?<!\\$)0(b|B)[01][01_]*\\b(?!\\$)" }, { "name": "constant.numeric.octal.ts", "match": "\\b(?<!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$)" }, { "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$)", "captures": { "0": { "name": "constant.numeric.decimal.ts" }, "1": { "name": "meta.delimiter.decimal.period.ts" }, "2": { "name": "meta.delimiter.decimal.period.ts" }, "3": { "name": "meta.delimiter.decimal.period.ts" }, "4": { "name": "meta.delimiter.decimal.period.ts" }, "5": { "name": "meta.delimiter.decimal.period.ts" }, "6": { "name": "meta.delimiter.decimal.period.ts" } } } ] }, "boolean-literal": { "patterns": [ { "name": "constant.language.boolean.true.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "constant.language.boolean.false.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "null-literal": { "name": "constant.language.null.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "this-literal": { "name": "variable.language.this.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)" }, "super-literal": { "name": "variable.language.super.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)" }, "undefined-literal": { "name": "constant.language.undefined.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "numericConstant-literal": { "patterns": [ { "name": "constant.language.nan.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "constant.language.infinity.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" } ] }, "support-objects": { "patterns": [ { "name": "variable.language.arguments.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)" }, { "name": "support.class.builtin.ts", "match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)" }, { "name": "support.class.error.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)" }, { "name": "support.function.ts", "match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()" }, { "match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Math)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)", "captures": { "1": { "name": "support.constant.math.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" }, "4": { "name": "support.function.math.ts" }, "5": { "name": "support.constant.property.math.ts" } } }, { "match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(console)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)", "captures": { "1": { "name": "support.class.console.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" }, "4": { "name": "support.function.console.ts" } } }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(JSON)(?:\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(parse|stringify))?\\b(?!\\$)", "captures": { "1": { "name": "support.constant.json.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" }, "4": { "name": "support.function.json.ts" } } }, { "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (constructor|length|prototype|__proto__)\n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "support.variable.property.ts" }, "4": { "name": "support.constant.ts" } } }, { "match": "(?x) (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.)) \\b (?:\n (document|event|navigator|performance|screen|window)\n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)", "captures": { "1": { "name": "support.variable.dom.ts" }, "2": { "name": "support.class.dom.ts" } } }, { "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeType|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\\()", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "support.constant.dom.ts" }, "4": { "name": "support.variable.property.dom.ts" } } }, { "name": "support.class.node.ts", "match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)" }, { "match": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(process)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)", "captures": { "1": { "name": "support.variable.object.process.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" }, "4": { "name": "support.variable.property.process.ts" }, "5": { "name": "support.function.process.ts" } } }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)", "captures": { "1": { "name": "support.type.object.module.ts" }, "2": { "name": "support.type.object.module.ts" }, "3": { "name": "punctuation.accessor.ts" }, "4": { "name": "punctuation.accessor.optional.ts" }, "5": { "name": "support.type.object.module.ts" } } }, { "name": "support.variable.object.node.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)" }, { "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s*\n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "support.function.event-handler.ts" }, "4": { "name": "support.function.ts" }, "5": { "name": "support.function.dom.ts" } } } ] }, "identifiers": { "patterns": [ { "include": "#object-identifiers" }, { "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n # sure shot arrow functions even if => is on new line\n(\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\([^\\(\\)]*\\))|(\\[[^\\[\\]]*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{[^\\{\\}]*\\})|(\\[[^\\[\\]]*\\]))([^()]|(\\([^\\(\\)]*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "entity.name.function.ts" } } }, { "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "variable.other.constant.property.ts" } } }, { "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*([_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "variable.other.property.ts" } } }, { "name": "variable.other.constant.ts", "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" }, { "name": "variable.other.readwrite.ts", "match": "[_$[:alpha:]][_$[:alnum:]]*" } ] }, "object-identifiers": { "patterns": [ { "name": "support.class.ts", "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" }, { "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" }, "3": { "name": "variable.other.constant.object.property.ts" }, "4": { "name": "variable.other.object.property.ts" } } }, { "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)", "captures": { "1": { "name": "variable.other.constant.object.ts" }, "2": { "name": "variable.other.object.ts" } } } ] }, "type-annotation": { "patterns": [ { "name": "meta.type.annotation.ts", "begin": "(:)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.ts" } }, "end": "(?<![:|&])((?=$|^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", "patterns": [ { "include": "#type" } ] }, { "name": "meta.type.annotation.ts", "begin": "(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.ts" } }, "end": "(?<![:|&])((?=[,);\\}\\]]|//)|(?==[^>])|(?=^\\s*$)|((?<=\\S)(?=\\s*$))|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", "patterns": [ { "include": "#type" } ] } ] }, "return-type": { "patterns": [ { "name": "meta.return.type.ts", "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.ts" } }, "end": "(?<![:|&])(?=$|^|[{};,]|//)", "patterns": [ { "include": "#return-type-core" } ] }, { "name": "meta.return.type.ts", "begin": "(?<=\\))\\s*(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.ts" } }, "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", "patterns": [ { "include": "#return-type-core" } ] } ] }, "return-type-core": { "patterns": [ { "include": "#comment" }, { "begin": "(?<=[:|&])(?=\\s*\\{)", "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "include": "#type-predicate-operator" }, { "include": "#type" } ] }, "arrow-return-type": { "name": "meta.return.type.arrow.ts", "begin": "(?<=\\))\\s*(:)", "beginCaptures": { "1": { "name": "keyword.operator.type.annotation.ts" } }, "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))", "patterns": [ { "begin": "(?<=[:])(?=\\s*\\{)", "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "include": "#type-predicate-operator" }, { "include": "#type" } ] }, "type-parameters": { "name": "meta.type.parameters.ts", "begin": "(<)", "beginCaptures": { "1": { "name": "punctuation.definition.typeparameters.begin.ts" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.ts" } }, "patterns": [ { "include": "#comment" }, { "name": "storage.modifier.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.assignment.ts", "match": "\\=(?!>)" }, { "include": "#type" }, { "include": "#punctuation-comma" } ] }, "type": { "patterns": [ { "include": "#comment" }, { "include": "#string" }, { "include": "#numeric-literal" }, { "include": "#type-primitive" }, { "include": "#type-builtin-literals" }, { "include": "#type-parameters" }, { "include": "#type-tuple" }, { "include": "#type-object" }, { "include": "#type-conditional" }, { "include": "#type-operators" }, { "include": "#type-fn-type-parameters" }, { "include": "#type-paren-or-function-parameters" }, { "include": "#type-function-return-type" }, { "include": "#type-name" } ] }, "type-primitive": { "name": "support.type.primitive.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|boolean|symbol|any|void|never)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "type-builtin-literals": { "name": "support.type.builtin.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "type-tuple": { "name": "meta.type.tuple.ts", "begin": "\\[", "beginCaptures": { "0": { "name": "meta.brace.square.ts" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.ts" } }, "patterns": [ { "include": "#type" }, { "include": "#punctuation-comma" } ] }, "type-object": { "name": "meta.object.type.ts", "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [ { "include": "#comment" }, { "include": "#method-declaration" }, { "include": "#indexer-declaration" }, { "include": "#indexer-mapped-type-declaration" }, { "include": "#field-declaration" }, { "include": "#type-annotation" }, { "begin": "\\.\\.\\.", "beginCaptures": { "0": { "name": "keyword.operator.spread.ts" } }, "end": "(?=\\}|;|,|$)|(?<=\\})", "patterns": [ { "include": "#type" } ] }, { "include": "#punctuation-comma" }, { "include": "#punctuation-semicolon" }, { "include": "#type" } ] }, "type-conditional": { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s+(extends)\\s+", "captures": { "1": { "name": "entity.name.type.ts" }, "2": { "name": "storage.modifier.ts" } } }, "type-paren-or-function-parameters": { "name": "meta.type.paren.cover.ts", "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.ts" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.ts" } }, "patterns": [ { "include": "#type" }, { "include": "#function-parameters" } ] }, "type-fn-type-parameters": { "patterns": [ { "name": "meta.type.constructor.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\b(?=\\s*\\<)", "captures": { "1": { "name": "keyword.control.new.ts" } } }, { "name": "meta.type.constructor.ts", "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\b\\s*(?=\\()", "beginCaptures": { "1": { "name": "keyword.control.new.ts" } }, "end": "(?<=\\))", "patterns": [ { "include": "#function-parameters" } ] }, { "name": "meta.type.function.ts", "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)", "end": "(?<=\\))", "patterns": [ { "include": "#function-parameters" } ] } ] }, "type-function-return-type": { "patterns": [ { "name": "meta.type.function.return.ts", "begin": "(=>)(?=\\s*\\S)", "beginCaptures": { "1": { "name": "storage.type.function.arrow.ts" } }, "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)", "patterns": [ { "include": "#type-function-return-type-core" } ] }, { "name": "meta.type.function.return.ts", "begin": "=>", "beginCaptures": { "0": { "name": "storage.type.function.arrow.ts" } }, "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", "patterns": [ { "include": "#type-function-return-type-core" } ] } ] }, "type-function-return-type-core": { "patterns": [ { "include": "#comment" }, { "begin": "(?<==>)(?=\\s*\\{)", "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "include": "#type-predicate-operator" }, { "include": "#type" } ] }, "type-operators": { "patterns": [ { "include": "#typeof-operator" }, { "begin": "([&|])(?=\\s*\\{)", "beginCaptures": { "0": { "name": "keyword.operator.type.ts" } }, "end": "(?<=\\})", "patterns": [ { "include": "#type-object" } ] }, { "begin": "[&|]", "beginCaptures": { "0": { "name": "keyword.operator.type.ts" } }, "end": "(?=\\S)" }, { "name": "keyword.operator.expression.keyof.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, { "name": "keyword.operator.ternary.ts", "match": "(\\?|\\:)" }, { "name": "keyword.operator.expression.infer.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))infer(?=\\s+[_$[:alpha:]])" } ] }, "type-predicate-operator": { "name": "keyword.operator.expression.is.ts", "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" }, "type-name": { "patterns": [ { "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", "captures": { "1": { "name": "entity.name.type.module.ts" }, "2": { "name": "punctuation.accessor.ts" }, "3": { "name": "punctuation.accessor.optional.ts" } } }, { "name": "entity.name.type.ts", "match": "[_$[:alpha:]][_$[:alnum:]]*" } ] }, "punctuation-comma": { "name": "punctuation.separator.comma.ts", "match": "," }, "punctuation-semicolon": { "name": "punctuation.terminator.statement.ts", "match": ";" }, "punctuation-accessor": { "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", "captures": { "1": { "name": "punctuation.accessor.ts" }, "2": { "name": "punctuation.accessor.optional.ts" } } }, "string": { "patterns": [ { "include": "#qstring-single" }, { "include": "#qstring-double" } ] }, "qstring-double": { "name": "string.quoted.double.ts", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ts" } }, "end": "(\")|((?:[^\\\\\\n])$)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.ts" }, "2": { "name": "invalid.illegal.newline.ts" } }, "patterns": [ { "include": "#string-character-escape" } ] }, "qstring-single": { "name": "string.quoted.single.ts", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ts" } }, "end": "(\\')|((?:[^\\\\\\n])$)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.ts" }, "2": { "name": "invalid.illegal.newline.ts" } }, "patterns": [ { "include": "#string-character-escape" } ] }, "string-character-escape": { "name": "constant.character.escape.ts", "match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" }, "template": { "name": "string.template.ts", "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", "beginCaptures": { "1": { "name": "entity.name.function.tagged-template.ts" }, "2": { "name": "punctuation.definition.string.template.begin.ts" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.string.template.end.ts" } }, "patterns": [ { "include": "#template-substitution-element" }, { "include": "#string-character-escape" } ] }, "template-substitution-element": { "name": "meta.template.expression.ts", "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.ts" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.ts" } }, "patterns": [ { "include": "#expression" } ], "contentName": "meta.embedded.line.ts" }, "regex": { "patterns": [ { "name": "string.regexp.ts", "begin": "(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimuy]*(?!\\s*[a-zA-Z0-9_$]))", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.ts" } }, "end": "(/)([gimuy]*)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.ts" }, "2": { "name": "keyword.other.ts" } }, "patterns": [ { "include": "#regexp" } ] }, { "name": "string.regexp.ts", "begin": "(?<![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimuy]*(?!\\s*[a-zA-Z0-9_$]))", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ts" } }, "end": "(/)([gimuy]*)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.ts" }, "2": { "name": "keyword.other.ts" } }, "patterns": [ { "include": "#regexp" } ] } ] }, "regexp": { "patterns": [ { "name": "keyword.control.anchor.regexp", "match": "\\\\[bB]|\\^|\\$" }, { "name": "keyword.other.back-reference.regexp", "match": "\\\\[1-9]\\d*" }, { "name": "keyword.operator.quantifier.regexp", "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" }, { "name": "keyword.operator.or.regexp", "match": "\\|" }, { "name": "meta.group.assertion.regexp", "begin": "(\\()((\\?=)|(\\?!))", "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "2": { "name": "punctuation.definition.group.assertion.regexp" }, "3": { "name": "meta.assertion.look-ahead.regexp" }, "4": { "name": "meta.assertion.negative-look-ahead.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } }, "patterns": [ { "include": "#regexp" } ] }, { "name": "meta.group.regexp", "begin": "\\((\\?:)?", "beginCaptures": { "0": { "name": "punctuation.definition.group.regexp" }, "1": { "name": "punctuation.definition.group.no-capture.regexp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.regexp" } }, "patterns": [ { "include": "#regexp" } ] }, { "name": "constant.other.character-class.set.regexp", "begin": "(\\[)(\\^)?", "beginCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" }, "2": { "name": "keyword.operator.negation.regexp" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" } }, "patterns": [ { "name": "constant.other.character-class.range.regexp", "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", "captures": { "1": { "name": "constant.character.numeric.regexp" }, "2": { "name": "constant.character.control.regexp" }, "3": { "name": "constant.character.escape.backslash.regexp" }, "4": { "name": "constant.character.numeric.regexp" }, "5": { "name": "constant.character.control.regexp" }, "6": { "name": "constant.character.escape.backslash.regexp" } } }, { "include": "#regex-character-class" } ] }, { "include": "#regex-character-class" } ] }, "regex-character-class": { "patterns": [ { "name": "constant.other.character-class.regexp", "match": "\\\\[wWsSdDtrnvf]|\\." }, { "name": "constant.character.numeric.regexp", "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" }, { "name": "constant.character.control.regexp", "match": "\\\\c[A-Z]" }, { "name": "constant.character.escape.backslash.regexp", "match": "\\\\." } ] }, "comment": { "patterns": [ { "name": "comment.block.documentation.ts", "begin": "/\\*\\*(?!/)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.ts" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.ts" } }, "patterns": [ { "include": "#docblock" } ] }, { "name": "comment.block.ts", "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", "beginCaptures": { "1": { "name": "punctuation.definition.comment.ts" }, "2": { "name": "storage.type.internaldeclaration.ts" }, "3": { "name": "punctuation.decorator.internaldeclaration.ts" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.ts" } } }, { "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.ts" }, "2": { "name": "comment.line.double-slash.ts" }, "3": { "name": "punctuation.definition.comment.ts" }, "4": { "name": "storage.type.internaldeclaration.ts" }, "5": { "name": "punctuation.decorator.internaldeclaration.ts" } }, "end": "(?=^)", "contentName": "comment.line.double-slash.ts" } ] }, "directives": { "name": "comment.line.triple-slash.directive.ts", "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")))+\\s*/>\\s*$)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.ts" } }, "end": "(?=^)", "patterns": [ { "name": "meta.tag.ts", "begin": "(<)(reference|amd-dependency|amd-module)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.directive.ts" }, "2": { "name": "entity.name.tag.directive.ts" } }, "end": "/>", "endCaptures": { "0": { "name": "punctuation.definition.tag.directive.ts" } }, "patterns": [ { "name": "entity.other.attribute-name.directive.ts", "match": "path|types|no-default-lib|name" }, { "name": "keyword.operator.assignment.ts", "match": "=" }, { "include": "#string" } ] } ] }, "docblock": { "patterns": [ { "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "constant.language.access-type.jsdoc" } } }, { "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" }, "4": { "name": "punctuation.definition.bracket.angle.begin.jsdoc" }, "5": { "name": "constant.other.email.link.underline.jsdoc" }, "6": { "name": "punctuation.definition.bracket.angle.end.jsdoc" } } }, { "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" }, "4": { "name": "keyword.operator.control.jsdoc" }, "5": { "name": "entity.name.type.instance.jsdoc" } } }, { "name": "meta.example.jsdoc", "begin": "((@)example)\\s+", "end": "(?=@|\\*/)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "patterns": [ { "match": "^\\s\\*\\s+" }, { "contentName": "constant.other.description.jsdoc", "begin": "\\G(<)caption(>)", "beginCaptures": { "0": { "name": "entity.name.tag.inline.jsdoc" }, "1": { "name": "punctuation.definition.bracket.angle.begin.jsdoc" }, "2": { "name": "punctuation.definition.bracket.angle.end.jsdoc" } }, "end": "(</)caption(>)|(?=\\*/)", "endCaptures": { "0": { "name": "entity.name.tag.inline.jsdoc" }, "1": { "name": "punctuation.definition.bracket.angle.begin.jsdoc" }, "2": { "name": "punctuation.definition.bracket.angle.end.jsdoc" } } }, { "match": "[^\\s@*](?:[^*]|\\*[^/])*", "captures": { "0": { "name": "source.embedded.ts" } } } ] }, { "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "constant.language.symbol-type.jsdoc" } } }, { "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.link.underline.jsdoc" }, "4": { "name": "entity.name.type.instance.jsdoc" } } }, { "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } } }, { "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } } }, { "begin": "((@)typedef)\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" }, { "name": "entity.name.type.instance.jsdoc", "match": "(?:[^@\\s*/]|\\*[^/])+" } ] }, { "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" }, { "name": "variable.other.jsdoc", "match": "([A-Za-z_$][\\w$.\\[\\]]*)" }, { "name": "variable.other.jsdoc", "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", "captures": { "1": { "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" }, "2": { "name": "keyword.operator.assignment.jsdoc" }, "3": { "name": "source.embedded.ts" }, "4": { "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" }, "5": { "name": "invalid.illegal.syntax.jsdoc" } } } ] }, { "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [ { "include": "#jsdoctype" } ] }, { "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" } } }, { "contentName": "variable.other.jsdoc", "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" }, "4": { "name": "punctuation.definition.string.begin.jsdoc" } }, "end": "(\\3)|(?=$|\\*/)", "endCaptures": { "0": { "name": "variable.other.jsdoc" }, "1": { "name": "punctuation.definition.string.end.jsdoc" } } }, { "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } } }, { "name": "storage.type.class.jsdoc", "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", "captures": { "1": { "name": "punctuation.definition.block.tag.jsdoc" } } }, { "include": "#inline-tags" } ] }, "brackets": { "patterns": [ { "begin": "{", "end": "}|(?=\\*/)", "patterns": [ { "include": "#brackets" } ] }, { "begin": "\\[", "end": "\\]|(?=\\*/)", "patterns": [ { "include": "#brackets" } ] } ] }, "inline-tags": { "patterns": [ { "name": "constant.other.description.jsdoc", "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", "captures": { "1": { "name": "punctuation.definition.bracket.square.begin.jsdoc" }, "2": { "name": "punctuation.definition.bracket.square.end.jsdoc" } } }, { "name": "entity.name.type.instance.jsdoc", "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", "beginCaptures": { "1": { "name": "punctuation.definition.bracket.curly.begin.jsdoc" }, "2": { "name": "storage.type.class.jsdoc" }, "3": { "name": "punctuation.definition.inline.tag.jsdoc" } }, "end": "}|(?=\\*/)", "endCaptures": { "0": { "name": "punctuation.definition.bracket.curly.end.jsdoc" } }, "patterns": [ { "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", "captures": { "1": { "name": "variable.other.link.underline.jsdoc" }, "2": { "name": "punctuation.separator.pipe.jsdoc" } } }, { "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", "captures": { "1": { "name": "variable.other.description.jsdoc" }, "2": { "name": "punctuation.separator.pipe.jsdoc" } } } ] } ] }, "jsdoctype": { "patterns": [ { "name": "invalid.illegal.type.jsdoc", "match": "\\G{(?:[^}*]|\\*[^/}])+$" }, { "contentName": "entity.name.type.instance.jsdoc", "begin": "\\G({)", "beginCaptures": { "0": { "name": "entity.name.type.instance.jsdoc" }, "1": { "name": "punctuation.definition.bracket.curly.begin.jsdoc" } }, "end": "((}))\\s*|(?=\\*/)", "endCaptures": { "1": { "name": "entity.name.type.instance.jsdoc" }, "2": { "name": "punctuation.definition.bracket.curly.end.jsdoc" } }, "patterns": [ { "include": "#brackets" } ] } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/vala.tmLanguage.json ================================================ { "foldingStartMarker": "(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)", "foldingStopMarker": "^\\s*(\\}|// \\}\\}\\}$)", "repository": { "constants-and-special-vars": { "patterns": [ { "match": "\\b(true|false|null)\\b", "name": "constant.language.vala" }, { "match": "\\b(this|base)\\b", "name": "variable.language.vala" }, { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b", "name": "constant.numeric.vala" }, { "match": "(\\.)?\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b", "name": "constant.other.vala", "captures": { "1": { "name": "keyword.operator.dereference.vala" } } } ] }, "values": { "patterns": [ { "include": "#strings" }, { "include": "#object-types" }, { "include": "#constants-and-special-vars" } ] }, "class": { "begin": "(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)", "endCaptures": { "0": { "name": "punctuation.section.class.end.vala" } }, "end": "}", "comment": "attempting to put namespace in here.", "name": "meta.class.vala", "patterns": [ { "include": "#storage-modifiers" }, { "include": "#comments" }, { "match": "(class|(?:@)?interface|enum|struct|namespace)\\s+([\\w\\.]+)", "name": "meta.class.identifier.vala", "captures": { "1": { "name": "storage.modifier.vala" }, "2": { "name": "entity.name.type.class.vala" } } }, { "begin": ":", "end": "(?={|,)", "patterns": [ { "include": "#object-types-inherited" }, { "include": "#comments" } ], "name": "meta.definition.class.inherited.classes.vala", "beginCaptures": { "0": { "name": "storage.modifier.extends.vala" } } }, { "begin": "(,)\\s", "end": "(?=\\{)", "patterns": [ { "include": "#object-types-inherited" }, { "include": "#comments" } ], "name": "meta.definition.class.implemented.interfaces.vala", "beginCaptures": { "1": { "name": "storage.modifier.implements.vala" } } }, { "begin": "{", "end": "(?=})", "patterns": [{ "include": "#class-body" }], "name": "meta.class.body.vala" } ] }, "parameters": { "patterns": [ { "match": "final", "name": "storage.modifier.vala" }, { "include": "#primitive-arrays" }, { "include": "#primitive-types" }, { "include": "#object-types" }, { "match": "\\w+", "name": "variable.parameter.vala" } ] }, "code": { "patterns": [ { "include": "#comments" }, { "include": "#class" }, { "begin": "{", "end": "}", "patterns": [{ "include": "#code" }] }, { "include": "#assertions" }, { "include": "#parens" }, { "include": "#constants-and-special-vars" }, { "include": "#anonymous-classes-and-new" }, { "include": "#keywords" }, { "include": "#storage-modifiers" }, { "include": "#strings" }, { "include": "#all-types" } ] }, "annotations": { "patterns": [ { "begin": "(@[^ (]+)(\\()", "endCaptures": { "1": { "name": "punctuation.definition.annotation-arguments.end.vala" } }, "end": "(\\))", "patterns": [ { "match": "(\\w*)\\s*(=)", "captures": { "1": { "name": "constant.other.key.vala" }, "2": { "name": "keyword.operator.assignment.vala" } } }, { "include": "#code" }, { "match": ",", "name": "punctuation.seperator.property.vala" } ], "name": "meta.declaration.annotation.vala", "beginCaptures": { "1": { "name": "storage.type.annotation.vala" }, "2": { "name": "punctuation.definition.annotation-arguments.begin.vala" } } }, { "match": "@\\w*", "name": "storage.type.annotation.vala" } ] }, "anonymous-classes-and-new": { "begin": "\\bnew\\b", "end": "(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)", "patterns": [ { "begin": "(\\w+)\\s*(?=\\[)", "end": "}|(?=;|\\))", "patterns": [ { "begin": "\\[", "end": "\\]", "patterns": [{ "include": "#code" }] }, { "begin": "{", "end": "(?=})", "patterns": [{ "include": "#code" }] } ], "beginCaptures": { "1": { "name": "storage.type.vala" } } }, { "begin": "(?=\\w.*\\()", "end": "(?<=\\))", "patterns": [ { "include": "#object-types" }, { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#code" }], "beginCaptures": { "1": { "name": "storage.type.vala" } } } ] }, { "begin": "{", "end": "}", "patterns": [{ "include": "#class-body" }], "name": "meta.inner-class.vala" } ], "beginCaptures": { "0": { "name": "keyword.control.new.vala" } } }, "assertions": { "patterns": [ { "begin": "\\b(assert|requires|ensures)\\s", "end": "$", "patterns": [ { "match": ":", "name": "keyword.operator.assert.expression-seperator.vala" }, { "include": "#code" } ], "name": "meta.declaration.assertion.vala", "beginCaptures": { "1": { "name": "keyword.control.assert.vala" } } } ] }, "object-types-inherited": { "patterns": [ { "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)<", "end": ">|[^\\w\\s,<]", "patterns": [ { "include": "#object-types" }, { "begin": "<", "end": ">|[^\\w\\s,<]", "comment": "This is just to support <>'s with no actual type prefix", "name": "storage.type.generic.vala" } ], "name": "entity.other.inherited-class.vala" }, { "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*", "name": "entity.other.inherited-class.vala", "captures": { "1": { "name": "keyword.operator.dereference.vala" } } } ] }, "class-body": { "patterns": [ { "include": "#comments" }, { "include": "#class" }, { "include": "#enums" }, { "include": "#methods" }, { "include": "#annotations" }, { "include": "#storage-modifiers" }, { "include": "#code" } ] }, "strings": { "patterns": [ { "begin": "@\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.vala" } }, "end": "\"", "patterns": [ { "match": "\\\\.|%[\\w\\.\\-]+|\\$(\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))", "name": "constant.character.escape.vala" } ], "name": "string.quoted.interpolated.vala", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.vala" } } }, { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.vala" } }, "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.vala" }, { "match": "%[\\w\\.\\-]+", "name": "constant.character.escape.vala" } ], "name": "string.quoted.double.vala", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.vala" } } }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.vala" } }, "end": "'", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.vala" } ], "name": "string.quoted.single.vala", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.vala" } } }, { "begin": "\"\"\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.vala" } }, "end": "\"\"\"", "patterns": [ { "match": "%[\\w\\.\\-]+", "name": "constant.character.escape.vala" } ], "name": "string.quoted.triple.vala", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.vala" } } } ] }, "keywords": { "patterns": [ { "match": "\\b(try|catch|finally|throw)\\b", "name": "keyword.control.catch-exception.vala" }, { "match": "\\?|:|\\?\\?", "name": "keyword.control.vala" }, { "match": "\\b(return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b", "name": "keyword.control.vala" }, { "match": "\\b(typeof|is|as)\\b", "name": "keyword.operator.vala" }, { "match": "(==|!=|<=|>=|<>|<|>)", "name": "keyword.operator.comparison.vala" }, { "match": "(=)", "name": "keyword.operator.assignment.vala" }, { "match": "(\\-\\-|\\+\\+)", "name": "keyword.operator.increment-decrement.vala" }, { "match": "(\\-|\\+|\\*|\\/|%)", "name": "keyword.operator.arithmetic.vala" }, { "match": "(!|&&|\\|\\|)", "name": "keyword.operator.logical.vala" }, { "match": "(?<=\\S)\\.(?=\\S)", "name": "keyword.operator.dereference.vala" }, { "match": ";", "name": "punctuation.terminator.vala" }, { "match": "(owned|unowned)", "name": "keyword.operator.ownership" } ] }, "comments-inline": { "patterns": [ { "begin": "/\\*", "end": "\\*/", "name": "comment.block.vala", "captures": { "0": { "name": "punctuation.definition.comment.vala" } } }, { "match": "\\s*((//).*$\\n?)", "captures": { "1": { "name": "comment.line.double-slash.vala" }, "2": { "name": "punctuation.definition.comment.vala" } } } ] }, "throws": { "begin": "throws", "end": "(?={|;)", "patterns": [{ "include": "#object-types" }], "name": "meta.throwables.vala", "beginCaptures": { "0": { "name": "storage.modifier.vala" } } }, "primitive-types": { "patterns": [ { "comment": "var is not really a primitive, but acts like one in most cases", "match": "\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b", "name": "storage.type.primitive.vala" } ] }, "all-types": { "patterns": [ { "include": "#primitive-arrays" }, { "include": "#primitive-types" }, { "include": "#object-types" } ] }, "namespace": { "begin": "^(?=\\s*[A-Z0-9_]+\\s*({|\\(|,))", "end": "(?=;|})", "comment": "This is not quite right. See the class grammar right now", "patterns": [ { "begin": "\\w+", "end": "(?=,|;|})", "patterns": [ { "include": "#parens" }, { "begin": "{", "end": "}", "patterns": [{ "include": "#code" }] } ], "name": "meta.namespace.vala", "beginCaptures": { "0": { "name": "constant.other.namespace.vala" } } } ] }, "storage-modifiers": { "comment": "Not sure about unsafe and readonly", "match": "\\b(public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b", "captures": { "1": { "name": "storage.modifier.vala" } } }, "enums": { "begin": "^(?=\\s*[A-Z0-9_]+\\s*({|\\(|,))", "end": "(?=;|})", "patterns": [ { "begin": "\\w+", "end": "(?=,|;|})", "patterns": [ { "include": "#parens" }, { "begin": "{", "end": "}", "patterns": [{ "include": "#class-body" }] } ], "name": "meta.enum.vala", "beginCaptures": { "0": { "name": "constant.other.enum.vala" } } } ] }, "comments": { "patterns": [ { "match": "/\\*\\*/", "name": "comment.block.empty.vala", "captures": { "0": { "name": "punctuation.definition.comment.vala" } } }, { "include": "text.html.javadoc" }, { "include": "#comments-inline" } ] }, "methods": { "begin": "(?!new)(?=\\w.*\\s+)(?=[^=]+\\()", "end": "}|(?=;)", "patterns": [ { "include": "#storage-modifiers" }, { "begin": "([\\~\\w\\.]+)\\s*\\(", "end": "\\)", "patterns": [{ "include": "#parameters" }], "name": "meta.method.identifier.vala", "beginCaptures": { "1": { "name": "entity.name.function.vala" } } }, { "begin": "(?=\\w.*\\s+\\w+\\s*\\()", "end": "(?=\\w+\\s*\\()", "patterns": [{ "include": "#all-types" }], "name": "meta.method.return-type.vala" }, { "include": "#throws" }, { "begin": "{", "end": "(?=})", "patterns": [{ "include": "#code" }], "name": "meta.method.body.vala" } ], "name": "meta.method.vala" }, "primitive-arrays": { "patterns": [ { "match": "\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(\\[\\])*\\b", "name": "storage.type.primitive.array.vala" } ] }, "parens": { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#code" }] }, "object-types": { "patterns": [ { "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)<", "end": ">|[^\\w\\s,\\?<\\[\\]]", "patterns": [ { "include": "#object-types" }, { "begin": "<", "end": ">|[^\\w\\s,\\[\\]<]", "comment": "This is just to support <>'s with no actual type prefix", "name": "storage.type.generic.vala" } ], "name": "storage.type.generic.vala" }, { "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)", "end": "(?=[^\\]\\s])", "patterns": [ { "begin": "\\[", "end": "\\]", "patterns": [{ "include": "#code" }] } ], "name": "storage.type.object.array.vala" }, { "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*\\b", "name": "storage.type.vala", "captures": { "1": { "name": "keyword.operator.dereference.vala" } } } ] } }, "fileTypes": ["vala", "vapi"], "uuid": "5FBC8212-3C2F-45AC-83D2-0C9195878913", "patterns": [ { "match": "^\\s*(using)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?", "name": "meta.using.vala", "captures": { "1": { "name": "keyword.other.using.vala" }, "2": { "name": "storage.modifier.using.vala" }, "3": { "name": "punctuation.terminator.vala" } } }, { "include": "#code" } ], "comment": "Based heavily on the Java bundle's language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n", "name": "Vala", "scopeName": "source.vala" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/velocity.tmLanguage.json ================================================ { "foldingStopMarker": "\\#end\\b|\\#\\{end", "foldingStartMarker": "(?x)\n\t\t\\#(?:\n\t\t\t (?:macro|if|foreach)\\b \\s* \\(\n\t\t\t|\\{ (?:macro|if|foreach)\\b \\s* \\(\n\t\t).*(?!\\#\\{?end).*$", "repository": { "keyword": { "patterns": [ { "match": "\\b(if|while|for|in|foreach|return|ifelse|else|case|macro|end|stop)\\b", "name": "keyword.control.velocity" }, { "match": "\\b(set|parse|cparse|config|include|cinclude)\\b", "name": "keyword.velocity" } ] }, "directives-arguments": { "patterns": [ { "include": "#nest-parens" }, { "include": "#directives" }, { "include": "#function" }, { "include": "#variable" }, { "include": "#array" }, { "include": "#string" }, { "include": "#constant" }, { "include": "#operators" } ] }, "constant": { "patterns": [ { "match": "\\b(true|false|null)\\b", "name": "constant.language.java" }, { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b", "name": "constant.numeric.velocity" } ] }, "directives": { "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t(\\#) (?:\n\t\t\t\t\t\t\t \\b(?:else|end)\\b\n\t\t\t\t\t\t\t|(\\{) \\b(?:else|end)\\b (\\})\n\t\t\t\t\t\t)", "name": "source.velocity.embedded", "captures": { "3": { "name": "punctuation.definition.keyword.end.velocity" }, "1": { "name": "punctuation.definition.keyword.velocity" }, "2": { "name": "punctuation.definition.keyword.begin.velocity" }, "0": { "name": "keyword.control.directive.velocity" } } }, { "begin": "((#)\\b(?:macro)\\b)\\s*(\\()", "endCaptures": { "1": { "name": "punctuation.definition.parameters.begin.velocity" } }, "end": "(\\))", "patterns": [ { "match": "(?<=#macro\\()\\s*([_a-zA-Z][-a-zA-Z0-9_]*)", "captures": { "1": { "name": "entity.name.type.module.macro.velocity" } } }, { "include": "#directives-arguments" } ], "name": "source.velocity.embedded", "beginCaptures": { "1": { "name": "storage.type.macro.velocity" }, "2": { "name": "punctuation.definition.keyword.velocity" }, "3": { "name": "punctuation.definition.parameters.begin.velocity" } } }, { "begin": "((#)\\b(?:set)\\b)\\s*(\\()", "endCaptures": { "1": { "name": "punctuation.definition.parameters.begin.velocity" } }, "end": "(\\))", "patterns": [{ "include": "#directives-arguments" }], "name": "source.velocity.embedded", "beginCaptures": { "1": { "name": "storage.type.variable.velocity" }, "2": { "name": "punctuation.definition.keyword.velocity" }, "3": { "name": "punctuation.definition.parameters.begin.velocity" } } }, { "begin": "((#)\\b(?:if|elseif|foreach)\\b)\\s*(\\()", "endCaptures": { "1": { "name": "punctuation.definition.arguments.begin.velocity" } }, "end": "(\\))", "patterns": [{ "include": "#directives-arguments" }], "name": "source.velocity.embedded", "beginCaptures": { "1": { "name": "keyword.control.directive.velocity" }, "2": { "name": "punctuation.definition.keyword.velocity" }, "3": { "name": "punctuation.definition.arguments.begin.velocity" } } }, { "begin": "((#)\\b(?:[a-zA-Z][-a-zA-Z0-9_]*)\\b)\\s*(\\()", "endCaptures": { "1": { "name": "punctuation.definition.arguments.begin.velocity" } }, "end": "(\\))", "patterns": [{ "include": "#directives-arguments" }], "name": "source.velocity.embedded", "beginCaptures": { "1": { "name": "entity.name.function.velocity" }, "2": { "name": "punctuation.definition.function.velocity" }, "3": { "name": "punctuation.definition.arguments.begin.velocity" } } }, { "begin": "((#)\\b(?:[a-zA-Z][-a-zA-Z0-9_]*)\\b)\\s*(\\()", "endCaptures": { "1": { "name": "punctuation.definition.arguments.begin.velocity" } }, "end": "(\\))", "patterns": [{ "include": "#directives-arguments" }], "name": "source.velocity.embedded", "beginCaptures": { "1": { "name": "entity.name.function.velocity" }, "2": { "name": "punctuation.definition.function.velocity" }, "3": { "name": "punctuation.definition.arguments.begin.velocity" } } } ] }, "string": { "patterns": [ { "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.velocity" }, { "include": "#directives" }, { "include": "#function" }, { "include": "#variable" }, { "begin": "\\$\\{", "end": "\\}", "name": "source.velocity.embedded.source" } ], "name": "string.quoted.double.velocity" }, { "begin": "'", "end": "'", "patterns": [ { "match": "\\\\'", "name": "constant.character.escape.velocity" } ], "name": "string.quoted.single.velocity" } ] }, "function": { "patterns": [ { "beginCaptures": { "7": { "name": "punctuation.definition.arguments.begin.velocity" }, "3": { "name": "variable.parameter.velocity" }, "4": { "name": "punctuation.separator.parameters.velocity" }, "0": { "name": "meta.function-call.method.with-arguments.velocity" }, "5": { "name": "entity.name.function.velocity" }, "1": { "name": "variable.other.readwrite.velocity" }, "6": { "name": "punctuation.definition.function.velocity" }, "2": { "name": "punctuation.definition.variable.velocity" } }, "match": "(?x)\n\t\t\t\t\t\t ((\\$ \\!? ) [a-zA-Z][-a-zA-Z0-9_]* \\b)\n\t\t\t\t\t\t\t( (?:(\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)* )\n\t\t\t\t\t\t\t( (?:(\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)+ ) (\\(\\s*\\))\n\t\t\t\t\t", "name": "source.velocity.embedded" }, { "begin": "(?x)\n\t\t\t\t\t\t ((\\$ \\!? ) [a-zA-Z][-a-zA-Z0-9_]* \\b)\n\t\t\t\t\t\t\t( (?:(\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)* )\n\t\t\t\t\t\t\t( (?:(\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)+ ) (\\()\\s*\n\t\t\t\t\t", "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.velocity" } }, "end": "\\s*(\\))", "patterns": [{ "include": "#function-arguments" }], "name": "source.velocity.embedded", "beginCaptures": { "7": { "name": "punctuation.definition.arguments.begin.velocity" }, "3": { "name": "variable.parameter.velocity" }, "4": { "name": "punctuation.separator.parameters.velocity" }, "0": { "name": "meta.function-call.method.with-arguments.velocity" }, "5": { "name": "entity.name.function.velocity" }, "1": { "name": "variable.other.readwrite.velocity" }, "6": { "name": "punctuation.definition.function.velocity" }, "2": { "name": "punctuation.definition.variable.velocity" } } }, { "begin": "(?x)\n\t\t\t\t\t\t \\$ \\!? \\{\n\t\t\t\t\t", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.velocity" } }, "end": "\\}", "patterns": [ { "match": "(\\w+)(\\(\\))", "name": "variable.other.readwrite.velocity", "captures": { "0": { "name": "meta.function-call.method.with-arguments.velocity" }, "1": { "name": "entity.name.function.velocity" }, "2": { "name": "punctuation.definition.arguments.velocity" } } }, { "begin": "(\\w+)(\\()", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.velocity" } }, "end": "\\)", "patterns": [{ "include": "#function-arguments" }], "name": "variable.other.readwrite.velocity", "captures": { "0": { "name": "meta.function-call.method.with-arguments.velocity" }, "1": { "name": "entity.name.function.velocity" }, "2": { "name": "punctuation.definition.arguments.begin.velocity" } } }, { "match": "\\w+", "name": "variable.other.readwrite.velocity" }, { "match": "\\.", "name": "punctuation.separator.parameters.velocity" } ], "name": "source.velocity.embedded", "captures": { "0": { "name": "punctuation.section.embedded.begin.velocity" } } } ] }, "nest-curly": { "patterns": [ { "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#nest-parens" }] } ] }, "variable": { "patterns": [ { "match": "(?x)\n\t\t\t\t\t\t ((\\$ \\!? ) [a-zA-Z][-a-zA-Z0-9_]*) \\b ( (?: (\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)+ ) (?!\\()\n\t\t\t\t\t\t|((\\$ \\!? \\{) [a-zA-Z][-a-zA-Z0-9_]*) \\b ( (?: (\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)+ ) ((\\}))\n\t\t\t\t\t", "name": "source.velocity.embedded", "captures": { "7": { "name": "variable.parameter.velocity" }, "3": { "name": "variable.parameter.velocity" }, "8": { "name": "punctuation.separator.parameters.velocity" }, "4": { "name": "punctuation.separator.parameters.velocity" }, "9": { "name": "variable.other.readwrite.velocity" }, "5": { "name": "variable.other.readwrite.velocity" }, "1": { "name": "variable.other.readwrite.velocity" }, "6": { "name": "punctuation.definition.variable.begin.velocity" }, "10": { "name": "punctuation.definition.variable.end.velocity" }, "2": { "name": "punctuation.definition.variable.velocity" } } }, { "match": "(?x)\n\t\t\t\t\t\t (\\$ \\!? ) [a-zA-Z][-a-zA-Z0-9_]* \\b\n\t\t\t\t\t\t|(\\$ \\!? \\{) [a-zA-Z][-a-zA-Z0-9_]* \\b (\\})\n\t\t\t\t\t", "name": "source.velocity.embedded", "captures": { "3": { "name": "punctuation.definition.variable.end.velocity" }, "1": { "name": "punctuation.definition.variable.velocity" }, "2": { "name": "punctuation.definition.variable.begin.velocity" }, "0": { "name": "variable.other.readwrite.velocity" } } } ] }, "nest-parens": { "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#nest-parens" }] } ] }, "operators": { "patterns": [ { "match": "\\bin\\b", "name": "keyword.operator.assignment.java" }, { "match": "(==|!=|<=|>=|<>|<|>)", "name": "keyword.operator.comparison.java" }, { "match": "=", "name": "keyword.operator.assignment.java" }, { "match": "(\\-\\-|\\+\\+)", "name": "keyword.operator.increment-decrement.java" }, { "match": "(\\-|\\+|\\*|\\/|%)", "name": "keyword.operator.arithmetic.java" }, { "match": "(!|&&|\\|\\|)", "name": "keyword.operator.logical.java" } ] }, "array": { "patterns": [ { "match": "(\\[)(-?\\d+)(\\.\\.)(-?\\d+)(\\])", "name": "meta.definition.range.java", "captures": { "3": { "name": "punctuation.separator.continuation.range.java" }, "1": { "name": "punctuation.definition.constant.range.begin.java" }, "4": { "name": "constant.numeric.integer.java" }, "2": { "name": "constant.numeric.integer.java" }, "5": { "name": "punctuation.definition.constant.range.end.java" } } }, { "begin": "\\[", "endCaptures": { "0": { "name": "punctuation.definition.array.end.velocity" } }, "end": "\\]", "patterns": [ { "include": "#nest-brackets" }, { "include": "#function" }, { "include": "#variable" }, { "include": "#array" }, { "include": "#string" }, { "include": "#constant" }, { "include": "#operators" }, { "match": ",", "name": "punctuation.separator.array.velocity" } ], "name": "meta.structure.array.velocity", "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.velocity" } } } ] }, "function-arguments": { "patterns": [ { "match": "(?x)\n\t\t\t\t\t\\s* (\\))( ( (?:(\\.) [a-zA-Z][-a-zA-Z0-9_]* \\b)+ ) (\\()\\s* )\n\t\t\t\t\t", "captures": { "3": { "name": "entity.name.function.velocity" }, "1": { "name": "punctuation.definition.arguments.end.velocity" }, "4": { "name": "punctuation.definition.function.velocity" }, "2": { "name": "meta.function-call.method.with-arguments.velocity" }, "5": { "name": "punctuation.definition.arguments.begin.velocity" } } }, { "include": "#nest-parens" }, { "include": "#directives" }, { "include": "#function" }, { "include": "#variable" }, { "include": "#array" }, { "include": "#string" }, { "include": "#constant" }, { "include": "#operators" } ] }, "nest-brackets": { "patterns": [ { "begin": "\\[", "end": "\\]", "patterns": [{ "include": "#nest-parens" }] } ] } }, "keyEquivalent": "^@V", "fileTypes": ["vm"], "uuid": "460426C7-D079-49DB-8E50-8E0B938644CA", "patterns": [ { "match": "\\\\[\\!\\#\\$\\\\]", "name": "source.velocity.embedded", "captures": { "0": { "name": "constant.character.escape.backslash.velocity" } } }, { "include": "#directives" }, { "include": "#function" }, { "include": "#variable" }, { "beginCaptures": { "0": { "name": "comment.line.double-number-sign" }, "1": { "name": "punctuation.definition.comment.velocity" } }, "match": "(\\#\\#).*$\\n?", "name": "source.velocity.embedded" }, { "begin": "(?=#\\*)", "end": "(?<=\\*#|\\*#\\n)", "patterns": [ { "begin": "\\#\\*\\*", "end": "\\*\\#", "name": "comment.block.documentation", "captures": { "0": { "name": "punctuation.definition.comment.velocity" } } }, { "begin": "\\#\\*", "end": "\\*\\#", "name": "comment.block", "captures": { "0": { "name": "punctuation.definition.comment.velocity" } } } ], "name": "source.velocity.embedded" } ], "name": "Velocity", "scopeName": "text.velocity" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/vhdl.tmLanguage.json ================================================ { "foldingStartMarker": "(?x)\n\t\t# From the start of the line make sure we are not going into a comment ...\n\t\t^(\n\t\t\t([^-]-?(?!-))*?\n\t\t\t\t(\n\t\t\t\t# Check for \"keyword ... is\"\n\t\t\t\t (\\b(?i:architecture|case|entity|function|package|procedure)\\b(.+?)(?i:\\bis)\\b)\n\n\t\t\t\t# Check for if statements\n\t\t\t\t|(\\b(?i:if)\\b(.+?)(?i:generate|then)\\b)\n\n\t\t\t\t# Check for and while statements\n\t\t\t\t|(\\b(?i:for|while)(.+?)(?i:loop|generate)\\b)\n\n\t\t\t\t# Check for keywords that do not require an is after it\n\t\t\t\t|(\\b(?i:component|process|record)\\b[^;]*?$)\n\n\t\t\t\t# From the beginning of the line, check for instantiation maps\n\t\t\t\t|(^\\s*\\b(?i:port|generic)\\b(?i:\\s+map\\b)?\\s*\\()\n\t\t\t)\n\t\t)\n\t", "foldingStopMarker": "(?x)\n\t\t# From the start of the line ...\n\t\t^(\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\t# Make sure we are not going into a comment ...\n\t\t\t\t\t([^-]-?(?!-))*?\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# The word end to the end of the line\n\t\t\t \t\t\t\t(?i:\\bend\\b).*$\\n?\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\n\t\t\t\t# ... a close paren followed by an optional semicolon as the only thing on the line\n\t\t\t |(\\s*?\\)\\s*?;?\\s*?$\\n?\n\t\t\t)\n\t\t)\n\t", "keyEquivalent": "^~V", "fileTypes": ["vhd", "vhdl", "vho"], "repository": { "block_processing": { "patterns": [ { "include": "#package_pattern" }, { "include": "#package_body_pattern" }, { "include": "#entity_pattern" }, { "include": "#architecture_pattern" } ] }, "procedure_definition_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word function $1\n\t\t\t\t\t\t((?i:procedure))\\s+\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A valid normal identifier $3\n\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z\\d_]*)\n\t\t\t\t\t\t\t# A valid quoted identifier $4\n\t\t\t\t\t\t\t|(\"\\S+\")\n\t\t\t\t\t\t\t# An invalid identifier $5\n\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t# Check to make sure we have a list is\n\t\t\t\t\t\t(?=\\s*(\\(|(?i:is)))\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "entity.name.function.procedure.end.vhdl" }, "7": { "name": "invalid.illegal.mismatched.identifier.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t((?i:end))\n\n\t\t\t\t\t\t# Optional word function $3\n\t\t\t\t\t\t(\\s+((?i:procedure)))?\n\n\t\t\t\t\t\t# Optional matched identifier $6 or mismatched identifier $7\n\t\t\t\t\t\t(\\s+((\\3|\\4)|(.+?)))?\n\n\t\t\t\t\t\t# Ending with whitespace and semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#parenthetical_list" }, { "include": "#control_patterns" }, { "include": "#type_pattern" }, { "include": "#record_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.procedure_definition.vhdl", "beginCaptures": { "3": { "name": "entity.name.function.procedure.begin.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "4": { "name": "entity.name.function.procedure.begin.vhdl" }, "5": { "name": "invalid.illegal.invalid.identifier.vhdl" } } } ] }, "while_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Check for an identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Followed by a colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# The for keyword $4\n\t\t\t\t\t\t\\b((?i:while))\\b\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "8": { "name": "invalid.illegal.mismatched.identifier" }, "4": { "name": "invalid.illegal.loop.keyword.required.vhdl" }, "7": { "name": "entity.name.tag.while.loop.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Followed by keyword loop $3\n\t\t\t\t\t\t\t ((?i:loop))\n\n\t\t\t\t\t\t\t# But it really is required $4\n\t\t\t\t\t\t\t|(\\S+)\n\t\t\t\t\t\t)\\b\n\n\t\t\t\t\t\t# The matching identifier $7 or an invalid identifier $8\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?\n\n\t\t\t\t\t\t# Only space and a semicolon left\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#control_patterns" }, { "include": "#cleanup" } ], "name": "meta.block.while.vhdl", "beginCaptures": { "2": { "name": "" }, "3": { "name": "punctuation.vhdl" }, "4": { "name": "keyword.language.vhdl" } } } ] }, "component_instantiation_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# Match a valid identifier $1\n\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t# Colon! $2\n\t\t\t\t\t\t\\s*(:)\\s*\n\n\t\t\t\t\t\t# Another valid identifier $3\n\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\\b\n\n\t\t\t\t\t\t# Make sure we are just the other word, or the beginning of\n\t\t\t\t\t\t# a generic or port mapping\n\t\t\t\t\t\t(?=\\s*($|generic|port))\n\t\t\t\t\t", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": ";", "patterns": [ { "include": "#parenthetical_list" }, { "include": "#cleanup" } ], "name": "meta.block.component_instantiation.vhdl", "beginCaptures": { "1": { "name": "entity.name.section.component_instantiation.vhdl" }, "2": { "name": "punctuation.vhdl" }, "3": { "name": "entity.name.tag.component.reference.vhdl" } } } ] }, "architecture_pattern": { "patterns": [ { "begin": "(?x)\n\n\t\t\t\t\t\t# The word architecture $1\n\t\t\t\t\t\t\\b((?i:architecture))\\s+\n\t\t\t\t\t\t\n\t\t\t\t\t\t# Followed up by a valid $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-z][a-zA-z0-9_]*)|(.+))(?=\\s)\\s+\n\n\t\t\t\t\t\t# The word of $5\n\t\t\t\t\t\t((?i:of))\\s+\n\n\t\t\t\t\t\t# Followed by a valid $7 or invalid identifier $8\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))(?=\\s*(?i:is))\\b\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "entity.name.type.architecture.end.vhdl" }, "7": { "name": "invalid.illegal.mismatched.identifier.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\n\n\t\t\t\t\t\t# Optional word architecture $3\n\t\t\t\t\t\t(\\s+((?i:architecture)))?\n\n\t\t\t\t\t\t# Optional same identifier $6 or illegal identifier $7\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?\n\n\t\t\t\t\t\t# This will cause the previous to capture until just before the ; or $\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#function_definition_pattern" }, { "include": "#procedure_definition_pattern" }, { "include": "#component_pattern" }, { "include": "#if_pattern" }, { "include": "#process_pattern" }, { "include": "#type_pattern" }, { "include": "#record_pattern" }, { "include": "#for_pattern" }, { "include": "#entity_instantiation_pattern" }, { "include": "#component_instantiation_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.architecture", "beginCaptures": { "3": { "name": "entity.name.type.architecture.begin.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "8": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "7": { "name": "entity.name.type.entity.reference.vhdl" }, "5": { "name": "keyword.language.vhdl" } } } ] }, "function_prototype_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word function $1\n\t\t\t\t\t\t((?i:function))\\s+\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A valid normal identifier $3\n\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z\\d_]*)\n\t\t\t\t\t\t\t# A valid quoted identifier $4\n\t\t\t\t\t\t\t|(\"\\S+\")\n\t\t\t\t\t\t\t# A valid backslash escaped identifier $5\n\t\t\t\t\t\t\t|(\\\\.+\\\\)\n\t\t\t\t\t\t\t# An invalid identifier $6\n\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t# Check to make sure we have a list or we return\n\t\t\t\t\t\t(?=\\s*\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t \\(\n\t\t\t\t\t\t\t\t|(?i:\\breturn\\b)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", "end": "(?<=;)", "patterns": [ { "begin": "\\b(?i:return)(?=\\s+[^;]+\\s*;)", "endCaptures": { "0": { "name": "punctuation.terminator.function_prototype.vhdl" } }, "end": "\\;", "patterns": [ { "include": "#parenthetical_list" }, { "include": "#cleanup" } ], "beginCaptures": { "0": { "name": "keyword.language.vhdl" } } }, { "include": "#parenthetical_list" }, { "include": "#cleanup" } ], "name": "meta.block.function_prototype.vhdl", "beginCaptures": { "3": { "name": "entity.name.function.function.prototype.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "invalid.illegal.function.name.vhdl" }, "4": { "name": "entity.name.function.function.prototype.vhdl" }, "5": { "name": "entity.name.function.function.prototype.vhdl" } } } ] }, "comments": { "patterns": [ { "match": "--.*$\\n?", "name": "comment.line.double-dash.vhdl" } ] }, "subtype_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# The word subtype $1\n\t\t\t\t\t\t\\b((?i:subtype))\\s+\n\n\t\t\t\t\t\t# Valid identifier $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t# The word is $5\n\t\t\t\t\t\t((?i:is))\\b\n\t\t\t\t\t", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": ";", "patterns": [{ "include": "#cleanup" }], "name": "meta.block.subtype.vhdl", "beginCaptures": { "3": { "name": "entity.name.type.subtype.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "5": { "name": "keyword.language.vhdl" } } } ] }, "entity_instantiation_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# Component identifier or illegal identifier $1\n\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t# Colon! $2\n\t\t\t\t\t\t\\s*(:)\\s*\n\n\t\t\t\t\t\t# Optional word use $4\n\t\t\t\t\t\t(((?i:use))\\s+)?\n\n\t\t\t\t\t\t# Required word entity $5\n\t\t\t\t\t\t((?i:entity))\\s+\n\n\t\t\t\t\t\t# Optional library unit identifier $8 for invalid identifier $9 followed by a dot $10\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\t\t\t\t\t\t\t(\\.)\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Entity name reference $12 or illegal identifier $13\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\n\t\t\t\t\t\t# Check to see if we are being followed by either open paren, end of line, or port or generic words\n\t\t\t\t\t\t(?=\\s*(\\(|$|(?i:port|generic)))\n\n\t\t\t\t\t\t# Optional architecture elaboration\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Open paren $16\n\t\t\t\t\t\t\t\\s*(\\()\\s*\n\n\t\t\t\t\t\t\t# Arch identifier $18 or invalid identifier $19\n\t\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))(?=\\s*\\))\n\n\t\t\t\t\t\t\t# Close paren $21\n\t\t\t\t\t\t\t\\s*(\\))\n\t\t\t\t\t\t)?\n\t\t\t\t\t", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": ";", "patterns": [ { "include": "#parenthetical_list" }, { "include": "#cleanup" } ], "name": "meta.block.entity_instantiation.vhdl", "beginCaptures": { "10": { "name": "punctuation.vhdl" }, "2": { "name": "punctuation.vhdl" }, "21": { "name": "punctuation.vhdl" }, "19": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "16": { "name": "punctuation.vhdl" }, "4": { "name": "keyword.language.vhdl" }, "5": { "name": "keyword.language.vhdl" }, "12": { "name": "entity.name.tag.entity.reference.vhdl" }, "13": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "18": { "name": "entity.name.tag.architecture.reference.vhdl" }, "8": { "name": "entity.name.tag.library.reference.vhdl" }, "1": { "name": "entity.name.section.entity_instantiation.vhdl" }, "9": { "name": "invalid.illegal.invalid.identifier.vhdl" } } } ] }, "component_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word component $1\n\t\t\t\t\t\t\\b((?i:component))\\s+\n\n\t\t\t\t\t\t# A valid identifier $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z_][a-zA-Z0-9_]*)\\s*|(.+?))(?=\\b(?i:is|port)\\b|$|--)\n\n\t\t\t\t\t\t# Optional word is $6\n\t\t\t\t\t\t(\\b((?i:is\\b)))?\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "8": { "name": "invalid.illegal.mismatched.identifier.vhdl" }, "4": { "name": "invalid.illegal.component.keyword.required.vhdl" }, "7": { "name": "entity.name.type.component.end.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\n\t\t\t\t\t\t# The word component $3 or illegal word $4\n\t\t\t\t\t\t(((?i:component\\b))|(.+?))(?=\\s*|;)\n\t\t\t\t\t\t\n\t\t\t\t\t\t# Optional identifier $7 or illegal mismatched $8\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#generic_list_pattern" }, { "include": "#port_list_pattern" }, { "include": "#comments" } ], "name": "meta.block.component.vhdl", "beginCaptures": { "3": { "name": "entity.name.type.component.begin.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "keyword.language.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" } } } ] }, "support_types": { "patterns": [ { "match": "\\b(?i:boolean|bit|character|severity_level|integer|real|time|delay_length|now|natural|positive|string|bit_vector|file_open_kind|file_open_status|fs|ps|ns|us|ms|sec|min|hr|severity_level|note|warning|error|failure)\\b", "name": "support.type.std.standard.vhdl" }, { "match": "\\b(?i:line|text|side|width|input|output)\\b", "name": "support.type.std.textio.vhdl" }, { "match": "\\b(?i:std_logic|std_ulogic|std_logic_vector|std_ulogic_vector)\\b", "name": "support.type.ieee.std_logic_1164.vhdl" }, { "match": "\\b(?i:signed|unsigned)\\b", "name": "support.type.ieee.numeric_std.vhdl" }, { "match": "\\b(?i:complex|complex_polar)\\b", "name": "support.type.ieee.math_complex.vhdl" } ] }, "generic_list_pattern": { "patterns": [ { "begin": "\\b(?i:generic)\\b", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": ";", "patterns": [{ "include": "#parenthetical_list" }], "name": "meta.block.generic_list.vhdl", "beginCaptures": { "0": { "name": "keyword.language.vhdl" } } } ] }, "for_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Check for an identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Followed by a colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Make sure the next word is not wait\n\t\t\t\t\t\t(?!(?i:wait\\s*))\n\n\t\t\t\t\t\t# The for keyword $4\n\t\t\t\t\t\t\\b((?i:for))\\b\n\n\t\t\t\t\t\t# Make sure the next word is not all\n\t\t\t\t\t\t(?!\\s*(?i:all))\n\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "8": { "name": "invalid.illegal.mismatched.identifier.vhdl" }, "4": { "name": "invalid.illegal.loop.or.generate.required.vhdl" }, "7": { "name": "entity.name.tag.for.generate.end.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Followed by generate or loop $3\n\t\t\t\t\t\t\t ((?i:generate|loop))\n\n\t\t\t\t\t\t\t# But it really is required $4\n\t\t\t\t\t\t\t|(\\S+)\n\t\t\t\t\t\t)\\b\n\n\t\t\t\t\t\t# The matching identifier $7 or an invalid identifier $8\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?\n\n\t\t\t\t\t\t# Only space and a semicolon left\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#control_patterns" }, { "include": "#entity_instantiation_pattern" }, { "include": "#component_pattern" }, { "include": "#component_instantiation_pattern" }, { "include": "#process_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.for.vhdl", "beginCaptures": { "2": { "name": "entity.name.tag.for.generate.begin.vhdl" }, "3": { "name": "punctuation.vhdl" }, "4": { "name": "keyword.language.vhdl" } } } ] }, "parenthetical_list": { "patterns": [ { "begin": "\\(", "end": "(?<=\\))", "patterns": [ { "begin": "(?=['\"a-zA-Z0-9])", "endCaptures": { "0": { "name": "meta.item.stopping.character.vhdl" } }, "end": "(;|\\)|,)", "patterns": [ { "include": "#comments" }, { "include": "#parenthetical_pair" }, { "include": "#cleanup" } ], "name": "meta.list.element.vhdl" }, { "match": "\\)", "name": "invalid.illegal.unexpected.parenthesis.vhdl" }, { "include": "#cleanup" } ], "name": "meta.block.parenthetical_list.vhdl", "beginCaptures": { "0": { "name": "punctuation.vhdl" } } } ] }, "entity_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word entity $1\n\t\t\t\t\t\t((?i:entity\\b))\\s+\n\n\t\t\t\t\t\t# The identifier $3 or an invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))(?=\\s)\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "entity.name.type.entity.end.vhdl" }, "7": { "name": "invalid.illegal.mismatched.identifier.vhdl" } }, "end": "(?x)\n\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end\\b))\n\n\t\t\t\t\t\t# Optional word entity $3\n\t\t\t\t\t\t(\\s+((?i:entity)))?\n\n\t\t\t\t\t\t# Optional identifier match $6 or indentifier mismatch $7\n\t\t\t\t\t\t(\\s+((\\3)|(.+?)))?\n\t\t\t\t\t\t\n\t\t\t\t\t\t# Make sure there is a semicolon following\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#comments" }, { "include": "#generic_list_pattern" }, { "include": "#port_list_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.entity.vhdl", "beginCaptures": { "1": { "name": "keyword.language.vhdl" }, "3": { "name": "entity.name.type.entity.begin.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" } } } ] }, "support_constants": { "patterns": [ { "match": "\\b(?i:math_1_over_e|math_1_over_pi|math_1_over_sqrt_2|math_2_pi|math_3_pi_over_2|math_deg_to_rad|math_e|math_log10_of_e|math_log2_of_e|math_log_of_10|math_log_of_2|math_pi|math_pi_over_2|math_pi_over_3|math_pi_over_4|math_rad_to_deg|math_sqrt_2|math_sqrt_pi)\\b", "name": "support.constant.ieee.math_real.vhdl" }, { "match": "\\b(?i:math_cbase_1|math_cbase_j|math_czero|positive_real|principal_value)\\b", "name": "support.constant.ieee.math_complex.vhdl" }, { "match": "\\b(?i:true|false)\\b", "name": "support.constant.std.standard.vhdl" } ] }, "type_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# The word type $1\n\t\t\t\t\t\t\\b((?i:type))\\s+\n\n\t\t\t\t\t\t# Valid identifier $3 or invalid identifier $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A semicolon is coming up if we are incomplete\n\t\t\t\t\t\t\t (?=\\s*;)\n\n\t\t\t\t\t\t\t# Or the word is comes up $7\n\t\t\t\t\t\t\t|(\\s+((?i:is)))\n\t\t\t\t\t\t)\\b\n\t\t\t\t\t", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": ";", "patterns": [ { "include": "#record_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.type.vhdl", "beginCaptures": { "3": { "name": "entity.name.type.type.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "7": { "name": "keyword.language.vhdl" } } } ] }, "case_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# Beginning of line ...\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# Optional identifier ... $3 or invalid identifier $4\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z0-9_]*)\n\t\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\\s*:\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# The word case $5\n\t\t\t\t\t\t\\b((?i:case))\\b\n\t\t\t\t\t", "endCaptures": { "1": { "name": "keyword.language.vhdl" }, "8": { "name": "entity.name.tag.case.end.vhdl" }, "4": { "name": "keyword.language.vhdl" }, "9": { "name": "invalid.illegal.mismatched.identifier.vhdl" }, "5": { "name": "invalid.illegal.case.required.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s*\n\n\t\t\t\t\t\t# The word case $4 or invalid word $5\n\t\t\t\t\t\t(\\s+(((?i:case))|(.*?)))\n\n\t\t\t\t\t\t# Optional identifier from before $8 or illegal $9\n\t\t\t\t\t\t(\\s+((\\2)|(.*?)))?\n\n\t\t\t\t\t\t# Ending with a semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#control_patterns" }, { "include": "#cleanup" } ], "name": "meta.block.case.vhdl", "beginCaptures": { "3": { "name": "entity.name.tag.case.begin.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "5": { "name": "keyword.language.vhdl" } } } ] }, "control_patterns": { "patterns": [ { "include": "#case_pattern" }, { "include": "#if_pattern" }, { "include": "#for_pattern" }, { "include": "#while_pattern" } ] }, "if_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Optional identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Followed by a colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Keyword if $4\n\t\t\t\t\t\t\\b((?i:if))\\b\n\t\t\t\t\t", "endCaptures": { "1": { "name": "keyword.language.vhdl" }, "8": { "name": "entity.name.tag.if.generate.end.vhdl" }, "4": { "name": "keyword.language.vhdl" }, "9": { "name": "invalid.illegal.mismatched.identifier.vhdl" }, "5": { "name": "invalid.illegal.if.or.generate.required.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\\s+\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t# Optional generate or if keyword $4\n\t\t\t\t\t\t\t\t ((?i:generate|if))\n\n\t\t\t\t\t\t\t\t# Keyword if or generate required $5\n\t\t\t\t\t\t\t\t|(\\S+)\n\t\t\t\t\t\t\t)\\b\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\\s+\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t# Optional matching identifier $8\n\t\t\t\t\t\t\t\t\t (\\2)\n\n\t\t\t\t\t\t\t\t\t# Mismatched identifier $9\n\t\t\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# Followed by a semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#control_patterns" }, { "include": "#process_pattern" }, { "include": "#entity_instantiation_pattern" }, { "include": "#component_pattern" }, { "include": "#component_instantiation_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.if.vhdl", "beginCaptures": { "2": { "name": "entity.name.tag.if.generate.begin.vhdl" }, "3": { "name": "punctuation.vhdl" }, "4": { "name": "keyword.language.vhdl" } } } ] }, "port_list_pattern": { "patterns": [ { "begin": "\\b(?i:port)\\b", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": ";", "patterns": [{ "include": "#parenthetical_list" }], "name": "meta.block.port_list.vhdl", "beginCaptures": { "0": { "name": "keyword.language.vhdl" } } } ] }, "strings": { "patterns": [ { "match": "'.'", "name": "string.quoted.single.vhdl" }, { "begin": "\"", "end": "\"", "patterns": [ { "match": "\\\\.", "name": "constant.character.escape.vhdl" } ], "name": "string.quoted.double.vhdl" }, { "begin": "\\\\", "end": "\\\\", "name": "string.other.backslash.vhdl" } ] }, "record_pattern": { "patterns": [ { "begin": "\\b(?i:record)\\b", "endCaptures": { "1": { "name": "keyword.language.vhdl" }, "6": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "2": { "name": "keyword.language.vhdl" }, "5": { "name": "entity.name.type.record.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end))\n\n\t\t\t\t\t\t# The word record $2\n\t\t\t\t\t\t\\s+((?i:record))\n\n\t\t\t\t\t\t# Optional identifier $5 or invalid identifier $6\n\t\t\t\t\t\t(\\s+(([a-zA-Z][a-zA-Z\\d_]*)|(.*?)))?\n\n\t\t\t\t\t\t# Only whitespace and semicolons can be left\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [{ "include": "#cleanup" }], "name": "meta.block.record.vhdl", "beginCaptures": { "0": { "name": "keyword.language.vhdl" } } }, { "include": "#cleanup" } ] }, "syntax_highlighting": { "patterns": [ { "include": "#keywords" }, { "include": "#punctuation" }, { "include": "#support_constants" }, { "include": "#support_types" }, { "include": "#support_functions" } ] }, "punctuation": { "patterns": [ { "match": "(\\.|,|:|;|\\(|\\))", "name": "punctuation.vhdl" } ] }, "package_body_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# The word package $1\n\t\t\t\t\t\t\\b((?i:package))\\s+\n\n\t\t\t\t\t\t# ... but we want to be a package body $2\n\t\t\t\t\t\t((?i:body))\\s+\n\n\t\t\t\t\t\t# The valid identifier $4 or the invalid one $5\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t# ... and we end it with an is $6\n\t\t\t\t\t\t((?i:is))\\b\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "8": { "name": "invalid.illegal.mismatched.identifier.vhdl" }, "4": { "name": "keyword.language.vhdl" }, "7": { "name": "entity.name.section.package_body.end.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end\\b))\n\n\t\t\t\t\t\t# Optional word package $3 body $4\n\t\t\t\t\t\t(\\s+((?i:package))\\s+((?i:body)))?\n\n\t\t\t\t\t\t# Optional identifier $7 or mismatched identifier $8\n\t\t\t\t\t\t(\\s+((\\4)|(.+?)))?(?=\\s*;)", "patterns": [ { "include": "#function_definition_pattern" }, { "include": "#procedure_definition_pattern" }, { "include": "#type_pattern" }, { "include": "#subtype_pattern" }, { "include": "#record_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.package_body.vhdl", "beginCaptures": { "1": { "name": "keyword.language.vhdl" }, "6": { "name": "keyword.language.vhdl" }, "4": { "name": "entity.name.section.package_body.begin.vhdl" }, "2": { "name": "keyword.language.vhdl" }, "5": { "name": "invalid.illegal.invalid.identifier.vhdl" } } } ] }, "process_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# Optional identifier $2\n\t\t\t\t\t\t\t([a-zA-Z][a-zA-Z0-9_]*)\n\n\t\t\t\t\t\t\t# Colon $3\n\t\t\t\t\t\t\t\\s*(:)\\s*\n\t\t\t\t\t\t)?\n\n\t\t\t\t\t\t# The word process #4\n\t\t\t\t\t\t((?i:process\\b))\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "entity.name.section.process.end.vhdl" }, "7": { "name": "invalid.illegal.invalid.identifier.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t((?i:end))\n\n\t\t\t\t\t\t# Optional word process $3\n\t\t\t\t\t\t(\\s+((?i:process)))\n\n\t\t\t\t\t\t# Optional identifier $6 or invalid identifier $7\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?\n\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#control_patterns" }, { "include": "#cleanup" } ], "name": "meta.block.process.vhdl", "beginCaptures": { "2": { "name": "entity.name.section.process.begin.vhdl" }, "3": { "name": "punctuation.vhdl" }, "4": { "name": "keyword.language.vhdl" } } } ] }, "keywords": { "patterns": [ { "match": "'(?i:active|ascending|base|delayed|driving|event|high|image|instance|instance_name|last|last_value|left|leftof|length|low|path|path_name|pos|pred|quiet|range|reverse|reverse_range|right|rightof|simple|simple_name|stable|succ|transaction|val|value)\\b", "name": "keyword.attributes.vhdl" }, { "match": "\\b(?i:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)\\b", "name": "keyword.language.vhdl" }, { "match": "(\\+|\\-|<=|=|=>|:=|>=|>|<|/|\\||&|(\\*{1,2}))", "name": "keyword.operator.vhdl" } ] }, "package_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# The word package $1\n\t\t\t\t\t\t\\b((?i:package))\\s+\n\n\t\t\t\t\t\t# ... but we do not want to be a package body\n\t\t\t\t\t\t(?!(?i:body))\n\n\t\t\t\t\t\t# The valid identifier $3 or the invalid one $4\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z\\d_]*)|(.+?))\\s+\n\n\t\t\t\t\t\t# ... and we end it with an is $5\n\t\t\t\t\t\t((?i:is))\\b\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "entity.name.section.package.end.vhdl" }, "7": { "name": "invalid.illegal.mismatched.identifier.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t\\b((?i:end\\b))\n\n\t\t\t\t\t\t# Optional word package $3\n\t\t\t\t\t\t(\\s+((?i:package)))?\n\n\t\t\t\t\t\t# Optional identifier $6 or mismatched identifier $7\n\t\t\t\t\t\t(\\s+((\\2)|(.+?)))?(?=\\s*;)", "patterns": [ { "include": "#function_prototype_pattern" }, { "include": "#procedure_prototype_pattern" }, { "include": "#type_pattern" }, { "include": "#subtype_pattern" }, { "include": "#record_pattern" }, { "include": "#component_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.package.vhdl", "beginCaptures": { "3": { "name": "entity.name.section.package.begin.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "5": { "name": "keyword.language.vhdl" } } } ] }, "attribute_list": { "patterns": [ { "begin": "\\'\\(", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": "\\)", "patterns": [ { "include": "#parenthetical_list" }, { "include": "#cleanup" } ], "name": "meta.block.attribute_list", "beginCaptures": { "0": { "name": "punctuation.vhdl" } } } ] }, "parenthetical_pair": { "patterns": [ { "begin": "\\(", "endCaptures": { "0": { "name": "punctuation.vhdl" } }, "end": "\\)", "patterns": [ { "include": "#parenthetical_pair" }, { "include": "#cleanup" } ], "name": "meta.block.parenthetical_pair.vhdl", "beginCaptures": { "0": { "name": "punctuation.vhdl" } } } ] }, "constants_numeric": { "patterns": [ { "match": "\\b([+\\-]?[\\d_]+\\.[\\d_]+([eE][+\\-]?[\\d_]+)?)\\b", "name": "constant.numeric.floating_point.vhdl" }, { "match": "\\b\\d+#[\\h_]+#\\b", "name": "constant.numeric.base_pound_number_pound.vhdl" }, { "match": "\\b[\\d_]+([eE][\\d_]+)?\\b", "name": "constant.numeric.integer.vhdl" }, { "match": "[xX]\"[0-9a-fA-F_uUxXzZwWlLhH\\-]+\"", "name": "constant.numeric.quoted.double.string.hex.vhdl" }, { "match": "[oO]\"[0-7_uUxXzZwWlLhH\\-]+\"", "name": "constant.numeric.quoted.double.string.octal.vhdl" }, { "match": "[bB]?\"[01_uUxXzZwWlLhH\\-]+\"", "name": "constant.numeric.quoted.double.string.binary.vhdl" }, { "match": "([bBoOxX]\".+?\")", "name": "constant.numeric.quoted.double.string.illegal.vhdl", "captures": { "1": { "name": "invalid.illegal.quoted.double.string.vhdl" } } }, { "match": "'[01uUxXzZwWlLhH\\-]'", "name": "constant.numeric.quoted.single.std_logic" } ] }, "support_functions": { "patterns": [ { "match": "\\b(?i:finish|stop|resolution_limit)\\b", "name": "support.function.std.env.vhdl" }, { "match": "\\b(?i:readline|read|writeline|write|endfile|endline)\\b", "name": "support.function.std.textio.vhdl" }, { "match": "\\b(?i:rising_edge|falling_edge|to_bit|to_bitvector|to_stdulogic|to_stdlogicvector|to_stdulogicvector|is_x)\\b", "name": "support.function.ieee.std_logic_1164.vhdl" }, { "match": "\\b(?i:shift_left|shift_right|rotate_left|rotate_right|resize|to_integer|to_unsigned|to_signed)\\b", "name": "support.function.ieee.numeric_std.vhdl" }, { "match": "\\b(?i:arccos(h?)|arcsin(h?)|arctan|arctanh|cbrt|ceil|cos|cosh|exp|floor|log10|log2|log|realmax|realmin|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\\b", "name": "support.function.ieee.math_real.vhdl" }, { "match": "\\b(?i:arg|cmplx|complex_to_polar|conj|get_principal_value|polar_to_complex)\\b", "name": "support.function.ieee.math_complex.vhdl" } ] }, "cleanup": { "patterns": [ { "include": "#comments" }, { "include": "#constants_numeric" }, { "include": "#strings" }, { "include": "#attribute_list" }, { "include": "#syntax_highlighting" } ] }, "procedure_prototype_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t\\b((?i:procedure))\\s+\n\t\t\t\t\t\t(([a-zA-Z][a-zA-Z0-9_]*)|(.+?))\n\t\t\t\t\t\t(?=\\s*(\\(|;))\n\t\t\t\t\t", "endCaptures": { "0": { "name": "punctual.vhdl" } }, "end": ";", "patterns": [{ "include": "#parenthetical_list" }], "name": "meta.block.procedure_prototype.vhdl", "beginCaptures": { "1": { "name": "keyword.language.vhdl" }, "3": { "name": "entity.name.function.procedure.begin.vhdl" }, "4": { "name": "invalid.illegal.invalid.identifier.vhdl" } } } ] }, "function_definition_pattern": { "patterns": [ { "begin": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word function $1\n\t\t\t\t\t\t((?i:function))\\s+\n\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t# A valid normal identifier $3\n\t\t\t\t\t\t\t ([a-zA-Z][a-zA-Z\\d_]*)\n\t\t\t\t\t\t\t# A valid string quoted identifier $4\n\t\t\t\t\t\t\t|(\"\\S+\")\n\t\t\t\t\t\t\t# A valid backslash escaped identifier $5\n\t\t\t\t\t\t\t|(\\\\.+\\\\)\n\t\t\t\t\t\t\t# An invalid identifier $5\n\t\t\t\t\t\t\t|(.+?)\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t# Check to make sure we have a list or we return\n\t\t\t\t\t\t(?=\\s*\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t \\(\n\t\t\t\t\t\t\t\t|(?i:\\breturn\\b)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t", "endCaptures": { "3": { "name": "keyword.language.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "entity.name.function.function.end.vhdl" }, "7": { "name": "invalid.illegal.mismatched.identifier.vhdl" } }, "end": "(?x)\n\t\t\t\t\t\t# From the beginning of the line\n\t\t\t\t\t\t^\\s*\n\n\t\t\t\t\t\t# The word end $1\n\t\t\t\t\t\t((?i:end))\n\n\t\t\t\t\t\t# Optional word function $3\n\t\t\t\t\t\t(\\s+((?i:function)))?\n\n\t\t\t\t\t\t# Optional matched identifier $6 or mismatched identifier $7\n\t\t\t\t\t\t(\\s+((\\3|\\4|\\5)|(.+?)))?\n\n\t\t\t\t\t\t# Ending with whitespace and semicolon\n\t\t\t\t\t\t(?=\\s*;)\n\t\t\t\t\t", "patterns": [ { "include": "#control_patterns" }, { "include": "#parenthetical_list" }, { "include": "#type_pattern" }, { "include": "#record_pattern" }, { "include": "#cleanup" } ], "name": "meta.block.function_definition.vhdl", "beginCaptures": { "3": { "name": "entity.name.function.function.begin.vhdl" }, "1": { "name": "keyword.language.vhdl" }, "6": { "name": "invalid.illegal.invalid.identifier.vhdl" }, "4": { "name": "entity.name.function.function.begin.vhdl" }, "5": { "name": "entity.name.function.function.begin.vhdl" } } } ] } }, "uuid": "99A3EB51-FCCD-4EA4-A642-10C2E8B93112", "patterns": [{ "include": "#block_processing" }, { "include": "#cleanup" }], "comment": "VHDL Bundle by Brian Padalino (ocnqnyvab@tznvy.pbz)", "name": "VHDL", "scopeName": "source.vhdl" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/visualforce.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/html.tmbundle/commit/a723f08ebd49c67c22aca08dd8f17d0bf836ec93", "fileTypes": ["html", "htm", "shtml", "xhtml", "inc", "tmpl", "tpl"], "firstLineMatch": "<(?i:(!DOCTYPE\\s*)?html)", "injections": { "R:text.html - (comment.block, text.html source)": { "comment": "Use R: to ensure this matches after any other injections.", "patterns": [ { "match": "<", "name": "invalid.illegal.bad-angle-bracket.html" } ] } }, "keyEquivalent": "^~H", "name": "HTML", "patterns": [ { "begin": "(<)([a-zA-Z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(>(<)/)(\\2)(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "meta.scope.between-tag-pair.html" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.html" } }, "name": "meta.tag.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(<\\?)(xml)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } }, "end": "(\\?>)", "name": "meta.tag.preprocessor.xml.html", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, { "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "end": "--\\s*>", "name": "comment.block.html", "patterns": [ { "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" }, { "include": "#embedded-code" } ] }, { "begin": "<!", "captures": { "0": { "name": "punctuation.definition.tag.html" } }, "end": ">", "name": "meta.tag.sgml.html", "patterns": [ { "begin": "(?i:DOCTYPE)", "captures": { "1": { "name": "entity.name.tag.doctype.html" } }, "end": "(?=>)", "name": "meta.tag.sgml.doctype.html", "patterns": [ { "match": "\"[^\">]*\"", "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" } ] }, { "begin": "\\[CDATA\\[", "end": "]](?=>)", "name": "constant.other.inline-data.html" }, { "match": "(\\s*)(?!--|>)\\S(\\s*)", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ] }, { "include": "#embedded-code" }, { "begin": "(^[ \\t]+)?(?=<(?i:style))", "beginCaptures": { "1": { "name": "punctuation.whitespace.embedded.leading.html" } }, "end": "(?!\\G)([ \\t]*$\\n?)?", "endCaptures": { "1": { "name": "punctuation.whitespace.embedded.trailing.html" } }, "patterns": [ { "begin": "(<)((?i:style))\\b", "beginCaptures": { "0": { "name": "meta.tag.metadata.style.html" }, "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(/>)|((<)/)((?i:style))(>)", "endCaptures": { "0": { "name": "meta.tag.metadata.style.html" }, "1": { "name": "punctuation.definition.tag.end.html" }, "2": { "name": "punctuation.definition.tag.begin.html" }, "3": { "name": "source.css" }, "4": { "name": "entity.name.tag.html" }, "5": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.embedded.block.html", "patterns": [ { "begin": "\\G", "captures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(?=/>)|(>)", "name": "meta.tag.metadata.style.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(?!\\G)", "end": "(?=</(?i:style))", "name": "source.css", "patterns": [ { "include": "#embedded-code" }, { "include": "source.css" } ] } ] } ] }, { "begin": "(^[ \\t]+)?(?=<(?i:script))", "beginCaptures": { "1": { "name": "punctuation.whitespace.embedded.leading.html" } }, "end": "(?!\\G)([ \\t]*$\\n?)?", "endCaptures": { "1": { "name": "punctuation.whitespace.embedded.trailing.html" } }, "patterns": [ { "begin": "(<)((?i:script))\\b", "beginCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(/>)|(/)((?i:script))(>)", "endCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.end.html" }, "2": { "name": "punctuation.definition.tag.begin.html" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.embedded.block.html", "patterns": [ { "begin": "\\G", "end": "(?=/>|/)", "patterns": [ { "begin": "(>)", "beginCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "((<))(?=/(?i:script))", "endCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "source.js" } }, "patterns": [ { "begin": "\\G", "end": "(?=</(?i:script))", "name": "source.js", "patterns": [ { "begin": "(^[ \\t]+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.js" } }, "end": "(?!\\G)", "patterns": [ { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.js" } }, "end": "(?=</script)|\\n", "name": "comment.line.double-slash.js" } ] }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.js" } }, "end": "\\*/|(?=</script)", "name": "comment.block.js" }, { "include": "source.js" } ] } ] }, { "begin": "\\G", "end": "(?i:(?=/?>|type(?=[\\s=])(?!\\s*=\\s*('|\"|)(text/(javascript|ecmascript|babel)|application/((x-)?javascript|ecmascript|babel)|module)[\\s\"'>])))", "name": "meta.tag.metadata.script.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(?=(?i:type\\s*=\\s*('|\"|)(text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\\s\"'>])))", "end": "((<))(?=/(?i:script))", "endCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "text.visualforce.markup" } }, "patterns": [ { "begin": "\\G", "end": "(>)|(?=/>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.metadata.script.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(?!\\G)", "end": "(?=</(?i:script))", "name": "text.visualforce.markup", "patterns": [ { "include": "text.visualforce.markup" } ] } ] }, { "begin": "(?=(?i:type))", "end": "(<)(?=/(?i:script))", "endCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.begin.html" } }, "patterns": [ { "begin": "\\G", "end": "(>)|(?=/>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.metadata.script.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(?!\\G)", "end": "(?=</(?i:script))", "name": "source.unknown" } ] } ] } ] } ] }, { "begin": "(</?)((?i:body|head|html)\\b)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.structure.any.html" } }, "end": "(>)", "name": "meta.tag.structure.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)((?i:address|blockquote|dd|div|section|article|aside|header|footer|nav|menu|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|pre)\\b)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.block.any.html" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.block.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b(?!-))", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.inline.any.html" } }, "end": "((?: ?/)?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.inline.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)([a-zA-Z][a-zA-Z0-9:-]*)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.other.html" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.tag.other.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "include": "#entities" }, { "match": "<>", "name": "invalid.illegal.incomplete.html" } ], "repository": { "embedded-code": { "patterns": [ { "include": "#smarty" }, { "include": "#python" } ] }, "entities": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } }, "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#[xX][0-9a-fA-F]+)(;)", "name": "constant.character.entity.html" }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "python": { "begin": "(?:^\\s*)<\\?python(?!.*\\?>)", "end": "\\?>(?:\\s*$\\n)?", "name": "source.python.embedded.html", "patterns": [ { "include": "source.python" } ] }, "smarty": { "patterns": [ { "begin": "(\\{(literal)\\})", "captures": { "1": { "name": "source.smarty.embedded.html" }, "2": { "name": "support.function.built-in.smarty" } }, "end": "(\\{/(literal)\\})" }, { "begin": "{{|{", "disabled": 1, "end": "}}|}", "name": "source.smarty.embedded.html", "patterns": [ { "include": "source.smarty" } ] } ] }, "string-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, "string-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, "tag-generic-attribute": { "match": "(?<=[^=])\\b([a-zA-Z0-9:-]+)", "name": "entity.other.attribute-name.html" }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } }, "end": "(?!\\G)(?<='|\"|[^\\s<>/])", "name": "meta.attribute-with-value.id.html", "patterns": [ { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" } ] }, { "captures": { "0": { "name": "meta.toc-list.id.html" } }, "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+", "name": "string.unquoted.html" } ] }, "tag-stuff": { "patterns": [ { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#embedded-code" }, { "include": "#unquoted-attribute" } ] }, "unquoted-attribute": { "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+", "name": "string.unquoted.html" } }, "scopeName": "text.visualforce.markup", "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/vue.tmLanguage.json ================================================ { "foldingStopMarker": "(?x)\n(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>\n|^(?!.*?<!--).*?--\\s*>\n|^<!--\\ end\\ tminclude\\ -->$\n|<\\?(?:php)?.*\\bend(if|for(each)?|while)\\b\n|\\{\\{?/(if|foreach|capture|literal|foreach|php|section|strip)\n|^[^{]*\\}\n)", "foldingStartMarker": "(?x)\n(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\\b.*?>\n|<!--(?!.*--\\s*>)\n|^<!--\\ \\#tminclude\\ (?>.*?-->)$\n|<\\?(?:php)?.*\\b(if|for(each)?|while)\\b.+:\n|\\{\\{?(if|foreach|capture|literal|foreach|php|section|strip)\n|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))\n)", "repository": { "string-single-quoted": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "'", "patterns": [ { "include": "#vue-interpolations" }, { "include": "#entities" } ], "name": "string.quoted.single.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "tag-stuff": { "patterns": [ { "include": "#vue-directives" }, { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, "tag-id-attribute": { "begin": "\\b(id)\\b\\s*(=)", "end": "(?<='|\")", "patterns": [ { "end": "\"", "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#vue-interpolations" }, { "include": "#entities" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html" }, { "end": "'", "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "patterns": [ { "include": "#vue-interpolations" }, { "include": "#entities" } ], "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html" } ], "name": "meta.attribute-with-value.id.html", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "tag-generic-attribute": { "match": "\\b([a-zA-Z\\-:]+)", "name": "entity.other.attribute-name.html" }, "entities": { "patterns": [ { "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" } ] }, "string-double-quoted": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "\"", "patterns": [ { "include": "#vue-interpolations" }, { "include": "#entities" } ], "name": "string.quoted.double.html", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, "vue-directives": { "begin": "(?:\\b(v-)|(:|@))([a-zA-Z\\-]+)(?:\\:([a-zA-Z\\-]+))?(?:\\.([a-zA-Z\\-]+))*\\s*(=)", "end": "(?<='|\")", "patterns": [ { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "\"", "patterns": [{ "include": "source.js" }], "name": "source.directive.vue", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } }, { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "end": "'", "patterns": [{ "include": "source.js" }], "name": "source.directive.vue", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } } } ], "name": "meta.directive.vue", "captures": { "3": { "name": "entity.other.attribute-name.html" }, "1": { "name": "entity.other.attribute-name.html" }, "6": { "name": "punctuation.separator.key-value.html" }, "4": { "name": "entity.other.attribute-name.html" }, "2": { "name": "punctuation.separator.key-value.html" }, "5": { "name": "entity.other.attribute-name.html" } } }, "vue-interpolations": { "patterns": [ { "begin": "\\{\\{\\{?", "endCaptures": { "0": { "name": "punctuation.definition.generic.end.html" } }, "end": "\\}\\}\\}?", "patterns": [{ "include": "source.js" }], "name": "expression.embbeded.vue", "beginCaptures": { "0": { "name": "punctuation.definition.generic.begin.html" } } } ] } }, "keyEquivalent": "^~H", "fileTypes": ["vue"], "uuid": "5512c10d-4cc5-434c-b8fc-53b912f55ab3", "patterns": [ { "include": "#vue-interpolations" }, { "begin": "(<)([a-zA-Z0-9:-]++)(?=[^>]*></\\2>)", "endCaptures": { "3": { "name": "punctuation.definition.tag.begin.html" }, "1": { "name": "punctuation.definition.tag.end.html" }, "4": { "name": "entity.name.tag.html" }, "2": { "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" }, "5": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)(<)(/)(\\2)(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } } }, { "begin": "(<\\?)(xml)", "end": "(\\?>)", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ], "name": "meta.tag.preprocessor.xml.html", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } } }, { "begin": "<!--", "end": "--\\s*>", "patterns": [ { "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ], "name": "comment.block.html", "captures": { "0": { "name": "punctuation.definition.comment.html" } } }, { "begin": "<!", "end": ">", "patterns": [ { "begin": "(?i:DOCTYPE)", "end": "(?=>)", "patterns": [ { "match": "\"[^\">]*\"", "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" } ], "name": "meta.tag.sgml.doctype.html", "captures": { "1": { "name": "entity.name.tag.doctype.html" } } }, { "begin": "\\[CDATA\\[", "end": "]](?=>)", "name": "constant.other.inline-data.html" }, { "match": "(\\s*)(?!--|>)\\S(\\s*)", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ], "name": "meta.tag.sgml.html", "captures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:template))\\b(?=[^>]*lang=(['\"])slm\\1?)", "end": "(</)((?i:template))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:template))", "patterns": [{ "include": "text.slm" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "text.slm.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:template))\\b(?=[^>]*lang=(['\"])jade\\1?)", "end": "(</)((?i:template))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:template))", "patterns": [{ "include": "text.jade" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "text.jade.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:template))\\b(?=[^>]*lang=(['\"])pug\\1?)", "end": "(</)((?i:template))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:template))", "patterns": [{ "include": "text.pug" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "text.pug.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])stylus\\1?)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [{ "include": "source.stylus" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.stylus.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])postcss\\1?)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [{ "include": "source.postcss" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.postcss.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])sass\\1?)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [{ "include": "source.sass" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.sass.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])scss\\1?)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [{ "include": "source.css.scss" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.scss.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])less\\1?)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [{ "include": "source.css.less" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.less.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "end": "(?=</(?i:style))", "patterns": [{ "include": "source.css" }], "beginCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } } ], "name": "source.css.embedded.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])ts\\1?)", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "end": "(</)((?i:script))", "patterns": [{ "include": "source.ts" }], "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } } ], "name": "source.ts.embedded.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])coffee\\1?)", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "end": "(</)((?i:script))", "patterns": [{ "include": "source.coffee" }], "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } } ], "name": "source.coffee.embedded.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } }, { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])livescript\\1?)", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "end": "(</)((?i:script))", "patterns": [{ "include": "source.livescript" }], "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } } ], "name": "source.livescript.embedded.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } }, { "begin": "(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel|ecmascript).*)))", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "end": "(</)((?i:script))", "patterns": [ { "match": "(//).*?((?=</script)|$\\n?)", "name": "comment.line.double-slash.js", "captures": { "1": { "name": "punctuation.definition.comment.js" } } }, { "begin": "/\\*", "end": "\\*/|(?=</script)", "name": "comment.block.js", "captures": { "0": { "name": "punctuation.definition.comment.js" } } }, { "include": "source.js" } ], "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } } ], "name": "source.js.embedded.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.script.html" } } }, { "begin": "(</?)((?i:body|head|html)\\b)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.structure.any.html", "captures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.structure.any.html" } } }, { "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.block.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.block.any.html" } } }, { "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "((?: ?/)?>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.inline.any.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.inline.any.html" } } }, { "begin": "(</?)([a-zA-Z0-9:-]+)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, "end": "(>)", "patterns": [{ "include": "#tag-stuff" }], "name": "meta.tag.other.html", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.other.html" } } }, { "include": "#entities" }, { "match": "<>", "name": "invalid.illegal.incomplete.html" }, { "match": "<", "name": "invalid.illegal.bad-angle-bracket.html" } ], "name": "Vue Component", "scopeName": "text.html.vue" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/wollok.tmLanguage.json ================================================ { "scopeName": "source.wollok", "fileTypes": ["wollok"], "patterns": [{ "include": "#main" }], "repository": { "main__3": { "patterns": [ { "include": "#numeric" }, { "match": "(,)", "name": "keyword.operator.wollok" } ] }, "main__2": { "patterns": [] }, "main__1": { "patterns": [{ "include": "#main" }] }, "multi_line_comment": { "patterns": [ { "begin": "(/\\*)", "endCaptures": { "1": { "name": "comment.wollok" } }, "end": "(\\*/)", "contentName": "comment.wollok", "beginCaptures": { "1": { "name": "comment.wollok" } } } ] }, "numeric": { "patterns": [{ "match": "(\\b\\d+)", "name": "constant.numeric.wollok" }] }, "main": { "patterns": [ { "match": "@[A-Za-z]+", "name": "variable.wollok" }, { "include": "#numeric" }, { "begin": "(\\{)", "endCaptures": { "1": { "name": "keyword.operator.wollok" } }, "patterns": [{ "include": "#main__1" }], "end": "(\\})", "beginCaptures": { "1": { "name": "keyword.operator.wollok" } } }, { "match": "(;)", "name": "keyword.operator.wollok" }, { "begin": "(\\\"|')", "endCaptures": { "1": { "name": "string.wollok" } }, "end": "(\\\"|')", "contentName": "string.wollok", "beginCaptures": { "1": { "name": "string.wollok" } } }, { "include": "#multi_line_comment" }, { "match": "(//.*)", "name": "comment.wollok" }, { "match": "\\b(object|class|package|program|test|describe|method|override|constructor|native|var|const|property|inherits|new|if|else|self|super|import|null|true|false|return|throw|then always|try|catch|mixed with|with|mixin|fixture)\\b", "name": "keyword.wollok" } ] }, "multi_line_comment__1": { "patterns": [] } }, "name": "wollok" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/xml.tmLanguage.json ================================================ { "fileTypes": ["xml", "xsd", "tld", "jsp", "pt", "cpt", "dtml", "rss", "opml"], "repository": { "entity": { "match": "(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.xml", "captures": { "1": { "name": "punctuation.definition.constant.xml" }, "3": { "name": "punctuation.definition.constant.xml" } } }, "parameterEntity": { "match": "(%)([:a-zA-Z_][:a-zA-Z0-9_.-]*)(;)", "name": "constant.character.parameter-entity.xml", "captures": { "1": { "name": "punctuation.definition.constant.xml" }, "3": { "name": "punctuation.definition.constant.xml" } } }, "tagStuff": { "patterns": [ { "match": " (?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9]+)=", "captures": { "3": { "name": "punctuation.separator.namespace.xml" }, "1": { "name": "entity.other.attribute-name.namespace.xml" }, "4": { "name": "entity.other.attribute-name.localname.xml" }, "2": { "name": "entity.other.attribute-name.xml" } } }, { "include": "#doublequotedString" }, { "include": "#singlequotedString" } ] }, "bare-ampersand": { "match": "&", "name": "invalid.illegal.bad-ampersand.xml" }, "singlequotedString": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "'", "patterns": [{ "include": "#entity" }, { "include": "#bare-ampersand" }], "name": "string.quoted.single.xml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "doublequotedString": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "\"", "patterns": [{ "include": "#entity" }, { "include": "#bare-ampersand" }], "name": "string.quoted.double.xml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "internalSubset": { "begin": "(\\[)", "end": "(\\])", "patterns": [ { "include": "#EntityDecl" }, { "include": "#parameterEntity" } ], "name": "meta.internalsubset.xml", "captures": { "1": { "name": "punctuation.definition.constant.xml" } } }, "EntityDecl": { "begin": "(<!)(ENTITY)\\s+(%\\s+)?([:a-zA-Z_][:a-zA-Z0-9_.-]*)(\\s+(?:SYSTEM|PUBLIC)\\s+)?", "end": "(>)", "patterns": [ { "include": "#doublequotedString" }, { "include": "#singlequotedString" } ], "captures": { "3": { "name": "punctuation.definition.entity.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "4": { "name": "variable.language.entity.xml" }, "2": { "name": "keyword.other.entity.xml" }, "5": { "name": "keyword.other.entitytype.xml" } } } }, "keyEquivalent": "^~X", "uuid": "D3C4E6DA-6B1C-11D9-8CC2-000D93589AF6", "patterns": [ { "begin": "(<\\?)\\s*([-_a-zA-Z0-9]+)", "end": "(\\?>)", "patterns": [ { "match": " ([a-zA-Z-]+)", "name": "entity.other.attribute-name.xml" }, { "include": "#doublequotedString" }, { "include": "#singlequotedString" } ], "name": "meta.tag.metadata.processing.xml", "captures": { "1": { "name": "punctuation.definition.tag.xml" }, "2": { "name": "entity.name.tag.xml" } } }, { "begin": "(<!)(DOCTYPE)\\s+([:a-zA-Z_][:a-zA-Z0-9_.-]*)", "end": "\\s*(>)", "patterns": [{ "include": "#internalSubset" }], "name": "meta.tag.metadata.doctype.xml", "captures": { "1": { "name": "punctuation.definition.tag.xml" }, "2": { "name": "entity.name.tag.xml" }, "3": { "name": "entity.other.attribute-name.documentroot.xml" } } }, { "begin": "<[!%]--", "end": "--%?>", "name": "comment.block.xml", "captures": { "0": { "name": "punctuation.definition.comment.xml" } } }, { "begin": "(<)((?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+))(?=(\\s[^>]*)?></\\2>)", "endCaptures": { "7": { "name": "punctuation.definition.tag.xml" }, "3": { "name": "entity.name.tag.namespace.xml" }, "4": { "name": "entity.name.tag.xml" }, "5": { "name": "punctuation.separator.namespace.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "6": { "name": "entity.name.tag.localname.xml" }, "2": { "name": "meta.scope.between-tag-pair.xml" } }, "end": "(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)(>)", "patterns": [{ "include": "#tagStuff" }], "name": "meta.tag.no-content.xml", "beginCaptures": { "3": { "name": "entity.name.tag.namespace.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "6": { "name": "entity.name.tag.localname.xml" }, "4": { "name": "entity.name.tag.xml" }, "5": { "name": "punctuation.separator.namespace.xml" } } }, { "begin": "(</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)", "end": "(/?>)", "patterns": [{ "include": "#tagStuff" }], "name": "meta.tag.xml", "captures": { "3": { "name": "entity.name.tag.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "4": { "name": "punctuation.separator.namespace.xml" }, "2": { "name": "entity.name.tag.namespace.xml" }, "5": { "name": "entity.name.tag.localname.xml" } } }, { "include": "#entity" }, { "include": "#bare-ampersand" }, { "begin": "<%@", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.xml" } }, "end": "%>", "patterns": [ { "match": "page|include|taglib", "name": "keyword.other.page-props.xml" } ], "name": "source.java-props.embedded.xml", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.xml" } } }, { "begin": "<%[!=]?(?!--)", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.xml" } }, "end": "(?!--)%>", "patterns": [{ "include": "source.java" }], "name": "source.java.embedded.xml", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.xml" } } }, { "begin": "<!\\[CDATA\\[", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "]]>", "name": "string.unquoted.cdata.xml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } } ], "name": "XML", "scopeName": "text.xml" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/xquery.tmLanguage.json ================================================ { "foldingStartMarker": "^\\s*(<[^!?%/](?!.+?(/>|</.+?>))|<[!%]--(?!.+?--%?>)|<%[!]?(?!.+?%>))|(declare|.*\\{\\s*(//.*)?$)", "firstLineMatch": "^\\bxquery version\\b.*", "foldingStopMarker": "^\\s*(</[^>]+>|[/%]>|-->)\\s*$|(.*\\}\\s*;?\\s*|.*;)", "keyEquivalent": "^~X", "fileTypes": ["xq", "xql", "xqm", "xqy", "xquery"], "repository": { "xml_content": { "begin": "(?<=>)(?=[^<]+)", "end": "(?=<)", "patterns": [{ "include": "#code_block" }], "name": "meta.xml-content.xquery" }, "entity": { "match": "(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.xml", "captures": { "1": { "name": "punctuation.definition.constant.xml" }, "3": { "name": "punctuation.definition.constant.xml" } } }, "internalSubset": { "begin": "(\\[)", "end": "(\\])", "patterns": [ { "include": "#EntityDecl" }, { "include": "#parameterEntity" } ], "name": "meta.internalsubset.xml", "captures": { "1": { "name": "punctuation.definition.constant.xml" } } }, "parameterEntity": { "match": "(%)([:a-zA-Z_][:a-zA-Z0-9_.-]*)(;)", "name": "constant.character.parameter-entity.xml", "captures": { "1": { "name": "punctuation.definition.constant.xml" }, "3": { "name": "punctuation.definition.constant.xml" } } }, "block_comment": { "begin": "\\(:", "end": ":\\)", "patterns": [{ "include": "#block_comment" }] }, "function_parameters": { "match": "\\$([\\-_a-zA-Z0-9][\\-\\._a-zA-Z0-9]*:)?([\\-_a-zA-Z0-9][\\-\\._a-zA-Z0-9]*)", "name": "variable.parameter.xquery" }, "doublequotedString": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "\"", "patterns": [{ "include": "#entity" }, { "include": "#bare-ampersand" }], "name": "string.quoted.double.xquery", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "doublequotedXmlString": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "\"", "patterns": [ { "include": "#entity" }, { "include": "#bare-ampersand" }, { "include": "#code_block" } ], "name": "string.quoted.double.xquery", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "EntityDecl": { "begin": "(<!)(ENTITY)\\s+(%\\s+)?([:a-zA-Z_][:a-zA-Z0-9_.-]*)(\\s+(?:SYSTEM|PUBLIC)\\s+)?", "end": "(>)", "patterns": [{ "include": "#xmlString" }], "captures": { "3": { "name": "punctuation.definition.entity.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "4": { "name": "variable.entity.xml" }, "2": { "name": "keyword.entity.xml" }, "5": { "name": "keyword.entitytype.xml" } } }, "string": { "patterns": [ { "include": "#doublequotedString" }, { "include": "#singlequotedString" } ] }, "function_call": { "begin": "[\\-_a-zA-Z0-9]+:[\\-_a-zA-Z0-9]+(\\()", "endCaptures": { "1": { "name": "punctuation.definition.parameters.end.xquery" } }, "end": "(\\))", "patterns": [{ "include": "$self" }, { "include": "#function_call" }], "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.xquery" } } }, "tagStuff": { "patterns": [ { "match": " (?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9]+)=", "captures": { "3": { "name": "punctuation.separator.namespace.xml" }, "1": { "name": "entity.other.attribute-name.namespace.xml" }, "4": { "name": "entity.other.attribute-name.localname.xml" }, "2": { "name": "entity.other.attribute-name.xml" } } }, { "include": "#xmlString" } ] }, "Xml": { "patterns": [ { "begin": "(<\\?)\\s*([-_a-zA-Z0-9]+)", "end": "(\\?>)", "patterns": [ { "match": " ([a-zA-Z-]+)", "name": "entity.other.attribute-name.xml" }, { "include": "#doublequotedXmlString" }, { "include": "#singlequotedXmlString" } ], "name": "meta.tag.preprocessor.xml", "captures": { "1": { "name": "punctuation.definition.tag.xml" }, "2": { "name": "entity.name.tag.xml" } } }, { "begin": "(<!)(DOCTYPE)\\s+([:a-zA-Z_][:a-zA-Z0-9_.-]*)", "end": "\\s*(>)", "patterns": [{ "include": "#internalSubset" }], "name": "meta.tag.sgml.doctype.xml", "captures": { "1": { "name": "punctuation.definition.tag.xml" }, "2": { "name": "keyword.doctype.xml" }, "3": { "name": "variable.documentroot.xml" } } }, { "begin": "<[!%]--", "end": "--%?>", "name": "comment.block.xml", "captures": { "0": { "name": "punctuation.definition.comment.xml" } } }, { "begin": "(<)((?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+))(?=(\\s[^>]*)?></\\2>)", "endCaptures": { "7": { "name": "punctuation.definition.tag.xml" }, "3": { "name": "entity.name.tag.namespace.xml" }, "4": { "name": "entity.name.tag.xml" }, "5": { "name": "punctuation.separator.namespace.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "6": { "name": "entity.name.tag.localname.xml" }, "2": { "name": "meta.scope.between-tag-pair.xml" } }, "end": "(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)(>)", "patterns": [{ "include": "#tagStuff" }], "name": "meta.tag.no-content.xml", "beginCaptures": { "3": { "name": "entity.name.tag.namespace.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "6": { "name": "entity.name.tag.localname.xml" }, "4": { "name": "entity.name.tag.xml" }, "5": { "name": "punctuation.separator.namespace.xml" } } }, { "begin": "(?x:\n (<)\n (\n (?:\n ([-_a-zA-Z0-9]+)(:)\n )?\n ([-_a-zA-Z0-9:]+)\n )\n (?=[^>]*/>)\n\t\t\t\t )", "end": "/>", "patterns": [{ "include": "#tagStuff" }], "name": "meta.tag.self-closing.xml" }, { "begin": "(?x:\n (<)\n (\n (?:\n ([-_a-zA-Z0-9]+)(:)\n )?\n ([-_a-zA-Z0-9:]+)\n )\n )", "endCaptures": { "1": { "name": "entity.name.tag.xml" } }, "end": "(</\\2>)", "patterns": [ { "include": "#tagStuff" }, { "include": "#Xml" }, { "include": "#xml_content" } ], "name": "meta.tag.xml", "beginCaptures": { "3": { "name": "entity.name.tag.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "4": { "name": "punctuation.separator.namespace.xml" }, "2": { "name": "entity.name.tag.namespace.xml" }, "5": { "name": "entity.name.tag.localname.xml" } } } ] }, "bare-ampersand": { "match": "&", "name": "invalid.illegal.bad-ampersand.xml" }, "singlequotedXmlString": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "'", "patterns": [ { "include": "#entity" }, { "include": "#bare-ampersand" }, { "include": "#code_block" } ], "name": "string.quoted.single.xquery", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "code_block": { "begin": "\\{", "end": "\\}", "patterns": [{ "include": "$self" }], "name": "meta.code-block.xquery" }, "singlequotedString": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "'", "patterns": [{ "include": "#entity" }, { "include": "#bare-ampersand" }], "name": "string.quoted.single.xquery", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "xmlString": { "patterns": [ { "include": "#doublequotedXmlString" }, { "include": "#singlequotedXmlString" } ] } }, "uuid": "5FB86104-E38E-4DAA-B929-DF98011DECBD", "patterns": [ { "include": "#Xml" }, { "include": "#entity" }, { "include": "#bare-ampersand" }, { "begin": "<!\\[CDATA\\[", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "]]>", "name": "string.unquoted.cdata.xml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, { "match": "^xquery version .*;$", "name": "keyword.control.import.xquery" }, { "match": "\\b(?i:(\\d+\\.\\d*(e[\\-\\+]?\\d+)?))(?=[^a-zA-Z_])", "name": "constant.numeric.float.xquery" }, { "match": "(?<=[^0-9a-zA-Z_])(?i:(\\.\\d+(e[\\-\\+]?\\d+)?))", "name": "constant.numeric.float.xquery" }, { "match": "\\b(?i:(\\d+e[\\-\\+]?\\d+))", "name": "constant.numeric.float.xquery" }, { "match": "\\b([1-9]+[0-9]*|0)", "name": "constant.numeric.integer.decimal.xquery" }, { "match": "\\b(import|module|schema)\\b", "name": "keyword.control.import.xquery" }, { "begin": "\\(:", "end": ":\\)", "patterns": [{ "include": "#block_comment" }], "name": "comment.block.xquery", "captures": { "0": { "name": "punctuation.definition.comment.xquery" } } }, { "comment": "http://www.w3.org/TR/xpath-datamodel/#types", "match": "(?<![:\\-_a-zA-Z0-9])((xs:)(string|boolean|decimal|float|double|duration|dateTime|time|date|gYearMonth|gYear|gMonthDay|gDay|gMonth|hexBinary|base64Binary|anyURI|QName|NOTATION|anyAtomicType|anyType|anySimpleType|untypedAtomic|dayTimeDuration|yearMonthDuration|integer|nonPositiveInteger|negativeInteger|long|int|short|byte|nonNegativeInteger|unsignedLong|unsignedInt|unsignedShort|unsignedByte|positiveInteger|ENTITY|ID|NMTOKEN|language|NCName|Name|token|normalizedString))(?![:\\-_a-zA-Z0-9])", "name": "support.type.xquery" }, { "match": "((\\$)(?:([\\-_a-zA-Z0-9]+)((:)))?([\\-_a-zA-Z0-9]+))", "name": "variable.other.xquery", "captures": { "1": { "name": "punctuation.definition.variable.xquery" } } }, { "match": "/(child|descendant|attribute|self|descendant-or-self|following-sibling|following|parent|ancestor|preceding-sibling|preceding|ancestor-or-self)::", "name": "support.constant.xquery" }, { "begin": "(declare)\\s+(private\\s+)?(function)\\s+((?:([\\-_a-zA-Z0-9]+):)?([\\-_a-zA-Z0-9]+))\\s*\\(", "end": "\\)", "patterns": [ { "include": "#function_parameters" }, { "include": "$self" } ], "name": "meta.function.xquery", "captures": { "3": { "name": "storage.type.function.xquery" }, "1": { "name": "keyword.control.declare.xquery" }, "4": { "name": "entity.name.function.xquery" }, "2": { "name": "storage.modifier.xquery" } } }, { "match": "(declare)\\s+(variable)", "name": "meta.variable.xquery", "captures": { "1": { "name": "keyword.other.xquery" }, "2": { "name": "storage.type.variable.xquery" } } }, { "match": "\\b(declare|namespace|preserve|no-preserve|inherit|no-inherit|strip|boundary-space|default|instance|option|copy-namespaces|xdmp:mapping)\\b", "name": "keyword.other.prolog.xquery" }, { "match": "(?<![:\\-_a-zA-Z0-9])(of|as|by|in|at|or|and)(?![:\\-_a-zA-Z0-9])", "name": "keyword.operator.logical.xquery" }, { "match": "(?<![:\\-_a-zA-Z0-9])(for|let|return|where|if|then|else|order by|satisfies|every)(?![:\\-_a-zA-Z0-9])", "captures": { "1": { "name": "keyword.control.flow.xquery" } } }, { "match": "(?<![:\\-_a-zA-Z0-9])(element|attribute|document|document-node|schema-element|schema-attribute|processing-instruction|comment|text|node|empty-sequence|item)(?![:\\-_a-zA-Z0-9])", "captures": { "1": { "name": "support.type.xquery" } } }, { "match": ":=", "name": "keyword.operator.assignment.xquery" }, { "match": "(?<![:\\-_a-zA-Z0-9])(\\+|-|<=?|>=?|eq|ne|lt|le|ge|gt|\\*|div|idiv|mod)(?![:\\-_a-zA-Z0-9])", "name": "keyword.operator.arithmetic.xquery" }, { "match": "(?<![:\\-_a-zA-Z0-9])((fn:)?(abs|adjust-date-to-timezone|adjust-date-to-timezone|adjust-dateTime-to-timezone|adjust-dateTime-to-timezone|adjust-time-to-timezone|adjust-time-to-timezone|avg|base-uri|base-uri|boolean|ceiling|codepoint-equal|codepoints-to-string|collection|collection|compare|concat|contains|count|current-date|current-dateTime|current-time|data|dateTime|day-from-date|day-from-dateTime|days-from-duration|deep-equal|default-collation|distinct-values|distinct-values|doc|doc-available|document-uri|empty|ends-with|error|escape-uri|exactly-one|exists|false|floor|hours-from-dateTime|hours-from-duration|hours-from-time|id|idref|implicit-timezone|in-scope-prefixes|index-of|insert-before|lang|last|local-name|local-name-from-QName|lower-case|matches|max|min|minutes-from-dateTime|minutes-from-duration|minutes-from-time|month-from-date|month-from-dateTime|months-from-duration|name|namespace-uri|namespace-uri-for-prefix|namespace-uri-from-QName|nilled|node-name|normalize-space|normalize-unicode|not|number|one-or-more|position|prefix-from-QName|QName|remove|replace|resolve-QName|resolve-uri|reverse|root|round|round-half-to-even|seconds-from-dateTime|seconds-from-duration|seconds-from-time|starts-with|static-base-uri|string|string-join|string-length|string-to-codepoints|subsequence|substring|substring-after|substring-before|sum|timezone-from-date|timezone-from-dateTime|timezone-from-time|tokenize|trace|translate|true|unordered|upper-case|year-from-date|year-from-dateTime|years-from-duration|zero-or-one))(?=\\s*\\()", "name": "support.function.builtin.xquery" }, { "match": "\\b(declare|module|namespace|element|variable|base-uri|collation|import|construction|ordering|ordered|unordered|order|empty|greatest|least|function|preserve|no-preserve|inherit|no-inherit|strip|boundary-space|default|instance|option|copy-namespaces)\\b", "name": "keyword.other.prolog.xquery" }, { "match": "(?<![:\\-_a-zA-Z0-9])(xdmp:(access|add-response-header|add64|amp|amp-roles|and64|apply|architecture|base64-decode|base64-encode|binary-decode|can-grant-roles|castable-as|collation-canonical-uri|collection-delete|collection-locks|collection-properties|crypt|current-last|current-position|database|database-backup|database-backup-cancel|database-backup-purge|database-backup-status|database-backup-validate|database-forests|database-name|database-restore|database-restore-cancel|database-restore-status|database-restore-validate|databases|default-collections|default-permissions|describe|diacritic-less|directory|directory-create|directory-delete|directory-locks|directory-properties|document-add-collections|document-add-permissions|document-add-properties|document-assign|document-delete|document-forest|document-get|document-get-collections|document-get-permissions|document-get-properties|document-get-quality|document-insert|document-load|document-locks|document-properties|document-remove-collections|document-remove-permissions|document-remove-properties|document-set-collections|document-set-permissions|document-set-properties|document-set-property|document-set-quality|elapsed-time|element-content-type|email|encoding-language-detect|estimate|eval|eval-in|excel-convert|exists|filesystem-directory|filesystem-directory-create|filesystem-file|forest|forest-backup|forest-clear|forest-counts|forest-databases|forest-name|forest-restart|forest-restore|forest-rollback|forest-status|forests|format-number|from-json|function|function-module|function-name|get|get-current-roles|get-current-user|get-request-body|get-request-client-address|get-request-client-certificate|get-request-field|get-request-field-content-type|get-request-field-filename|get-request-field-names|get-request-header|get-request-header-names|get-request-method|get-request-path|get-request-protocol|get-request-url|get-request-user|get-request-username|get-response-code|get-response-encoding|get-server-field|get-server-field-names|get-session-field|get-session-field-names|get-url-rewriter-path|group|group-hosts|group-name|group-servers|groups|has-privilege|hash32|hash64|hex-to-integer|host|host-name|host-status|hosts|http-delete|http-get|http-head|http-options|http-post|http-put|integer-to-hex|integer-to-octal|invoke|invoke-in|key-from-QName|load|lock-acquire|lock-for-update|lock-release|log|log-level|login|logout|lshift64|md5|merge|merge-cancel|merging|modules-database|modules-root|mul64|node-database|node-delete|node-insert-after|node-insert-before|node-insert-child|node-kind|node-replace|node-uri|not64|octal-to-integer|or64|parse-dateTime|parse-yymmdd|path|pdf-convert|permission|plan|platform|powerpoint-convert|pretty-print|privilege|privilege-roles|product-edition|QName-from-key|query-meters|query-trace|quote|random|redirect-response|request|request-cancel|request-status|request-timestamp|restart|rethrow|role|role-roles|rshift64|save|schema-database|security-assert|security-database|server|server-name|server-status|servers|set|set-request-time-limit|set-response-code|set-response-content-type|set-response-encoding|set-server-field|set-server-field-privilege|set-session-field|shutdown|sleep|spawn|spawn-in|step64|strftime|subbinary|tidy|to-json|trace|triggers-database|unpath|unquote|uri-content-type|uri-format|uri-is-file|url-decode|url-encode|user|user-last-login|user-roles|value|version|with-namespaces|word-convert|x509-certificate-extract|xor64|xquery-version|xslt-eval|xslt-invoke|zip-create|zip-get|zip-manifest))(?=\\s*\\()", "name": "support.function.marklogic.xquery" }, { "match": "(?<![:\\-_a-zA-Z0-9])(xdmp:([\\-_a-zA-Z0-9][\\-\\._a-zA-Z0-9]*:)?([\\-_a-zA-Z0-9][\\-\\._a-zA-Z0-9]*))", "name": "invalid.function.marklogic" }, { "include": "#string" }, { "begin": "(\\()", "endCaptures": { "1": { "name": "punctuation.definition.end.xquery" } }, "end": "(\\))", "patterns": [{ "include": "$self" }], "name": "meta", "beginCaptures": { "1": { "name": "punctuation.definition.begin.xquery" } } } ], "name": "XQuery", "scopeName": "source.xquery" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/xsl.tmLanguage.json ================================================ { "fileTypes": ["xsl", "xslt"], "repository": { "doublequotedString": { "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "\"", "name": "string.quoted.double.xml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } }, "singlequotedString": { "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.xml" } }, "end": "'", "name": "string.quoted.single.xml", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.xml" } } } }, "keyEquivalent": "^~X", "uuid": "DB8033A1-6D8E-4D80-B8A2-8768AAC6125D", "patterns": [ { "begin": "(<)(xsl)((:))(template)", "end": "(>)", "patterns": [ { "match": " (?:([-_a-zA-Z0-9]+)((:)))?([a-zA-Z-]+)", "captures": { "3": { "name": "punctuation.separator.namespace.xml" }, "1": { "name": "entity.other.attribute-name.namespace.xml" }, "4": { "name": "entity.other.attribute-name.localname.xml" }, "2": { "name": "entity.other.attribute-name.xml" } } }, { "include": "#doublequotedString" }, { "include": "#singlequotedString" } ], "name": "meta.tag.xml.template", "captures": { "3": { "name": "entity.name.tag.xml" }, "1": { "name": "punctuation.definition.tag.xml" }, "4": { "name": "punctuation.separator.namespace.xml" }, "2": { "name": "entity.name.tag.namespace.xml" }, "5": { "name": "entity.name.tag.localname.xml" } } }, { "include": "text.xml" } ], "name": "XSL", "scopeName": "text.xml.xsl" } ================================================ FILE: src/renderer/components/editor/grammars/textmate/yaml.tmLanguage.json ================================================ { "information_for_contributors": [ "This file has been converted from https://github.com/textmate/yaml.tmbundle/blob/master/Syntaxes/YAML.tmLanguage", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/textmate/yaml.tmbundle/commit/e54ceae3b719506dba7e481a77cea4a8b576ae46", "name": "yaml", "scopeName": "source.yaml", "patterns": [ { "include": "#comment" }, { "include": "#property" }, { "include": "#directive" }, { "match": "^---", "name": "entity.other.document.begin.yaml" }, { "match": "^\\.{3}", "name": "entity.other.document.end.yaml" }, { "include": "#node" } ], "repository": { "block-collection": { "patterns": [ { "include": "#block-sequence" }, { "include": "#block-mapping" } ] }, "block-mapping": { "patterns": [ { "include": "#block-pair" } ] }, "block-node": { "patterns": [ { "include": "#prototype" }, { "include": "#block-scalar" }, { "include": "#block-collection" }, { "include": "#flow-scalar-plain-out" }, { "include": "#flow-node" } ] }, "block-pair": { "patterns": [ { "begin": "\\?", "beginCaptures": { "1": { "name": "punctuation.definition.key-value.begin.yaml" } }, "end": "(?=\\?)|^ *(:)|(:)", "endCaptures": { "1": { "name": "punctuation.separator.key-value.mapping.yaml" }, "2": { "name": "invalid.illegal.expected-newline.yaml" } }, "name": "meta.block-mapping.yaml", "patterns": [ { "include": "#block-node" } ] }, { "begin": "(?x)\n (?=\n (?x:\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n )\n (\n [^\\s:]\n | : \\S\n | \\s+ (?![#\\s])\n )*\n \\s*\n :\n\t\t\t\t\t\t\t(\\s|$)\n )\n ", "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ", "patterns": [ { "include": "#flow-scalar-plain-out-implicit-type" }, { "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n ", "beginCaptures": { "0": { "name": "entity.name.tag.yaml" } }, "contentName": "entity.name.tag.yaml", "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ", "name": "string.unquoted.plain.out.yaml" } ] }, { "match": ":(?=\\s|$)", "name": "punctuation.separator.key-value.mapping.yaml" } ] }, "block-scalar": { "begin": "(?:(\\|)|(>))([1-9])?([-+])?(.*\\n?)", "beginCaptures": { "1": { "name": "keyword.control.flow.block-scalar.literal.yaml" }, "2": { "name": "keyword.control.flow.block-scalar.folded.yaml" }, "3": { "name": "constant.numeric.indentation-indicator.yaml" }, "4": { "name": "storage.modifier.chomping-indicator.yaml" }, "5": { "patterns": [ { "include": "#comment" }, { "match": ".+", "name": "invalid.illegal.expected-comment-or-newline.yaml" } ] } }, "end": "^(?=\\S)|(?!\\G)", "patterns": [ { "begin": "^([ ]+)(?! )", "end": "^(?!\\1|\\s*$)", "name": "string.unquoted.block.yaml" } ] }, "block-sequence": { "match": "(-)(?!\\S)", "name": "punctuation.definition.block.sequence.item.yaml" }, "comment": { "begin": "(?:(^[ \\t]*)|[ \\t]+)(?=#\\p{Print}*$)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.yaml" } }, "end": "(?!\\G)", "patterns": [ { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.yaml" } }, "end": "\\n", "name": "comment.line.number-sign.yaml" } ] }, "directive": { "begin": "^%", "beginCaptures": { "0": { "name": "punctuation.definition.directive.begin.yaml" } }, "end": "(?=$|[ \\t]+($|#))", "name": "meta.directive.yaml", "patterns": [ { "captures": { "1": { "name": "keyword.other.directive.yaml.yaml" }, "2": { "name": "constant.numeric.yaml-version.yaml" } }, "match": "\\G(YAML)[ \\t]+(\\d+\\.\\d+)" }, { "captures": { "1": { "name": "keyword.other.directive.tag.yaml" }, "2": { "name": "storage.type.tag-handle.yaml" }, "3": { "name": "support.type.tag-prefix.yaml" } }, "match": "(?x)\n \\G\n (TAG)\n (?:[ \\t]+\n ((?:!(?:[0-9A-Za-z\\-]*!)?))\n (?:[ \\t]+ (\n ! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )*\n | (?![,!\\[\\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+\n )\n )?\n )?\n " }, { "captures": { "1": { "name": "support.other.directive.reserved.yaml" }, "2": { "name": "string.unquoted.directive-name.yaml" }, "3": { "name": "string.unquoted.directive-parameter.yaml" } }, "match": "(?x) \\G (\\w+) (?:[ \\t]+ (\\w+) (?:[ \\t]+ (\\w+))? )?" }, { "match": "\\S+", "name": "invalid.illegal.unrecognized.yaml" } ] }, "flow-alias": { "captures": { "1": { "name": "keyword.control.flow.alias.yaml" }, "2": { "name": "punctuation.definition.alias.yaml" }, "3": { "name": "variable.other.alias.yaml" }, "4": { "name": "invalid.illegal.character.anchor.yaml" } }, "match": "((\\*))([^\\s\\[\\]/{/},]+)([^\\s\\]},]\\S*)?" }, "flow-collection": { "patterns": [ { "include": "#flow-sequence" }, { "include": "#flow-mapping" } ] }, "flow-mapping": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.mapping.begin.yaml" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.mapping.end.yaml" } }, "name": "meta.flow-mapping.yaml", "patterns": [ { "include": "#prototype" }, { "match": ",", "name": "punctuation.separator.mapping.yaml" }, { "include": "#flow-pair" } ] }, "flow-node": { "patterns": [ { "include": "#prototype" }, { "include": "#flow-alias" }, { "include": "#flow-collection" }, { "include": "#flow-scalar" } ] }, "flow-pair": { "patterns": [ { "begin": "\\?", "beginCaptures": { "0": { "name": "punctuation.definition.key-value.begin.yaml" } }, "end": "(?=[},\\]])", "name": "meta.flow-pair.explicit.yaml", "patterns": [ { "include": "#prototype" }, { "include": "#flow-pair" }, { "include": "#flow-node" }, { "begin": ":(?=\\s|$|[\\[\\]{},])", "beginCaptures": { "0": { "name": "punctuation.separator.key-value.mapping.yaml" } }, "end": "(?=[},\\]])", "patterns": [ { "include": "#flow-value" } ] } ] }, { "begin": "(?x)\n (?=\n (?:\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n )\n (\n [^\\s:[\\[\\]{},]]\n | : [^\\s[\\[\\]{},]]\n | \\s+ (?![#\\s])\n )*\n \\s*\n :\n\t\t\t\t\t\t\t(\\s|$)\n )\n ", "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ", "name": "meta.flow-pair.key.yaml", "patterns": [ { "include": "#flow-scalar-plain-in-implicit-type" }, { "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n ", "beginCaptures": { "0": { "name": "entity.name.tag.yaml" } }, "contentName": "entity.name.tag.yaml", "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ", "name": "string.unquoted.plain.in.yaml" } ] }, { "include": "#flow-node" }, { "begin": ":(?=\\s|$|[\\[\\]{},])", "captures": { "0": { "name": "punctuation.separator.key-value.mapping.yaml" } }, "end": "(?=[},\\]])", "name": "meta.flow-pair.yaml", "patterns": [ { "include": "#flow-value" } ] } ] }, "flow-scalar": { "patterns": [ { "include": "#flow-scalar-double-quoted" }, { "include": "#flow-scalar-single-quoted" }, { "include": "#flow-scalar-plain-in" } ] }, "flow-scalar-double-quoted": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.yaml" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.yaml" } }, "name": "string.quoted.double.yaml", "patterns": [ { "match": "\\\\([0abtnvfre \"/\\\\N_Lp]|x\\d\\d|u\\d{4}|U\\d{8})", "name": "constant.character.escape.yaml" }, { "match": "\\\\\\n", "name": "constant.character.escape.double-quoted.newline.yaml" } ] }, "flow-scalar-plain-in": { "patterns": [ { "include": "#flow-scalar-plain-in-implicit-type" }, { "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] [^\\s[\\[\\]{},]]\n ", "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n ", "name": "string.unquoted.plain.in.yaml" } ] }, "flow-scalar-plain-in-implicit-type": { "patterns": [ { "captures": { "1": { "name": "constant.language.null.yaml" }, "2": { "name": "constant.language.boolean.yaml" }, "3": { "name": "constant.numeric.integer.yaml" }, "4": { "name": "constant.numeric.float.yaml" }, "5": { "name": "constant.other.timestamp.yaml" }, "6": { "name": "constant.language.value.yaml" }, "7": { "name": "constant.language.merge.yaml" } }, "match": "(?x)\n (?x:\n (null|Null|NULL|~)\n | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n | (\n (?:\n [-+]? 0b [0-1_]+ # (base 2)\n | [-+]? 0 [0-7_]+ # (base 8)\n | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)\n | [-+]? 0x [0-9a-fA-F_]+ # (base 16)\n | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)\n )\n )\n | (\n (?x:\n [-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)\n | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]* # (base 60)\n | [-+]? \\. (?: inf|Inf|INF) # (infinity)\n | \\. (?: nan|NaN|NAN) # (not a number)\n )\n )\n | (\n (?x:\n \\d{4} - \\d{2} - \\d{2} # (y-m-d)\n | \\d{4} # (year)\n - \\d{1,2} # (month)\n - \\d{1,2} # (day)\n (?: [Tt] | [ \\t]+) \\d{1,2} # (hour)\n : \\d{2} # (minute)\n : \\d{2} # (second)\n (?: \\.\\d*)? # (fraction)\n (?:\n (?:[ \\t]*) Z\n | [-+] \\d{1,2} (?: :\\d{1,2})?\n )? # (time zone)\n )\n )\n | (=)\n | (<<)\n )\n (?:\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n | \\s* : [\\[\\]{},]\n | \\s* [\\[\\]{},]\n )\n )\n " } ] }, "flow-scalar-plain-out": { "patterns": [ { "include": "#flow-scalar-plain-out-implicit-type" }, { "begin": "(?x)\n [^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n | [?:-] \\S\n ", "end": "(?x)\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n ", "name": "string.unquoted.plain.out.yaml" } ] }, "flow-scalar-plain-out-implicit-type": { "patterns": [ { "captures": { "1": { "name": "constant.language.null.yaml" }, "2": { "name": "constant.language.boolean.yaml" }, "3": { "name": "constant.numeric.integer.yaml" }, "4": { "name": "constant.numeric.float.yaml" }, "5": { "name": "constant.other.timestamp.yaml" }, "6": { "name": "constant.language.value.yaml" }, "7": { "name": "constant.language.merge.yaml" } }, "match": "(?x)\n (?x:\n (null|Null|NULL|~)\n | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n | (\n (?:\n [-+]? 0b [0-1_]+ # (base 2)\n | [-+]? 0 [0-7_]+ # (base 8)\n | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)\n | [-+]? 0x [0-9a-fA-F_]+ # (base 16)\n | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)\n )\n )\n | (\n (?x:\n [-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)\n | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]* # (base 60)\n | [-+]? \\. (?: inf|Inf|INF) # (infinity)\n | \\. (?: nan|NaN|NAN) # (not a number)\n )\n )\n | (\n (?x:\n \\d{4} - \\d{2} - \\d{2} # (y-m-d)\n | \\d{4} # (year)\n - \\d{1,2} # (month)\n - \\d{1,2} # (day)\n (?: [Tt] | [ \\t]+) \\d{1,2} # (hour)\n : \\d{2} # (minute)\n : \\d{2} # (second)\n (?: \\.\\d*)? # (fraction)\n (?:\n (?:[ \\t]*) Z\n | [-+] \\d{1,2} (?: :\\d{1,2})?\n )? # (time zone)\n )\n )\n | (=)\n | (<<)\n )\n (?x:\n (?=\n \\s* $\n | \\s+ \\#\n | \\s* : (\\s|$)\n )\n )\n " } ] }, "flow-scalar-single-quoted": { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.yaml" } }, "end": "'(?!')", "endCaptures": { "0": { "name": "punctuation.definition.string.end.yaml" } }, "name": "string.quoted.single.yaml", "patterns": [ { "match": "''", "name": "constant.character.escape.single-quoted.yaml" } ] }, "flow-sequence": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.sequence.begin.yaml" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.sequence.end.yaml" } }, "name": "meta.flow-sequence.yaml", "patterns": [ { "include": "#prototype" }, { "match": ",", "name": "punctuation.separator.sequence.yaml" }, { "include": "#flow-pair" }, { "include": "#flow-node" } ] }, "flow-value": { "patterns": [ { "begin": "\\G(?![},\\]])", "end": "(?=[},\\]])", "name": "meta.flow-pair.value.yaml", "patterns": [ { "include": "#flow-node" } ] } ] }, "node": { "patterns": [ { "include": "#block-node" } ] }, "property": { "begin": "(?=!|&)", "end": "(?!\\G)", "name": "meta.property.yaml", "patterns": [ { "captures": { "1": { "name": "keyword.control.property.anchor.yaml" }, "2": { "name": "punctuation.definition.anchor.yaml" }, "3": { "name": "entity.name.type.anchor.yaml" }, "4": { "name": "invalid.illegal.character.anchor.yaml" } }, "match": "\\G((&))([^\\s\\[\\]/{/},]+)(\\S+)?" }, { "match": "(?x)\n \\G\n (?:\n ! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+ >\n | (?:!(?:[0-9A-Za-z\\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$_.~*'()] )+\n | !\n )\n (?=\\ |\\t|$)\n ", "name": "storage.type.tag-handle.yaml" }, { "match": "\\S+", "name": "invalid.illegal.tag-handle.yaml" } ] }, "prototype": { "patterns": [ { "include": "#comment" }, { "include": "#property" } ] } } } ================================================ FILE: src/renderer/components/editor/grammars/textmate/zeek.tmLanguage.json ================================================ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "fileTypes": ["bro", "zeek"], "foldingStartMarker": "\\{\\s*$", "foldingStopMarker": "^\\s*\\}", "name": "zeek", "patterns": [ { "include": "#directives" }, { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.zeek" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.zeek" } }, "name": "string.quoted.double.zeek", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" } ] }, { "begin": "(?<=in|\\=|,|\\()\\s*(/)", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.zeek" } }, "end": "(?<!\\\\)/", "endCaptures": { "0": { "name": "punctuation.definition.string.end.zeek" } }, "name": "string.quoted.regexp.zeek", "patterns": [ { "include": "#string_escaped_char" }, { "include": "#string_placeholder" } ] }, { "begin": "(/)(?=.*/)", "name": "string.regexp.zeek", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.zeek" } }, "end": "(/)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.zeek" } }, "patterns": [ { "name": "constant.character.escape.zeek", "match": "\\\\." } ] }, { "captures": { "1": { "name": "storage.type.function.zeek" }, "2": { "name": "entity.name.function.zeek" }, "3": { "name": "variable.parameter.zeek" }, "4": { "name": "storage.type.zeek" } }, "match": "^\\s*(function|hook|event)\\s+((?:(?:[a-zA-Z_][0-9a-zA-Z_]*)(?:::))?[0-9a-zA-Z_]+)\\s+\\((?:([a-zA-Z0-9_]+), ([a-zA-Z0-9_]+))*\\)(?:\\s*:\\s*([a-zA-Z0-9_]+))", "name": "meta.function.zeek", "patterns": [ { "include": "#types" }, { "include": "#attributes" }, { "include": "#operator" }, { "include": "#constants" } ] }, { "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.zeek" } }, "end": "$", "name": "comment.line.number-sign.zeek" }, { "include": "#builtin-functions" }, { "include": "#statements" }, { "include": "#preprocessor" }, { "include": "#declarations" }, { "include": "#attributes" }, { "include": "#constants" }, { "include": "#types" }, { "include": "#operator" } ], "repository": { "attributes": { "patterns": [ { "match": "\\&\\b(redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|error_handler|type_column|deprecated)\\b", "name": "storage.modifier.attribute.zeek" } ] }, "preprocessor": { "patterns": [ { "match": "(@(load-plugin|load-sigs|load|unload)).*$", "name": "meta.preprocessor.zeek", "captures": { "1": { "name": "keyword.other.zeek" } } }, { "match": "(@(DEBUG|DIR|FILENAME|deprecated|ifdef|ifndef|if|else|endif))", "name": "meta.preprocessor.zeek", "captures": { "1": { "name": "keyword.other.zeek" } } }, { "match": "(@prefixes)\\s*(\\+?=).*$", "name": "meta.preprocessor.zeek", "captures": { "1": { "name": "keyword.other.zeek" }, "2": { "name": "keyword.operator.zeek" } } } ] }, "builtin-functions": { "patterns": [ { "captures": { "1": { "name": "support.function.builtin.zeek" } }, "match": "(?<!\\$)\\b(active_file|addr_to_counts|addr_to_ptr_name|all_set|anonymize_addr|any_set|bro_is_terminating|bro_version|bytestring_to_count|bytestring_to_double|bytestring_to_hexstr|calc_next_rotate|capture_events|capture_state_updates|cat|cat_sep|checkpoint_state|clear_table|close|complete_handshake|connect|connection_exists|continue_processing|convert_for_pattern|count_to_port|count_to_v4_addr|counts_to_v4_addr|counts_to_addr|current_analyzer|current_time|decode_base64|decode_base64_custom|disable_analyzer|disable_print_hook|disconnect|do_profiling|double_to_count|double_to_interval|double_to_time|dump_current_packet|dump_packet|dump_rule_stats|enable_communication|enable_raw_output|encode_base64|encode_base64_custom|entropy_test_add|entropy_test_finish|entropy_test_init|enum_to_int|exit|exp|file_magic|file_mode|file_size|find_entropy|floor|flush_all|fmt|get_conn_transport_proto|get_current_packet|get_event_peer|get_file_name|get_local_event_peer|get_matcher_stats|get_port_transport_proto|getenv|gethostname|getpid|global_ids|global_sizes|hexstr_to_bytestring|identify_data|install_dst_addr_filter|install_dst_net_filter|install_pcap_filter|install_src_addr_filter|install_src_net_filter|int_to_count|interval_to_double|interval_to_int|is_external_connection|is_icmp_port|is_local_interface|is_remote_event|is_tcp_port|is_udp_port|is_v4_addr|is_v6_addr|listen|ln|log10|lookup_ID|lookup_addr|lookup_asn|lookup_connection|lookup_hostname|lookup_hostname_txt|lookup_location|mask_addr|match_signatures|md5_hash|md5_hash_finish|md5_hash_init|md5_hash_update|md5_hmac|merge_pattern|mkdir|net_stats|network_time|open|open_for_append|order|pcap_error|piped_exec|port_to_count|precompile_pcap_filter|preserve_prefix|preserve_subnet|ptr_name_to_addr|rand|raw_bytes_to_v4_addr|reading_live_traffic|record_fields|record_type_to_vector|remask_addr|request_remote_events|request_remote_logs|request_remote_sync|rescan_state|resize|resource_usage|resume_state_updates|rotate_file|rotate_file_by_name|routing0_data_to_addrs|same_object|send_capture_filter|send_current_packet|send_id|send_ping|send_state|set_accept_state|set_buf|set_compression_level|set_inactivity_timeout|set_record_packets|setenv|sha1_hash|sha1_hash_finish|sha1_hash_init|sha1_hash_update|sha256_hash|sha256_hash_finish|sha256_hash_init|sha256_hash_update|skip_further_processing|sort|sqrt|srand|strftime|string_to_pattern|strptime|suspend_processing|suspend_state_updates|syslog|system|system_env|terminate|terminate_communication|time_to_double|to_addr|to_count|to_double|to_int|to_port|to_subnet|type_name|uninstall_dst_addr_filter|uninstall_dst_net_filter|uninstall_src_addr_filter|uninstall_src_net_filter|unique_id|unique_id_from|uuid_to_string|val_size|write_file)\\s*(?=\\()", "name": "meta.function-call.zeek.bif.zeek" }, { "captures": { "1": { "name": "support.function.builtin.zeek" } }, "match": "(?<!\\$)\\b(cat_string_array|cat_string_array_n|clean|edit|escape_string|find_all|find_last|gsub|hexdump|is_ascii|join_string_array|join_string_vec|levenshtein_distance|reverse|sort_string_array|split|split1|split_all|split_n|str_shell_escape|str_smith_waterman|str_split|strcmp|string_cat|string_fill|string_to_ascii_hex|strip|strstr|sub|sub_bytes|subst_string|to_lower|to_string_literal|to_upper)(?=\\()", "name": "meta.function-call.strings.bif.zeek" }, { "captures": { "1": { "name": "support.function.builtin.zeek" } }, "match": "(?<!\\$)\\b(Reporter::(?:error|fatal|info|warning))(?=\\()", "name": "meta.function-call.reporter.bif.zeek" }, { "captures": { "1": { "name": "support.function.builtin.zeek" } }, "match": "(?<!\\$)\\b(OS_version_found|ack_above_hole|bro_done|bro_init|bro_script_loaded|conn_stats|conn_weird|connection_external|connection_flow_label_changed|connection_reused|connection_state_remove|connection_status_update|connection_timeout|content_gap|dns_mapping_altered|dns_mapping_lost_name|dns_mapping_new_name|dns_mapping_unverified|dns_mapping_valid|esp_packet|event_queue__flush_point|file_gap|file_new|file_opened|file_over_new_connection|file_state_remove|file_timeout|finished_send_state|flow_weird|gap_report|get_file_handle|ipv6_ext_headers|load_sample|mobile_ipv6_message|net_weird|new_connection|new_event|new_packet|packet_contents|profiling_update|protocol_confirmation|protocol_violation|remote_capture_filter|remote_connection_closed|remote_connection_error|remote_connection_established|remote_connection_handshake_done|remote_event_registered|remote_log|remote_log_peer|remote_pong|remote_state_access_performed|remote_state_inconsistency|reporter_error|reporter_info|reporter_warning|rexmit_inconsistency|scheduled_analyzer_applied|signature_match|software_parse_error|software_unparsed_version_found|software_version_found|tunnel_changed|udp_session_done)\\s*(?=\\()", "name": "meta.event-call.event.bif.zeek" }, { "captures": { "1": { "name": "invalid.deprecated.zeek" } }, "match": "(?<!\\$)\\b(anonymization_mapping|gaobot_signature_found|kazaa_signature_found|napster_signature_found|print_hook|root_backdoor_signature_found|rotate_interval|rotate_size)(?=\\()", "name": "meta.event-call.deprecated.zeek" } ] }, "constants": { "patterns": [ { "match": "\\b((25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])/(3[0-2]|[1-2]?[0-9])\\b", "name": "constant.other.subnet.zeek" }, { "match": "\\[\\b(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\]/(12[0-8]|1[0-1][0-9]|[1-2]?[0-9]|[0-9][0-9])\\b", "name": "constant.other.subnet6.zeek" }, { "match": "(?<!::)\\b((25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9]?[0-9])\\b(?!/)", "name": "constant.other.ip.zeek" }, { "match": "\\[\\b(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\b\\](?!/)", "name": "constant.other.ip6.zeek" }, { "match": "\\b((6[0-5]{2}[0-3][0-5]|[1-5]?[0-9]{1,4})/(tcp|udp|icmp))\\b", "name": "constant.other.port.zeek" }, { "match": "\\b((\\s*-?)([0-9]+)\\s?((sec|min|hr|day)s?))\\b", "name": "constant.other.interval.zeek" }, { "match": "(?<![0-9])(\\s*-?)\\.\\b([0-9]*)\\b(?!\\.)|(?<!\\.)(\\s*-?)\\b([0-9]+\\.[0-9]+)\\b(?!\\.)", "name": "constant.numeric.double.zeek" }, { "match": "\\b(0(x|X)[0-9a-fA-F]+)\\b", "name": "constant.numeric.integer.hexadecimal.zeek" }, { "match": "(?<!\\.|:)(\\s*-?)\\b([0-9]+)\\b(?!\\.|:|/|\\s((sec|min|day)s?))", "name": "constant.numeric.integer.decimal.zeek" }, { "match": "\\b(T|F)\\b", "name": "constant.language.boolean.zeek" } ] }, "declarations": { "patterns": [ { "captures": { "2": { "name": "storage.modifier.namespace.zeek" } }, "match": "^\\s*(module)\\s+([a-zA-Z_][0-9a-zA-Z_-]*)", "name": "keyword.control.import.zeek" }, { "match": "\\b(export)\\b", "name": "keyword.control.export.zeek" }, { "match": "\\b(type|const|global|local|redef|function|event|hook)\\b", "name": "storage.modifier.declaration.zeek" } ] }, "directives": { "patterns": [ { "begin": "^\\s*(\\@(?:load|load-sigs|unload))\\s+(.*)\\b", "captures": { "1": { "name": "keyword.control.import.zeek" }, "2": { "name": "meta.definition.zeek" } }, "end": "$", "name": "meta.preprocessor.zeek" }, { "begin": "^\\s*(\\@prefixes)\\s+(=|\\+=)\\s+([a-zA-Z_][0-9a-zA-Z_-]+)\\b", "captures": { "1": { "name": "keyword.control.def.zeek" }, "2": { "name": "keyword.operator.assignment.zeek" }, "3": { "name": "text.plain.zeek" } }, "end": "$", "name": "meta.preprocessor.zeek" }, { "captures": { "1": { "name": "keyword.other.directive.zeek" }, "2": { "name": "keyword.control.directive.zeek" } }, "match": "^\\s*(\\@)(if|ifdef|ifndef|else|endif)\\b", "name": "meta.preprocessor.zeek" }, { "captures": { "1": { "name": "constant.other.placeholder.zeek" } }, "match": "(\\@DEBUG|\\@DIR|\\@FILENAME)", "name": "meta.preprocessor.zeek" } ] }, "generic_names": { "match": "[A-Za-z_][A-Za-z0-9_]*" }, "illegal_names": { "patterns": [ { "match": "(bool|int|count|double|time|interval|string|pattern|enum|port|addr|subnet|any|table|set|vector|record|opaque|file|function|event|hook)", "name": "invalid.illegal.name.type.zeek" } ] }, "operator": { "patterns": [ { "match": "\\b(of)\\b", "name": "keyword.operator.zeek" }, { "match": "(\\!|&&|\\|\\||\\b(in)\\b)", "name": "keyword.operator.logical.zeek" }, { "match": "(<|<\\=|>\\=|>|\\=\\=|\\!\\=)", "name": "keyword.operator.comparison.zeek" }, { "match": "(\\+\\=|-\\=|\\*\\=|/\\=)", "name": "keyword.operator.assignment.augmented.zeek" }, { "match": "(\\+\\+|\\-\\-)", "name": "keyword.operator.increment-decrement.zeek" }, { "match": "(\\+|\\-|\\*|/|%)(?!\\+|\\-)", "name": "keyword.operator.arithmetic.zeek" }, { "match": "(\\=)", "name": "keyword.operator.assignment.zeek" }, { "match": "(?<!\\|)(\\|)(?!\\|)", "name": "keyword.operator.length.zeek" } ] }, "statements": { "patterns": [ { "match": "\\b(add|delete|print|for|next|break|if|else|switch|case|default|break|fallthrough|when|schedule|return)\\b", "name": "keyword.control.flow.zeek" } ] }, "string_escaped_char": { "patterns": [ { "match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{0,2}|[4-7]\\d?|x[a-fA-F0-9]{0,2})", "name": "constant.character.escape.zeek" }, { "match": "\\\\(\\\\|[/\\^\\$\\{\\}\\[\\]\\(\\)\\.\\*\\+\\?\\|\\-])", "name": "constant.character.escape.zeek" }, { "match": "\\\\.", "name": "invalid.illegal.unknown-escape.zeek" } ] }, "string_placeholder": { "patterns": [ { "match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n\t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n", "name": "constant.other.placeholder.zeek" }, { "match": "%", "name": "invalid.illegal.placeholder.zeek" } ] }, "types": { "patterns": [ { "match": "\\b\\d{1,5}/(udp|tcp|icmp|unknown)\\b", "name": "constant.numeric.port.zeek" }, { "match": "\\b(bool|count|int|double|time|interval|string|pattern|port|addr|subnet|time|enum|record|function|event|hook|file|opaque|any)\\b", "name": "storage.type.zeek" }, { "match": "\\b(addr_set|addr_vec|any_vec|count_set|id_table|index_vec|record_field_table|string_array|string_set|string_vec|sw_substring_vec|table_string_of_string)\\b", "name": "invalid.deprecated.type.zeek" }, { "match": "\\bset\\s*\\[\\s*[a-zA-Z_][0-9a-zA-Z_-]+\\s*\\]", "name": "storage.type.zeek" }, { "match": "\\b(table|set)\\s*\\[\\s*[a-zA-Z_][0-9a-zA-Z_-]+\\s*\\]\\s+of\\s+", "name": "storage.type.zeek" }, { "match": "\\bvector\\s+of\\s+[a-zA-Z_][0-9a-zA-Z_-]+\\s*", "name": "storage.type.zeek" } ] } }, "scopeName": "source.zeek" } ================================================ FILE: src/renderer/components/editor/header/Header.vue ================================================ <script setup lang="ts"> import { useApp, useSnippets, useSnippetUpdate } from '@/composables' import { i18n } from '@/electron' import { router, RouterName } from '@/router' import { Code, Eye, Image, Network, PanelLeftClose, PanelLeftOpen, Plus, Presentation, Type, } from 'lucide-vue-next' const { selectedSnippet, selectedSnippetContent, addFragment, isAvailableToCodePreview, } = useSnippets() const { isFocusedSnippetName, state, isShowMarkdown, isShowMindmap, isShowMarkdownPresentation, isShowCodePreview, isShowCodeImage, isShowJsonVisualizer, isSidebarHidden, } = useApp() const { addToUpdateQueue } = useSnippetUpdate() const isShowDescription = ref(false) const name = computed({ get() { return selectedSnippet?.value?.name }, set(v: string) { addToUpdateQueue(selectedSnippet.value!.id, { name: v, description: selectedSnippet.value!.description, folderId: selectedSnippet.value!.folder?.id || null, isDeleted: selectedSnippet.value!.isDeleted, isFavorites: selectedSnippet.value!.isFavorites, }) }, }) const isShowMarkdownAction = computed( () => selectedSnippetContent.value?.language === 'markdown', ) const isShowJsonVisualizerAction = computed( () => selectedSnippetContent.value?.language === 'json', ) const isShowTags = computed(() => { return ( !isShowMindmap.value && !isShowMarkdown.value && !isShowCodeImage.value && !isShowJsonVisualizer.value ) }) function onClickTab(index: number) { state.snippetContentIndex = index } function onMarkdownToggle() { isShowMarkdown.value = !isShowMarkdown.value isShowMindmap.value = false isShowMarkdownPresentation.value = false isShowCodePreview.value = false isShowCodeImage.value = false isShowJsonVisualizer.value = false } function onMarkdownPresentationToggle() { isShowMarkdownPresentation.value = !isShowMarkdownPresentation.value isShowMarkdown.value = false isShowMindmap.value = false isShowCodePreview.value = false isShowCodeImage.value = false isShowJsonVisualizer.value = false router.push({ name: RouterName.markdownPresentation }) } function onMindmapToggle() { isShowMindmap.value = !isShowMindmap.value isShowMarkdown.value = false isShowMarkdownPresentation.value = false isShowCodePreview.value = false isShowCodeImage.value = false isShowJsonVisualizer.value = false } function onCodePreviewToggle() { isShowCodePreview.value = !isShowCodePreview.value isShowMarkdown.value = false isShowMarkdownPresentation.value = false isShowMindmap.value = false isShowCodeImage.value = false isShowJsonVisualizer.value = false } function onCodeImageToggle() { isShowCodeImage.value = !isShowCodeImage.value isShowMarkdown.value = false isShowMarkdownPresentation.value = false isShowMindmap.value = false isShowCodePreview.value = false isShowJsonVisualizer.value = false } function onJsonVisualizerToggle() { isShowJsonVisualizer.value = !isShowJsonVisualizer.value isShowMarkdown.value = false isShowMarkdownPresentation.value = false isShowMindmap.value = false isShowCodePreview.value = false isShowCodeImage.value = false } </script> <template> <div data-editor-header> <div class="border-border grid grid-cols-[1fr_auto] items-center border-b px-2 pb-1" > <UiInput v-model="name" variant="ghost" class="w-full truncate px-0" :select="isFocusedSnippetName" @blur="isFocusedSnippetName = false" /> <div class="ml-2 flex"> <UiActionButton class="mr-1" :tooltip=" isSidebarHidden ? i18n.t('action.showSidebar') : i18n.t('action.hideSidebar') " @click="isSidebarHidden = !isSidebarHidden" > <PanelLeftOpen v-if="isSidebarHidden" class="h-3 w-3" /> <PanelLeftClose v-else class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('menu:editor.previewScreenshot')" :active="isShowCodeImage" @click="onCodeImageToggle" > <Image class="h-3 w-3" /> </UiActionButton> <UiActionButton v-if="isAvailableToCodePreview" :tooltip=" isShowCodePreview ? `${i18n.t('action.hide')} ${i18n.t('menu:editor.previewCode')}` : i18n.t('menu:editor.previewCode') " :active="isShowCodePreview" @click="onCodePreviewToggle" > <Code class="h-3 w-3" /> </UiActionButton> <UiActionButton v-if="isShowMarkdownAction" :tooltip=" isShowMarkdownPresentation ? i18n.t('action.hide') : i18n.t('menu:markdown.presentationMode') " :active="isShowMarkdownPresentation" @click="onMarkdownPresentationToggle" > <Presentation class="h-3 w-3" /> </UiActionButton> <UiActionButton v-if="isShowJsonVisualizerAction" :tooltip="i18n.t('menu:editor.previewJson')" :active="isShowJsonVisualizer" @click="onJsonVisualizerToggle" > <Network class="h-3 w-3 -rotate-90" /> </UiActionButton> <UiActionButton v-if="isShowMarkdownAction" :tooltip=" isShowMarkdown ? `${i18n.t('action.hide')} ${i18n.t('menu:markdown.previewMarkdown')}` : i18n.t('menu:markdown.previewMarkdown') " :active="isShowMarkdown" @click="onMarkdownToggle" > <Eye class="h-3 w-3" /> </UiActionButton> <UiActionButton v-if="isShowMarkdownAction" :tooltip=" isShowMindmap ? `${i18n.t('action.hide')} ${i18n.t('menu:markdown.previewMindmap')}` : i18n.t('menu:markdown.previewMindmap') " :active="isShowMindmap" @click="onMindmapToggle" > <Network class="h-3 w-3 -rotate-90" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('action.add.description')" @click="isShowDescription = !isShowDescription" > <Type class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('action.new.fragment')" @click="addFragment" > <Plus class="h-4 w-4" /> </UiActionButton> </div> </div> <div v-if="selectedSnippet?.contents && selectedSnippet.contents.length > 1" class="border-border grid auto-cols-fr grid-flow-col border-b" > <EditorTab v-for="(i, index) in selectedSnippet?.contents" :id="i.id" :key="i.id" :index="index" :name="i.label" :class="{ 'bg-accent text-accent-foreground': state.snippetContentIndex === index, }" @click="onClickTab(index)" /> </div> <EditorDescription v-model:show="isShowDescription" /> <div v-if="isShowTags" class="pt-1" > <EditorHeaderTags /> </div> </div> </template> ================================================ FILE: src/renderer/components/editor/header/Tags.vue ================================================ <script setup lang="ts"> import type { TagItem } from '@/components/ui/input-tags/types' import { useSnippets, useTags } from '@/composables' const { selectedSnippet, deleteTagFromSnippet, addTagToSnippet } = useSnippets() const { tags, addTag, getTags } = useTags() getTags() const snippetTags = computed(() => selectedSnippet.value?.tags || []) async function onCreateTag(newTag: TagItem) { try { const id = await addTag(newTag.name) if (id && selectedSnippet.value) { await addTagToSnippet(id, selectedSnippet.value.id) } await getTags() } catch (error) { console.error('Error creating tag:', error) } } function onDeleteTag(deletedTag: TagItem) { if (selectedSnippet.value) { deleteTagFromSnippet(deletedTag.id, selectedSnippet.value.id) } } function onAddTag(tag: TagItem) { if (selectedSnippet.value) { addTagToSnippet(tag.id, selectedSnippet.value.id) } } </script> <template> <UiInputTags :model-value="snippetTags" :suggestions="tags" class="w-full" @create-tag="onCreateTag" @delete-tag="onDeleteTag" @add-tag="onAddTag" /> </template> ================================================ FILE: src/renderer/components/editor/header/Tool.vue ================================================ <script setup lang="ts"></script> <template> <div class="border-border flex h-[var(--editor-tool-header-height)] items-center border-b" > <slot /> </div> </template> ================================================ FILE: src/renderer/components/editor/json-visualizer/DialogInfo.vue ================================================ <script setup lang="ts"> import type { Node } from '@vue-flow/core' import type { NodeData } from './types' import { useClipboard, useDark, useDebounceFn } from '@vueuse/core' import CodeMirror from 'codemirror' import { Copy } from 'lucide-vue-next' import { onMounted, watch } from 'vue' import 'codemirror/lib/codemirror.css' import 'codemirror/theme/neo.css' import 'codemirror/theme/oceanic-next.css' interface Props { node: Node<NodeData> } const props = defineProps<Props>() const { copy } = useClipboard() const isDark = useDark() let editor: CodeMirror.Editor | null = null const editorRef = useTemplateRef('editorRef') const scrollBarOpacity = ref('1') const theme = computed(() => (isDark.value ? 'oceanic-next' : 'neo')) const hideScrollbar = useDebounceFn(() => { scrollBarOpacity.value = '0' }, 1000) function toJsonString(value: any) { return JSON.stringify(value, null, 2) || '{}' } function init() { if (!editorRef.value) { return } editor = CodeMirror(editorRef.value, { value: toJsonString(props.node.data?.value), mode: 'json', lineNumbers: true, theme: theme.value, readOnly: true, lineWrapping: true, scrollbarStyle: 'null', }) editor.on('scroll', () => { scrollBarOpacity.value = '1' editor?.setOption('scrollbarStyle', 'overlay') }) editor.on('scroll', hideScrollbar) watch( () => props.node, (newNode) => { if (editor && newNode.data?.value !== undefined) { const jsonString = toJsonString(newNode.data.value) editor.setValue(jsonString) } }, { deep: true }, ) watch(isDark, (v) => { if (v) { editor?.setOption('theme', 'oceanic-next') } else { editor?.setOption('theme', 'neo') } }) } function onCopy() { copy(editor?.getValue() || '') editorRef.value?.dispatchEvent( new KeyboardEvent('keydown', { key: 'Enter', bubbles: true }), ) } onMounted(() => { init() }) </script> <template> <div class="relative"> <UiActionButton class="absolute top-1 right-1 z-10" @click="onCopy" > <Copy class="h-3 w-3" /> </UiActionButton> <div ref="editorRef" data-dialog-info class="h-[200px] overflow-auto rounded-md" /> </div> </template> <style> html.light [data-dialog-info] { --dialog-info-bg: oklch(98% 0 0); } html.dark [data-dialog-info] { --dialog-info-bg: oklch(22% 0 0); } [data-dialog-info] .CodeMirror { background: var(--dialog-info-bg) !important; } [data-dialog-info] .CodeMirror-gutters { background: var(--dialog-info-bg) !important; } </style> ================================================ FILE: src/renderer/components/editor/json-visualizer/JsonVisualizer.vue ================================================ <script setup lang="ts"> import type { Edge, Node } from '@vue-flow/core' import type { NodeData } from './types' import { useDialog, useSnippets } from '@/composables' import { i18n } from '@/electron' import { Background } from '@vue-flow/background' import { useVueFlow, VueFlow } from '@vue-flow/core' import { useDark } from '@vueuse/core' import domToImage from 'dom-to-image' import { FileDown, Lock, LockOpen, Maximize, Minus, Plus, } from 'lucide-vue-next' import { useLayout } from './composables/useLayout' import DialogInfo from './DialogInfo.vue' import ArrayNode from './nodes/ArrayNode.vue' import ObjectNode from './nodes/ObjectNode.vue' import { parseJsonToGraph } from './utils' import '@vue-flow/core/dist/style.css' import '@vue-flow/core/dist/theme-default.css' const { selectedSnippetContent, selectedSnippet } = useSnippets() const isDark = useDark() const { zoomIn, zoomOut, fitView, setInteractive, nodesDraggable, nodesConnectable, elementsSelectable, } = useVueFlow() const nodes = ref<Node<NodeData>[]>([]) const edges = ref<Edge[]>([]) const vueFlowRef = useTemplateRef('vueFlowRef') const { layout } = useLayout() function updateGraph() { const graph = parseJsonToGraph( JSON.parse(selectedSnippetContent.value?.value || '{}'), ) nodes.value = graph.nodes edges.value = graph.edges nodes.value = layout(nodes.value, edges.value, 'LR') nextTick(() => { fitView() }) } function onNodesInitialized() { updateGraph() } watch( selectedSnippetContent, () => { updateGraph() }, { immediate: true }, ) const backgroundPatternColor = computed(() => (isDark.value ? '#666' : '#aaa')) const nodeTypes = { object: ObjectNode, array: ArrayNode, } const isModalVisible = ref(false) const selectedNodeData = ref<NodeData | null>(null) const selectedNodeId = ref<string | null>(null) const isInteractive = toRef( () => nodesDraggable.value || nodesConnectable.value || elementsSelectable.value, ) function onNodeClick(event: { node: Node<NodeData> }) { const node = event.node const { showDialog } = useDialog() showDialog({ title: 'Node Content', content: h(DialogInfo, { node }), }) selectedNodeId.value = node.id selectedNodeData.value = node.data ?? null isModalVisible.value = true } function onLockToggle() { setInteractive(!isInteractive.value) } function onZoom(type: 'zoomIn' | 'zoomOut' | 'fit') { if (type === 'zoomIn') { zoomIn() } else if (type === 'zoomOut') { zoomOut() } else if (type === 'fit') { fitView() } } async function onSave(format: 'png' | 'svg') { let data = '' const node = vueFlowRef.value! if (format === 'png') { data = await domToImage.toPng(vueFlowRef.value!, { width: node.offsetWidth * 2, height: node.offsetHeight * 2, style: { transform: 'scale(2)', transformOrigin: 'top left', }, }) } if (format === 'svg') { data = await domToImage.toSvg(vueFlowRef.value!) } const a = document.createElement('a') a.href = data a.download = `${selectedSnippet.value?.name}.${format}` a.click() } setInteractive(false) </script> <template> <div> <EditorHeaderTool> <div class="flex w-full items-center justify-between px-2"> <div> <UiActionButton :tooltip="i18n.t('button.zoomIn')" @click="onZoom('zoomIn')" > <Plus class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.zoomOut')" @click="onZoom('zoomOut')" > <Minus class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.fit')" @click="onZoom('fit')" > <Maximize class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.lock')" @click="onLockToggle" > <Lock v-if="!isInteractive" class="h-3 w-3" /> <LockOpen v-else class="h-3 w-3" /> </UiActionButton> </div> <div> <UiActionButton type="iconText" :tooltip="`${i18n.t('button.saveAs')} PNG`" @click="onSave('png')" > <div class="flex items-center gap-1"> PNG <FileDown class="h-3 w-3" /> </div> </UiActionButton> <UiActionButton type="iconText" :tooltip="`${i18n.t('button.saveAs')} SVG`" @click="onSave('svg')" > <div class="flex items-center gap-1"> SVG <FileDown class="h-3 w-3" /> </div> </UiActionButton> </div> </div> </EditorHeaderTool> <div class="relative h-[calc(100%-var(--editor-tool-header-height))] overflow-hidden" > <div ref="vueFlowRef" class="bg-background relative h-full" > <VueFlow v-if="nodes.length > 0" :nodes="nodes" :edges="edges" :node-types="nodeTypes as any" :default-viewport="{ zoom: 0.8 }" :min-zoom="0.1" :max-zoom="2" fit-view-on-init @node-click="onNodeClick" @nodes-initialized="onNodesInitialized" > <Background :pattern-color="backgroundPatternColor" :gap="16" /> </VueFlow> </div> <div class="absolute bottom-3 left-3 z-10"> <div v-if="nodes.length > 0" class="bg-muted rounded px-2 py-0.5 text-sm select-none" > {{ nodes.length }} nodes | {{ edges.length }} edges </div> </div> </div> </div> </template> ================================================ FILE: src/renderer/components/editor/json-visualizer/composables/useLayout.ts ================================================ import type { Edge, Node } from '@vue-flow/core' import type { LayoutDirection, NodeData } from '../types' import dagre from '@dagrejs/dagre' import { Position, useVueFlow } from '@vue-flow/core' import { ref } from 'vue' /** * Composable to run the layout algorithm on the graph. * It uses the `dagre` library to calculate the layout of the nodes and edges. */ export function useLayout() { const { findNode } = useVueFlow() const graph = ref(new dagre.graphlib.Graph()) const previousDirection = ref<LayoutDirection>('LR') function layout( nodes: Node<NodeData>[], edges: Edge[], direction: LayoutDirection, ): Node<NodeData>[] { // we create a new graph instance, in case some nodes/edges were removed, otherwise dagre would act as if they were still there const dagreGraph = new dagre.graphlib.Graph() graph.value = dagreGraph dagreGraph.setDefaultEdgeLabel(() => ({})) const isHorizontal = direction === 'LR' dagreGraph.setGraph({ rankdir: direction }) previousDirection.value = direction for (const node of nodes) { // if you need width+height of nodes for your layout, you can use the dimensions property of the internal node (`GraphNode` type) const graphNode = findNode(node.id) dagreGraph.setNode(node.id, { width: graphNode?.dimensions.width || 150, height: graphNode?.dimensions.height || 50, }) } for (const edge of edges) { dagreGraph.setEdge(edge.source, edge.target) } dagre.layout(dagreGraph) // set nodes with updated positions return nodes.map((node) => { const nodeWithPosition = dagreGraph.node(node.id) return { ...node, targetPosition: isHorizontal ? Position.Left : Position.Top, sourcePosition: isHorizontal ? Position.Right : Position.Bottom, position: { x: nodeWithPosition.x, y: nodeWithPosition.y }, } }) } return { graph, layout, previousDirection } } ================================================ FILE: src/renderer/components/editor/json-visualizer/nodes/ArrayNode.vue ================================================ <script setup lang="ts"> import type { NodeData } from '../types' import { Handle, Position } from '@vue-flow/core' const props = defineProps<{ data: NodeData id: string }>() function getDisplayItems() { const arr = props.data.value || [] return arr } function formatValue(value: any) { if (value === null) return 'null' if (value === undefined) return 'undefined' if (typeof value === 'object') { if (Array.isArray(value)) return `[${value.length} items]` return `{${Object.keys(value).length} keys}` } if (typeof value === 'string') return `"${value}"` return String(value) } </script> <template> <div class="dark:bg-background max-w-[350px] min-w-[200px] cursor-pointer rounded-lg border-2 border-emerald-500 bg-white p-3 shadow-md transition-all duration-200 hover:border-emerald-600 hover:shadow-lg" > <Handle type="target" :position="Position.Left" /> <div class="flex flex-col gap-2"> <div class="border-border flex items-center justify-between border-b pb-2" > <span class="text-foreground text-sm font-semibold">{{ data.label }}</span> <span class="bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-xs" >Array [{{ data.length }}]</span> </div> <div class="flex flex-col gap-1"> <div v-for="(item, index) in getDisplayItems()" :key="index" class="flex gap-1.5 text-xs leading-relaxed" > <span class="font-medium text-emerald-500">[{{ index }}]:</span> <UiText mono class="text-muted-foreground break-words" > {{ formatValue(item) }} </UiText> </div> </div> </div> <Handle type="source" :position="Position.Right" /> </div> </template> ================================================ FILE: src/renderer/components/editor/json-visualizer/nodes/ObjectNode.vue ================================================ <script setup lang="ts"> import type { NodeData } from '../types' import { Handle, Position } from '@vue-flow/core' const props = defineProps<{ data: NodeData id: string }>() function getDisplayProperties() { const obj = props.data.value || {} return obj } function formatValue(value: any) { if (value === null) return 'null' if (value === undefined) return 'undefined' if (typeof value === 'object') { if (Array.isArray(value)) return `[${value.length} items]` return `{${Object.keys(value).length} keys}` } if (typeof value === 'string') return `"${value}"` return String(value) } </script> <template> <div class="dark:bg-background max-w-[350px] min-w-[200px] cursor-pointer rounded-lg border-2 border-blue-500 bg-white p-3 shadow-md transition-all duration-200 hover:border-blue-600 hover:shadow-lg" > <Handle type="target" :position="Position.Left" /> <div class="flex flex-col gap-2"> <div class="border-border flex items-center justify-between border-b pb-2" > <span class="text-foreground text-sm font-semibold">{{ data.label }}</span> <span class="bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-xs" >Object</span> </div> <div class="flex flex-col gap-1"> <div v-for="(value, key) in getDisplayProperties()" :key="key" class="flex gap-1.5 text-xs leading-relaxed" > <span class="font-medium text-blue-500">{{ key }}:</span> <UiText mono class="text-muted-foreground break-words" > {{ formatValue(value) }} </UiText> </div> </div> </div> <Handle type="source" :position="Position.Right" /> </div> </template> ================================================ FILE: src/renderer/components/editor/json-visualizer/types/index.ts ================================================ import type { Edge, Node } from '@vue-flow/core' export interface NodeData { label: string value: any type: 'object' | 'array' | 'primitive' keysCount?: number length?: number } export interface GraphData { nodes: Node<NodeData>[] edges: Edge[] } export type NodeType = 'object' | 'array' | 'primitive' export type ValueType = | 'null' | 'array' | 'object' | 'string' | 'number' | 'boolean' | 'undefined' export type LayoutDirection = 'TB' | 'LR' ================================================ FILE: src/renderer/components/editor/json-visualizer/utils/index.ts ================================================ export * from './json-parser' ================================================ FILE: src/renderer/components/editor/json-visualizer/utils/json-parser.ts ================================================ import type { Edge, Node } from '@vue-flow/core' import type { GraphData, NodeData, NodeType, ValueType } from '../types' let nodeIdCounter = 0 function generateNodeId(): string { return `node-${nodeIdCounter++}` } function getValueType(value: any): ValueType { if (value === null) return 'null' if (Array.isArray(value)) return 'array' if (typeof value === 'object') return 'object' return typeof value as ValueType } function createNode( id: string, type: NodeType, data: NodeData, position: { x: number, y: number } = { x: 0, y: 0 }, ): Node<NodeData> { return { id, type, data, position, } } function createEdge(sourceId: string, targetId: string): Edge { return { id: `edge-${sourceId}-${targetId}`, source: sourceId, target: targetId, type: 'default', animated: false, } } function parseValue( value: any, key: string | null = null, parentId: string | null = null, nodes: Node<NodeData>[] = [], edges: Edge[] = [], ): string { const nodeId = generateNodeId() const valueType = getValueType(value) if (valueType === 'object') { // Создаем узел для объекта const node = createNode(nodeId, 'object', { label: key || 'root', value, type: 'object', keysCount: Object.keys(value).length, }) nodes.push(node) // Если есть родитель, создаем связь if (parentId !== null) { edges.push(createEdge(parentId, nodeId)) } // Рекурсивно обрабатываем дочерние элементы Object.entries(value).forEach(([childKey, childValue]) => { const childType = getValueType(childValue) // Создаем узлы только для объектов и массивов if (childType === 'object' || childType === 'array') { parseValue(childValue, childKey, nodeId, nodes, edges) } }) } else if (valueType === 'array') { // Создаем узел для массива const node = createNode(nodeId, 'array', { label: key || 'root', value, type: 'array', length: value.length, }) nodes.push(node) // Если есть родитель, создаем связь if (parentId !== null) { edges.push(createEdge(parentId, nodeId)) } // Рекурсивно обрабатываем элементы массива value.forEach((item: any, index: number) => { const itemType = getValueType(item) // Создаем узлы только для объектов и массивов if (itemType === 'object' || itemType === 'array') { parseValue(item, `[${index}]`, nodeId, nodes, edges) } }) } // Примитивные значения не создают отдельные узлы return nodeId } export function parseJsonToGraph(jsonData: any): GraphData { // Сброс счетчика для новых узлов nodeIdCounter = 0 const nodes: Node<NodeData>[] = [] const edges: Edge[] = [] // Проверяем, является ли корневой элемент объектом или массивом const valueType = getValueType(jsonData) if (valueType === 'object') { // Создаем корневой узел для объекта const rootId = generateNodeId() const rootNode = createNode(rootId, 'object', { label: 'root', value: jsonData, type: 'object', keysCount: Object.keys(jsonData).length, }) nodes.push(rootNode) // Парсим дочерние элементы Object.entries(jsonData).forEach(([key, value]) => { const childType = getValueType(value) if (childType === 'object' || childType === 'array') { parseValue(value, key, rootId, nodes, edges) } }) } else if (valueType === 'array') { // Создаем корневой узел для массива const rootId = generateNodeId() const rootNode = createNode(rootId, 'array', { label: 'root', value: jsonData, type: 'array', length: jsonData.length, }) nodes.push(rootNode) // Парсим элементы массива jsonData.forEach((item: any, index: number) => { const itemType = getValueType(item) if (itemType === 'object' || itemType === 'array') { parseValue(item, `[${index}]`, rootId, nodes, edges) } }) } // Если корень - примитив, то не создаем узлов return { nodes, edges } } ================================================ FILE: src/renderer/components/editor/markdown/LaserPointer.vue ================================================ <script setup lang="ts"> import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue' interface Props { offsetBottom?: number isActive: boolean } interface Point { x: number y: number timestamp: number } interface Stroke { id: string points: Point[] opacity: number } const props = withDefaults(defineProps<Props>(), { offsetBottom: 40, }) const canvasRef = ref<HTMLCanvasElement>() const isDrawing = ref(false) const strokes = ref<Stroke[]>([]) let animationId: number | null = null let currentStroke: Stroke | null = null const FADE_DURATION = 3000 const LINE_WIDTH = 3 const LINE_COLOR = '#ff4444' const SMOOTHING_FACTOR = 0.3 function resizeCanvas() { if (!canvasRef.value) return const canvas = canvasRef.value canvas.width = window.innerWidth * window.devicePixelRatio canvas.height = (window.innerHeight - props.offsetBottom) * window.devicePixelRatio // Устанавливаем CSS размеры canvas.style.width = `${window.innerWidth}px` canvas.style.height = `${window.innerHeight - props.offsetBottom}px` const ctx = canvas.getContext('2d') if (ctx) { ctx.scale(window.devicePixelRatio, window.devicePixelRatio) ctx.lineCap = 'round' ctx.lineJoin = 'round' } } function getCanvasPoint(event: MouseEvent): Point { if (!canvasRef.value) return { x: 0, y: 0, timestamp: Date.now() } return { x: event.clientX, y: event.clientY, timestamp: Date.now(), } } function startDrawing(event: MouseEvent) { if (!props.isActive) return isDrawing.value = true const point = getCanvasPoint(event) currentStroke = { id: Date.now().toString(), points: [point], opacity: 1, } strokes.value.push(currentStroke) } function draw(event: MouseEvent) { if (!isDrawing.value || !currentStroke || !props.isActive) return const point = getCanvasPoint(event) currentStroke.points.push(point) drawCanvas() } function stopDrawing() { isDrawing.value = false currentStroke = null } function drawCanvas() { if (!canvasRef.value) return const canvas = canvasRef.value const ctx = canvas.getContext('2d') if (!ctx) return ctx.clearRect(0, 0, canvas.width, canvas.height) strokes.value.forEach((stroke) => { if (stroke.points.length < 2) return ctx.globalAlpha = stroke.opacity ctx.strokeStyle = LINE_COLOR ctx.lineWidth = LINE_WIDTH ctx.beginPath() ctx.moveTo(stroke.points[0].x, stroke.points[0].y) for (let i = 1; i < stroke.points.length - 1; i++) { const currentPoint = stroke.points[i] const nextPoint = stroke.points[i + 1] const controlX = currentPoint.x + (nextPoint.x - currentPoint.x) * SMOOTHING_FACTOR const controlY = currentPoint.y + (nextPoint.y - currentPoint.y) * SMOOTHING_FACTOR ctx.quadraticCurveTo(currentPoint.x, currentPoint.y, controlX, controlY) } if (stroke.points.length > 1) { const lastPoint = stroke.points[stroke.points.length - 1] ctx.lineTo(lastPoint.x, lastPoint.y) } ctx.stroke() }) ctx.globalAlpha = 1 } function updateStrokes() { const now = Date.now() strokes.value = strokes.value.filter((stroke) => { if (stroke.points.length === 0) return false // Вычисляем возраст самой старой точки в штрихе const oldestPoint = Math.min(...stroke.points.map(p => p.timestamp)) const age = now - oldestPoint if (age > FADE_DURATION) { return false // Удаляем полностью исчезнувшие штрихи } // Обновляем прозрачность на основе возраста stroke.opacity = Math.max(0, 1 - age / FADE_DURATION) return true }) drawCanvas() // Продолжаем анимацию если есть штрихи if (strokes.value.length > 0) { animationId = requestAnimationFrame(updateStrokes) } else { animationId = null } } function startAnimation() { if (animationId === null) { animationId = requestAnimationFrame(updateStrokes) } } function clearStrokes() { strokes.value = [] if (canvasRef.value) { const ctx = canvasRef.value.getContext('2d') if (ctx) { ctx.clearRect(0, 0, canvasRef.value.width, canvasRef.value.height) } } } function onMouseDown(event: MouseEvent) { startDrawing(event) startAnimation() } function onMouseMove(event: MouseEvent) { draw(event) } function onMouseUp() { stopDrawing() } // Обработчики событий касания для мобильных устройств function onTouchStart(event: TouchEvent) { event.preventDefault() const touch = event.touches[0] const mouseEvent = new MouseEvent('mousedown', { clientX: touch.clientX, clientY: touch.clientY, }) onMouseDown(mouseEvent) } function onTouchMove(event: TouchEvent) { event.preventDefault() const touch = event.touches[0] const mouseEvent = new MouseEvent('mousemove', { clientX: touch.clientX, clientY: touch.clientY, }) onMouseMove(mouseEvent) } function onTouchEnd(event: TouchEvent) { event.preventDefault() onMouseUp() } onMounted(() => { window.addEventListener('resize', resizeCanvas) }) onUnmounted(() => { window.removeEventListener('resize', resizeCanvas) if (animationId) { cancelAnimationFrame(animationId) } }) // Очищаем штрихи когда указка выключается и принудительно ресайзим при включении watch( () => props.isActive, (newValue) => { if (!newValue) { clearStrokes() isDrawing.value = false currentStroke = null } else { nextTick(() => { resizeCanvas() }) } }, ) </script> <template> <canvas v-if="isActive" v-show="isActive" ref="canvasRef" class="pointer-events-auto fixed top-0 left-0 z-40 w-screen cursor-crosshair" :class="`h-[calc(100vh-${props.offsetBottom}px)]`" @mousedown="onMouseDown" @mousemove="onMouseMove" @mouseup="onMouseUp" @mouseleave="onMouseUp" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" /> </template> ================================================ FILE: src/renderer/components/editor/markdown/Markdown.vue ================================================ <script setup lang="ts"> import { useSnippets, useTheme } from '@/composables' import { i18n, ipc, store } from '@/electron' import CodeMirror from 'codemirror' import { Minus, Plus } from 'lucide-vue-next' import { marked } from 'marked' import mermaid from 'mermaid' import sanitizeHtml from 'sanitize-html' import { nextTick, ref, watch } from 'vue' import { useRoute } from 'vue-router' import { useMarkdown } from './composables' import 'codemirror/addon/runmode/runmode' import 'codemirror/theme/neo.css' import 'codemirror/theme/oceanic-next.css' const isDev = import.meta.env.DEV const { selectedSnippetContent } = useSnippets() const { isDark, editorThemeName } = useTheme() const { scaleToShow, onZoom } = useMarkdown() const route = useRoute() const renderedContent = ref('') const codeEditors = ref<CodeMirror.Editor[]>([]) const codeBlocksData = ref<{ id: string, value: string, language?: string }[]>( [], ) const markdownRef = useTemplateRef('markdownRef') const isShowHeaderTool = route.name !== 'markdown-presentation' marked.use({ renderer: { code({ text, lang }) { if (lang === 'mermaid') { return `<div class="mermaid">${text}</div>` } const id = Math.random().toString(36).substring(2, 15) codeBlocksData.value.push({ id, value: text, language: lang }) return `<div id="${id}" class="code-block"></div>` }, link({ href, text }) { if (href.startsWith('masscode://')) { return `<a href="${href}" class="deep-link">${text}</a>` } else { return `<a href="${href}" class="external">${text}</a>` } }, }, }) async function renderMarkdown() { if (selectedSnippetContent.value?.value) { const markdownHtml = await marked.parse(selectedSnippetContent.value.value) let sanitizedHtml = sanitizeHtml(markdownHtml, { allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'del']), allowedAttributes: { '*': [ 'align', 'alt', 'height', 'href', 'name', 'src', 'target', 'width', 'class', 'type', 'checked', 'disabled', 'id', 'data-*', ], }, allowedSchemes: ['http', 'https', 'masscode'], }) const re = /src="\.\//g const path = store.preferences.get('storagePath') sanitizedHtml = isDev ? sanitizedHtml.replace(re, `src="file://${path}/`) : sanitizedHtml.replace(re, `src="${path}/`) renderedContent.value = sanitizedHtml } else { renderedContent.value = '' codeEditors.value = [] codeBlocksData.value = [] } } function renderCodeBlockEditors() { codeEditors.value = [] codeBlocksData.value.forEach((blockData) => { const container = document.getElementById(blockData.id) if (container) { const editor = CodeMirror(container as HTMLElement, { value: blockData.value, mode: blockData.language, theme: editorThemeName.value, readOnly: true, lineNumbers: false, lineWrapping: true, scrollbarStyle: 'null', }) codeEditors.value.push(editor) } }) } function renderMermaidBlocks() { mermaid.initialize({ startOnLoad: true, theme: isDark.value ? 'dark' : 'default', }) mermaid.run() } function onLinkClick(event: MouseEvent) { const target = event.target as HTMLElement if (target.tagName === 'A') { const href = target.getAttribute('href') if (href && target.classList.contains('external')) { ipc.invoke('system:open-external', href) event.preventDefault() } } } watch(selectedSnippetContent, async () => renderMarkdown(), { immediate: true, }) watch(scaleToShow, () => renderMarkdown()) watch(renderedContent, () => { nextTick(() => { renderCodeBlockEditors() renderMermaidBlocks() markdownRef.value?.removeEventListener('click', onLinkClick) markdownRef.value?.addEventListener('click', onLinkClick) }) }) watch(editorThemeName, (theme) => { codeEditors.value.forEach((editor) => { editor.setOption('theme', theme) }) }) watch(isDark, () => { renderMermaidBlocks() }) </script> <template> <div data-editor-markdown class="grid grid-rows-[auto_1fr] overflow-hidden" > <EditorHeaderTool v-if="isShowHeaderTool"> <div class="flex w-full justify-end gap-2 px-2"> <UiActionButton :tooltip="i18n.t('button.zoomOut')" @click="onZoom('out')" > <Minus class="h-3 w-3" /> </UiActionButton> <div class="tabular-nums select-none"> {{ scaleToShow }} </div> <UiActionButton :tooltip="i18n.t('button.zoomIn')" @click="onZoom('in')" > <Plus class="h-3 w-3" /> </UiActionButton> </div> </EditorHeaderTool> <div class="scrollbar h-full min-h-0 overflow-y-auto"> <div ref="markdownRef" class="markdown-content" > <div v-html="renderedContent" /> </div> </div> </div> </template> <style> @reference '../../../styles.css'; .markdown-content { @apply text-foreground p-4 font-sans; font-size: calc(1rem * var(--markdown-scale)); line-height: 1.5; } .markdown-content h1 { @apply border-border text-foreground my-4 border-b pb-2 font-semibold first-of-type:mt-0; font-size: calc(2.25rem * var(--markdown-scale)); } .markdown-content h2 { @apply border-border text-foreground my-5 border-b pb-2 font-semibold first-of-type:mt-0; font-size: calc(1.875rem * var(--markdown-scale)); } .markdown-content h3 { @apply text-foreground my-6 font-semibold; font-size: calc(1.5rem * var(--markdown-scale)); } .markdown-content h4 { @apply text-foreground my-7 font-semibold; font-size: calc(1.25rem * var(--markdown-scale)); } .markdown-content p { @apply mb-4; font-size: calc(1rem * var(--markdown-scale)); } .markdown-content a { @apply text-blue-600 no-underline dark:text-blue-400; } .markdown-content a:hover { @apply underline; } .markdown-content strong { @apply font-semibold; } .markdown-content em { @apply italic; } .markdown-content ul, .markdown-content ol { @apply mb-4 ml-8; list-style-position: outside; } .markdown-content ul { list-style-type: disc; } .markdown-content ol { list-style-type: decimal; } .markdown-content ul ul, .markdown-content ol ol, .markdown-content ul ol, .markdown-content ol ul { @apply mb-0 ml-6; } .markdown-content li { @apply mb-1; } .markdown-content blockquote { @apply border-border text-muted-foreground mb-4 border-l-4 pl-4; } .markdown-content code { @apply rounded bg-[rgba(27,31,35,0.05)] px-1 py-0.5 dark:bg-[rgba(255,255,255,0.1)]; font-size: calc(0.875rem * var(--markdown-scale)); font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-content pre { @apply bg-muted dark:bg-muted mb-4 overflow-auto rounded p-4 leading-5; font-size: calc(0.875rem * var(--markdown-scale)); font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-content pre code { @apply m-0 border-0 bg-transparent p-0 text-base; } .markdown-content table { @apply mb-4 block border-collapse overflow-x-auto; } .markdown-content tr { @apply border-border border-t; } .markdown-content td, .markdown-content th { @apply border-border border p-2; } .markdown-content th { @apply bg-muted dark:bg-muted font-semibold; } .markdown-content tr:nth-child(2n) { @apply bg-muted dark:bg-muted; } .markdown-content img { @apply box-content max-w-full; } .markdown-content hr { @apply border-border my-6 border-t p-0; } .markdown-content .CodeMirror { @apply !bg-muted overflow-auto rounded-md p-4; font-size: calc(0.875rem * var(--markdown-scale)); line-height: calc(0.875rem * var(--markdown-scale) * 1.5); } .markdown-content .code-block > div { @apply overflow-hidden; } </style> ================================================ FILE: src/renderer/components/editor/markdown/Presentation.vue ================================================ <script setup lang="ts"> import { Button } from '@/components/ui/shadcn/button' import { useApp, useSnippets } from '@/composables' import { i18n } from '@/electron' import { router, RouterName } from '@/router' import { useFullscreen, useMagicKeys } from '@vueuse/core' import { ArrowLeft, ArrowRight, Expand, Minimize, Minus, Plus, X, Zap, } from 'lucide-vue-next' import { ref } from 'vue' import { useMarkdown } from './composables' const { isShowMarkdownPresentation } = useApp() const { selectSnippet, displayedSnippets, selectedSnippet } = useSnippets() const { scaleToShow, onZoom } = useMarkdown() const { isFullscreen, toggle } = useFullscreen() const { left, right, escape, meta, ctrl, l } = useMagicKeys() const isLaserPointerActive = ref(false) const mdSnippetIds = computed(() => { return displayedSnippets.value ?.filter(s => s.contents[0].language === 'markdown') .map(i => i.id) }) const currentIndex = computed( () => mdSnippetIds.value?.findIndex(i => selectedSnippet.value?.id === i) || 0, ) function onClose() { isShowMarkdownPresentation.value = false router.push({ name: RouterName.main }) } function onPrevNext(direction: 'prev' | 'next') { let id if (direction === 'prev') { id = mdSnippetIds.value?.[currentIndex.value - 1] } else { id = mdSnippetIds.value?.[currentIndex.value + 1] } if (id) { selectSnippet(id) } } function onFullscreen() { toggle() } function toggleLaserPointer() { isLaserPointerActive.value = !isLaserPointerActive.value } watch(left, (v) => { if (v) onPrevNext('prev') }) watch(right, (v) => { if (v) onPrevNext('next') }) watch(escape, (v) => { if (v) onClose() }) watchEffect(() => { if ((meta.value || ctrl.value) && l.value) { isLaserPointerActive.value = !isLaserPointerActive.value } }) </script> <template> <div class="relative grid h-screen grid-rows-[1fr_40px] overflow-hidden"> <Button class="absolute top-6 right-2 z-50" variant="ghost" @click="onClose" > <X class="h-3 w-3" /> </Button> <div class="scrollbar h-full min-h-0 overflow-y-auto"> <div class="overflow-auto p-5"> <EditorMarkdown :key="scaleToShow" /> </div> </div> <div class="flex items-center justify-between px-8"> <div class="flex items-center"> <UiActionButton :tooltip="i18n.t('button.fullscreen')" @click="onFullscreen" > <Expand v-if="!isFullscreen" class="h-3 w-3" /> <Minimize v-else class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.prev')" @click="onPrevNext('prev')" > <ArrowLeft class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.next')" @click="onPrevNext('next')" > <ArrowRight class="h-3 w-3" /> </UiActionButton> <UiActionButton :active="isLaserPointerActive" :tooltip="i18n.t('button.laserPointer')" @click="toggleLaserPointer" > <Zap class="h-3 w-3" /> </UiActionButton> <div class="flex items-center gap-2"> <UiActionButton :tooltip="i18n.t('button.zoomOut')" @click="onZoom('out')" > <Minus class="h-3 w-3" /> </UiActionButton> <div class="tabular-nums select-none"> {{ scaleToShow }} </div> <UiActionButton :tooltip="i18n.t('button.zoomIn')" @click="onZoom('in')" > <Plus class="h-3 w-3" /> </UiActionButton> </div> </div> <div> <div class="tabular-nums select-none"> {{ currentIndex + 1 }} / {{ mdSnippetIds?.length }} </div> </div> </div> <EditorMarkdownLaserPointer :is-active="isLaserPointerActive" /> </div> </template> ================================================ FILE: src/renderer/components/editor/markdown/composables/index.ts ================================================ export * from './useMarkdown' ================================================ FILE: src/renderer/components/editor/markdown/composables/useMarkdown.ts ================================================ import { store } from '@/electron' import { useCssVar } from '@vueuse/core' const scale = useCssVar('--markdown-scale', document.body, { initialValue: store.preferences.get('markdown.scale'), }) const scaleToShow = computed(() => Number(scale.value).toFixed(1)) function onZoom(type: 'in' | 'out') { const step = 0.1 const currentValue = store.preferences.get('markdown.scale') as number const value = type === 'in' ? Number((currentValue + step).toFixed(1)) : Number((currentValue - step).toFixed(1)) if (type === 'in') { store.preferences.set('markdown.scale', value) } else { if (currentValue - step < 1) { return } store.preferences.set('markdown.scale', value) } scale.value = String(value) } export function useMarkdown() { return { onZoom, scaleToShow, } } ================================================ FILE: src/renderer/components/editor/mindmap/Mindmap.vue ================================================ <script setup lang="ts"> import { useSnippets } from '@/composables' import { i18n } from '@/electron' import domToImage from 'dom-to-image' import { FileDown, Maximize, Minus, Plus } from 'lucide-vue-next' import { Transformer } from 'markmap-lib' import { Markmap } from 'markmap-view' const { selectedSnippetContent, selectedSnippet } = useSnippets() const mindmapRef = useTemplateRef('mindmapRef') const svgRef = useTemplateRef('svgRef') const transformer = new Transformer() let mm: Markmap | null = null async function update() { const value = selectedSnippetContent.value?.value || '# Empty' const { root } = transformer.transform(value) if (mm) { await mm.setData(root) await mm.fit() } } function init() { mm = Markmap.create(svgRef.value!, { duration: 0, style: () => ` .markmap-node div { color: var(--foreground); user-select: none; cursor: default; } .markmap-node circle { fill: var(--background); } `, }) svgRef.value?.addEventListener('dblclick', e => e.stopPropagation(), true) update() } function onZoom(type: 'zoomIn' | 'zoomOut' | 'fit') { if (!mm) return if (type === 'zoomIn') { mm.rescale(1.25) } if (type === 'zoomOut') { mm.rescale(0.8) } if (type === 'fit') { mm.fit() } } async function onSaveScreenshot(type: 'png' | 'svg' = 'png') { let data = '' if (!mm) return await mm.fit() if (type === 'png') { data = await domToImage.toPng(mindmapRef.value!) } if (type === 'svg') { data = await domToImage.toSvg(mindmapRef.value!) } const a = document.createElement('a') a.href = data a.download = `${selectedSnippet.value?.name} - ${selectedSnippetContent.value?.label}.${type}` a.click() } onMounted(() => { init() }) watch(selectedSnippetContent, () => { update() }) </script> <template> <div> <EditorHeaderTool> <div class="flex w-full items-center justify-between px-2"> <div> <UiActionButton :tooltip="i18n.t('button.zoomIn')" @click="onZoom('zoomIn')" > <Plus class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.zoomOut')" @click="onZoom('zoomOut')" > <Minus class="h-3 w-3" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('button.fit')" @click="onZoom('fit')" > <Maximize class="h-3 w-3" /> </UiActionButton> </div> <div> <UiActionButton type="iconText" :tooltip="`${i18n.t('button.saveAs')} PNG`" @click="onSaveScreenshot('png')" > <div class="flex items-center gap-1"> PNG <FileDown class="h-3 w-3" /> </div> </UiActionButton> <UiActionButton type="iconText" :tooltip="`${i18n.t('button.saveAs')} SVG`" @click="onSaveScreenshot('svg')" > <div class="flex items-center gap-1"> SVG <FileDown class="h-3 w-3" /> </div> </UiActionButton> </div> </div> </EditorHeaderTool> <div ref="mindmapRef" class="h-full cursor-grab" > <svg ref="svgRef" class="h-[calc(100%-var(--editor-tool-header-height))] w-full" /> </div> </div> </template> ================================================ FILE: src/renderer/components/editor/preview/Preview.vue ================================================ <script setup lang="ts"> import { useSnippets } from '@/composables' import { i18n, ipc } from '@/electron' import { useDark } from '@vueuse/core' import { FileDown, Moon, RefreshCcw, Sun } from 'lucide-vue-next' const { selectedSnippet } = useSnippets() const previewKey = ref(0) const isDark = useDark() const isDarkPreview = ref(isDark.value) const defaultHtml = computed(() => { return `<div style="display: flex; align-items: center; justify-content: center; height: 100%; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-size: 14px;"> <p style="color: ${isDarkPreview.value ? 'oklch(75% 0 0)' : 'oklch(20% 0 0)'}; text-align: center;">${i18n.t('messages:warning.htmlCssPreview')}</p> </div>` }) const html = computed(() => { return ( selectedSnippet.value?.contents.find( content => content.language === 'html', )?.value || defaultHtml.value ) }) const css = computed(() => { return ( selectedSnippet.value?.contents.find( content => content.language === 'css', )?.value || '' ) }) const js = computed(() => { return ( selectedSnippet.value?.contents.find( content => content.language === 'javascript', )?.value || '' ) }) function generateHtmlPreview(save = false) { const cssDefault = ` body { background-color: ${isDarkPreview.value ? 'oklch(24.78% 0 0)' : 'oklch(100% 0 0)'}; } ` const jsDefault = ` try { ${js.value} } catch (error) { console.error('Error in preview:', error) } ` const cssCode = save ? css.value : cssDefault + css.value const jsCode = save ? js.value : jsDefault return `<!DOCTYPE html> <html> <head> <style>${cssCode}</style> </head> <body> ${html.value} <script>${jsCode}<\/script> </body> </html> ` } const htmlPreview = computed(() => generateHtmlPreview()) async function onSaveHtml() { let html = generateHtmlPreview(true) try { html = await ipc.invoke('prettier:format', { text: html, parser: 'html', }) } catch (error) { console.error(error) } const blob = new Blob([html], { type: 'text/html' }) const url = URL.createObjectURL(blob) const a = document.createElement('a') a.href = url a.download = `${selectedSnippet.value?.name}.html` a.click() } watch([html, css, js], () => { previewKey.value++ }) watch(isDarkPreview, () => { previewKey.value++ }) </script> <template> <div class="border-border flex h-[var(--editor-tool-header-height)] items-center justify-between border-b px-2 py-1" > <div> <UiActionButton type="icon" :tooltip="i18n.t('button.toggleDarkMode')" @click="isDarkPreview = !isDarkPreview" > <Moon v-if="isDarkPreview" class="h-3 w-3" /> <Sun v-else class="h-3 w-3" /> </UiActionButton> </div> <div class="flex items-center"> <UiActionButton type="iconText" :tooltip="`${i18n.t('button.saveAs')} HTML`" @click="onSaveHtml" > <div class="flex items-center gap-1"> HTML <FileDown class="h-3 w-3" /> </div> </UiActionButton> <UiActionButton type="icon" :tooltip="i18n.t('button.refreshPreview')" @click="previewKey++" > <RefreshCcw class="h-3 w-3" /> </UiActionButton> </div> </div> <div class="h-[calc(100%-var(--editor-tool-header-height))]"> <iframe :key="previewKey" data-editor-preview :srcdoc="htmlPreview" sandbox="allow-scripts" frameborder="0" height="100%" width="100%" /> </div> </template> ================================================ FILE: src/renderer/components/editor/types/index.ts ================================================ export type Language = | 'abap' | 'abc' | 'actionscript' | 'ada' | 'alda' | 'apache_conf' | 'apex' | 'applescript' | 'aql' | 'asciidoc' | 'asl' | 'asp_vb_net' | 'assembly_x86' | 'autohotkey' | 'batchfile' | 'bicep' | 'c_cpp' | 'c9search' | 'cirru' | 'clojure' | 'cobol' | 'coffee' | 'coldfusion' | 'crystal' | 'csharp' | 'csound_document' | 'csound_orchestra' | 'csound_score' | 'csp' | 'css' | 'curly' | 'd' | 'dart' | 'diff' | 'django' | 'dockerfile' | 'dot' | 'drools' | 'edifact' | 'eiffel' | 'ejs' | 'elixir' | 'elm' | 'erlang' | 'forth' | 'fortran' | 'fsharp' | 'fsl' | 'ftl' | 'gcode' | 'gherkin' | 'gitignore' | 'glsl' | 'gobstones' | 'golang' | 'graphqlschema' | 'groovy' | 'haml' | 'handlebars' | 'haskell_cabal' | 'haskell' | 'haxe' | 'hjson' | 'html_elixir' | 'html_ruby' | 'html' | 'ini' | 'io' | 'jack' | 'jade' | 'java' | 'javascript' | 'json' | 'json5' | 'jsoniq' | 'jsp' | 'jssm' | 'jsx' | 'julia' | 'kotlin' | 'kusto' | 'latex' | 'latte' | 'less' | 'liquid' | 'lisp' | 'livescript' | 'logiql' | 'logtalk' | 'lsl' | 'lua' | 'luapage' | 'lucene' | 'makefile' | 'markdown' | 'mask' | 'matlab' | 'maze' | 'mediawiki' | 'mel' | 'mikrotik' | 'mips' | 'mixal' | 'mushcode' | 'mysql' | 'nginx' | 'nim' | 'nix' | 'nu' | 'nsis' | 'nunjucks' | 'objectivec' | 'ocaml' | 'oeabl' | 'pascal' | 'perl' | 'perl6' | 'pgsql' | 'php_laravel_blade' | 'php' | 'pig' | 'plain_text' | 'powershell' | 'powerquery' | 'praat' | 'prisma' | 'prolog' | 'properties' | 'protobuf' | 'pug' | 'puppet' | 'python' | 'qml' | 'r' | 'raku' | 'razor' | 'rdoc' | 'red' | 'redshift' | 'regexp' | 'rhtml' | 'rst' | 'ruby' | 'rust' | 'sas' | 'sass' | 'sassdoc' | 'scad' | 'scala' | 'scheme' | 'scrypt' | 'scss' | 'sh' | 'sjs' | 'slim' | 'smalltalk' | 'smarty' | 'smithy' | 'solidity' | 'soy_template' | 'space' | 'sparql' | 'sql' | 'sqlserver' | 'stylus' | 'svg' | 'swift' | 'tcl' | 'terraform' | 'tex' | 'text' | 'textile' | 'toml' | 'tsx' | 'turtle' | 'twig' | 'typescript' | 'vala' | 'vbscript' | 'velocity' | 'verilog' | 'vhdl' | 'visualforce' | 'vue' | 'wollok' | 'xml' | 'xquery' | 'xsl' | 'yaml' | 'zeek' export interface LanguageOption { name: string value: Language grammar?: () => Promise<{ default: any }> scopeName?: string } export interface GrammarOption { grammar: () => Promise<{ default: any }> language: Language priority: 'asap' | 'now' | 'defer' } ================================================ FILE: src/renderer/components/layout/TwoColumn.vue ================================================ <script setup lang="ts"> import { i18n } from '@/electron' import { ArrowLeft } from 'lucide-vue-next' import { computed } from 'vue' interface Props { title: string leftSize?: string rightSize?: string showBack?: boolean topSpace?: number } interface Emits { (e: 'back'): void } const props = withDefaults(defineProps<Props>(), { leftSize: '220px', rightSize: '1fr', showBack: true, topSpace: 0, }) const emit = defineEmits<Emits>() const gridTemplateColumns = computed(() => { return `${props.leftSize} 1px ${props.rightSize}` }) const leftHeaderStyle = computed(() => { return { paddingTop: `calc(var(--content-top-offset) + ${props.topSpace}px)`, } }) </script> <template> <div class="relative grid h-screen flex-1 overflow-hidden" :style="{ gridTemplateColumns }" > <div class="grid h-full min-h-0 grid-rows-[auto_1fr] overflow-hidden"> <div class="flex items-center justify-between gap-2 overflow-hidden px-2 pb-2" :style="leftHeaderStyle" > <div class="truncate font-bold"> {{ title }} </div> <UiActionButton v-if="showBack" :tooltip="i18n.t('button.back')" class="shrink-0" @click="() => emit('back')" > <ArrowLeft class="h-4 w-4" /> </UiActionButton> </div> <div class="h-full min-h-0 overflow-auto"> <slot name="left" /> </div> </div> <div class="bg-border" /> <div class="h-full min-h-0 overflow-auto pt-[var(--content-top-offset)]"> <slot name="right" /> </div> </div> </template> ================================================ FILE: src/renderer/components/math-notebook/MathEditor.vue ================================================ <script setup lang="ts"> import { renderMathEditorHighlight } from './math-editor-highlight' interface Props { modelValue: string } interface Emits { (e: 'update:modelValue', value: string): void (e: 'scroll', scrollTop: number): void (e: 'activeLine', line: number): void } const props = defineProps<Props>() const emit = defineEmits<Emits>() const textareaRef = ref<HTMLTextAreaElement>() const activeLine = ref(0) const scrollTop = ref(0) const scrollLeft = ref(0) const lineCount = computed(() => { return Math.max((props.modelValue || '').split('\n').length, 1) }) const lineNumbers = computed(() => { return Array.from({ length: lineCount.value }, (_, i) => i + 1) }) const highlightedHtml = computed(() => { return renderMathEditorHighlight(props.modelValue || '') }) function syncScrollState(target: HTMLTextAreaElement) { scrollTop.value = target.scrollTop scrollLeft.value = target.scrollLeft emit('scroll', target.scrollTop) } function handleInput(event: Event) { const target = event.target as HTMLTextAreaElement emit('update:modelValue', target.value) updateActiveLine(target) syncScrollState(target) } function handleScroll(event: Event) { const target = event.target as HTMLTextAreaElement syncScrollState(target) } function updateActiveLine(target: HTMLTextAreaElement) { const text = target.value.substring(0, target.selectionStart) const line = text.split('\n').length - 1 activeLine.value = line emit('activeLine', line) } function handleClick(event: Event) { updateActiveLine(event.target as HTMLTextAreaElement) } function handleKeyup(event: Event) { updateActiveLine(event.target as HTMLTextAreaElement) } onMounted(() => { textareaRef.value?.focus() if (textareaRef.value) { syncScrollState(textareaRef.value) } }) const lineNumbersStyle = computed(() => { return { transform: `translate3d(0, ${-scrollTop.value}px, 0)`, } }) const highlightStyle = computed(() => { return { transform: `translate3d(${-scrollLeft.value}px, ${-scrollTop.value}px, 0)`, } }) </script> <template> <div class="flex h-full overflow-hidden"> <div class="shrink-0 overflow-hidden border-r border-transparent py-1 pr-1 pl-3 text-right select-none" > <div class="will-change-transform" :style="lineNumbersStyle" > <div v-for="num in lineNumbers" :key="num" class="text-muted-foreground/40 h-[22px] font-mono text-[12px] leading-[22px] transition-colors duration-75" :class="{ '!text-muted-foreground': activeLine === num - 1 }" > {{ num }} </div> </div> </div> <div class="math-editor relative min-w-0 flex-1"> <div aria-hidden="true" class="math-editor-highlight pointer-events-none absolute inset-0 z-10 overflow-hidden" > <pre class="min-h-full w-max min-w-full py-1 pr-4 pl-3 font-mono text-[13px] leading-[22px] tracking-wide whitespace-pre will-change-transform" :style="highlightStyle" v-html="highlightedHtml" /> </div> <textarea ref="textareaRef" :value="modelValue" class="math-editor-textarea scrollbar selection:bg-accent/50 absolute inset-0 z-0 h-full w-full resize-none bg-transparent py-1 pr-4 pl-3 font-mono text-[13px] leading-[22px] tracking-wide text-transparent outline-none" spellcheck="false" wrap="off" @input="handleInput" @scroll="handleScroll" @click="handleClick" @keyup="handleKeyup" /> </div> </div> </template> <style scoped> @reference '../../styles.css'; .math-editor { --math-editor-builtin: oklch(76% 0.17 285); --math-editor-keyword: oklch(68% 0.08 280); --math-editor-unit: oklch(78% 0.17 338); --math-editor-variable: oklch(78% 0.18 145); } :global(html:not(.dark)) .math-editor { --math-editor-builtin: oklch(56% 0.16 282); --math-editor-keyword: oklch(48% 0.05 280); --math-editor-unit: oklch(58% 0.16 335); --math-editor-variable: oklch(52% 0.17 145); } .math-editor-highlight { color: var(--foreground); } .math-editor-textarea { caret-color: var(--foreground); } .math-editor-highlight :deep(.mn-editor-token) { font-weight: 500; } .math-editor-highlight :deep(.mn-editor-token--variable) { color: var(--math-editor-variable); } .math-editor-highlight :deep(.mn-editor-token--builtin) { color: var(--math-editor-builtin); } .math-editor-highlight :deep(.mn-editor-token--unit) { color: var(--math-editor-unit); } .math-editor-highlight :deep(.mn-editor-token--keyword) { color: var(--math-editor-keyword); } </style> ================================================ FILE: src/renderer/components/math-notebook/README.md ================================================ # Math Notebook Calculator-style notepad inspired by [Numi](https://numi.app). Write expressions in natural language — results appear instantly on every line. ## Arithmetic Standard math operators and parentheses. ``` 10 + 5 → 15 20 * 3 → 60 (2 + 3) * 4 → 20 2 ^ 10 → 1,024 5 300 → 5,300 ``` ## Word Operators Use words instead of symbols. | Operation | Keywords | |----------------|------------------------------| | Addition | `plus`, `and`, `with` | | Subtraction | `minus`, `subtract`, `without` | | Multiplication | `times`, `multiplied by`, `mul` | | Division | `divide`, `divide by` | | Modulo | `mod` | ``` 8 times 9 → 72 100 plus 50 → 150 200 without 30 → 170 10 multiplied by 3 → 30 17 mod 5 → 2 ``` ## Variables Declare variables with `=` and reuse them across lines. ``` v = 20 → 20 v times 7 → 140 v + 10 → 30 ``` ## Labels Prefix a line with a label followed by a colon — the label is ignored, only the expression is evaluated. ``` Price: $11 + $34.45 → 45.45 USD Monthly: 1200 / 12 → 100 ``` ## Inline Quotes Text inside double quotes is ignored. ``` $275 for the "Model 227" → 275 USD ``` ## Percentage ### Basic percentage ``` 100 + 15% → 115 200 - 10% → 180 15% of 200 → 30 ``` ### Advanced percentage | Operation | Example | Result | |-----------------------------------------|------------------------|--------| | Adding percentage | `5% on 200` | 210 | | Subtracting percentage | `5% off 200` | 190 | | Percentage of one value relative to another | `50 as a % of 100` | 50 | | Percentage addition relative to another | `70 as a % on 20` | 250 | | Percentage subtraction relative to another | `20 as a % off 70` | 71.43 | | Value by percent part | `5% of what is 6` | 120 | | Value by percent addition | `5% on what is 6` | 5.71 | | Value by percent subtraction | `5% off what is 6` | 6.32 | ## Scales Shorthand for large numbers. One-letter scales are case-sensitive: `k` for thousands, `M` for millions. ``` $2k → 2,000 USD 3M → 3,000,000 1.5 billion → 1,500,000,000 10 thousand → 10,000 ``` ## Currency Supports ISO 4217 codes, common currency symbols, and common currency names. Live exchange rates with cached fallback. ### Supported symbols | Symbol | Currency | |--------|----------| | `$` | USD | | `€` | EUR | | `£` | GBP | | `¥` | JPY | | `₽` | RUB | | `₴` | UAH | | `₩` | KRW | | `₹` | INR | | `R$` | BRL | ### Supported ISO codes USD, EUR, GBP, CAD, RUB, JPY, CNY, CHF, AUD, KRW, INR, BRL, MXN, PLN, SEK, NOK, DKK, CZK, HUF, TRY, NZD, SGD, HKD, ZAR, THB, UAH, ILS. ``` $30 + $15 → 45 USD $30 to EUR → ... EUR €50 + £20 → ... EUR 5 dollars + 10 dollars → 15 USD ``` ## Unit Conversion Powered by mathjs. Use `to`, `in`, `as`, `into` for conversion. ``` 5 km to mile → 3.10686 mile 5 km into mile → 3.10686 mile 1 inch in cm → 2.54 cm 100 celsius to fahrenheit → 212 fahrenheit 1 kg to lb → 2.20462 lb 1 meter 20 cm → 1.2 m 1 meter 20 cm into cm → 120 cm 1 point to inch → 0.0138889 inch 1 are to m^2 → 100 m^2 1 degree to radian → 0.0174533 radian 1 nautical mile to mile → 1.15078 mile ``` ### Supported unit categories - **Length**: meter, inch, foot, yard, mile, nautical mile, point, line, hand, furlong, cable, league, etc. - **Weight**: gram, kg, pound, ounce, tonne, stone, carat, etc. - **Temperature**: celsius, fahrenheit, kelvin - **Time**: second, minute, hour, day, week, month, year - **Angular**: radian, degree, and `°` - **Data**: bit, byte, KB, MB, GB, TB (with SI and binary prefixes) - **Area**: m², hectare, acre, are, plus aliases like `sq`, `square`, `sqm` - **Volume**: liter, gallon, pint, quart, cup, teaspoon, tablespoon, plus aliases like `cu`, `cubic`, `cb`, `cbm` ## CSS Units Supports CSS-oriented `px`, `pt`, and `em` conversions with configurable `ppi` and `em`. ``` 12 pt in px → 16 px em = 20px 1.2 em in px → 24 px ppi = 326 1 cm in px → 128.35 px ``` ## Math Functions ``` sqrt(16) → 4 sqrt 16 → 4 cbrt 8 → 2 root 2 (8) → 2.8284 sin(45 deg) → 0.7071 sin 45° → 0.7071 cos(pi) → -1 log(100) → 2 log 2 (8) → 3 ln(e) → 1 abs(-42) → 42 round(3.7) → 4 round 3.45 → 3 ceil(3.2) → 4 floor(3.9) → 3 fact(5) → 120 arcsin(1) → 1.5708 arccos(1) → 0 arctan(1) → 0.7854 ``` ## Number Formats Append `in hex`, `in bin`, `in oct`, or `in sci` to format the result. ``` 255 in hex → 0xFF 10 in bin → 0b1010 255 in oct → 0o377 5300 in sci → 5.3e+3 5 300 in sci → 5.3e+3 ``` Input also supports hex, binary, and octal literals: ``` 0xFF → 255 0b1010 → 10 0o377 → 255 ``` ## Previous Result Use `prev` to reference the result from the previous line. ``` 10 + 5 → 15 prev * 2 → 30 prev - 5 → 25 ``` ## Sum & Total `sum` or `total` calculates the sum of all numeric results above (until an empty line). ``` 10 + 5 → 15 20 * 3 → 60 sum → 75 ``` ## Average `average` or `avg` calculates the mean of all numeric results above (until an empty line). ``` 10 20 30 average → 20 ``` ## Comments Lines starting with `//` or `#` are treated as comments and produce no result. ``` // This is a comment # This is also a comment ``` ## Date & Time Convert Unix timestamps to dates with `fromunix`. ``` fromunix(1446587186) → 11/3/2015, ... fromunix(1446587186) + 2 day ``` Time arithmetic follows Numi-like semantics: `1 year = 365 days`, `1 month = 365 / 12 days`. Current time helpers: ``` time time() now now() now in Madrid Berlin now time() + 1 day now + 1 day ``` Time zone conversion: ``` PST time New York time Time in Madrid 2:30 pm HKT in Berlin 2:30 pm New York in Berlin 2026-03-06 PST in Berlin 2026-03-06 2:30 pm PST in Berlin Mar 6 2026 PST in Berlin 2:30 pm Mar 6 2026 PST in Berlin tomorrow PST in Berlin ``` Time unit arithmetic: ``` 1 month in days → 30.4167 days round(1 month in days) → 30 round 1 month in days → 30 2 hours + 30 minutes → 2.5 hours ``` ## Constants | Name | Value | |------|--------------| | pi | 3.1415926536 | | e | 2.7182818285 | ## Bitwise Operations ``` 5 & 3 → 1 5 | 3 → 7 5 xor 3 → 6 1 << 4 → 16 16 >> 2 → 4 6 (3) → 18 ``` ## SI Prefixes SI-based units support all SI prefixes (case-sensitive): ``` 1 mm → 0.001 m 3 GB → 3e+9 bytes 2 MHz → 2,000,000 Hz ``` ================================================ FILE: src/renderer/components/math-notebook/ResultsPanel.vue ================================================ <script setup lang="ts"> import type { LineResult } from '@/composables/math-notebook' import { Button } from '@/components/ui/shadcn/button' import { useCopyToClipboard } from '@/composables' import { i18n, ipc } from '@/electron' import { LoaderCircle, Sigma } from 'lucide-vue-next' interface Props { results: LineResult[] scrollTop: number activeLine: number } const props = defineProps<Props>() const showTotal = ref(true) const copy = useCopyToClipboard() const MATH_NOTEBOOK_DOCUMENTATION_URL = 'https://masscode.io/documentation/math-notebook.html' const total = computed(() => { return props.results.reduce((sum, r) => { if (r.type === 'number' || r.type === 'assignment') { const num = Number.parseFloat((r.value || '').replace(/,/g, '')) if (!Number.isNaN(num)) return sum + num } return sum }, 0) }) const formattedTotal = computed(() => { return Number.isInteger(total.value) ? total.value.toLocaleString('en-US') : total.value.toLocaleString('en-US', { maximumFractionDigits: 6 }) }) const resultsStyle = computed(() => { return { transform: `translate3d(0, ${-Math.max(props.scrollTop, 0)}px, 0)`, } }) function handleClickResult(result: LineResult) { if (result.value) { copy(result.value) } } function getResultClasses(result: LineResult) { const base = 'flex h-[22px] select-none items-center justify-end font-mono text-[13px] leading-[22px] transition-all duration-100' if (result.error) { return `${base} text-destructive` } if (result.type === 'pending') { return `${base} text-muted-foreground` } if (result.type === 'comment') { return `${base} text-muted-foreground` } if (result.type === 'assignment') { return `${base} group text-muted-foreground` } if (result.value) { return `${base} group` } return base } function getResultValueClasses(result: LineResult) { const base = 'truncate rounded-md px-1.5 transition-colors duration-100' if (result.type === 'assignment') { return `${base} group-hover:bg-accent-hover` } if (result.value) { return `${base} group-hover:bg-primary group-hover:text-white` } return base } function openDocumentation() { void ipc.invoke('system:open-external', MATH_NOTEBOOK_DOCUMENTATION_URL) } </script> <template> <div class="flex h-full flex-col overflow-hidden"> <div class="min-h-0 flex-1 overflow-hidden py-1 pr-3 pl-3"> <div class="will-change-transform" :style="resultsStyle" > <div v-for="(result, index) in results" :key="index" :class="getResultClasses(result)" @click="handleClickResult(result)" > <template v-if="result.type === 'pending'"> <LoaderCircle class="h-3.5 w-3.5 animate-spin" /> </template> <template v-else-if="result.error && result.showError"> <span class="truncate"> {{ result.error }} </span> </template> <template v-else> <span v-if="result.value" :class="[ getResultValueClasses(result), { 'font-medium': ['number', 'aggregate'].includes(result.type) && props.activeLine === index, }, ]" > {{ result.value }} </span> </template> </div> </div> </div> <transition name="total-slide"> <div v-if="showTotal" class="border-border flex h-[34px] shrink-0 items-center gap-2 border-t px-3" > <UiText variant="caption" weight="medium" uppercase class="text-muted-foreground shrink-0 tracking-[0.1em]" > {{ i18n.t("total") }} </UiText> <span class="group flex h-[22px] min-w-0 flex-1 items-center justify-end font-mono text-[13px] leading-[22px] select-none" @click="copy(formattedTotal)" > <span class="group-hover:bg-primary truncate rounded-md px-1.5 transition-colors duration-100 group-hover:text-white" > {{ formattedTotal }} </span> </span> </div> </transition> <div class="border-border flex h-[34px] shrink-0 items-center justify-between border-t px-2" > <Button variant="ghost" size="sm" @click="openDocumentation" > {{ i18n.t("menu:help.documentation") }} </Button> <UiActionButton :tooltip="i18n.t('total')" @click="showTotal = !showTotal" > <Sigma class="text-foreground h-3.5 w-3.5 transition-colors" /> </UiActionButton> </div> </div> </template> <style scoped> .total-slide-enter-active, .total-slide-leave-active { transition: all 0.15s ease; } .total-slide-enter-from, .total-slide-leave-to { opacity: 0; height: 0; overflow: hidden; } </style> ================================================ FILE: src/renderer/components/math-notebook/SheetList.vue ================================================ <script setup lang="ts"> import * as ContextMenu from '@/components/ui/shadcn/context-menu' import { useMathNotebook } from '@/composables' import { i18n } from '@/electron' import { format } from 'date-fns' import { FileText, Plus } from 'lucide-vue-next' const { sheets, activeSheetId, createSheet, deleteSheet, selectSheet, renameSheet, } = useMathNotebook() const editingId = ref<string | null>(null) const editingName = ref('') function handleCreateSheet() { const id = createSheet() const sheet = sheets.value.find(sheet => sheet.id === id) if (sheet) { startRename(sheet.id, sheet.name) } } function startRename(id: string, currentName: string) { editingId.value = id editingName.value = currentName nextTick(() => { const input = document.querySelector( '.sheet-rename-input', ) as HTMLInputElement input?.focus() input?.select() }) } function finishRename(id: string) { if (editingName.value.trim()) { renameSheet(id, editingName.value.trim()) } editingId.value = null } function cancelRename() { editingId.value = null } </script> <template> <div class="flex h-full flex-col overflow-hidden"> <div class="_mt-1 flex items-center justify-between px-2 pb-2 select-none"> <UiText as="div" variant="caption" weight="bold" uppercase > {{ i18n.t("mathNotebook.sheetList") }} </UiText> <UiActionButton :tooltip="i18n.t('mathNotebook.newSheet')" @click="handleCreateSheet" > <Plus class="h-4 w-4" /> </UiActionButton> </div> <div class="scrollbar min-h-0 flex-1 overflow-y-auto px-2"> <ContextMenu.ContextMenu v-for="sheet in sheets" :key="sheet.id" > <ContextMenu.ContextMenuTrigger as-child> <div class="group mb-0.5 flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 transition-colors duration-75" :class=" activeSheetId === sheet.id ? 'bg-accent text-accent-foreground' : 'hover:bg-accent-hover' " @click="selectSheet(sheet.id)" @dblclick="startRename(sheet.id, sheet.name)" > <FileText class="h-3.5 w-3.5 shrink-0 transition-colors" :class=" activeSheetId === sheet.id ? 'text-accent-foreground' : 'text-muted-foreground' " :stroke-width="1.5" /> <div class="min-w-0 flex-1"> <input v-if="editingId === sheet.id" v-model="editingName" class="sheet-rename-input w-full bg-transparent text-[13px] outline-none" @blur="finishRename(sheet.id)" @keydown.enter="finishRename(sheet.id)" @keydown.escape="cancelRename" @click.stop > <template v-else> <UiText as="div" variant="sm" class="truncate leading-tight" > {{ sheet.name }} </UiText> <UiText as="div" variant="caption" class="leading-tight transition-colors" muted > {{ format(new Date(sheet.updatedAt), "dd.MM.yyyy") }} </UiText> </template> </div> </div> </ContextMenu.ContextMenuTrigger> <ContextMenu.ContextMenuContent> <ContextMenu.ContextMenuItem @click="startRename(sheet.id, sheet.name)" > {{ i18n.t("action.rename") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuSeparator /> <ContextMenu.ContextMenuItem @click="deleteSheet(sheet.id)"> {{ i18n.t("action.delete.common") }} </ContextMenu.ContextMenuItem> </ContextMenu.ContextMenuContent> </ContextMenu.ContextMenu> <div v-if="sheets.length === 0" class="text-muted-foreground mt-8 text-center text-[12px]" > {{ i18n.t("placeholder.emptySheetList") }} </div> </div> </div> </template> ================================================ FILE: src/renderer/components/math-notebook/Workspace.vue ================================================ <script setup lang="ts"> import type { LineResult } from '@/composables/math-notebook' import { useMathEngine, useMathNotebook } from '@/composables' import { i18n, ipc } from '@/electron' import { Calculator } from 'lucide-vue-next' interface CurrencyRatesPayload { rates: Record<string, number> source: 'live' | 'cache' | 'unavailable' } const { activeSheet, updateSheet } = useMathNotebook() const { evaluateDocument, setCurrencyServiceState, updateCurrencyRates } = useMathEngine() const scrollTop = ref(0) const activeLine = ref(0) const results = ref<LineResult[]>([]) const timeTick = ref(0) let timeTickInterval: number | undefined const content = computed({ get: () => activeSheet.value?.content || '', set: (value: string) => { if (activeSheet.value) { updateSheet(activeSheet.value.id, value) } }, }) watch( [content, timeTick], ([text]) => { results.value = evaluateDocument(text) }, { immediate: true }, ) onMounted(async () => { timeTickInterval = window.setInterval(() => { timeTick.value = Date.now() }, 60_000) try { const payload = await ipc.invoke<null, CurrencyRatesPayload>( 'system:currency-rates', null, ) if (payload.source === 'unavailable') { setCurrencyServiceState( 'unavailable', i18n.t('mathNotebook.currencyUnavailable'), ) } else { updateCurrencyRates(payload.rates) } results.value = evaluateDocument(content.value) } catch { setCurrencyServiceState( 'unavailable', i18n.t('mathNotebook.currencyUnavailable'), ) results.value = evaluateDocument(content.value) } }) onBeforeUnmount(() => { if (timeTickInterval !== undefined) { window.clearInterval(timeTickInterval) } }) function handleScroll(top: number) { scrollTop.value = top } function handleActiveLine(line: number) { activeLine.value = line } </script> <template> <div v-if="activeSheet" class="grid h-full min-h-0 overflow-hidden" style="grid-template-columns: 1fr 1px 220px" > <MathNotebookMathEditor :key="activeSheet.id" v-model="content" @scroll="handleScroll" @active-line="handleActiveLine" /> <div class="bg-border/50" /> <MathNotebookResultsPanel :results="results" :scroll-top="scrollTop" :active-line="activeLine" /> </div> <div v-else class="flex h-full flex-col items-center justify-center gap-4" > <div class="text-muted-foreground/20"> <Calculator class="h-16 w-16" :stroke-width="1" /> </div> <!-- <div class="text-center"> <p class="text-muted-foreground/60 text-[13px]"> {{ i18n.t("mathNotebook.newSheet") }} </p> </div> --> </div> </template> ================================================ FILE: src/renderer/components/math-notebook/math-editor-highlight.ts ================================================ import { currencySymbols, knownUnitTokens, MATH_UNARY_FUNCTIONS, timeZoneAliases, } from '@/composables/math-notebook/math-engine/constants' const assignmentPattern = /^\s*([A-Z_]\w*)\s*=(?!=)/i const highlightableTokenPattern = /R\$|[$€£¥₽₴₩₹]|[A-Z_]\w*/gi const keywordTokens = new Set(['in', 'to', 'as', 'into', 'xor']) const unitTokens = new Set([ ...knownUnitTokens, 'sq', 'square', 'cu', 'cubic', 'cb', ]) const builtinTokens = new Set([ ...MATH_UNARY_FUNCTIONS, 'fromunix', 'root', 'log', 'now', 'time', 'prev', 'sum', 'total', 'avg', 'average', 'today', 'tomorrow', 'yesterday', 'bitand', 'bitor', 'bitxor', 'bitnot', 'unitvalue', ...Object.keys(timeZoneAliases), ]) const currencySymbolTokens = new Set(Object.keys(currencySymbols)) function escapeHtml(text: string) { return text .replaceAll('&', '&') .replaceAll('<', '<') .replaceAll('>', '>') .replaceAll('"', '"') .replaceAll('\'', ''') } function collectAssignedVariables(source: string) { const variables = new Set<string>() for (const line of source.split('\n')) { const match = line.match(assignmentPattern) if (!match) { continue } variables.add(match[1]) } return variables } function resolveTokenClass(token: string, assignedVariables: Set<string>) { if (assignedVariables.has(token)) { return 'variable' } if (currencySymbolTokens.has(token)) { return 'unit' } const normalized = token.toLowerCase() if (keywordTokens.has(normalized)) { return 'keyword' } if (unitTokens.has(normalized)) { return 'unit' } if (builtinTokens.has(normalized)) { return 'builtin' } return null } function highlightLine(line: string, assignedVariables: Set<string>) { let html = '' let lastIndex = 0 for (const match of line.matchAll(highlightableTokenPattern)) { const [token] = match const index = match.index ?? 0 if (index > lastIndex) { html += escapeHtml(line.slice(lastIndex, index)) } const tokenClass = resolveTokenClass(token, assignedVariables) const escapedToken = escapeHtml(token) html += tokenClass ? `<span class="mn-editor-token mn-editor-token--${tokenClass}">${escapedToken}</span>` : escapedToken lastIndex = index + token.length } if (lastIndex < line.length) { html += escapeHtml(line.slice(lastIndex)) } return html } export function renderMathEditorHighlight(source: string) { const assignedVariables = collectAssignedVariables(source) return source .split('\n') .map(line => highlightLine(line, assignedVariables)) .join('\n') } ================================================ FILE: src/renderer/components/preferences/API.vue ================================================ <script setup lang="ts"> import { Button } from '@/components/ui/shadcn/button' import { i18n, ipc, store } from '@/electron' const apiPort = ref(store.preferences.get('apiPort')) watch(apiPort, (value) => { const port = Number(value) if (port >= 1024 && port <= 65535) { store.preferences.set('apiPort', port) } }) </script> <template> <div> <UiMenuFormSection :label="i18n.t('preferences:api.label')"> <UiMenuFormItem :label="i18n.t('preferences:api.port.label')"> <UiInput v-model="apiPort" type="number" min="1024" max="65535" size="sm" class="w-32" /> <template #description> {{ i18n.t("preferences:api.port.description") }} </template> <template #actions> <Button variant="outline" @click="ipc.invoke('system:reload', null)" > {{ i18n.t("action.reload.app") }} </Button> </template> </UiMenuFormItem> </UiMenuFormSection> </div> </template> ================================================ FILE: src/renderer/components/preferences/Appearance.vue ================================================ <script setup lang="ts"> import { Button } from '@/components/ui/shadcn/button' import * as Select from '@/components/ui/shadcn/select' import { useTheme } from '@/composables' import { i18n, ipc } from '@/electron' const { currentThemeId, customThemes, loadCustomThemes, setTheme } = useTheme() const builtInThemes = [ { id: 'light', label: i18n.t('preferences:appearance.theme.light'), }, { id: 'dark', label: i18n.t('preferences:appearance.theme.dark'), }, { id: 'auto', label: i18n.t('preferences:appearance.theme.system'), }, ] const customDarkThemes = computed(() => { return customThemes.value.filter(theme => theme.type === 'dark') }) const customLightThemes = computed(() => { return customThemes.value.filter(theme => theme.type === 'light') }) async function onThemeChange(id: string) { await setTheme(id) } async function openThemesDir() { await ipc.invoke('theme:open-dir', null) } async function createThemeTemplate() { await ipc.invoke('theme:create-template', null) await loadCustomThemes() } void loadCustomThemes() </script> <template> <div> <UiMenuFormSection :label="i18n.t('preferences:appearance.label')"> <UiMenuFormItem :label="i18n.t('preferences:appearance.theme.label')"> <Select.Select :model-value="currentThemeId" @update:model-value="onThemeChange" > <Select.SelectTrigger class="w-64"> <Select.SelectValue /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectGroup> <Select.SelectLabel> {{ i18n.t("preferences:appearance.theme.builtIn") }} </Select.SelectLabel> <Select.SelectItem v-for="theme in builtInThemes" :key="theme.id" :value="theme.id" > {{ theme.label }} </Select.SelectItem> </Select.SelectGroup> <template v-if="customThemes.length"> <Select.SelectSeparator /> <Select.SelectGroup v-if="customDarkThemes.length"> <Select.SelectLabel> {{ `${i18n.t("preferences:appearance.theme.custom")} · ${i18n.t("preferences:appearance.theme.dark")}` }} </Select.SelectLabel> <Select.SelectItem v-for="theme in customDarkThemes" :key="theme.id" :value="theme.id" > {{ theme.name }} </Select.SelectItem> </Select.SelectGroup> <Select.SelectGroup v-if="customLightThemes.length"> <Select.SelectLabel> {{ `${i18n.t("preferences:appearance.theme.custom")} · ${i18n.t("preferences:appearance.theme.light")}` }} </Select.SelectLabel> <Select.SelectItem v-for="theme in customLightThemes" :key="theme.id" :value="theme.id" > {{ theme.name }} </Select.SelectItem> </Select.SelectGroup> </template> </Select.SelectContent> </Select.Select> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:appearance.theme.themesDir')"> <template #description> {{ i18n.t("preferences:appearance.theme.dirDescription") }} </template> <template #actions> <div class="flex gap-2"> <Button variant="outline" @click="openThemesDir" > {{ i18n.t("preferences:appearance.theme.openDir") }} </Button> <Button @click="createThemeTemplate"> {{ i18n.t("preferences:appearance.theme.createTemplate") }} </Button> </div> </template> </UiMenuFormItem> </UiMenuFormSection> </div> </template> ================================================ FILE: src/renderer/components/preferences/Editor.vue ================================================ <script setup lang="ts"> import * as Select from '@/components/ui/shadcn/select' import { Switch } from '@/components/ui/shadcn/switch' import { useEditor } from '@/composables' import { i18n } from '@/electron' const { settings } = useEditor() const wrap = ref(settings.wrap ? 'true' : 'false') watch(wrap, () => { settings.wrap = wrap.value === 'true' }) watch( settings, () => { if (settings.fontSize < 1) settings.fontSize = 1 }, { deep: true }, ) </script> <template> <div class="space-y-4"> <UiMenuFormSection :label="i18n.t('preferences:editor.label')"> <UiMenuFormItem :label="i18n.t('preferences:editor.fontSize')"> <UiInput v-model="settings.fontSize" type="number" size="sm" /> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.fontFamily')"> <UiInput v-model="settings.fontFamily" size="sm" /> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.tabSize')"> <UiInput v-model="settings.tabSize" type="number" size="sm" /> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.wrap.label')"> <Select.Select v-model="wrap"> <Select.SelectTrigger class="w-64"> <Select.SelectValue /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectItem value="true"> {{ i18n.t("preferences:editor.wrap.wordWrap") }} </Select.SelectItem> <Select.SelectItem value="false"> {{ i18n.t("preferences:editor.wrap.off") }} </Select.SelectItem> </Select.SelectContent> </Select.Select> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.highlightLine')"> <Switch :checked="settings.highlightLine" @update:checked="settings.highlightLine = $event" /> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.matchBrackets')"> <Switch :checked="settings.matchBrackets" @update:checked="settings.matchBrackets = $event" /> </UiMenuFormItem> </UiMenuFormSection> <UiMenuFormSection :label="i18n.t('preferences:editor.prettier.label')"> <UiMenuFormItem :label="i18n.t('preferences:editor.prettier.trailingComma.label')" > <Select.Select v-model="settings.trailingComma"> <Select.SelectTrigger class="w-64"> <Select.SelectValue /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectItem value="all"> {{ i18n.t("preferences:editor.prettier.trailingComma.all") }} </Select.SelectItem> <Select.SelectItem value="none"> {{ i18n.t("preferences:editor.prettier.trailingComma.none") }} </Select.SelectItem> <Select.SelectItem value="es5"> {{ i18n.t("preferences:editor.prettier.trailingComma.es5") }} </Select.SelectItem> </Select.SelectContent> </Select.Select> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.prettier.semi')"> <Switch :checked="settings.semi" @update:checked="settings.semi = $event" /> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:editor.prettier.singleQuote')" > <Switch :checked="settings.singleQuote" @update:checked="settings.singleQuote = $event" /> </UiMenuFormItem> </UiMenuFormSection> </div> </template> ================================================ FILE: src/renderer/components/preferences/Language.vue ================================================ <script setup lang="ts"> import { Button } from '@/components/ui/shadcn/button' import * as Select from '@/components/ui/shadcn/select' import { i18n, ipc, store } from '@/electron' import { language } from '~/main/i18n/language' const languageOptions = Object.entries(language).map(([key, value]) => ({ label: value, value: key, })) const selectedLanguage = ref(store.preferences.get('language')) watch(selectedLanguage, (value) => { store.preferences.set('language', value) }) </script> <template> <div> <UiMenuFormSection :label="i18n.t('preferences:language.label')"> <UiMenuFormItem :label="i18n.t('preferences:language.label')"> <template #description> {{ i18n.t("messages:description.language") }} </template> <Select.Select v-model="selectedLanguage"> <Select.SelectTrigger class="w-64"> <Select.SelectValue placeholder="Select a language" /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectItem v-for="i in languageOptions" :key="i.value" :value="i.value" > {{ i.label }} </Select.SelectItem> </Select.SelectContent> </Select.Select> <template #actions> <Button variant="outline" @click="ipc.invoke('system:reload', null)" > {{ i18n.t("action.reload.app") }} </Button> </template> </UiMenuFormItem> </UiMenuFormSection> </div> </template> ================================================ FILE: src/renderer/components/preferences/Storage.vue ================================================ <script setup lang="ts"> import type { Backup } from '~/main/db/types' import type { PreferencesStore } from '~/main/store/types' import type { DialogOptions } from '~/main/types/ipc' import type { SnippetsCountsResponse } from '~/renderer/services/api/generated' import { Button } from '@/components/ui/shadcn/button' import * as Select from '@/components/ui/shadcn/select' import { Switch } from '@/components/ui/shadcn/switch' import { useDialog, useFolders, useSnippets, useSonner } from '@/composables' import { i18n, ipc, store } from '@/electron' import { format } from 'date-fns' import { LoaderCircle, RotateCcw, Trash2 } from 'lucide-vue-next' import { api } from '~/renderer/services/api' const { sonner } = useSonner() const { getFolders } = useFolders() const { getSnippets } = useSnippets() function normalizeStorageEngine( engine: string | undefined, ): PreferencesStore['storage']['engine'] { return engine === 'markdown' ? 'markdown' : 'sqlite' } function getDefaultVaultPath(baseStoragePath: string): string { const separator = baseStoragePath.includes('\\') ? '\\' : '/' const hasTrailingSeparator = baseStoragePath.endsWith('\\') || baseStoragePath.endsWith('/') return `${baseStoragePath}${hasTrailingSeparator ? '' : separator}markdown-vault` } const storagePath = ref(store.preferences.get('storagePath')) const storageSettings = reactive<PreferencesStore['storage']>({ engine: normalizeStorageEngine( (store.preferences.get('storage') as Partial<PreferencesStore['storage']>) ?.engine as string | undefined, ), vaultPath: null, ...(store.preferences.get('storage') as Partial<PreferencesStore['storage']>), }) storageSettings.engine = normalizeStorageEngine( storageSettings.engine as string, ) const backupSettings = reactive(store.preferences.get('backup')) const backups = ref<Backup[]>([]) const isShowBackupList = ref(false) const isRestoringBackup = ref(false) const storageEngineOptions = [ { label: i18n.t('preferences:storage.engine.sqlite'), value: 'sqlite' }, { label: i18n.t('preferences:storage.engine.markdown'), value: 'markdown' }, ] const isMarkdownEngine = computed(() => storageSettings.engine === 'markdown') const isSqliteEngine = computed(() => storageSettings.engine === 'sqlite') const effectiveVaultPath = computed(() => { if (storageSettings.vaultPath && storageSettings.vaultPath.trim()) { return storageSettings.vaultPath } return getDefaultVaultPath(storagePath.value) }) const backupItervalOptions = [ { label: i18n.t('preferences:storage.backup.interval.1'), value: 1 }, { label: i18n.t('preferences:storage.backup.interval.6'), value: 6 }, { label: i18n.t('preferences:storage.backup.interval.12'), value: 12 }, { label: i18n.t('preferences:storage.backup.interval.24'), value: 24 }, ] const backupMaxBackupsOptions = [ { label: '5', value: 5 }, { label: '10', value: 10 }, { label: '15', value: 15 }, { label: '20', value: 20 }, ] const counts = reactive<SnippetsCountsResponse>({ total: 0, trash: 0, }) const isLoadingCounts = ref(false) let loadingCountsTimer: ReturnType<typeof setTimeout> | null = null function showLoadingCounts() { loadingCountsTimer = setTimeout(() => { isLoadingCounts.value = true }, 300) } function hideLoadingCounts() { clearTimeout(loadingCountsTimer!) isLoadingCounts.value = false } async function getSnippetsCounts() { showLoadingCounts() try { const { data } = await api.snippets.getSnippetsCounts() counts.total = data.total counts.trash = data.trash } catch (err) { console.error(err) } finally { hideLoadingCounts() } } getSnippetsCounts() async function moveStorage() { const result = await ipc.invoke<DialogOptions, string>( 'main-menu:open-dialog', { properties: ['openDirectory'], }, ) if (result) { try { await ipc.invoke('db:move', result) storagePath.value = result sonner({ message: 'Storage successfully moved', type: 'success' }) } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } } } async function openStorage() { const result = await ipc.invoke<DialogOptions, string>( 'main-menu:open-dialog', { properties: ['openDirectory'], }, ) if (result) { try { await ipc.invoke('db:relaod', result) storagePath.value = result await getSnippetsCounts() sonner({ message: 'Database successfully loaded', type: 'success' }) } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } } } async function onStorageEngineChange(value: string) { storageSettings.engine = value as PreferencesStore['storage']['engine'] store.preferences.set('storage.engine', storageSettings.engine) showLoadingCounts() try { if (storageSettings.engine === 'sqlite') { await ipc.invoke('db:start-auto-backup', null) } else { await ipc.invoke('db:stop-auto-backup', null) } await getFolders(false) await getSnippets() const { data } = await api.snippets.getSnippetsCounts() counts.total = data.total counts.trash = data.trash } finally { hideLoadingCounts() } } async function openVaultStorage() { const result = await ipc.invoke<DialogOptions, string>( 'main-menu:open-dialog', { properties: ['openDirectory', 'createDirectory'], }, ) if (result) { storageSettings.vaultPath = result await nextTick() showLoadingCounts() try { await getFolders(false) await getSnippets() const { data } = await api.snippets.getSnippetsCounts() counts.total = data.total counts.trash = data.trash } finally { hideLoadingCounts() } sonner({ message: i18n.t('messages:success.vaultLoaded'), type: 'success', }) } } async function migrateSqliteToMarkdown() { const { confirm } = useDialog() const isConfirmed = await confirm({ title: i18n.t('messages:confirm.migrateToMarkdown.0'), content: i18n.t('messages:confirm.migrateToMarkdown.1'), }) if (!isConfirmed) { return } try { const result = await ipc.invoke< undefined, { folders: number, snippets: number, tags: number } >('db:migrate-to-markdown', undefined) sonner({ message: i18n.t('messages:success.migrateToMarkdown', { folders: result.folders, snippets: result.snippets, tags: result.tags, }), type: 'success', }) await getSnippetsCounts() } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } } async function migrateMarkdownToSqlite() { const { confirm } = useDialog() const isConfirmed = await confirm({ title: i18n.t('messages:confirm.migrateToSqlite.0'), content: i18n.t('messages:confirm.migrateToSqlite.1'), }) if (!isConfirmed) { return } try { const result = await ipc.invoke< undefined, { folders: number, snippets: number, tags: number } >('db:migrate-to-sqlite', undefined) sonner({ message: i18n.t('messages:success.migrateToSqlite', { folders: result.folders, snippets: result.snippets, tags: result.tags, }), type: 'success', }) await getSnippetsCounts() } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } } async function migrateFromV3() { const result = await ipc.invoke<DialogOptions, string>( 'main-menu:open-dialog', { properties: ['openFile'], filters: [{ name: '*', extensions: ['json'] }], }, ) const { confirm } = useDialog() if (!result) { return } const isConfirmed = await confirm({ title: i18n.t('messages:confirm.migrateDb.0'), content: i18n.t('messages:confirm.migrateDb.1'), }) if (isConfirmed) { try { await ipc.invoke('db:migrate', result) await getSnippetsCounts() sonner({ message: 'Migration successfully completed', type: 'success' }) } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } } } async function clearDatabase() { const { confirm } = useDialog() const isConfirmed = await confirm({ title: i18n.t('messages:confirm.clearDb'), content: i18n.t('messages:warning.noUndo'), }) if (isConfirmed) { try { await ipc.invoke('db:clear', null) await getSnippetsCounts() sonner({ message: 'Database successfully cleared', type: 'success' }) } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } } } async function createBackup() { await ipc.invoke('db:backup', true) sonner({ message: i18n.t('messages:success.backup.created'), type: 'success', }) if (isShowBackupList.value) { await showBackupList() } } async function restoreBackup(backupPath: string) { const { confirm } = useDialog() const isConfirmed = await confirm({ title: i18n.t('messages:confirm.backup.restore'), content: i18n.t('messages:warning.noUndo'), }) if (!isConfirmed) return isRestoringBackup.value = true try { await ipc.invoke('db:restore', backupPath) sonner({ message: i18n.t('messages:success.backup.restored'), type: 'success', }) await getSnippetsCounts() } catch (err) { const e = err as Error sonner({ message: e.message, type: 'error' }) } finally { isRestoringBackup.value = false } } async function deleteBackup(backupPath: string) { const { confirm } = useDialog() const isConfirmed = await confirm({ title: i18n.t('messages:confirm.backup.delete'), content: i18n.t('messages:warning.noUndo'), }) if (!isConfirmed) return await ipc.invoke('db:delete-backup', backupPath) await showBackupList() sonner({ message: i18n.t('messages:success.backup.deleted'), type: 'success', }) } async function moveBackupStorage() { const result = await ipc.invoke<DialogOptions, string>( 'main-menu:open-dialog', { properties: ['openDirectory', 'createDirectory'], }, ) if (result) { await ipc.invoke('db:move-backup', result) sonner({ message: i18n.t('messages:success.backup.moved'), type: 'success', }) } } async function openBackupStorage() { const result = await ipc.invoke<DialogOptions, string>( 'main-menu:open-dialog', { properties: ['openDirectory'], }, ) if (result) { backupSettings.path = result store.preferences.set('backup', JSON.parse(JSON.stringify(backupSettings))) } if (isShowBackupList.value) { await showBackupList() } } async function showBackupList() { backups.value = (await ipc.invoke('db:backup-list', null)) as Backup[] isShowBackupList.value = true } function onBackupIntervalChange(value: string) { backupSettings.interval = Number.parseInt(value) ipc.invoke('db:stop-auto-backup', null) ipc.invoke('db:start-auto-backup', null) } function formatFileSize(bytes: number) { if (bytes === 0) return '0 Bytes' const k = 1024 const sizes = ['Bytes', 'KB', 'MB', 'GB'] const i = Math.floor(Math.log(bytes) / Math.log(k)) return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}` } function isManualBackup(backup: Backup) { return backup.name.startsWith('massCode-manual-backup-') } function hideBackupList() { isShowBackupList.value = false } watch( backupSettings, () => { store.preferences.set('backup', JSON.parse(JSON.stringify(backupSettings))) }, { deep: true }, ) watch( storageSettings, () => { store.preferences.set( 'storage', JSON.parse(JSON.stringify(storageSettings)), ) }, { deep: true }, ) </script> <template> <div class="space-y-4"> <!-- Section 1: Main --> <UiMenuFormSection :label="i18n.t('preferences:storage.section.main')"> <UiMenuFormItem :label="i18n.t('preferences:storage.engine.label')"> <Select.Select :model-value="storageSettings.engine" @update:model-value="onStorageEngineChange" > <Select.SelectTrigger class="w-64"> <Select.SelectValue /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectItem v-for="option in storageEngineOptions" :key="option.value" :value="option.value" > {{ option.label }} </Select.SelectItem> </Select.SelectContent> </Select.Select> <template #description> {{ i18n.t("messages:description.storageEngine") }} </template> </UiMenuFormItem> <UiMenuFormItem v-if="isSqliteEngine" :label="i18n.t('path')" > <UiInput v-model="storagePath" disabled size="sm" /> <template #actions> <div class="flex gap-2"> <Button variant="outline" @click="moveStorage" > {{ i18n.t("action.move.storage") }} </Button> <Button variant="outline" @click="openStorage" > {{ i18n.t("action.open.storage") }} </Button> </div> </template> <template #description> {{ i18n.t("messages:description.storage") }} </template> </UiMenuFormItem> <UiMenuFormItem v-if="isMarkdownEngine" :label="i18n.t('preferences:storage.vaultPath')" > <UiInput :model-value="effectiveVaultPath" disabled size="sm" /> <template #actions> <Button variant="outline" @click="openVaultStorage" > {{ i18n.t("action.select.directory") }} </Button> </template> <template #description> {{ i18n.t("messages:description.storageVault") }} </template> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:storage.count')"> <LoaderCircle v-if="isLoadingCounts" class="h-4 w-4 animate-spin" /> <template v-else> {{ i18n.t("total") }}: {{ counts.total }}, {{ i18n.t("sidebar.trash") }}: {{ counts.trash }} </template> </UiMenuFormItem> </UiMenuFormSection> <!-- Section 2: Migration --> <UiMenuFormSection :label="i18n.t('preferences:storage.section.migration')"> <UiMenuFormItem v-if="isSqliteEngine" :label="i18n.t('preferences:storage.migrate')" > <Button variant="outline" @click="migrateFromV3" > {{ i18n.t("action.migrate.fromV3") }} </Button> <template #description> {{ i18n.t("messages:description.migrate.fromV3") }} </template> </UiMenuFormItem> <UiMenuFormItem v-if="isSqliteEngine" :label="i18n.t('preferences:storage.migrateSqliteToMarkdown')" > <Button variant="outline" @click="migrateSqliteToMarkdown" > {{ i18n.t("preferences:storage.migrateSqliteToMarkdown") }} </Button> </UiMenuFormItem> <UiMenuFormItem v-if="isSqliteEngine" :label="i18n.t('preferences:storage.vaultPath')" > <UiInput :model-value="effectiveVaultPath" disabled size="sm" /> <template #actions> <Button variant="outline" @click="openVaultStorage" > {{ i18n.t("action.select.directory") }} </Button> </template> <template #description> {{ i18n.t("messages:description.storageVault") }} </template> </UiMenuFormItem> <UiMenuFormItem v-if="isMarkdownEngine" :label="i18n.t('preferences:storage.migrateMarkdownToSqlite')" > <Button variant="outline" @click="migrateMarkdownToSqlite" > {{ i18n.t("preferences:storage.migrateMarkdownToSqlite") }} </Button> </UiMenuFormItem> </UiMenuFormSection> <!-- Section 3: Danger Zone (SQLite only) --> <UiMenuFormSection v-if="isSqliteEngine" :label="i18n.t('preferences:storage.section.dangerZone')" variant="danger" > <UiMenuFormItem :label="i18n.t('preferences:storage.clearDatabase')"> <Button variant="destructive" @click="clearDatabase" > {{ i18n.t("action.delete.allData") }} </Button> <template #description> {{ i18n.t("messages:warning.clearDb") }} </template> </UiMenuFormItem> </UiMenuFormSection> <!-- Section 4: Backup (SQLite only) --> <UiMenuFormSection v-if="isSqliteEngine" :label="i18n.t('preferences:storage.backup.label')" > <UiMenuFormItem :label="i18n.t('path')"> <UiInput v-model="backupSettings.path" disabled size="sm" /> <template #actions> <div class="flex gap-2"> <Button variant="outline" @click="moveBackupStorage" > {{ i18n.t("action.move.storage") }} </Button> <Button variant="outline" @click="openBackupStorage" > {{ i18n.t("action.open.storage") }} </Button> </div> </template> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:storage.backup.enabled')"> <Switch :checked="backupSettings.enabled" @update:checked="backupSettings.enabled = $event" /> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:storage.backup.interval.label')" > <Select.Select :model-value="backupSettings.interval.toString()" @update:model-value="onBackupIntervalChange" > <Select.SelectTrigger class="w-64"> <Select.SelectValue /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectItem v-for="option in backupItervalOptions" :key="option.value" :value="option.value.toString()" > {{ option.label }} </Select.SelectItem> </Select.SelectContent> </Select.Select> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:storage.backup.maxBackups')"> <Select.Select :model-value="backupSettings.maxBackups.toString()" @update:model-value=" backupSettings.maxBackups = Number.parseInt($event) " > <Select.SelectTrigger class="w-64"> <Select.SelectValue /> </Select.SelectTrigger> <Select.SelectContent> <Select.SelectItem v-for="option in backupMaxBackupsOptions" :key="option.value" :value="option.value.toString()" > {{ option.label }} </Select.SelectItem> </Select.SelectContent> </Select.Select> <template #description> {{ i18n.t("messages:description.backup.manual") }} </template> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:storage.backup.createNow')"> <Button variant="outline" @click="createBackup" > {{ i18n.t("action.backup.create") }} </Button> </UiMenuFormItem> <UiMenuFormItem :label="i18n.t('preferences:storage.backup.list')"> <div class="flex gap-2"> <Button variant="outline" @click="showBackupList" > {{ i18n.t("action.backup.showList") }} </Button> <Button v-if="isShowBackupList" variant="outline" @click="hideBackupList" > {{ i18n.t("action.hide") }} </Button> </div> <div v-if="isShowBackupList" class="space-y-2" > <div v-for="backup in backups" :key="backup.path" class="border-border flex items-center justify-between rounded-lg border p-3" > <div class="flex-1"> <UiText as="div" variant="base" weight="medium" class="tabular-nums" > {{ format(backup.createdAt, "dd.MM.yyyy HH:mm:ss") }} • {{ formatFileSize(backup.size) }} {{ isManualBackup(backup) ? "(manual)" : "" }} </UiText> </div> <UiActionButton :tooltip="i18n.t('action.delete.common')" @click="deleteBackup(backup.path)" > <Trash2 class="h-3 w-3 text-red-500" /> </UiActionButton> <UiActionButton :tooltip="i18n.t('action.backup.restore')" :disabled="isRestoringBackup" @click="restoreBackup(backup.path)" > <RotateCcw class="h-3 w-3" /> </UiActionButton> <!-- <Button size="sm" :disabled="isRestoringBackup" @click="restoreBackup(backup.path)" > {{ i18n.t('action.backup.restore') }} </Button> --> </div> </div> </UiMenuFormItem> </UiMenuFormSection> </div> </template> ================================================ FILE: src/renderer/components/preferences/keys.ts ================================================ import type { InjectionKey, ShallowRef } from 'vue' export interface PreferencesInjection { scrollRef: Readonly<ShallowRef<HTMLElement | null>> } export const preferencesKeys: InjectionKey<PreferencesInjection> = Symbol('preferences') ================================================ FILE: src/renderer/components/sidebar/Sidebar.vue ================================================ <script setup lang="ts"> import { i18n } from '@/electron' </script> <template> <div data-sidebar class="flex h-full flex-col px-1 pt-[var(--content-top-offset)]" > <div class="truncate px-1 pb-2 font-bold select-none"> {{ i18n.t("sidebar.title") }} </div> <UiText as="div" variant="caption" weight="bold" uppercase class="flex gap-1 pb-1 pl-1 select-none" > {{ i18n.t("sidebar.library") }} </UiText> <SidebarLibrary /> </div> </template> ================================================ FILE: src/renderer/components/sidebar/folders/Tree.vue ================================================ <script setup lang="ts"> import type { TreeNode as TreeNodeType } from '@/components/ui/tree/types' import type { Node, Position } from './types' import { languages } from '@/components/editor/grammars/languages' import * as ContextMenu from '@/components/ui/shadcn/context-menu' import { Tree as UiTree } from '@/components/ui/tree' import { useApp, useDialog, useFolders, useSnippets } from '@/composables' import { i18n } from '@/electron' import { scrollToElement } from '@/utils' import { Folder } from 'lucide-vue-next' import CustomIcons from './custom-icons/CustomIcons.vue' interface Props { modelValue: Node[] selectedId?: string | number } interface Emits { (e: 'update:modelValue', value: Node[]): void (e: 'clickNode', value: { id: number, event?: MouseEvent }): void ( e: 'dragNode', value: { nodes: Node[], target: Node, position: Position }, ): void (e: 'toggleNode', value: Node): void } const props = defineProps<Props>() const emit = defineEmits<Emits>() const { createFolderAndSelect, deleteFolder, folders, updateFolder, getFolderByIdFromTree, getFolders, selectedFolderIds, clearFolderSelection, selectFolder, } = useFolders() const { state, highlightedFolderIds, highlightedSnippetIds, highlightedTagId, focusedFolderId, } = useApp() const { clearSnippetsState, displayedSnippets, updateSnippets, selectFirstSnippet, } = useSnippets() // --- Data mapping --- function mapToTreeNode(folder: Node): TreeNodeType { return { id: folder.id, label: folder.name, isExpanded: Boolean(folder.isOpen), children: folder.children?.map(mapToTreeNode) || [], } } const treeData = computed(() => props.modelValue.map(mapToTreeNode)) const selectedIds = computed({ get: () => selectedFolderIds.value as (string | number)[], set: (val) => { selectedFolderIds.value = val as number[] }, }) const editableId = ref<string | number | null>(null) const focusedId = computed({ get: () => focusedFolderId.value as string | number | undefined, set: (val) => { focusedFolderId.value = val as number | undefined }, }) const highlightedIds = computed({ get: () => highlightedFolderIds.value as Set<string | number>, set: (val) => { highlightedFolderIds.value.clear() val.forEach(id => highlightedFolderIds.value.add(id as number)) }, }) // --- Context menu state --- const contextNode = ref<Node | null>(null) const isContextMultiSelection = computed(() => { if (!contextNode.value) return false if (selectedFolderIds.value.length <= 1) return false return selectedFolderIds.value.includes(contextNode.value.id) }) const contextNodeDefaultLanguage = computed(() => { if (!contextNode.value) return '' return ( getFolderByIdFromTree(folders.value, contextNode.value.id) ?.defaultLanguage || '' ) }) // --- Event handlers --- function onClickNode({ node, event, }: { node: TreeNodeType event?: MouseEvent }) { highlightedFolderIds.value.clear() highlightedTagId.value = undefined state.tagId = undefined emit('clickNode', { id: Number(node.id), event }) } function onDblclickNode(node: TreeNodeType) { setTimeout(() => { editableId.value = node.id }, 100) } function onToggleNode(node: TreeNodeType) { const folderNode = getFolderByIdFromTree( folders.value, Number(node.id), ) as Node if (folderNode) { emit('toggleNode', folderNode) } } function onDragNode({ nodes, target, position, }: { nodes: TreeNodeType[] target: TreeNodeType position: Position }) { const folderNodes = nodes .map(n => getFolderByIdFromTree(folders.value, Number(n.id))) .filter((n): n is Node => Boolean(n)) const folderTarget = getFolderByIdFromTree( folders.value, Number(target.id), ) as Node if (folderNodes.length && folderTarget) { emit('dragNode', { nodes: folderNodes, target: folderTarget, position }) } } async function onExternalDrop({ data, target, }: { data: DataTransfer target: TreeNodeType position: Position }) { const snippetIds = JSON.parse(data.getData('snippetIds') || '[]') const snippets = displayedSnippets.value?.filter(s => snippetIds.includes(s.id), ) if (!snippets?.length) return const folderId = Number(target.id) if (snippets.every(s => s.folder?.id === folderId && !s.isDeleted)) return const ids = snippets.map(s => s.id) const updateData = snippets.map(() => ({ folderId, isDeleted: 0, })) await updateSnippets(ids, updateData) if (state.snippetId && ids.includes(state.snippetId)) { selectFirstSnippet() } } function onContextMenu({ node, }: { node: TreeNodeType selectedNodes: TreeNodeType[] }) { contextNode.value = getFolderByIdFromTree( folders.value, Number(node.id), ) as Node highlightedSnippetIds.value.clear() } function onUpdateLabel({ node, value }: { node: TreeNodeType, value: string }) { updateFolder(Number(node.id), { name: value }) editableId.value = null } function onCancelEdit() { editableId.value = null } // --- Context menu actions --- async function onDeleteFolder() { if (!contextNode.value) return const { confirm } = useDialog() const activeBeforeDelete = state.folderId const targetIds = selectedFolderIds.value.includes(contextNode.value.id) ? [...selectedFolderIds.value] : [contextNode.value.id] const folderName = getFolderByIdFromTree( folders.value, contextNode.value.id, )?.name const isConfirmed = await confirm({ title: targetIds.length > 1 ? i18n.t('messages:confirm.delete', { name: i18n.t('sidebar.folders'), }) : i18n.t('messages:confirm.delete', { name: folderName }), description: i18n.t('messages:warning:allSnippetsMoveToTrash'), }) if (!isConfirmed) return await Promise.all(targetIds.map(id => deleteFolder(id, false))) await getFolders(false) if (activeBeforeDelete && targetIds.includes(activeBeforeDelete)) { clearSnippetsState() const fallbackId = selectedFolderIds.value[0] if (fallbackId) { await selectFolder(fallbackId) scrollToElement(`[id="${fallbackId}"]`) } else { clearFolderSelection() } } } function onRenameFolder() { setTimeout(() => { if (!contextNode.value) return editableId.value = contextNode.value.id }, 100) } function onSelectLanguage(language: string) { if (!contextNode.value) return updateFolder(contextNode.value.id, { defaultLanguage: language }) } function scrollToSelectedLanguage(el: any, isSelected: boolean) { if (isSelected && el) { nextTick(() => { const element = el.$el || el if (element instanceof HTMLElement) { element.scrollIntoView({ block: 'center' }) } }) } } function onSetCustomIcon() { if (!contextNode.value) return const { showDialog } = useDialog() showDialog({ title: i18n.t('action.setCustomIcon'), content: h(CustomIcons, { nodeId: contextNode.value.id, }), }) } async function onRemoveCustomIcon() { if (!contextNode.value) return updateFolder(contextNode.value.id, { icon: null }) await getFolders() } </script> <template> <div class="h-full min-h-0"> <ContextMenu.ContextMenu> <ContextMenu.ContextMenuTrigger as-child> <UiTree :model-value="treeData" :selected-ids="selectedIds" :editable-id="editableId" :focused-id="focusedId" :highlighted-ids="highlightedIds" @click-node="onClickNode" @dblclick-node="onDblclickNode" @toggle-node="onToggleNode" @drag-node="onDragNode" @external-drop="onExternalDrop" @context-menu="onContextMenu" @update-label="onUpdateLabel" @cancel-edit="onCancelEdit" @update:selected-ids="selectedIds = $event" @update:editable-id="editableId = $event" @update:focused-id="focusedId = $event" @update:highlighted-ids="highlightedIds = $event" > <template #icon="{ node }"> <div class="mr-1.5 flex flex-shrink-0 items-center"> <UiFolderIcon v-if="getFolderByIdFromTree(folders, Number(node.id))?.icon" :name="getFolderByIdFromTree(folders, Number(node.id))!.icon!" /> <Folder v-else class="h-4 w-4" /> </div> </template> </UiTree> </ContextMenu.ContextMenuTrigger> <ContextMenu.ContextMenuContent> <template v-if="isContextMultiSelection"> <ContextMenu.ContextMenuItem @click="onDeleteFolder"> {{ i18n.t("action.delete.common") }} </ContextMenu.ContextMenuItem> </template> <template v-else> <ContextMenu.ContextMenuItem @click="createFolderAndSelect(contextNode?.id)" > {{ i18n.t("action.new.folder") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuSeparator /> <ContextMenu.ContextMenuItem @click="onRenameFolder"> {{ i18n.t("action.rename") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuItem @click="onDeleteFolder"> {{ i18n.t("action.delete.common") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuSeparator /> <ContextMenu.ContextMenuItem @click="onSetCustomIcon"> {{ i18n.t("action.setCustomIcon") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuItem v-if="contextNode?.icon" @click="onRemoveCustomIcon" > {{ i18n.t("action.removeCustomIcon") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuSeparator /> <ContextMenu.ContextMenuSub> <ContextMenu.ContextMenuSubTrigger> {{ i18n.t("action.defaultLanguage") }} </ContextMenu.ContextMenuSubTrigger> <ContextMenu.ContextMenuSubContent> <div class="scrollbar max-h-[250px] min-h-0 overflow-y-auto"> <ContextMenu.ContextMenuCheckboxItem v-for="language in languages" :key="language.value" :ref=" (el) => scrollToSelectedLanguage( el, contextNodeDefaultLanguage === language.value, ) " :checked="contextNodeDefaultLanguage === language.value" @click="onSelectLanguage(language.value)" > {{ language.name }} </ContextMenu.ContextMenuCheckboxItem> </div> </ContextMenu.ContextMenuSubContent> </ContextMenu.ContextMenuSub> </template> </ContextMenu.ContextMenuContent> </ContextMenu.ContextMenu> </div> </template> ================================================ FILE: src/renderer/components/sidebar/folders/custom-icons/CustomIcons.vue ================================================ <script setup lang="ts"> import UiInput from '~/renderer/components/ui/input/Input.vue' import { useFolders } from '~/renderer/composables' import { icons, iconsSet } from './icons' interface Props { nodeId: number } const props = defineProps<Props>() const { updateFolder, getFolders } = useFolders() const search = ref('') const containerRef = useTemplateRef('containerRef') const iconsBySearch = computed(() => { if (search.value === '') { return icons } return icons.filter(i => i.name?.includes(search.value.toLowerCase())) }) const selectedIndex = ref(-1) function onKeydown(e: KeyboardEvent) { const len = iconsBySearch.value.length if (e.key === 'ArrowDown') { e.preventDefault() if (selectedIndex.value + 1 < len) { selectedIndex.value += 1 } } else if (e.key === 'ArrowUp') { e.preventDefault() if (selectedIndex.value - 1 >= 0) { selectedIndex.value -= 1 } } else if (e.key === 'Enter') { e.preventDefault() onSet(iconsBySearch.value[selectedIndex.value].name!) } } async function onSet(name: string) { if (!props.nodeId) return await updateFolder(props.nodeId, { icon: name, }) await getFolders() containerRef.value?.dispatchEvent( new KeyboardEvent('keydown', { key: 'Enter', bubbles: true }), ) } watch( () => search.value, () => { selectedIndex.value = -1 }, ) watch( () => iconsBySearch.value, () => { if (selectedIndex.value >= iconsBySearch.value.length) { selectedIndex.value = -1 } }, { immediate: true }, ) watch(selectedIndex, () => { if (selectedIndex.value >= 0) { const el = document.getElementById(`icon-${selectedIndex.value}`) el?.scrollIntoView({ behavior: 'auto', block: 'nearest', }) } }) </script> <template> <div ref="containerRef" class="space-y-5" > <div> <UiInput v-model="search" placeholder="Search..." @keydown="onKeydown" /> </div> <div class="scrollbar max-h-[200px] overflow-y-auto"> <div class="grid auto-rows-[36px] grid-cols-8 gap-2"> <div v-for="(icon, index) in iconsBySearch" :id="`icon-${index}`" :key="icon.name" class="user-select-none flex items-center justify-center rounded-md" :class="index === selectedIndex ? 'bg-muted' : 'hover:bg-muted'" @click="onSet(icon.name!)" > <span class="*:size-5" v-html="iconsSet[icon.name!]" /> </div> </div> </div> </div> </template> ================================================ FILE: src/renderer/components/sidebar/folders/custom-icons/icons.ts ================================================ const files = import.meta.glob('@/assets/svg/icons/**.svg', { as: 'raw', eager: true, }) const re = /\/([^/]+)\.svg$/ const iconsSet: Record<string, string> = {} const icons = Object.entries(files).map(([k, v]) => { const name = k.match(re)?.[1] if (name) { iconsSet[name] = v as unknown as string } return { name, source: v, } }) export { icons, iconsSet } ================================================ FILE: src/renderer/components/sidebar/folders/types/index.ts ================================================ import type { FoldersItem } from '~/main/api/dto/folders' export type Position = 'after' | 'before' | 'center' export interface Node extends FoldersItem { children: Node[] } export interface Store { dragNode?: Node dragNodes?: Node[] dragEnterNode?: Node } ================================================ FILE: src/renderer/components/sidebar/library/Item.vue ================================================ <script setup lang="ts"> import type { SnippetsQuery } from '~/renderer/services/api/generated' import { useApp, useFolders, useSnippets } from '@/composables' import { LibraryFilter } from '@/composables/types' import { onClickOutside } from '@vueuse/core' const props = defineProps<Props>() interface Props { id: (typeof LibraryFilter)[keyof typeof LibraryFilter] name: string icon: Component } const { state } = useApp() const { clearFolderSelection } = useFolders() const { getSnippets, selectFirstSnippet, clearSearch, isRestoreStateBlocked } = useSnippets() const isFocused = ref(false) const itemRef = ref<HTMLElement>() const isSelected = computed(() => state.libraryFilter === props.id) async function onItemClick( id: (typeof LibraryFilter)[keyof typeof LibraryFilter], ) { isFocused.value = true isRestoreStateBlocked.value = true clearSearch() state.libraryFilter = id clearFolderSelection() state.tagId = undefined const query: SnippetsQuery = {} if (id === LibraryFilter.Favorites) { query.isFavorites = 1 } else if (id === LibraryFilter.Trash) { query.isDeleted = 1 } else if (id === LibraryFilter.All) { query.isDeleted = 0 } else if (id === LibraryFilter.Inbox) { query.isInbox = 1 } await getSnippets(query) selectFirstSnippet() } onClickOutside(itemRef, () => { isFocused.value = false }) </script> <template> <div ref="itemRef" data-sidebar-item :data-selected="isSelected ? 'true' : undefined" :data-focused="isFocused ? 'true' : undefined" class="data-[selected=true]:bg-accent data-[focused=true]:bg-primary! data-[focused=true]:text-primary-foreground rounded-md" :class="{ 'hover:bg-accent-hover': !isSelected && !isFocused }" @click="onItemClick(id)" > <div class="ml-5.5 flex items-center"> <component :is="icon" class="mr-0.5 h-4 w-4" /> <div class="ml-1 select-none"> {{ name }} </div> </div> </div> </template> ================================================ FILE: src/renderer/components/sidebar/library/Library.vue ================================================ <script setup lang="ts"> import type { Node } from '@/components/sidebar/folders/types' import Tree from '@/components/sidebar/folders/Tree.vue' import LibraryItem from '@/components/sidebar/library/Item.vue' import * as ContextMenu from '@/components/ui/shadcn/context-menu' import * as Resizable from '@/components/ui/shadcn/resizable' import { useApp, useFolders, useSnippets } from '@/composables' import { LibraryFilter } from '@/composables/types' import { scrollToSnippetIndex } from '@/composables/useSnippetScroller' import { i18n, store } from '@/electron' import { scrollToElement } from '@/utils' import { Archive, Inbox, Plus, Star, Trash } from 'lucide-vue-next' import { APP_DEFAULTS } from '~/main/store/constants' const { state, isAppLoading, isCodeSpaceInitialized } = useApp() const { getSnippets, selectFirstSnippet, emptyTrash, isRestoreStateBlocked, clearSearch, displayedSnippets, } = useSnippets() const { getFolders, folders, selectFolder, createFolderAndSelect, updateFolder, selectedFolderIds, } = useFolders() const MIN_TAGS_PANEL_SIZE = 12 function normalizeTagsListHeight(value: number | undefined) { if (typeof value !== 'number' || Number.isNaN(value)) { return APP_DEFAULTS.sizes.tagsList } return Math.max( MIN_TAGS_PANEL_SIZE, Math.min(100 - MIN_TAGS_PANEL_SIZE, value), ) } const tagsListHeight = normalizeTagsListHeight( store.app.get('sizes.tagsListHeight') as number | undefined, ) const libraryItems = [ { id: LibraryFilter.Inbox, name: i18n.t('sidebar.inbox'), icon: Inbox }, { id: LibraryFilter.Favorites, name: i18n.t('sidebar.favorites'), icon: Star, }, { id: LibraryFilter.All, name: i18n.t('sidebar.allSnippets'), icon: Archive }, { id: LibraryFilter.Trash, name: i18n.t('sidebar.trash'), icon: Trash }, ] async function initGetFolders() { await getFolders() nextTick(() => { scrollToElement(`[id="${state.folderId}"]`) }) } async function initGetSnippets() { await getSnippets() nextTick(() => { const index = displayedSnippets.value?.findIndex(s => s.id === state.snippetId) ?? -1 if (index >= 0) { scrollToSnippetIndex(index) } }) } async function initApp() { if (isCodeSpaceInitialized.value) { isAppLoading.value = false return } isAppLoading.value = true const results = await Promise.allSettled([ initGetFolders(), initGetSnippets(), ]) results.forEach((result) => { if (result.status === 'rejected') { console.error('App init error:', result.reason) } }) isCodeSpaceInitialized.value = results.every( result => result.status === 'fulfilled', ) isAppLoading.value = false } void initApp() async function onFolderClick({ id, event, }: { id: number event?: MouseEvent }) { if (event?.shiftKey) { await selectFolder(id, { mode: 'range', ensureVisibility: false }) return } if (event && (event.metaKey || event.ctrlKey)) { await selectFolder(id, { mode: 'toggle', ensureVisibility: false }) return } if (state.folderId !== id || selectedFolderIds.value.length > 1) { isRestoreStateBlocked.value = true clearSearch() await selectFolder(id) await getSnippets({ folderId: id }) selectFirstSnippet() } } async function onFolderToggle(node: Node) { try { const { id, isOpen } = node updateFolder(id, { isOpen: !isOpen ? 1 : 0 }) } catch (error) { console.error('Folder update error:', error) } } async function onFolderDrag({ nodes, target, position, }: { nodes: Node[] target: Node position: 'before' | 'after' | 'center' }) { try { // Фильтруем узлы, исключая целевой, чтобы избежать перемещения папки в себя const movableNodes = nodes.filter(node => node.id !== target.id) if (!movableNodes.length) { return } if (position === 'center') { // Перемещение внутрь целевой папки const destinationParentId = Number(target.id) let orderIndex = target.children?.length || 0 for (const node of movableNodes) { await updateFolder(node.id, { parentId: destinationParentId, orderIndex, }) orderIndex += 1 } return } // Перемещение до или после целевой папки for (const node of movableNodes) { const isDraggingUp = node.orderIndex > target.orderIndex const newParentId: number | null = target.parentId || null let newOrderIndex: number if (node.parentId === target.parentId) { // Если перемещаем внутри одного списка, корректируем по направлению и позиции if (position === 'after') { newOrderIndex = isDraggingUp ? target.orderIndex + 1 : target.orderIndex } else { newOrderIndex = isDraggingUp ? target.orderIndex : Math.max(target.orderIndex - 1, 0) } } else { // Если перемещение в другой родительский элемент newOrderIndex = position === 'after' ? target.orderIndex + 1 : target.orderIndex } await updateFolder(node.id, { parentId: newParentId, orderIndex: newOrderIndex, }) } } catch (error) { console.error('Folder update error:', error) } } function onResizeTagList(val: number[]) { store.app.set('sizes.tagsListHeight', normalizeTagsListHeight(val[1])) } </script> <template> <div class="flex h-full min-h-0 flex-col"> <div class="shrink-0 overflow-hidden" data-sidebar-library > <ContextMenu.ContextMenu> <ContextMenu.ContextMenuTrigger> <div class="px-1"> <LibraryItem v-for="i in libraryItems" :id="i.id" :key="i.name" :name="i.name" :icon="i.icon" /> </div> </ContextMenu.ContextMenuTrigger> <ContextMenu.ContextMenuContent> <ContextMenu.ContextMenuItem @click="emptyTrash"> {{ i18n.t("action.delete.trash") }} </ContextMenu.ContextMenuItem> </ContextMenu.ContextMenuContent> </ContextMenu.ContextMenu> </div> <Resizable.ResizablePanelGroup id="1" direction="vertical" class="min-h-0 flex-1" @layout="onResizeTagList" > <Resizable.ResizablePanel> <div class="flex h-full min-h-0 flex-col"> <div class="mt-1 flex items-center justify-between py-1 pl-1 select-none" > <UiText as="div" variant="caption" weight="bold" uppercase > {{ i18n.t("sidebar.folders") }} </UiText> <UiActionButton :tooltip="i18n.t('action.new.folder')" @click="createFolderAndSelect()" > <Plus class="h-4 w-4" /> </UiActionButton> </div> <div class="min-h-0 flex-1"> <Tree v-if="folders?.length" v-model="folders" class="h-full px-0.5 pb-1" @click-node="onFolderClick" @toggle-node="onFolderToggle" @drag-node="onFolderDrag" /> <UiEmptyPlaceholder v-else :text="i18n.t('placeholder.emptyFoldersList')" /> </div> </div> </Resizable.ResizablePanel> <Resizable.ResizableHandle /> <Resizable.ResizablePanel :min-size="MIN_TAGS_PANEL_SIZE" :default-size="tagsListHeight" > <div class="flex h-full min-h-0 flex-col"> <div class="flex items-center justify-between py-1 pl-1 select-none"> <UiText as="div" variant="caption" weight="bold" uppercase > {{ i18n.t("sidebar.tags") }} </UiText> </div> <div class="min-h-0 flex-1"> <SidebarTags class="h-full px-1 pb-1" /> </div> </div> </Resizable.ResizablePanel> </Resizable.ResizablePanelGroup> </div> </template> ================================================ FILE: src/renderer/components/sidebar/tags/Item.vue ================================================ <script setup lang="ts"> import { useApp } from '@/composables' import { onClickOutside } from '@vueuse/core' import { Tag } from 'lucide-vue-next' interface Props { id: number name: string } const props = defineProps<Props>() const { highlightedTagId, state } = useApp() const tagRef = useTemplateRef('tagRef') const isFocused = ref(false) const isSelected = computed(() => state.tagId === props.id) const isHighlighted = computed(() => highlightedTagId.value === props.id) function onClickItem() { highlightedTagId.value = undefined isFocused.value = true } onClickOutside(tagRef, () => { isFocused.value = false }) </script> <template> <div ref="tagRef" :data-selected="isSelected ? 'true' : undefined" :data-focused="isFocused ? 'true' : undefined" :data-highlighted="isHighlighted ? 'true' : undefined" class="data-[selected=true]:bg-accent data-[focused=true]:bg-primary! data-[focused=true]:text-primary-foreground data-[highlighted=true]:outline-primary flex items-center gap-2 rounded-md px-6 select-none data-[highlighted=true]:bg-transparent! data-[highlighted=true]:outline-2 data-[highlighted=true]:-outline-offset-2" :class="{ 'hover:bg-accent-hover': !isSelected && !isFocused }" @click="onClickItem" > <Tag class="h-3 w-3 shrink-0" /> <span class="truncate">{{ name }}</span> </div> </template> ================================================ FILE: src/renderer/components/sidebar/tags/Tags.vue ================================================ <script setup lang="ts"> import * as ContextMenu from '@/components/ui/shadcn/context-menu' import { useApp, useDialog, useFolders, useSnippets, useTags, } from '@/composables' import { i18n } from '@/electron' const { tags, getTags, deleteTag } = useTags() const { highlightedTagId, state } = useApp() const { getSnippets, selectFirstSnippet, clearSnippets, clearSearch, isRestoreStateBlocked, } = useSnippets() const { clearFolderSelection } = useFolders() getTags() const idToDelete = ref(0) async function onTagClick(tagId: number) { state.tagId = tagId clearFolderSelection() state.libraryFilter = undefined isRestoreStateBlocked.value = true clearSearch() await getSnippets({ tagId }) selectFirstSnippet() } function onClickContextMenu(tagId: number) { highlightedTagId.value = tagId idToDelete.value = tagId } async function onDelete() { const { confirm } = useDialog() const name = tags.value.find( tag => tag.id === highlightedTagId.value, )?.name const isConfirmed = await confirm({ title: i18n.t('messages:confirm.delete', { name }), content: i18n.t('messages:warning.deleteTag'), }) if (isConfirmed && idToDelete.value) { await deleteTag(idToDelete.value) if (state.tagId === idToDelete.value) { state.tagId = undefined clearSnippets() } else if (state.tagId) { await getSnippets({ tagId: state.tagId }) } idToDelete.value = 0 } } function onUpdateContextMenu(bool: boolean) { if (!bool) { highlightedTagId.value = undefined } } </script> <template> <div v-if="tags.length" data-sidebar-tags class="h-full min-h-0" > <div class="scrollbar h-full min-h-0 overflow-x-hidden overflow-y-auto"> <ContextMenu.ContextMenu @update:open="onUpdateContextMenu"> <ContextMenu.ContextMenuTrigger> <SidebarTagsItem v-for="tag in tags" :id="tag.id" :key="tag.id" :name="tag.name" @click="onTagClick(tag.id)" @contextmenu="onClickContextMenu(tag.id)" /> </ContextMenu.ContextMenuTrigger> <ContextMenu.ContextMenuContent> <ContextMenu.ContextMenuItem @click="onDelete"> {{ i18n.t("action.delete.common") }} </ContextMenu.ContextMenuItem> </ContextMenu.ContextMenuContent> </ContextMenu.ContextMenu> </div> </div> <UiEmptyPlaceholder v-else :text="i18n.t('placeholder.emptyTagList')" /> </template> ================================================ FILE: src/renderer/components/snippet/Header.vue ================================================ <script setup lang="ts"> import { Button } from '@/components/ui/shadcn/button' import { useApp, useSnippets } from '@/composables' import { i18n, ipc } from '@/electron' import { Plus, Search, X } from 'lucide-vue-next' const { isSearch, searchQuery, createSnippetAndSelect, clearSearch, search, searchSelectedIndex, selectSearchSnippet, displayedSnippets, } = useSnippets() const { isFocusedSearch } = useApp() ipc.on('main-menu:find', () => { isFocusedSearch.value = true }) watch(searchQuery, (v) => { if (v) { search() } else { clearSearch(true) } }) function onKeydown(event: KeyboardEvent) { if (event.key === 'ArrowDown') { event.preventDefault() const nextIndex = Math.min( searchSelectedIndex.value + 1, (displayedSnippets.value?.length || 0) - 1, ) selectSearchSnippet(nextIndex) } else if (event.key === 'ArrowUp') { event.preventDefault() const prevIndex = Math.max(searchSelectedIndex.value - 1, 0) selectSearchSnippet(prevIndex) } if (event.key === 'Escape') { event.preventDefault() clearSearch(true) } } </script> <template> <div class="border-border mt-[var(--content-top-offset)] mb-2 border-b pb-1"> <div class="flex items-center px-1"> <Search class="text-muted-foreground ml-1 h-4 w-4" /> <div class="flex-grow"> <UiInput v-model="searchQuery" :placeholder="i18n.t('placeholder.search')" variant="ghost" :focus="isFocusedSearch" @blur="isFocusedSearch = false" @keydown="onKeydown" /> </div> <Button v-if="searchQuery" variant="ghost" @click="clearSearch(true)" > <X class="h-4 w-4" /> </Button> <UiActionButton v-if="!isSearch" :tooltip="i18n.t('action.new.snippet')" @click="createSnippetAndSelect" > <Plus class="h-4 w-4" /> </UiActionButton> </div> </div> </template> ================================================ FILE: src/renderer/components/snippet/Item.vue ================================================ <script setup lang="ts"> import type { SnippetsResponse } from '@/services/api/generated' import * as ContextMenu from '@/components/ui/shadcn/context-menu' import { useApp, useDialog, useSnippets } from '@/composables' import { LibraryFilter } from '@/composables/types' import { i18n } from '@/electron' import { onClickOutside, useClipboard } from '@vueuse/core' import { format } from 'date-fns' interface Props { snippet: SnippetsResponse[0] } const props = defineProps<Props>() const { highlightedSnippetIds, highlightedFolderIds, isFocusedSnippetName, focusedSnippetId, state, } = useApp() const { selectSnippet, selectFirstSnippet, duplicateSnippet, selectedSnippetIds, updateSnippet, updateSnippets, deleteSnippet, deleteSnippets, displayedSnippets, } = useSnippets() const { confirm } = useDialog() const { copy } = useClipboard() const snippetRef = ref<HTMLDivElement>() const isSelected = computed(() => state.snippetId === props.snippet.id) const isInMultiSelection = computed( () => selectedSnippetIds.value.length > 1 && selectedSnippetIds.value.includes(props.snippet.id), ) const isHighlighted = computed(() => highlightedSnippetIds.value.has(props.snippet.id), ) const isFocused = computed(() => focusedSnippetId.value === props.snippet.id) const isDuplicateDisabled = computed( () => highlightedSnippetIds.value.size > 1, ) const isFavoritesLibrarySelected = computed( () => state.libraryFilter === LibraryFilter.Favorites, ) const isTrashLibrarySelectd = computed( () => state.libraryFilter === LibraryFilter.Trash, ) const folderName = computed(() => { if (props.snippet.folder) { return props.snippet.folder.name } if (props.snippet.isDeleted) { return i18n.t('sidebar.trash') } return i18n.t('sidebar.inbox') }) function onSnippetClick(id: number, event: MouseEvent) { selectSnippet(id, event.shiftKey) focusedSnippetId.value = id } function onClickContextMenu() { highlightedFolderIds.value.clear() highlightedSnippetIds.value.clear() highlightedSnippetIds.value.add(props.snippet.id) if (selectedSnippetIds.value.length > 1) { selectedSnippetIds.value.forEach(id => highlightedSnippetIds.value.add(id), ) } } async function onAddFavorites() { const isFavorites = isFavoritesLibrarySelected.value ? 0 : 1 if (selectedSnippetIds.value.length > 1) { const snippetsData = selectedSnippetIds.value?.map(() => ({ isFavorites })) await updateSnippets(selectedSnippetIds.value, snippetsData) } else { await updateSnippet(props.snippet.id, { isFavorites }) } if (isFavoritesLibrarySelected.value) { if ( selectedSnippetIds.value.length > 1 || state.snippetId === props.snippet.id ) { selectFirstSnippet() } } } async function onDelete() { if (selectedSnippetIds.value.length > 1) { const isAllSoftDeleted = displayedSnippets.value?.every(s => s.isDeleted) if (isAllSoftDeleted) { const isConfirmed = await confirm({ title: i18n.t('messages:confirm.deleteConfirmMultipleSnippets', { count: selectedSnippetIds.value.length, }), content: i18n.t('messages:warning.noUndo'), }) if (isConfirmed) { await deleteSnippets(selectedSnippetIds.value) } } else { // Мягкое удаление const snippetsData = selectedSnippetIds.value?.map(() => ({ folderId: null, isDeleted: 1, })) await updateSnippets(selectedSnippetIds.value, snippetsData) } } else if (props.snippet.isDeleted) { const isConfirmed = await confirm({ title: i18n.t('messages:confirm.deletePermanently', { name: props.snippet.name, }), content: i18n.t('messages:warning.noUndo'), }) if (isConfirmed) { await deleteSnippet(props.snippet.id) } } else { // Мягкое удаление await updateSnippet(props.snippet.id, { folderId: null, isDeleted: 1, }) } if ( selectedSnippetIds.value.length > 1 || state.snippetId === props.snippet.id ) { selectFirstSnippet() } } async function onRestore() { if (selectedSnippetIds.value.length > 1) { const snippetsData = selectedSnippetIds.value?.map(() => ({ folderId: null, isDeleted: 0, })) await updateSnippets(selectedSnippetIds.value, snippetsData) } else { await updateSnippet(props.snippet.id, { folderId: null, isDeleted: 0, }) } } async function onDuplicate() { await duplicateSnippet(props.snippet.id) selectFirstSnippet() isFocusedSnippetName.value = true } function onCopySnippetLink() { // copy(`masscode://folder/${state.folderId}/snippet/${props.snippet.id}`) copy( `masscode://goto?folderId=${state.folderId}&snippetId=${props.snippet.id}`, ) } function onDragStart(event: DragEvent) { const ids = selectedSnippetIds.value.length > 1 ? selectedSnippetIds.value : [props.snippet.id] event.dataTransfer?.setData('snippetIds', JSON.stringify(ids)) const el = document.createElement('div') if (selectedSnippetIds.value.length > 1) { el.className = 'fixed left-[-100%] text-foreground truncate max-w-[200px] flex items-center' el.id = 'ghost' el.innerHTML = ` <span class="rounded-full bg-primary text-white px-2 py-0.5 text-xs ml-3"> ${selectedSnippetIds.value.length} </span> ` } else { el.className = 'fixed left-[-100%] text-foreground truncate max-w-[200px]' el.id = 'ghost' el.innerHTML = props.snippet.name } document.body.appendChild(el) event.dataTransfer?.setDragImage(el, 0, 0) setTimeout(() => el.remove(), 0) } onClickOutside(snippetRef, () => { focusedSnippetId.value = undefined highlightedSnippetIds.value.clear() }) </script> <template> <div ref="snippetRef" data-snippet-item class="border-border relative border-b px-1 focus-visible:outline-none" :class="{ 'is-selected': isSelected, 'is-multi-selected': isInMultiSelection, 'is-focused': isFocused, 'is-highlighted': isHighlighted, }" draggable="true" @click="(event) => onSnippetClick(snippet.id, event)" @contextmenu="onClickContextMenu" @dragstart.stop="onDragStart" > <ContextMenu.ContextMenu> <ContextMenu.ContextMenuTrigger> <div class="flex flex-col p-2 select-none"> <div class="mb-2 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap" > {{ snippet.name || i18n.t("snippet.untitled") }} </div> <UiText as="div" variant="xs" muted class="meta flex justify-between" > <div> {{ folderName }} </div> <div> {{ format(new Date(snippet.createdAt), "dd.MM.yyyy") }} </div> </UiText> </div> </ContextMenu.ContextMenuTrigger> <ContextMenu.ContextMenuContent> <template v-if="!isTrashLibrarySelectd"> <ContextMenu.ContextMenuItem @click="onAddFavorites"> {{ isFavoritesLibrarySelected ? i18n.t("action.remove.fromFavorites") : i18n.t("action.add.toFavorites") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuSeparator /> <ContextMenu.ContextMenuItem @click="onCopySnippetLink"> {{ i18n.t("action.copy.snippetLink") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuSeparator /> <ContextMenu.ContextMenuItem :disabled="isDuplicateDisabled" @click="onDuplicate" > {{ i18n.t("action.duplicate") }} </ContextMenu.ContextMenuItem> </template> <ContextMenu.ContextMenuItem @click="onDelete"> {{ state.libraryFilter === LibraryFilter.Trash ? i18n.t("action.delete.common") : i18n.t("action.move.toTrash") }} </ContextMenu.ContextMenuItem> <ContextMenu.ContextMenuItem v-if="isTrashLibrarySelectd" @click="onRestore" > {{ i18n.t("action.restore") }} </ContextMenu.ContextMenuItem> </ContextMenu.ContextMenuContent> </ContextMenu.ContextMenu> </div> </template> <style lang="scss"> @reference "../../styles.css"; [data-snippet-item] { &:not(.is-selected):not(.is-focused):not(.is-multi-selected) { @apply hover:bg-accent-hover hover:rounded-md; } &.is-selected { @apply bg-accent text-accent-foreground z-10 rounded-md border-transparent; .meta { @apply text-accent-foreground; } } &.is-multi-selected { @apply bg-accent text-accent-foreground z-10 rounded-md border-transparent; .meta { @apply text-accent-foreground; } } &.is-focused:not(.is-multi-selected) { @apply bg-primary text-primary-foreground z-10 rounded-md border-transparent; .meta { @apply text-primary-foreground; } } &.is-highlighted { @apply outline-primary rounded-md outline-2 -outline-offset-2; &.is-focused, &.is-selected, &.is-multi-selected { @apply bg-background text-accent-foreground; .meta { @apply text-accent-foreground; } } } } </style> ================================================ FILE: src/renderer/components/snippet/List.vue ================================================ <script setup lang="ts"> import { useApp, useSnippets } from '@/composables' import { setSnippetScrollerRef } from '@/composables/useSnippetScroller' import { i18n } from '@/electron' const snippetScrollerLocalRef = ref<{ scrollToItem: (index: number) => void } | null>(null) const isInitialSnippetPositionRestored = ref(false) const SNIPPET_ITEM_SIZE = 61 const { state } = useApp() const { displayedSnippets } = useSnippets() function setScrollerRef( value: { scrollToItem: (index: number) => void } | null, ) { snippetScrollerLocalRef.value = value setSnippetScrollerRef(value) } watch( [displayedSnippets, () => state.snippetId, snippetScrollerLocalRef], ([snippets, snippetId, scroller]) => { if (isInitialSnippetPositionRestored.value) return if (!scroller || !snippets?.length || snippetId === undefined) return const index = snippets.findIndex(snippet => snippet.id === snippetId) if (index < 0) return isInitialSnippetPositionRestored.value = true nextTick(() => { requestAnimationFrame(() => { scroller.scrollToItem(index) }) }) }, { immediate: true, flush: 'post', }, ) </script> <template> <div data-snippets-list class="flex h-full flex-col" > <div> <SnippetHeader /> </div> <RecycleScroller v-if="displayedSnippets?.length" :ref="setScrollerRef" v-slot="{ item }" class="scrollbar flex-grow px-2" :items="displayedSnippets" :item-size="SNIPPET_ITEM_SIZE" key-field="id" > <SnippetItem :snippet="item" /> </RecycleScroller> <UiEmptyPlaceholder v-else :text="i18n.t('placeholder.emptySnippetsList')" /> </div> </template> ================================================ FILE: src/renderer/components/space-rail/SpaceRail.vue ================================================ <script setup lang="ts"> import * as Tooltip from '@/components/ui/shadcn/tooltip' import { useApp, useTheme } from '@/composables' import { i18n, ipc } from '@/electron' import { RouterName } from '@/router' import { getSpaceDefinitions } from '@/spaceDefinitions' import { isMac } from '@/utils' import { Settings } from 'lucide-vue-next' import { RouterLink, useRoute } from 'vue-router' import packageJson from '../../../../package.json' const { isSponsored } = useApp() const { isDark } = useTheme() const route = useRoute() function openDonatePage() { void ipc.invoke('system:open-external', 'https://masscode.io/donate/') } const spaces = computed(() => { return getSpaceDefinitions().map(space => ({ ...space, active: space.isActive(route.name), })) }) </script> <template> <nav class="flex h-full flex-col items-center px-2 pb-3" :class="isMac ? 'pt-[calc(var(--content-top-offset)+8px)]' : 'pt-3'" :aria-label="i18n.t('spaces.label')" > <div class="flex w-full flex-col gap-1"> <RouterLink v-for="space in spaces" :key="space.id" v-slot="{ navigate }" custom :to="space.to" > <Tooltip.Tooltip> <Tooltip.TooltipTrigger as-child> <button type="button" class="text-muted-foreground flex w-full cursor-default flex-col items-center gap-1 rounded-lg px-2 py-2 transition-colors" :class=" space.active ? 'bg-accent text-accent-foreground' : 'hover:bg-accent-hover' " @click="navigate" > <component :is="space.icon" class="h-4 w-4 shrink-0" /> <UiText variant="caption" weight="medium" class="leading-none select-none" > {{ space.label }} </UiText> </button> </Tooltip.TooltipTrigger> <Tooltip.TooltipContent side="right"> {{ space.tooltip }} </Tooltip.TooltipContent> </Tooltip.Tooltip> </RouterLink> </div> <div v-if="!isSponsored" class="mt-auto flex flex-1 flex-col items-center justify-end gap-2 pb-2" > <span class="cursor-pointer text-center text-[9px] leading-none font-semibold tracking-[0.14em] uppercase select-none [writing-mode:sideways-lr]" :class="isDark ? 'text-amber-300/70' : 'text-violet-500/70'" role="link" tabindex="0" @click="openDonatePage" @keydown.enter="openDonatePage" @keydown.space.prevent="openDonatePage" > {{ i18n.t("messages:special.unsponsored") }} </span> <RouterLink v-slot="{ navigate }" custom :to="{ name: RouterName.preferencesStorage }" > <UiActionButton :tooltip="i18n.t('preferences:label')" @click="navigate" > <Settings class="h-4 w-4" /> </UiActionButton> </RouterLink> <UiText as="div" variant="caption" weight="medium" class="text-muted-foreground/55 leading-none select-none" > v{{ packageJson.version }} </UiText> </div> </nav> </template> ================================================ FILE: src/renderer/components/ui/action-button/ActionButton.vue ================================================ <script setup lang="ts"> import { Button } from '@/components/ui/shadcn/button' import * as Tooltip from '@/components/ui/shadcn/tooltip' interface Props { tooltip?: string } defineProps<Props>() </script> <template> <Tooltip.Tooltip v-if="tooltip"> <Tooltip.TooltipTrigger as-child> <Button variant="icon" size="icon" v-bind="$attrs" > <slot /> </Button> </Tooltip.TooltipTrigger> <Tooltip.TooltipContent> {{ tooltip }} </Tooltip.TooltipContent> </Tooltip.Tooltip> <Button v-else variant="icon" size="icon" v-bind="$attrs" > <slot /> </Button> </template> ================================================ FILE: src/renderer/components/ui/color-picker/ColorPicker.vue ================================================ <script setup lang="ts"> import { cn } from '@/utils' import chroma from 'chroma-js' import { computed, nextTick, onMounted, ref, watch } from 'vue' interface Props { class?: string disabled?: boolean showInput?: boolean } const props = withDefaults(defineProps<Props>(), { showInput: true, }) const model = defineModel<string>({ default: '#ff0000' }) const colorAreaRef = ref<HTMLElement>() const hueSliderRef = ref<HTMLElement>() const alphaSliderRef = ref<HTMLElement>() const isDraggingColor = ref(false) const isDraggingHue = ref(false) const isDraggingAlpha = ref(false) const hsv = ref({ h: 0, s: 100, v: 100 }) const alpha = ref(1) const colorPosition = ref({ x: 100, y: 0 }) const huePosition = ref(0) const alphaPosition = ref(100) const isUpdatingFromModel = ref(false) const currentChroma = computed(() => { try { return chroma .hsv(hsv.value.h, hsv.value.s / 100, hsv.value.v / 100) .alpha(alpha.value) } catch { return chroma('#000000') } }) const currentRgb = computed(() => { const [r, g, b] = currentChroma.value.rgb() return { r: Math.round(r), g: Math.round(g), b: Math.round(b) } }) const currentHex = computed(() => { const chromaColor = currentChroma.value return chromaColor.alpha() < 1 ? chromaColor.hex('rgba') : chromaColor.hex() }) const pureHueColor = computed(() => { try { return chroma.hsv(hsv.value.h, 1, 1).hex() } catch { return '#ff0000' } }) function handleColorAreaMouseDown(event: MouseEvent) { if (props.disabled) return event.preventDefault() isDraggingColor.value = true updateColorFromPosition(event) document.addEventListener('mousemove', handleColorAreaMouseMove) document.addEventListener('mouseup', handleColorAreaMouseUp) } function handleColorAreaMouseMove(event: MouseEvent) { if (!isDraggingColor.value) return event.preventDefault() updateColorFromPosition(event) } function handleColorAreaMouseUp() { isDraggingColor.value = false document.removeEventListener('mousemove', handleColorAreaMouseMove) document.removeEventListener('mouseup', handleColorAreaMouseUp) } function updateColorFromPosition(event: MouseEvent) { if (!colorAreaRef.value) return const rect = colorAreaRef.value.getBoundingClientRect() const x = Math.max(0, Math.min(rect.width, event.clientX - rect.left)) const y = Math.max(0, Math.min(rect.height, event.clientY - rect.top)) colorPosition.value = { x, y } const newS = (x / rect.width) * 100 const newV = 100 - (y / rect.height) * 100 hsv.value.s = Math.round(newS) hsv.value.v = Math.round(newV) } function handleHueMouseDown(event: MouseEvent) { if (props.disabled) return event.preventDefault() isDraggingHue.value = true updateHueFromPosition(event) document.addEventListener('mousemove', handleHueMouseMove) document.addEventListener('mouseup', handleHueMouseUp) } function handleHueMouseMove(event: MouseEvent) { if (!isDraggingHue.value) return event.preventDefault() updateHueFromPosition(event) } function handleHueMouseUp() { isDraggingHue.value = false document.removeEventListener('mousemove', handleHueMouseMove) document.removeEventListener('mouseup', handleHueMouseUp) } function updateHueFromPosition(event: MouseEvent) { if (!hueSliderRef.value) return const rect = hueSliderRef.value.getBoundingClientRect() const x = Math.max(0, Math.min(rect.width, event.clientX - rect.left)) huePosition.value = x hsv.value.h = Math.min(359.99, (x / rect.width) * 360) } function handleAlphaMouseDown(event: MouseEvent) { if (props.disabled) return event.preventDefault() isDraggingAlpha.value = true updateAlphaFromPosition(event) document.addEventListener('mousemove', handleAlphaMouseMove) document.addEventListener('mouseup', handleAlphaMouseUp) } function handleAlphaMouseMove(event: MouseEvent) { if (!isDraggingAlpha.value) return event.preventDefault() updateAlphaFromPosition(event) } function handleAlphaMouseUp() { isDraggingAlpha.value = false document.removeEventListener('mousemove', handleAlphaMouseMove) document.removeEventListener('mouseup', handleAlphaMouseUp) } function updateAlphaFromPosition(event: MouseEvent) { if (!alphaSliderRef.value) return const rect = alphaSliderRef.value.getBoundingClientRect() const x = Math.max(0, Math.min(rect.width, event.clientX - rect.left)) alphaPosition.value = x alpha.value = x / rect.width } function updatePositions() { if (!colorAreaRef.value || !hueSliderRef.value || !alphaSliderRef.value) return const colorRect = colorAreaRef.value.getBoundingClientRect() const hueRect = hueSliderRef.value.getBoundingClientRect() const alphaRect = alphaSliderRef.value.getBoundingClientRect() colorPosition.value = { x: (hsv.value.s / 100) * colorRect.width, y: ((100 - hsv.value.v) / 100) * colorRect.height, } huePosition.value = (hsv.value.h / 360) * hueRect.width alphaPosition.value = alpha.value * alphaRect.width } function initializeFromModel() { isUpdatingFromModel.value = true try { const chromaColor = chroma(model.value) const [h, s, v] = chromaColor.hsv() hsv.value = { h: Number.isNaN(h) ? 0 : h, s: Math.round(s * 100), v: Math.round(v * 100), } alpha.value = chromaColor.alpha() nextTick(() => { updatePositions() nextTick(() => { isUpdatingFromModel.value = false }) }) } catch { hsv.value = { h: 0, s: 0, v: 0 } alpha.value = 1 isUpdatingFromModel.value = false } } watch( () => model.value, () => { if (!isUpdatingFromModel.value) { initializeFromModel() } }, { immediate: true }, ) watch([currentHex, alpha], () => { if (!isUpdatingFromModel.value) { const newHex = currentHex.value try { const currentColor = chroma(model.value) const newColor = chroma(newHex) const [r1, g1, b1] = currentColor.rgb() const [r2, g2, b2] = newColor.rgb() const a1 = currentColor.alpha() const a2 = newColor.alpha() const colorChanged = Math.abs(r1 - r2) > 1 || Math.abs(g1 - g2) > 1 || Math.abs(b1 - b2) > 1 || Math.abs(a1 - a2) > 0.01 if (colorChanged) { isUpdatingFromModel.value = true model.value = newHex nextTick(() => { isUpdatingFromModel.value = false }) } } catch { isUpdatingFromModel.value = true model.value = newHex nextTick(() => { isUpdatingFromModel.value = false }) } } }) watch( [hsv, alpha], () => { if (!isUpdatingFromModel.value) { nextTick(() => { updatePositions() }) } }, { deep: true }, ) onMounted(() => { initializeFromModel() }) </script> <template> <div :class="cn('space-y-2', props.class)"> <div class="relative"> <div ref="colorAreaRef" class="border-border relative h-48 w-full cursor-crosshair overflow-hidden rounded-md border select-none" :class="{ 'cursor-not-allowed opacity-50': disabled }" :style="{ backgroundColor: pureHueColor }" @mousedown="handleColorAreaMouseDown" > <div class="absolute inset-0 bg-gradient-to-r from-white to-transparent" /> <div class="absolute inset-0 bg-gradient-to-b from-transparent to-black" /> </div> <div class="pointer-events-none absolute z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 transform rounded-full border-2 border-white shadow-md" :style="{ left: `${colorPosition.x}px`, top: `${colorPosition.y}px`, backgroundColor: currentHex, }" /> </div> <div class="relative py-1"> <div ref="hueSliderRef" class="border-border relative h-4 w-full cursor-pointer rounded-md border select-none" :class="{ 'cursor-not-allowed opacity-50': disabled }" style=" background: linear-gradient( to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100% ); " @mousedown="handleHueMouseDown" /> <div class="pointer-events-none absolute top-1/2 z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 transform rounded-full border-2 border-white shadow-md" :style="{ left: `${huePosition}px`, backgroundColor: pureHueColor, }" /> </div> <div class="relative py-1"> <div class="absolute inset-x-0 top-1 bottom-1 rounded-md" style=" background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%); background-size: 8px 8px; background-position: 0 0, 0 4px, 4px -4px, -4px 0px; " /> <div ref="alphaSliderRef" class="border-border relative h-4 w-full cursor-pointer rounded-md border select-none" :class="{ 'cursor-not-allowed opacity-50': disabled }" :style="{ background: `linear-gradient(to right, transparent 0%, ${chroma.rgb(currentRgb.r, currentRgb.g, currentRgb.b).hex()} 100%)`, }" @mousedown="handleAlphaMouseDown" /> <div class="pointer-events-none absolute top-1/2 z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 transform rounded-full border-2 border-white shadow-md" :style="{ left: `${alphaPosition}px`, backgroundColor: currentHex, }" /> </div> <div v-if="showInput" class="flex items-center gap-3" > <div class="border-border relative h-[27px] w-[27px] shrink-0 overflow-hidden rounded-md border" > <div class="absolute inset-0" style=" background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%); background-size: 4px 4px; background-position: 0 0, 0 2px, 2px -2px, -2px 0px; " /> <div class="absolute inset-0" :style="{ backgroundColor: currentHex }" /> </div> <div class="w-full"> <UiInput v-model="model" type="text" :disabled="disabled" placeholder="#000000" /> </div> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/empty/Placeholder.vue ================================================ <script setup lang="ts"> interface Props { text: string } defineProps<Props>() </script> <template> <div class="text-muted-foreground flex h-full items-center justify-center text-center" > {{ text }} </div> </template> ================================================ FILE: src/renderer/components/ui/folder-icon/FolderIcon.vue ================================================ <script setup lang="ts"> import type { Variants } from './variants' import { cn } from '@/utils' import { iconsSet } from './icons' import { variants } from './variants' interface Props { name: string size?: Variants['size'] class?: string } const props = defineProps<Props>() </script> <template> <div :class="cn(variants({ size }), props.class)" :data-icon-name="name" v-html="iconsSet[name]" /> </template> ================================================ FILE: src/renderer/components/ui/folder-icon/icons.ts ================================================ const files = import.meta.glob('@/assets/svg/icons/**.svg', { as: 'raw', eager: true, }) const re = /\/([^/]+)\.svg$/ const iconsSet: Record<string, string> = {} const icons = Object.entries(files).map(([k, v]) => { const name = k.match(re)?.[1] if (name) { iconsSet[name] = v as string } return { name, source: v, } }) export { icons, iconsSet } ================================================ FILE: src/renderer/components/ui/folder-icon/variants.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export const variants = cva('', { variants: { size: { sm: 'w-4 h-4', md: 'w-8 h-8', }, }, defaultVariants: { size: 'sm', }, }) export type Variants = VariantProps<typeof variants> ================================================ FILE: src/renderer/components/ui/heading/Heading.vue ================================================ <script setup lang="ts"> interface Props { title: string description?: string level?: 2 | 3 } const props = withDefaults(defineProps<Props>(), { level: 2, }) const levelStyles = computed(() => { return { 'text-lg font-bold': props.level === 2, 'text-md font-bold': props.level === 3, } }) </script> <template> <div class="mb-3 not-first:mt-3"> <component :is="`h${level}`" :class="levelStyles" > {{ title }} </component> <UiText v-if="description" as="p" variant="base" muted > {{ description }} </UiText> </div> </template> ================================================ FILE: src/renderer/components/ui/input/Input.vue ================================================ <script setup lang="ts"> import type { Variants } from './variants' import { cn } from '@/utils' import { X } from 'lucide-vue-next' import { variants } from './variants' interface Props { variant?: Variants['variant'] class?: string placeholder?: string clearable?: boolean type?: 'text' | 'textarea' | 'number' focus?: boolean select?: boolean disabled?: boolean readonly?: boolean rows?: number error?: string description?: string } defineOptions({ inheritAttrs: false, }) const props = withDefaults(defineProps<Props>(), { type: 'text', }) const attrs = useAttrs() const model = defineModel<string | number>() function clear() { model.value = '' } const inputRef = useTemplateRef('inputRef') watchEffect(() => { if (props.focus) { nextTick(() => { inputRef.value?.focus() }) } }) watchEffect(() => { if (props.select) { nextTick(() => { inputRef.value?.select() }) } }) </script> <template> <div> <div class="relative flex"> <input v-if="type !== 'textarea'" ref="inputRef" v-model="model" :class="[ cn(variants({ variant }), props.class), { 'pr-9': clearable && model }, { 'text-muted-foreground cursor-not-allowed': disabled }, { 'text-muted-foreground': readonly }, { 'border-red-500': error }, ]" :placeholder="placeholder" :type="type" v-bind="attrs" :disabled="disabled || readonly" > <textarea v-else v-model="model" class="scrollbar" :class="[ cn(variants({ variant }), props.class), { 'pr-9': clearable && model }, { 'text-muted-foreground cursor-not-allowed': disabled }, { 'text-muted-foreground': readonly }, { 'border-red-500': error }, ]" :placeholder="placeholder" :rows="rows || 3" v-bind="attrs" :disabled="disabled || readonly" /> <div v-if="clearable && model" class="border-border absolute top-1/2 right-3 -translate-y-1/2 rounded-full border p-0.5" @click="clear" > <X class="text-muted-foreground h-3 w-3" /> </div> </div> <UiText v-if="description" as="div" variant="xs" muted class="mt-1" > {{ description }} </UiText> <div v-if="error" class="text-sm text-red-500" > {{ error }} </div> </div> </template> ================================================ FILE: src/renderer/components/ui/input/variants.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export const variants = cva( 'w-full rounded-md focus:outline-none placeholder:text-muted-foreground py-0.5 px-2 border bg-[color-mix(in_oklch,var(--foreground)_2%,var(--background))] [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none', { variants: { variant: { default: 'border-border focus:border-primary', ghost: 'border-transparent focus:border-transparent !bg-transparent', }, }, defaultVariants: { variant: 'default', }, }, ) export type Variants = VariantProps<typeof variants> ================================================ FILE: src/renderer/components/ui/input-tags/InputTags.vue ================================================ <script setup lang="ts"> import type { TagItem } from './types' import { i18n } from '@/electron' import { X } from 'lucide-vue-next' interface Props { modelValue: TagItem[] placeholder?: string suggestions: TagItem[] } interface Emits { (e: 'update:modelValue', value: TagItem[]): void (e: 'createTag', value: TagItem): void (e: 'deleteTag', value: TagItem): void (e: 'addTag', value: TagItem): void } const props = withDefaults(defineProps<Props>(), { placeholder: `${i18n.t('placeholder.addTag')}...`, }) const emit = defineEmits<Emits>() const tags = ref<TagItem[]>([...props.modelValue]) const inputValue = ref('') const filteredSuggestions = ref<TagItem[]>([]) const warningTagIndex = ref<number | null>(null) const selectedSuggestionIndex = ref(-1) const isFocused = ref(false) const inputRef = ref<HTMLInputElement | null>(null) const containerRef = ref<HTMLDivElement | null>(null) const suggestionsRef = ref<HTMLDivElement | null>(null) const scrollContainerRef = ref<HTMLDivElement | null>(null) const dropdownStyle = ref({ top: '0px', left: '0px', width: '0px', }) function updateDropdownPosition() { nextTick(() => { if (containerRef.value && suggestionsRef.value) { const rect = containerRef.value.getBoundingClientRect() const availableHeight = window.innerHeight - rect.bottom - 10 // 10px - отступ снизу const maxHeight = Math.min(240, availableHeight) dropdownStyle.value = { top: `${rect.bottom}px`, left: `${rect.left}px`, width: `${rect.width}px`, } if (scrollContainerRef.value) { scrollContainerRef.value.style.maxHeight = `${maxHeight}px` } } }) } function addTag() { const value = inputValue.value.trim() if ( value && !tags.value.some(tag => tag.name.toLowerCase() === value.toLowerCase()) ) { const existingTag = props.suggestions.find( suggestion => suggestion.name.toLowerCase() === value.toLowerCase(), ) if (existingTag) { tags.value.push({ ...existingTag }) emit('addTag', { ...existingTag }) } else { const newId = Date.now() const newTag = { id: newId, name: value } tags.value.push(newTag) emit('createTag', newTag) } inputValue.value = '' filteredSuggestions.value = [] selectedSuggestionIndex.value = -1 } } function removeTag(index: number) { const tagToRemove = tags.value[index] tags.value.splice(index, 1) warningTagIndex.value = null emit('deleteTag', tagToRemove) } function removeLastTag() { if (inputValue.value === '' && tags.value.length > 0) { const lastIndex = tags.value.length - 1 if (warningTagIndex.value === lastIndex) { // Второе нажатие backspace - удаляем тег const tagToRemove = tags.value[lastIndex] tags.value.pop() warningTagIndex.value = null emit('deleteTag', tagToRemove) } else { // Первое нажатие backspace - показываем предупреждение warningTagIndex.value = lastIndex } } } function handleKeydown(e: KeyboardEvent) { if (e.key === 'Escape') { e.preventDefault() inputValue.value = '' filteredSuggestions.value = [] warningTagIndex.value = null inputRef.value?.blur() return } if (filteredSuggestions.value.length > 0) { if (e.key === 'ArrowDown') { e.preventDefault() // Переход на следующий элемент или в начало списка selectedSuggestionIndex.value = (selectedSuggestionIndex.value + 1) % filteredSuggestions.value.length ensureSelectedSuggestionVisible() } else if (e.key === 'ArrowUp') { e.preventDefault() // Переход на предыдущий элемент или в конец списка selectedSuggestionIndex.value = selectedSuggestionIndex.value <= 0 ? filteredSuggestions.value.length - 1 : selectedSuggestionIndex.value - 1 ensureSelectedSuggestionVisible() } else if (e.key === 'Enter') { e.preventDefault() if (selectedSuggestionIndex.value !== -1) { selectSuggestion( filteredSuggestions.value[selectedSuggestionIndex.value], ) } else { addTag() } warningTagIndex.value = null } } else if (e.key === 'Enter') { e.preventDefault() addTag() warningTagIndex.value = null } if (e.key === 'Backspace') { removeLastTag() } else if ( e.key !== 'ArrowDown' && e.key !== 'ArrowUp' && e.key !== 'Enter' && e.key !== 'Escape' ) { warningTagIndex.value = null } } function ensureSelectedSuggestionVisible() { nextTick(() => { const listItems = suggestionsRef.value?.querySelectorAll('li') const scrollContainer = scrollContainerRef.value if (listItems && scrollContainer && selectedSuggestionIndex.value >= 0) { const selectedItem = listItems[selectedSuggestionIndex.value] if (selectedItem) { const containerRect = scrollContainer.getBoundingClientRect() const selectedRect = selectedItem.getBoundingClientRect() if (selectedRect.top < containerRect.top) { // Элемент выше видимой области scrollContainer.scrollTop -= containerRect.top - selectedRect.top } else if (selectedRect.bottom > containerRect.bottom) { // Элемент ниже видимой области scrollContainer.scrollTop += selectedRect.bottom - containerRect.bottom } } } }) } function updateFilteredSuggestions() { if (inputValue.value) { const lowerCaseInput = inputValue.value.toLowerCase() filteredSuggestions.value = props.suggestions .filter( suggestion => !tags.value.some(tag => tag.id === suggestion.id), ) .filter(suggestion => suggestion.name.toLowerCase().includes(lowerCaseInput), ) if (filteredSuggestions.value.length > 0) { updateDropdownPosition() } } else { filteredSuggestions.value = [] } } function handleInput() { updateFilteredSuggestions() } function selectSuggestion(suggestion: TagItem) { if (!tags.value.some(tag => tag.id === suggestion.id)) { tags.value.push({ ...suggestion }) emit('addTag', { ...suggestion }) inputValue.value = '' filteredSuggestions.value = [] selectedSuggestionIndex.value = -1 } } function focusInput() { inputRef.value?.focus() isFocused.value = true if (filteredSuggestions.value.length > 0) { updateDropdownPosition() } } function handleBlur() { setTimeout(() => {}, 200) nextTick(() => { isFocused.value = false filteredSuggestions.value = [] warningTagIndex.value = null selectedSuggestionIndex.value = -1 inputValue.value = '' }) } function resetWarning() { warningTagIndex.value = null } function handleResize() { if (isFocused.value && filteredSuggestions.value.length > 0) { updateDropdownPosition() } } onMounted(() => { window.addEventListener('resize', handleResize) }) onBeforeUnmount(() => { window.removeEventListener('resize', handleResize) }) watch( () => props.modelValue, (newValue) => { tags.value = [...newValue] }, { deep: true }, ) watch(filteredSuggestions, () => { selectedSuggestionIndex.value = -1 }) watch(isFocused, (newValue) => { if (newValue && filteredSuggestions.value.length > 0) { updateDropdownPosition() } }) </script> <template> <div ref="containerRef" class="relative flex flex-wrap items-center gap-1 rounded px-2 py-1" @click="focusInput" > <div v-for="(tag, index) in tags" :key="tag.id" class="bg-accent text-text flex items-center rounded-sm px-1.5 py-0.5 text-xs select-none" :class="{ 'ring-primary ring-1': warningTagIndex === index }" @click="resetWarning" > <div>{{ tag.name }}</div> <X class="hover:text-muted-foreground relative top-[1px] -mr-0.5 ml-1 h-3 w-3" @click.stop="removeTag(index)" /> </div> <input ref="inputRef" v-model="inputValue" type="text" :placeholder="tags.length ? '' : placeholder" class="w-full min-w-[120px] flex-1 bg-transparent text-xs outline-none" @keydown="handleKeydown" @input="handleInput" @focus="focusInput" @blur="handleBlur" > </div> <div v-if="isFocused && filteredSuggestions.length > 0" ref="suggestionsRef" class="bg-background border-border fixed z-50 rounded-md border shadow-lg" :style="dropdownStyle" > <div ref="scrollContainerRef" class="scrollbar max-h-[240px] overflow-x-hidden overflow-y-auto" > <ul class="w-full p-1"> <li v-for="(suggestion, index) in filteredSuggestions" :key="suggestion.id" class="cursor-pointer rounded-sm px-2 py-0.5 text-sm" :class="[ `suggestion-item-${index}`, index === selectedSuggestionIndex ? 'bg-accent text-text' : 'hover:bg-accent-hover', ]" @mousedown.prevent="selectSuggestion(suggestion)" @mouseover="selectedSuggestionIndex = index" > {{ suggestion.name }} </li> </ul> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/input-tags/types/index.ts ================================================ export interface TagItem { id: number name: string } ================================================ FILE: src/renderer/components/ui/menu/FormItem.vue ================================================ <script setup lang="ts"> import { cn } from '@/utils' interface Props { label: string class?: string } const props = defineProps<Props>() </script> <template> <div :class="cn('grid grid-cols-[200px_1fr] gap-2', props.class)"> <div class="flex min-h-9 items-start text-sm font-medium"> {{ label }} </div> <div class="space-y-2"> <slot /> <UiText v-if="$slots.description" as="div" variant="base" muted > <slot name="description" /> </UiText> <div v-if="$slots.actions"> <slot name="actions" /> </div> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/menu/FormSection.vue ================================================ <script setup lang="ts"> import { cn } from '@/utils' interface Props { label: string description?: string variant?: 'default' | 'danger' } const props = withDefaults(defineProps<Props>(), { description: undefined, variant: 'default', }) </script> <template> <div> <div class="mb-2 px-1"> <h3 class="text-muted-foreground text-xs font-semibold tracking-wide uppercase" > {{ label }} </h3> <p v-if="description" class="text-muted-foreground mt-0.5 text-xs" > {{ description }} </p> </div> <div :class=" cn( 'rounded-lg border p-5', props.variant === 'danger' ? 'border-destructive/20 bg-[color-mix(in_oklch,var(--destructive)_5%,var(--background))]' : 'border-border bg-[color-mix(in_oklch,var(--foreground)_4%,var(--background))]', ) " > <div class="divide-border/40 divide-y [&>*]:py-4 [&>*:first-child]:pt-0 [&>*:last-child]:pb-0" > <slot /> </div> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/menu/Item.vue ================================================ <script setup lang="ts"> interface Props { label: string isActive?: boolean } defineProps<Props>() </script> <template> <div class="flex items-center gap-2 rounded-md px-2 py-1" :class=" isActive ? 'bg-accent text-accent-foreground' : 'hover:bg-accent-hover' " > <div v-if="$slots.icon" class="text-muted-foreground flex h-4 w-4 shrink-0 items-center justify-center" > <slot name="icon" /> </div> <div class="truncate select-none" :class="!$slots.icon && 'ml-3.5'" > {{ label }} </div> </div> </template> ================================================ FILE: src/renderer/components/ui/shadcn/button/Button.vue ================================================ <script setup lang="ts"> import type { PrimitiveProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import type { ButtonVariants } from '.' import { cn } from '@/utils' import { Primitive } from 'reka-ui' import { buttonVariants } from '.' interface Props extends PrimitiveProps { variant?: ButtonVariants['variant'] size?: ButtonVariants['size'] class?: HTMLAttributes['class'] } const props = withDefaults(defineProps<Props>(), { as: 'button', }) </script> <template> <Primitive data-slot="button" :data-variant="variant" :as="as" :as-child="asChild" :class="cn(buttonVariants({ variant, size }), props.class)" > <slot /> </Primitive> </template> ================================================ FILE: src/renderer/components/ui/shadcn/button/index.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export { default as Button } from './Button.vue' export const buttonVariants = cva( 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-default disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\'size-\'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', { variants: { variant: { default: 'bg-primary text-primary-foreground hover:bg-primary/90', destructive: 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', outline: 'border bg-[color-mix(in_oklch,var(--foreground)_2%,var(--background))] shadow-xs hover:bg-[color-mix(in_oklch,var(--foreground)_5%,var(--background))] hover:text-accent-foreground', secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', ghost: 'hover:bg-accent-hover hover:text-accent-foreground dark:hover:bg-accent/50', icon: 'text-muted-foreground hover:bg-accent-hover hover:text-accent-foreground [&_svg:not([class*=\'size-\'])]:size-4', link: 'text-primary underline-offset-4 hover:underline', }, size: { default: 'h-7 px-3', sm: 'h-6 px-2', lg: 'h-8 px-4', icon: 'h-7 w-7 px-0', }, }, defaultVariants: { variant: 'default', size: 'default', }, }, ) export type ButtonVariants = VariantProps<typeof buttonVariants> ================================================ FILE: src/renderer/components/ui/shadcn/checkbox/Checkbox.vue ================================================ <script setup lang="ts"> import type { CheckboxRootEmits, CheckboxRootProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Check } from 'lucide-vue-next' import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps< CheckboxRootProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<CheckboxRootEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <CheckboxRoot v-slot="slotProps" data-slot="checkbox" v-bind="forwarded" :class=" cn( 'peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', props.class, ) " > <CheckboxIndicator data-slot="checkbox-indicator" class="grid place-content-center text-current transition-none" > <slot v-bind="slotProps"> <Check class="size-3.5" /> </slot> </CheckboxIndicator> </CheckboxRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/checkbox/index.ts ================================================ export { default as Checkbox } from './Checkbox.vue' ================================================ FILE: src/renderer/components/ui/shadcn/command/Command.vue ================================================ <script setup lang="ts"> import type { ListboxRootEmits, ListboxRootProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ListboxRoot, useFilter, useForwardPropsEmits } from 'reka-ui' import { reactive, ref, watch } from 'vue' import { provideCommandContext } from '.' const props = withDefaults( defineProps<ListboxRootProps & { class?: HTMLAttributes['class'] }>(), { modelValue: '', }, ) const emits = defineEmits<ListboxRootEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) const allItems = ref<Map<string, string>>(new Map()) const allGroups = ref<Map<string, Set<string>>>(new Map()) const { contains } = useFilter({ sensitivity: 'base' }) const filterState = reactive({ search: '', filtered: { /** The count of all visible items. */ count: 0, /** Map from visible item id to its search score. */ items: new Map() as Map<string, number>, /** Set of groups with at least one visible item. */ groups: new Set() as Set<string>, }, }) function filterItems() { if (!filterState.search) { filterState.filtered.count = allItems.value.size // Do nothing, each item will know to show itself because search is empty return } // Reset the groups filterState.filtered.groups = new Set() let itemCount = 0 // Check which items should be included for (const [id, value] of allItems.value) { const score = contains(value, filterState.search) filterState.filtered.items.set(id, score ? 1 : 0) if (score) itemCount++ } // Check which groups have at least 1 item shown for (const [groupId, group] of allGroups.value) { for (const itemId of group) { if (filterState.filtered.items.get(itemId)! > 0) { filterState.filtered.groups.add(groupId) break } } } filterState.filtered.count = itemCount } watch( () => filterState.search, () => { filterItems() }, ) provideCommandContext({ allItems, allGroups, filterState, }) </script> <template> <ListboxRoot data-slot="command" v-bind="forwarded" :class=" cn( 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', props.class, ) " > <slot /> </ListboxRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandDialog.vue ================================================ <script setup lang="ts"> import type { DialogRootEmits, DialogRootProps } from 'reka-ui' import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from '@/components/ui/shadcn/dialog' import { useForwardPropsEmits } from 'reka-ui' import Command from './Command.vue' const props = withDefaults( defineProps< DialogRootProps & { title?: string description?: string } >(), { title: 'Command Palette', description: 'Search for a command to run...', }, ) const emits = defineEmits<DialogRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <Dialog v-slot="slotProps" v-bind="forwarded" > <DialogContent class="overflow-hidden p-0"> <DialogHeader class="sr-only"> <DialogTitle>{{ title }}</DialogTitle> <DialogDescription>{{ description }}</DialogDescription> </DialogHeader> <Command> <slot v-bind="slotProps" /> </Command> </DialogContent> </Dialog> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandEmpty.vue ================================================ <script setup lang="ts"> import type { PrimitiveProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Primitive } from 'reka-ui' import { computed } from 'vue' import { useCommand } from '.' const props = defineProps< PrimitiveProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const { filterState } = useCommand() const isRender = computed( () => !!filterState.search && filterState.filtered.count === 0, ) </script> <template> <Primitive v-if="isRender" data-slot="command-empty" v-bind="delegatedProps" :class="cn('py-6 text-center text-sm', props.class)" > <slot /> </Primitive> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandGroup.vue ================================================ <script setup lang="ts"> import type { ListboxGroupProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ListboxGroup, ListboxGroupLabel, useId } from 'reka-ui' import { computed, onMounted, onUnmounted } from 'vue' import { provideCommandGroupContext, useCommand } from '.' const props = defineProps< ListboxGroupProps & { class?: HTMLAttributes['class'] heading?: string } >() const delegatedProps = reactiveOmit(props, 'class') const { allGroups, filterState } = useCommand() const id = useId() const isRender = computed(() => !filterState.search ? true : filterState.filtered.groups.has(id), ) provideCommandGroupContext({ id }) onMounted(() => { if (!allGroups.value.has(id)) allGroups.value.set(id, new Set()) }) onUnmounted(() => { allGroups.value.delete(id) }) </script> <template> <ListboxGroup v-bind="delegatedProps" :id="id" data-slot="command-group" :class="cn('text-foreground overflow-hidden p-1', props.class)" :hidden="isRender ? undefined : true" > <ListboxGroupLabel v-if="heading" data-slot="command-group-heading" class="text-muted-foreground px-2 py-1.5 text-xs font-medium" > {{ heading }} </ListboxGroupLabel> <slot /> </ListboxGroup> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandInput.vue ================================================ <script setup lang="ts"> import type { ListboxFilterProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Search } from 'lucide-vue-next' import { ListboxFilter, useForwardProps } from 'reka-ui' import { useCommand } from '.' defineOptions({ inheritAttrs: false, }) const props = defineProps< ListboxFilterProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) const { filterState } = useCommand() </script> <template> <div data-slot="command-input-wrapper" class="flex h-9 items-center gap-2 border-b px-3" > <Search class="size-4 shrink-0 opacity-50" /> <ListboxFilter v-bind="{ ...forwardedProps, ...$attrs }" v-model="filterState.search" data-slot="command-input" auto-focus :class=" cn( 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', props.class, ) " /> </div> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandItem.vue ================================================ <script setup lang="ts"> import type { ListboxItemEmits, ListboxItemProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit, useCurrentElement } from '@vueuse/core' import { ListboxItem, useForwardPropsEmits, useId } from 'reka-ui' import { computed, onMounted, onUnmounted, ref } from 'vue' import { useCommand, useCommandGroup } from '.' const props = defineProps< ListboxItemProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<ListboxItemEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) const id = useId() const { filterState, allItems, allGroups } = useCommand() const groupContext = useCommandGroup() const isRender = computed(() => { if (!filterState.search) { return true } else { const filteredCurrentItem = filterState.filtered.items.get(id) // If the filtered items is undefined means not in the all times map yet // Do the first render to add into the map if (filteredCurrentItem === undefined) { return true } // Check with filter return filteredCurrentItem > 0 } }) const itemRef = ref() const currentElement = useCurrentElement(itemRef) onMounted(() => { if (!(currentElement.value instanceof HTMLElement)) return // textValue to perform filter allItems.value.set( id, currentElement.value.textContent ?? props.value?.toString() ?? '', ) const groupId = groupContext?.id if (groupId) { if (!allGroups.value.has(groupId)) { allGroups.value.set(groupId, new Set([id])) } else { allGroups.value.get(groupId)?.add(id) } } }) onUnmounted(() => { allItems.value.delete(id) }) </script> <template> <ListboxItem v-if="isRender" v-bind="forwarded" :id="id" ref="itemRef" data-slot="command-item" :class=" cn( 'data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class, ) " @select=" () => { filterState.search = ''; } " > <slot /> </ListboxItem> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandList.vue ================================================ <script setup lang="ts"> import type { ListboxContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ListboxContent, useForwardProps } from 'reka-ui' const props = defineProps< ListboxContentProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardProps(delegatedProps) </script> <template> <ListboxContent data-slot="command-list" v-bind="forwarded" :class=" cn( 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', props.class, ) " > <div role="presentation"> <slot /> </div> </ListboxContent> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandSeparator.vue ================================================ <script setup lang="ts"> import type { SeparatorProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Separator } from 'reka-ui' const props = defineProps< SeparatorProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <Separator data-slot="command-separator" v-bind="delegatedProps" :class="cn('bg-border -mx-1 h-px', props.class)" > <slot /> </Separator> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/CommandShortcut.vue ================================================ <script setup lang="ts"> import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' const props = defineProps<{ class?: HTMLAttributes['class'] }>() </script> <template> <span data-slot="command-shortcut" :class=" cn('text-muted-foreground ml-auto text-xs tracking-widest', props.class) " > <slot /> </span> </template> ================================================ FILE: src/renderer/components/ui/shadcn/command/index.ts ================================================ import type { Ref } from 'vue' import { createContext } from 'reka-ui' export { default as Command } from './Command.vue' export { default as CommandDialog } from './CommandDialog.vue' export { default as CommandEmpty } from './CommandEmpty.vue' export { default as CommandGroup } from './CommandGroup.vue' export { default as CommandInput } from './CommandInput.vue' export { default as CommandItem } from './CommandItem.vue' export { default as CommandList } from './CommandList.vue' export { default as CommandSeparator } from './CommandSeparator.vue' export { default as CommandShortcut } from './CommandShortcut.vue' export const [useCommand, provideCommandContext] = createContext<{ allItems: Ref<Map<string, string>> allGroups: Ref<Map<string, Set<string>>> filterState: { search: string filtered: { count: number items: Map<string, number> groups: Set<string> } } }>('Command') export const [useCommandGroup, provideCommandGroupContext] = createContext<{ id?: string }>('CommandGroup') ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenu.vue ================================================ <script setup lang="ts"> import type { ContextMenuRootEmits, ContextMenuRootProps } from 'reka-ui' import { ContextMenuRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps<ContextMenuRootProps>() const emits = defineEmits<ContextMenuRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <ContextMenuRoot data-slot="context-menu" v-bind="forwarded" > <slot /> </ContextMenuRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuCheckboxItem.vue ================================================ <script setup lang="ts"> import type { ContextMenuCheckboxItemEmits, ContextMenuCheckboxItemProps, } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Check } from 'lucide-vue-next' import { ContextMenuCheckboxItem, ContextMenuItemIndicator, useForwardPropsEmits, } from 'reka-ui' const props = defineProps< ContextMenuCheckboxItemProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<ContextMenuCheckboxItemEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <ContextMenuCheckboxItem data-slot="context-menu-checkbox-item" v-bind="forwarded" :class=" cn( 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class, ) " > <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" > <ContextMenuItemIndicator> <slot name="indicator-icon"> <Check class="size-4" /> </slot> </ContextMenuItemIndicator> </span> <slot /> </ContextMenuCheckboxItem> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuContent.vue ================================================ <script setup lang="ts"> import type { ContextMenuContentEmits, ContextMenuContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ContextMenuContent, ContextMenuPortal, useForwardPropsEmits, } from 'reka-ui' defineOptions({ inheritAttrs: false, }) const props = defineProps< ContextMenuContentProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<ContextMenuContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <ContextMenuPortal> <ContextMenuContent data-slot="context-menu-content" v-bind="{ ...$attrs, ...forwarded }" :class=" cn( 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-context-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md', props.class, ) " > <slot /> </ContextMenuContent> </ContextMenuPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuGroup.vue ================================================ <script setup lang="ts"> import type { ContextMenuGroupProps } from 'reka-ui' import { ContextMenuGroup } from 'reka-ui' const props = defineProps<ContextMenuGroupProps>() </script> <template> <ContextMenuGroup data-slot="context-menu-group" v-bind="props" > <slot /> </ContextMenuGroup> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuItem.vue ================================================ <script setup lang="ts"> import type { ContextMenuItemEmits, ContextMenuItemProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ContextMenuItem, useForwardPropsEmits } from 'reka-ui' const props = withDefaults( defineProps< ContextMenuItemProps & { class?: HTMLAttributes['class'] inset?: boolean variant?: 'default' | 'destructive' } >(), { variant: 'default', }, ) const emits = defineEmits<ContextMenuItemEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <ContextMenuItem data-slot="context-menu-item" :data-inset="inset ? '' : undefined" :data-variant="variant" v-bind="forwarded" :class=" cn( 'focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class, ) " > <slot /> </ContextMenuItem> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuLabel.vue ================================================ <script setup lang="ts"> import type { ContextMenuLabelProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ContextMenuLabel } from 'reka-ui' const props = defineProps< ContextMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <ContextMenuLabel data-slot="context-menu-label" :data-inset="inset ? '' : undefined" v-bind="delegatedProps" :class=" cn( 'text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', props.class, ) " > <slot /> </ContextMenuLabel> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuPortal.vue ================================================ <script setup lang="ts"> import type { ContextMenuPortalProps } from 'reka-ui' import { ContextMenuPortal } from 'reka-ui' const props = defineProps<ContextMenuPortalProps>() </script> <template> <ContextMenuPortal data-slot="context-menu-portal" v-bind="props" > <slot /> </ContextMenuPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuRadioGroup.vue ================================================ <script setup lang="ts"> import type { ContextMenuRadioGroupEmits, ContextMenuRadioGroupProps, } from 'reka-ui' import { ContextMenuRadioGroup, useForwardPropsEmits } from 'reka-ui' const props = defineProps<ContextMenuRadioGroupProps>() const emits = defineEmits<ContextMenuRadioGroupEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <ContextMenuRadioGroup data-slot="context-menu-radio-group" v-bind="forwarded" > <slot /> </ContextMenuRadioGroup> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuRadioItem.vue ================================================ <script setup lang="ts"> import type { ContextMenuRadioItemEmits, ContextMenuRadioItemProps, } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Circle } from 'lucide-vue-next' import { ContextMenuItemIndicator, ContextMenuRadioItem, useForwardPropsEmits, } from 'reka-ui' const props = defineProps< ContextMenuRadioItemProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<ContextMenuRadioItemEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <ContextMenuRadioItem data-slot="context-menu-radio-item" v-bind="forwarded" :class=" cn( 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class, ) " > <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" > <ContextMenuItemIndicator> <slot name="indicator-icon"> <Circle class="size-2 fill-current" /> </slot> </ContextMenuItemIndicator> </span> <slot /> </ContextMenuRadioItem> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuSeparator.vue ================================================ <script setup lang="ts"> import type { ContextMenuSeparatorProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ContextMenuSeparator } from 'reka-ui' const props = defineProps< ContextMenuSeparatorProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <ContextMenuSeparator data-slot="context-menu-separator" v-bind="delegatedProps" :class="cn('bg-border -mx-1 my-1 h-px', props.class)" /> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuShortcut.vue ================================================ <script setup lang="ts"> import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' const props = defineProps<{ class?: HTMLAttributes['class'] }>() </script> <template> <span data-slot="context-menu-shortcut" :class=" cn('text-muted-foreground ml-auto text-xs tracking-widest', props.class) " > <slot /> </span> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuSub.vue ================================================ <script setup lang="ts"> import type { ContextMenuSubEmits, ContextMenuSubProps } from 'reka-ui' import { ContextMenuSub, useForwardPropsEmits } from 'reka-ui' const props = defineProps<ContextMenuSubProps>() const emits = defineEmits<ContextMenuSubEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <ContextMenuSub data-slot="context-menu-sub" v-bind="forwarded" > <slot /> </ContextMenuSub> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuSubContent.vue ================================================ <script setup lang="ts"> import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps, } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ContextMenuSubContent, useForwardPropsEmits } from 'reka-ui' const props = defineProps< DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<DropdownMenuSubContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <ContextMenuSubContent data-slot="context-menu-sub-content" v-bind="forwarded" :class=" cn( 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--reka-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg', props.class, ) " > <slot /> </ContextMenuSubContent> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuSubTrigger.vue ================================================ <script setup lang="ts"> import type { ContextMenuSubTriggerProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ChevronRight } from 'lucide-vue-next' import { ContextMenuSubTrigger, useForwardProps } from 'reka-ui' const props = defineProps< ContextMenuSubTriggerProps & { class?: HTMLAttributes['class'] inset?: boolean } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <ContextMenuSubTrigger data-slot="context-menu-sub-trigger" :data-inset="inset ? '' : undefined" v-bind="forwardedProps" :class=" cn( 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class, ) " > <slot /> <ChevronRight class="ml-auto" /> </ContextMenuSubTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/ContextMenuTrigger.vue ================================================ <script setup lang="ts"> import type { ContextMenuTriggerProps } from 'reka-ui' import { ContextMenuTrigger, useForwardProps } from 'reka-ui' const props = defineProps<ContextMenuTriggerProps>() const forwardedProps = useForwardProps(props) </script> <template> <ContextMenuTrigger data-slot="context-menu-trigger" v-bind="forwardedProps" > <slot /> </ContextMenuTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/context-menu/index.ts ================================================ export { default as ContextMenu } from './ContextMenu.vue' export { default as ContextMenuCheckboxItem } from './ContextMenuCheckboxItem.vue' export { default as ContextMenuContent } from './ContextMenuContent.vue' export { default as ContextMenuGroup } from './ContextMenuGroup.vue' export { default as ContextMenuItem } from './ContextMenuItem.vue' export { default as ContextMenuLabel } from './ContextMenuLabel.vue' export { default as ContextMenuRadioGroup } from './ContextMenuRadioGroup.vue' export { default as ContextMenuRadioItem } from './ContextMenuRadioItem.vue' export { default as ContextMenuSeparator } from './ContextMenuSeparator.vue' export { default as ContextMenuShortcut } from './ContextMenuShortcut.vue' export { default as ContextMenuSub } from './ContextMenuSub.vue' export { default as ContextMenuSubContent } from './ContextMenuSubContent.vue' export { default as ContextMenuSubTrigger } from './ContextMenuSubTrigger.vue' export { default as ContextMenuTrigger } from './ContextMenuTrigger.vue' ================================================ FILE: src/renderer/components/ui/shadcn/dialog/Dialog.vue ================================================ <script setup lang="ts"> import type { DialogRootEmits, DialogRootProps } from 'reka-ui' import { DialogRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps<DialogRootProps>() const emits = defineEmits<DialogRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <DialogRoot v-slot="slotProps" data-slot="dialog" v-bind="forwarded" > <slot v-bind="slotProps" /> </DialogRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogClose.vue ================================================ <script setup lang="ts"> import type { DialogCloseProps } from 'reka-ui' import { DialogClose } from 'reka-ui' const props = defineProps<DialogCloseProps>() </script> <template> <DialogClose data-slot="dialog-close" v-bind="props" > <slot /> </DialogClose> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogContent.vue ================================================ <script setup lang="ts"> import type { DialogContentEmits, DialogContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { X } from 'lucide-vue-next' import { DialogClose, DialogContent, DialogPortal, useForwardPropsEmits, } from 'reka-ui' import DialogOverlay from './DialogOverlay.vue' defineOptions({ inheritAttrs: false, }) const props = withDefaults( defineProps< DialogContentProps & { class?: HTMLAttributes['class'] showCloseButton?: boolean } >(), { showCloseButton: true, }, ) const emits = defineEmits<DialogContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <DialogPortal> <DialogOverlay /> <DialogContent data-slot="dialog-content" v-bind="{ ...$attrs, ...forwarded }" :class=" cn( 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', props.class, ) " > <slot /> <DialogClose v-if="showCloseButton" data-slot="dialog-close" class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4" > <X /> <span class="sr-only">Close</span> </DialogClose> </DialogContent> </DialogPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogDescription.vue ================================================ <script setup lang="ts"> import type { DialogDescriptionProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { DialogDescription, useForwardProps } from 'reka-ui' const props = defineProps< DialogDescriptionProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <DialogDescription data-slot="dialog-description" v-bind="forwardedProps" :class="cn('text-muted-foreground text-sm', props.class)" > <slot /> </DialogDescription> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogFooter.vue ================================================ <script setup lang="ts"> import type { HTMLAttributes } from 'vue' import { Button } from '@/components/ui/shadcn/button' import { cn } from '@/utils' import { DialogClose } from 'reka-ui' const props = withDefaults( defineProps<{ class?: HTMLAttributes['class'] showCloseButton?: boolean }>(), { showCloseButton: false, }, ) </script> <template> <div data-slot="dialog-footer" :class=" cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', props.class) " > <slot /> <DialogClose v-if="showCloseButton" as-child > <Button variant="outline"> Close </Button> </DialogClose> </div> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogHeader.vue ================================================ <script setup lang="ts"> import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' const props = defineProps<{ class?: HTMLAttributes['class'] }>() </script> <template> <div data-slot="dialog-header" :class="cn('flex flex-col gap-2 text-center sm:text-left', props.class)" > <slot /> </div> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogOverlay.vue ================================================ <script setup lang="ts"> import type { DialogOverlayProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { DialogOverlay } from 'reka-ui' const props = defineProps< DialogOverlayProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <DialogOverlay data-slot="dialog-overlay" v-bind="delegatedProps" :class=" cn( 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', props.class, ) " > <slot /> </DialogOverlay> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogScrollContent.vue ================================================ <script setup lang="ts"> import type { DialogContentEmits, DialogContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { X } from 'lucide-vue-next' import { DialogClose, DialogContent, DialogOverlay, DialogPortal, useForwardPropsEmits, } from 'reka-ui' defineOptions({ inheritAttrs: false, }) const props = defineProps< DialogContentProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<DialogContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <DialogPortal> <DialogOverlay class="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80" > <DialogContent :class=" cn( 'border-border bg-background relative z-50 my-8 grid w-full max-w-lg gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg md:w-full', props.class, ) " v-bind="{ ...$attrs, ...forwarded }" @pointer-down-outside=" (event) => { const originalEvent = event.detail.originalEvent; const target = originalEvent.target as HTMLElement; if ( originalEvent.offsetX > target.clientWidth || originalEvent.offsetY > target.clientHeight ) { event.preventDefault(); } } " > <slot /> <DialogClose class="hover:bg-secondary absolute top-4 right-4 rounded-md p-0.5 transition-colors" > <X class="h-4 w-4" /> <span class="sr-only">Close</span> </DialogClose> </DialogContent> </DialogOverlay> </DialogPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogTitle.vue ================================================ <script setup lang="ts"> import type { DialogTitleProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { DialogTitle, useForwardProps } from 'reka-ui' const props = defineProps< DialogTitleProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <DialogTitle data-slot="dialog-title" v-bind="forwardedProps" :class="cn('text-lg leading-none font-semibold', props.class)" > <slot /> </DialogTitle> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/DialogTrigger.vue ================================================ <script setup lang="ts"> import type { DialogTriggerProps } from 'reka-ui' import { DialogTrigger } from 'reka-ui' const props = defineProps<DialogTriggerProps>() </script> <template> <DialogTrigger data-slot="dialog-trigger" v-bind="props" > <slot /> </DialogTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/dialog/index.ts ================================================ export { default as Dialog } from './Dialog.vue' export { default as DialogClose } from './DialogClose.vue' export { default as DialogContent } from './DialogContent.vue' export { default as DialogDescription } from './DialogDescription.vue' export { default as DialogFooter } from './DialogFooter.vue' export { default as DialogHeader } from './DialogHeader.vue' export { default as DialogOverlay } from './DialogOverlay.vue' export { default as DialogScrollContent } from './DialogScrollContent.vue' export { default as DialogTitle } from './DialogTitle.vue' export { default as DialogTrigger } from './DialogTrigger.vue' ================================================ FILE: src/renderer/components/ui/shadcn/input/Input.vue ================================================ <script setup lang="ts"> import type { HTMLAttributes } from 'vue' import type { InputVariants } from '.' import { cn } from '@/utils' import { useVModel } from '@vueuse/core' import { inputVariants } from '.' const props = defineProps<{ defaultValue?: string | number modelValue?: string | number class?: HTMLAttributes['class'] variant?: InputVariants['variant'] }>() const emits = defineEmits<{ (e: 'update:modelValue', payload: string | number): void }>() const modelValue = useVModel(props, 'modelValue', emits, { passive: true, defaultValue: props.defaultValue, }) </script> <template> <input v-model="modelValue" data-slot="input" :class="cn(inputVariants({ variant }), props.class)" > </template> ================================================ FILE: src/renderer/components/ui/shadcn/input/index.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export { default as Input } from './Input.vue' export const inputVariants = cva( 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-7 w-full min-w-0 rounded-md px-2 text-sm outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50', { variants: { variant: { default: 'border-input bg-background dark:bg-input/30 border shadow-xs focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', ghost: 'border-transparent bg-transparent shadow-none focus-visible:border-transparent focus-visible:ring-0', }, }, defaultVariants: { variant: 'default', }, }, ) export type InputVariants = VariantProps<typeof inputVariants> ================================================ FILE: src/renderer/components/ui/shadcn/popover/Popover.vue ================================================ <script setup lang="ts"> import type { PopoverRootEmits, PopoverRootProps } from 'reka-ui' import { PopoverRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps<PopoverRootProps>() const emits = defineEmits<PopoverRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <PopoverRoot v-slot="slotProps" data-slot="popover" v-bind="forwarded" > <slot v-bind="slotProps" /> </PopoverRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/popover/PopoverAnchor.vue ================================================ <script setup lang="ts"> import type { PopoverAnchorProps } from 'reka-ui' import { PopoverAnchor } from 'reka-ui' const props = defineProps<PopoverAnchorProps>() </script> <template> <PopoverAnchor data-slot="popover-anchor" v-bind="props" > <slot /> </PopoverAnchor> </template> ================================================ FILE: src/renderer/components/ui/shadcn/popover/PopoverContent.vue ================================================ <script setup lang="ts"> import type { PopoverContentEmits, PopoverContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { PopoverContent, PopoverPortal, useForwardPropsEmits } from 'reka-ui' defineOptions({ inheritAttrs: false, }) const props = withDefaults( defineProps<PopoverContentProps & { class?: HTMLAttributes['class'] }>(), { align: 'center', sideOffset: 4, }, ) const emits = defineEmits<PopoverContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <PopoverPortal> <PopoverContent data-slot="popover-content" v-bind="{ ...$attrs, ...forwarded }" :class=" cn( 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--reka-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden', props.class, ) " > <slot /> </PopoverContent> </PopoverPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/popover/PopoverTrigger.vue ================================================ <script setup lang="ts"> import type { PopoverTriggerProps } from 'reka-ui' import { PopoverTrigger } from 'reka-ui' const props = defineProps<PopoverTriggerProps>() </script> <template> <PopoverTrigger data-slot="popover-trigger" v-bind="props" > <slot /> </PopoverTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/popover/index.ts ================================================ export { default as Popover } from './Popover.vue' export { default as PopoverAnchor } from './PopoverAnchor.vue' export { default as PopoverContent } from './PopoverContent.vue' export { default as PopoverTrigger } from './PopoverTrigger.vue' ================================================ FILE: src/renderer/components/ui/shadcn/resizable/ResizableHandle.vue ================================================ <script setup lang="ts"> import type { SplitterResizeHandleEmits, SplitterResizeHandleProps, } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { GripVertical } from 'lucide-vue-next' import { SplitterResizeHandle, useForwardPropsEmits } from 'reka-ui' const props = defineProps< SplitterResizeHandleProps & { class?: HTMLAttributes['class'] withHandle?: boolean } >() const emits = defineEmits<SplitterResizeHandleEmits>() const delegatedProps = reactiveOmit(props, 'class', 'withHandle') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <SplitterResizeHandle data-slot="resizable-handle" v-bind="forwarded" :class=" cn( 'group/resizable-handle focus-visible:ring-ring before:bg-border hover:before:bg-primary focus-visible:before:bg-primary relative flex w-px items-center justify-center bg-transparent before:absolute before:inset-y-0 before:left-1/2 before:w-px before:-translate-x-1/2 before:transition-[background-color,width,height] before:delay-0 before:duration-150 before:content-[\'\'] after:absolute after:inset-y-0 after:left-1/2 after:w-3 after:-translate-x-1/2 after:content-[\'\'] hover:before:w-0.5 hover:before:delay-200 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden focus-visible:before:w-0.5 focus-visible:before:delay-0 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:before:top-1/2 data-[orientation=vertical]:before:left-0 data-[orientation=vertical]:before:h-px data-[orientation=vertical]:before:w-full data-[orientation=vertical]:before:translate-x-0 data-[orientation=vertical]:before:-translate-y-1/2 data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-3 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:translate-x-0 data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:hover:before:h-0.5 data-[orientation=vertical]:focus-visible:before:h-0.5 [&[data-orientation=vertical]>div]:rotate-90', props.class, ) " > <template v-if="props.withHandle"> <div class="bg-background border-border text-muted-foreground group-hover/resizable-handle:border-primary group-hover/resizable-handle:bg-primary/10 group-hover/resizable-handle:text-primary group-focus-visible/resizable-handle:border-primary group-focus-visible/resizable-handle:bg-primary/10 group-focus-visible/resizable-handle:text-primary z-10 flex h-4 w-3 items-center justify-center rounded-xs border transition-[border-color,background-color,color] delay-0 duration-150 group-hover/resizable-handle:delay-200 group-focus-visible/resizable-handle:delay-0" > <slot> <GripVertical class="size-2.5" /> </slot> </div> </template> </SplitterResizeHandle> </template> ================================================ FILE: src/renderer/components/ui/shadcn/resizable/ResizablePanel.vue ================================================ <script setup lang="ts"> import type { SplitterPanelEmits, SplitterPanelProps } from 'reka-ui' import { SplitterPanel, useForwardExpose, useForwardPropsEmits } from 'reka-ui' const props = defineProps<SplitterPanelProps>() const emits = defineEmits<SplitterPanelEmits>() const forwarded = useForwardPropsEmits(props, emits) const { forwardRef } = useForwardExpose() </script> <template> <SplitterPanel :ref="forwardRef" v-slot="slotProps" data-slot="resizable-panel" v-bind="forwarded" > <slot v-bind="slotProps" /> </SplitterPanel> </template> ================================================ FILE: src/renderer/components/ui/shadcn/resizable/ResizablePanelGroup.vue ================================================ <script setup lang="ts"> import type { SplitterGroupEmits, SplitterGroupProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { SplitterGroup, useForwardPropsEmits } from 'reka-ui' const props = defineProps< SplitterGroupProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<SplitterGroupEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <SplitterGroup v-slot="slotProps" data-slot="resizable-panel-group" v-bind="forwarded" :class=" cn('flex h-full w-full data-[orientation=vertical]:flex-col', props.class) " > <slot v-bind="slotProps" /> </SplitterGroup> </template> ================================================ FILE: src/renderer/components/ui/shadcn/resizable/index.ts ================================================ export { default as ResizableHandle } from './ResizableHandle.vue' export { default as ResizablePanel } from './ResizablePanel.vue' export { default as ResizablePanelGroup } from './ResizablePanelGroup.vue' ================================================ FILE: src/renderer/components/ui/shadcn/select/Select.vue ================================================ <script setup lang="ts"> import type { SelectRootEmits, SelectRootProps } from 'reka-ui' import { SelectRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps<SelectRootProps>() const emits = defineEmits<SelectRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <SelectRoot v-slot="slotProps" data-slot="select" v-bind="forwarded" > <slot v-bind="slotProps" /> </SelectRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectContent.vue ================================================ <script setup lang="ts"> import type { SelectContentEmits, SelectContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { SelectContent, SelectPortal, SelectViewport, useForwardPropsEmits, } from 'reka-ui' import { SelectScrollDownButton, SelectScrollUpButton } from '.' defineOptions({ inheritAttrs: false, }) const props = withDefaults( defineProps<SelectContentProps & { class?: HTMLAttributes['class'] }>(), { position: 'popper', }, ) const emits = defineEmits<SelectContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <SelectPortal> <SelectContent data-slot="select-content" v-bind="{ ...$attrs, ...forwarded }" :class=" cn( 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md', position === 'popper' && 'w-full min-w-[var(--reka-select-trigger-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', props.class, ) " > <SelectScrollUpButton /> <SelectViewport :class=" cn( 'p-1', position === 'popper' && 'w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1', ) " > <slot /> </SelectViewport> <SelectScrollDownButton /> </SelectContent> </SelectPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectGroup.vue ================================================ <script setup lang="ts"> import type { SelectGroupProps } from 'reka-ui' import { SelectGroup } from 'reka-ui' const props = defineProps<SelectGroupProps>() </script> <template> <SelectGroup data-slot="select-group" v-bind="props" > <slot /> </SelectGroup> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectItem.vue ================================================ <script setup lang="ts"> import type { SelectItemProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { Check } from 'lucide-vue-next' import { SelectItem, SelectItemIndicator, SelectItemText, useForwardProps, } from 'reka-ui' const props = defineProps< SelectItemProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <SelectItem data-slot="select-item" v-bind="forwardedProps" :class=" cn( 'focus:bg-accent focus:text-accent-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex h-7 w-full cursor-default items-center gap-2 rounded-sm py-0 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2', props.class, ) " > <span class="absolute right-2 flex size-3.5 items-center justify-center"> <SelectItemIndicator> <slot name="indicator-icon"> <Check class="size-4" /> </slot> </SelectItemIndicator> </span> <SelectItemText> <slot /> </SelectItemText> </SelectItem> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectItemText.vue ================================================ <script setup lang="ts"> import type { SelectItemTextProps } from 'reka-ui' import { SelectItemText } from 'reka-ui' const props = defineProps<SelectItemTextProps>() </script> <template> <SelectItemText data-slot="select-item-text" v-bind="props" > <slot /> </SelectItemText> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectLabel.vue ================================================ <script setup lang="ts"> import type { SelectLabelProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { SelectLabel } from 'reka-ui' const props = defineProps< SelectLabelProps & { class?: HTMLAttributes['class'] } >() </script> <template> <SelectLabel data-slot="select-label" :class="cn('text-muted-foreground px-2 py-1.5 text-xs', props.class)" > <slot /> </SelectLabel> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectScrollDownButton.vue ================================================ <script setup lang="ts"> import type { SelectScrollDownButtonProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ChevronDown } from 'lucide-vue-next' import { SelectScrollDownButton, useForwardProps } from 'reka-ui' const props = defineProps< SelectScrollDownButtonProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <SelectScrollDownButton data-slot="select-scroll-down-button" v-bind="forwardedProps" :class=" cn('flex cursor-default items-center justify-center py-1', props.class) " > <slot> <ChevronDown class="size-4" /> </slot> </SelectScrollDownButton> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectScrollUpButton.vue ================================================ <script setup lang="ts"> import type { SelectScrollUpButtonProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ChevronUp } from 'lucide-vue-next' import { SelectScrollUpButton, useForwardProps } from 'reka-ui' const props = defineProps< SelectScrollUpButtonProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <SelectScrollUpButton data-slot="select-scroll-up-button" v-bind="forwardedProps" :class=" cn('flex cursor-default items-center justify-center py-1', props.class) " > <slot> <ChevronUp class="size-4" /> </slot> </SelectScrollUpButton> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectSeparator.vue ================================================ <script setup lang="ts"> import type { SelectSeparatorProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { SelectSeparator } from 'reka-ui' const props = defineProps< SelectSeparatorProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <SelectSeparator data-slot="select-separator" v-bind="delegatedProps" :class="cn('bg-border pointer-events-none -mx-1 my-1 h-px', props.class)" /> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectTrigger.vue ================================================ <script setup lang="ts"> import type { SelectTriggerProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { ChevronDown } from 'lucide-vue-next' import { SelectIcon, SelectTrigger, useForwardProps } from 'reka-ui' const props = defineProps< SelectTriggerProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <SelectTrigger data-slot="select-trigger" v-bind="forwardedProps" :class=" cn( 'border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-7 w-fit items-center justify-between gap-2 rounded-md border bg-[color-mix(in_oklch,var(--foreground)_2%,var(--background))] px-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none hover:bg-[color-mix(in_oklch,var(--foreground)_5%,var(--background))] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 [&>span]:truncate', props.class, ) " > <slot /> <SelectIcon as-child> <ChevronDown class="size-4 opacity-50" /> </SelectIcon> </SelectTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/SelectValue.vue ================================================ <script setup lang="ts"> import type { SelectValueProps } from 'reka-ui' import { SelectValue } from 'reka-ui' const props = defineProps<SelectValueProps>() </script> <template> <SelectValue data-slot="select-value" v-bind="props" > <slot /> </SelectValue> </template> ================================================ FILE: src/renderer/components/ui/shadcn/select/index.ts ================================================ export { default as Select } from './Select.vue' export { default as SelectContent } from './SelectContent.vue' export { default as SelectGroup } from './SelectGroup.vue' export { default as SelectItem } from './SelectItem.vue' export { default as SelectItemText } from './SelectItemText.vue' export { default as SelectLabel } from './SelectLabel.vue' export { default as SelectScrollDownButton } from './SelectScrollDownButton.vue' export { default as SelectScrollUpButton } from './SelectScrollUpButton.vue' export { default as SelectSeparator } from './SelectSeparator.vue' export { default as SelectTrigger } from './SelectTrigger.vue' export { default as SelectValue } from './SelectValue.vue' ================================================ FILE: src/renderer/components/ui/shadcn/switch/Switch.vue ================================================ <script setup lang="ts"> import type { SwitchRootEmits, SwitchRootProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { SwitchRoot, SwitchThumb, useForwardPropsEmits } from 'reka-ui' const props = defineProps< SwitchRootProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<SwitchRootEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <SwitchRoot v-slot="slotProps" data-slot="switch" v-bind="forwarded" :class=" cn( 'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', props.class, ) " > <SwitchThumb data-slot="switch-thumb" :class=" cn( 'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0', ) " > <slot name="thumb" v-bind="slotProps" /> </SwitchThumb> </SwitchRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/switch/index.ts ================================================ export { default as Switch } from './Switch.vue' ================================================ FILE: src/renderer/components/ui/shadcn/tabs/Tabs.vue ================================================ <script setup lang="ts"> import type { TabsRootEmits, TabsRootProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { TabsRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps< TabsRootProps & { class?: HTMLAttributes['class'] } >() const emits = defineEmits<TabsRootEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <TabsRoot v-slot="slotProps" data-slot="tabs" v-bind="forwarded" :class="cn('flex flex-col gap-2', props.class)" > <slot v-bind="slotProps" /> </TabsRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tabs/TabsContent.vue ================================================ <script setup lang="ts"> import type { TabsContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { TabsContent } from 'reka-ui' const props = defineProps< TabsContentProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <TabsContent data-slot="tabs-content" :class="cn('flex-1 outline-none', props.class)" v-bind="delegatedProps" > <slot /> </TabsContent> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tabs/TabsList.vue ================================================ <script setup lang="ts"> import type { TabsListProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { TabsList } from 'reka-ui' const props = defineProps< TabsListProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') </script> <template> <TabsList data-slot="tabs-list" v-bind="delegatedProps" :class=" cn( 'bg-muted text-muted-foreground inline-flex h-7 w-fit items-center justify-center rounded-lg p-0.5', props.class, ) " > <slot /> </TabsList> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tabs/TabsTrigger.vue ================================================ <script setup lang="ts"> import type { TabsTriggerProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { TabsTrigger, useForwardProps } from 'reka-ui' const props = defineProps< TabsTriggerProps & { class?: HTMLAttributes['class'] } >() const delegatedProps = reactiveOmit(props, 'class') const forwardedProps = useForwardProps(delegatedProps) </script> <template> <TabsTrigger data-slot="tabs-trigger" :class=" cn( 'data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-full flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class, ) " v-bind="forwardedProps" > <slot /> </TabsTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tabs/index.ts ================================================ export { default as Tabs } from './Tabs.vue' export { default as TabsContent } from './TabsContent.vue' export { default as TabsList } from './TabsList.vue' export { default as TabsTrigger } from './TabsTrigger.vue' ================================================ FILE: src/renderer/components/ui/shadcn/textarea/Textarea.vue ================================================ <script setup lang="ts"> import type { HTMLAttributes } from 'vue' import type { TextareaVariants } from '.' import { cn } from '@/utils' import { useVModel } from '@vueuse/core' import { textareaVariants } from '.' const props = defineProps<{ class?: HTMLAttributes['class'] defaultValue?: string | number modelValue?: string | number variant?: TextareaVariants['variant'] }>() const emits = defineEmits<{ (e: 'update:modelValue', payload: string | number): void }>() const modelValue = useVModel(props, 'modelValue', emits, { passive: true, defaultValue: props.defaultValue, }) </script> <template> <textarea v-model="modelValue" data-slot="textarea" :class="cn(textareaVariants({ variant }), props.class)" /> </template> ================================================ FILE: src/renderer/components/ui/shadcn/textarea/index.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export { default as Textarea } from './Textarea.vue' export const textareaVariants = cva( 'placeholder:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', { variants: { variant: { default: 'border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', ghost: 'border-transparent bg-transparent shadow-none focus-visible:border-transparent focus-visible:ring-0', }, }, defaultVariants: { variant: 'default', }, }, ) export type TextareaVariants = VariantProps<typeof textareaVariants> ================================================ FILE: src/renderer/components/ui/shadcn/tooltip/Tooltip.vue ================================================ <script setup lang="ts"> import type { TooltipRootEmits, TooltipRootProps } from 'reka-ui' import { TooltipRoot, useForwardPropsEmits } from 'reka-ui' const props = defineProps<TooltipRootProps>() const emits = defineEmits<TooltipRootEmits>() const forwarded = useForwardPropsEmits(props, emits) </script> <template> <TooltipRoot v-slot="slotProps" data-slot="tooltip" v-bind="forwarded" > <slot v-bind="slotProps" /> </TooltipRoot> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tooltip/TooltipContent.vue ================================================ <script setup lang="ts"> import type { TooltipContentEmits, TooltipContentProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import { cn } from '@/utils' import { reactiveOmit } from '@vueuse/core' import { TooltipArrow, TooltipContent, TooltipPortal, useForwardPropsEmits, } from 'reka-ui' defineOptions({ inheritAttrs: false, }) const props = withDefaults( defineProps<TooltipContentProps & { class?: HTMLAttributes['class'] }>(), { sideOffset: 4, }, ) const emits = defineEmits<TooltipContentEmits>() const delegatedProps = reactiveOmit(props, 'class') const forwarded = useForwardPropsEmits(delegatedProps, emits) </script> <template> <TooltipPortal> <TooltipContent data-slot="tooltip-content" v-bind="{ ...forwarded, ...$attrs }" :class=" cn( 'bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md border px-3 py-1.5 text-xs text-balance shadow-md', props.class, ) " > <slot /> <TooltipArrow class="bg-popover fill-popover z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] border-r border-b" /> </TooltipContent> </TooltipPortal> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tooltip/TooltipProvider.vue ================================================ <script setup lang="ts"> import type { TooltipProviderProps } from 'reka-ui' import { TooltipProvider } from 'reka-ui' const props = withDefaults(defineProps<TooltipProviderProps>(), { delayDuration: 700, }) </script> <template> <TooltipProvider v-bind="props"> <slot /> </TooltipProvider> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tooltip/TooltipTrigger.vue ================================================ <script setup lang="ts"> import type { TooltipTriggerProps } from 'reka-ui' import { TooltipTrigger } from 'reka-ui' const props = defineProps<TooltipTriggerProps>() </script> <template> <TooltipTrigger data-slot="tooltip-trigger" v-bind="props" > <slot /> </TooltipTrigger> </template> ================================================ FILE: src/renderer/components/ui/shadcn/tooltip/index.ts ================================================ export { default as Tooltip } from './Tooltip.vue' export { default as TooltipContent } from './TooltipContent.vue' export { default as TooltipProvider } from './TooltipProvider.vue' export { default as TooltipTrigger } from './TooltipTrigger.vue' ================================================ FILE: src/renderer/components/ui/sonner/Sonner.vue ================================================ <script setup lang="ts"> import type { Props } from './types' import { Button } from '@/components/ui/shadcn/button' import { AlertTriangle, CheckCircle2, Info, X, XCircle } from 'lucide-vue-next' interface Emits { (e: 'closeToast'): void } const props = defineProps<Props>() const emit = defineEmits<Emits>() function onActionClick() { props.action?.onClick() emit('closeToast') } const icon = computed(() => { if (props.type === 'success') { return CheckCircle2 } if (props.type === 'error') { return XCircle } if (props.type === 'warning') { return AlertTriangle } return Info }) </script> <template> <div class="bg-background border-border relative w-[var(--width)] rounded-md border p-3 shadow-lg" :class="{ 'border-red-700': type === 'error', 'border-yellow-600': type === 'warning', }" > <div v-if="closeButton" class="border-border bg-background hover:bg-muted absolute -top-2.5 -left-2.5 rounded-full border p-0.5" > <X class="text-text h-4 w-4" @click="emit('closeToast')" /> </div> <div class="grid grid-cols-[20px_1fr_auto] items-center gap-2"> <div class="flex- shrink-0"> <component :is="icon" class="h-4 w-4" :class="{ 'text-red-700': type === 'error', 'text-green-500': type === 'success', 'text-yellow-600': type === 'warning', }" /> </div> <div class="pr-6"> <template v-if="message"> {{ message }} </template> <component :is="component" v-if="component" @close-toast="emit('closeToast')" /> </div> <Button v-if="action" class="shrink-0" variant="outline" @click="onActionClick" > {{ action.label }} </Button> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/sonner/templates/Donate.vue ================================================ <script setup lang="ts"> import { i18n, ipc } from '@/electron' interface Emits { (e: 'closeToast'): void } const emit = defineEmits<Emits>() const message = computed(() => { return i18n.t('messages:special.supportMessage', { tagStart: '<a id="donate" href="#" class="text-blue-500">', tagEnd: '</a>', }) }) onMounted(() => { document.getElementById('donate')?.addEventListener('click', () => { ipc.invoke('system:open-external', 'https://masscode.io/donate') emit('closeToast') }) }) </script> <template> <div v-html="message" /> </template> ================================================ FILE: src/renderer/components/ui/sonner/types.ts ================================================ export interface Props { message?: string component?: Component type?: 'default' | 'success' | 'error' | 'warning' closeButton?: boolean duration?: number action?: { label: string onClick: () => void } onClose?: () => void } ================================================ FILE: src/renderer/components/ui/text/Text.vue ================================================ <script setup lang="ts"> import type { PrimitiveProps } from 'reka-ui' import type { HTMLAttributes } from 'vue' import type { TextVariants } from '.' import { cn } from '@/utils' import { Primitive } from 'reka-ui' import { textVariants } from '.' interface Props extends PrimitiveProps { variant?: TextVariants['variant'] weight?: TextVariants['weight'] mono?: boolean muted?: boolean uppercase?: boolean class?: HTMLAttributes['class'] } const props = withDefaults(defineProps<Props>(), { as: 'span', mono: false, muted: false, uppercase: false, }) </script> <template> <Primitive data-slot="text" :data-variant="variant" :data-weight="weight" :as="as" :as-child="asChild" :class=" cn(textVariants({ variant, weight, mono, muted, uppercase }), props.class) " > <slot /> </Primitive> </template> ================================================ FILE: src/renderer/components/ui/text/index.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export { default as Text } from './Text.vue' export const textVariants = cva('text-foreground', { variants: { variant: { caption: 'text-[10px] leading-3', xs: 'text-xs leading-4', sm: 'text-[13px] leading-5', base: 'text-sm leading-[21px]', lg: 'text-base leading-6', xl: 'text-lg leading-6', }, weight: { normal: 'font-normal', medium: 'font-medium', semibold: 'font-semibold', bold: 'font-bold', }, mono: { true: 'font-mono', false: '', }, muted: { true: 'text-muted-foreground', false: '', }, uppercase: { true: 'uppercase', false: '', }, }, defaultVariants: { variant: 'base', weight: 'normal', mono: false, muted: false, uppercase: false, }, }) export type TextVariants = VariantProps<typeof textVariants> ================================================ FILE: src/renderer/components/ui/textarea/Textarea.vue ================================================ <script setup lang="ts"> import type { Variants } from './variants' import { cn } from '@/utils' import { variants } from './variants' interface Props { variant?: Variants['variant'] class?: string placeholder?: string focus?: boolean } const props = defineProps<Props>() const model = defineModel<string>() const inputRef = useTemplateRef('inputRef') function onBlur(e: FocusEvent) { const target = e.target as HTMLDivElement // eslint-disable-next-line unicorn/prefer-dom-node-text-content model.value = target.innerText.trimEnd() } watchEffect(() => { if (props.focus) { nextTick(() => { inputRef.value?.focus() }) } }) </script> <template> <div class="relative"> <div class="scrollbar max-h-[100px] overflow-x-hidden overflow-y-auto"> <div ref="inputRef" :class="[cn(variants({ variant }), props.class)]" class="break-words whitespace-pre-wrap" contenteditable="true" spellcheck="false" role="textbox" :data-placeholder="placeholder" @blur="onBlur" > {{ model }} </div> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/textarea/variants.ts ================================================ import type { VariantProps } from 'class-variance-authority' import { cva } from 'class-variance-authority' export const variants = cva( 'bg-background outline-none whitespace-pre-wrap break-words w-full rounded-md py-1 px-2 border text-sm', { variants: { variant: { default: 'border-input focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', ghost: 'border-transparent bg-transparent shadow-none focus-visible:border-transparent focus-visible:ring-0', }, }, defaultVariants: { variant: 'default', }, }, ) export type Variants = VariantProps<typeof variants> ================================================ FILE: src/renderer/components/ui/tree/Tree.vue ================================================ <script setup lang="ts"> import type { DropPosition, TreeNode } from './types' import { treeInjectionKey } from './keys' import TreeNodeComponent from './TreeNode.vue' interface Props { modelValue: TreeNode[] selectedIds?: (string | number)[] editableId?: string | number | null focusedId?: string | number | undefined highlightedIds?: Set<string | number> indent?: number } interface Emits { (e: 'update:modelValue', value: TreeNode[]): void (e: 'update:selectedIds', value: (string | number)[]): void (e: 'update:editableId', value: string | number | null): void (e: 'update:focusedId', value: string | number | undefined): void (e: 'update:highlightedIds', value: Set<string | number>): void (e: 'clickNode', value: { node: TreeNode, event?: MouseEvent }): void (e: 'dblclickNode', value: TreeNode): void (e: 'toggleNode', value: TreeNode): void ( e: 'dragNode', value: { nodes: TreeNode[], target: TreeNode, position: DropPosition }, ): void ( e: 'externalDrop', value: { data: DataTransfer, target: TreeNode, position: DropPosition }, ): void (e: 'updateLabel', value: { node: TreeNode, value: string }): void (e: 'cancelEdit', value: TreeNode): void ( e: 'contextMenu', value: { node: TreeNode, selectedNodes: TreeNode[] }, ): void } const props = withDefaults(defineProps<Props>(), { selectedIds: () => [], editableId: null, focusedId: undefined, highlightedIds: () => new Set(), indent: 10, }) const emit = defineEmits<Emits>() const hoveredNodeId = ref('') const isHoveredByIdDisabled = ref(false) const internalEditableId = computed({ get: () => props.editableId, set: val => emit('update:editableId', val), }) const internalSelectedIds = computed({ get: () => props.selectedIds, set: val => emit('update:selectedIds', val), }) const internalFocusedId = computed({ get: () => props.focusedId, set: val => emit('update:focusedId', val), }) const internalHighlightedIds = computed({ get: () => props.highlightedIds, set: val => emit('update:highlightedIds', val), }) function findNodeById(id: string | number): TreeNode | undefined { const walk = (nodes: TreeNode[]): TreeNode | undefined => { for (const node of nodes) { if (node.id === id) return node if (node.children?.length) { const found = walk(node.children) if (found) return found } } } return walk(props.modelValue) } function clickNode(id: string | number, event?: MouseEvent) { const node = findNodeById(id) if (!node) return emit('clickNode', { node, event }) } function dblclickNode(node: TreeNode) { emit('dblclickNode', node) } function dragNodeHandler( nodes: TreeNode[], target: TreeNode, position: DropPosition, ) { emit('dragNode', { nodes, target, position }) } function externalDropHandler( data: DataTransfer, target: TreeNode, position: DropPosition, ) { emit('externalDrop', { data, target, position }) } function toggleNode(node: TreeNode) { emit('toggleNode', node) } function contextMenu(node: TreeNode) { const selectedNodes = internalSelectedIds.value .map(id => findNodeById(id)) .filter((n): n is TreeNode => Boolean(n)) emit('contextMenu', { node, selectedNodes }) } function updateLabelHandler(node: TreeNode, value: string) { emit('updateLabel', { node, value }) } function cancelEditHandler(node: TreeNode) { emit('cancelEdit', node) } provide(treeInjectionKey, { clickNode, dblclickNode, dragNode: dragNodeHandler, externalDrop: externalDropHandler, toggleNode, contextMenu, updateLabel: updateLabelHandler, cancelEdit: cancelEditHandler, isHoveredByIdDisabled, editableId: internalEditableId, selectedIds: internalSelectedIds, focusedId: internalFocusedId, highlightedIds: internalHighlightedIds, }) </script> <template> <div v-if="modelValue.length" class="h-full min-h-0" > <div class="scrollbar h-full min-h-0 overflow-x-hidden overflow-y-auto"> <div data-tree> <TreeNodeComponent v-for="(node, index) in modelValue" :key="node.id" :node="node" :nodes="modelValue" :index="index" :indent="indent" :hovered-node-id="hoveredNodeId" > <template v-if="$slots.icon" #icon="iconProps" > <slot name="icon" v-bind="iconProps" /> </template> </TreeNodeComponent> </div> </div> </div> </template> ================================================ FILE: src/renderer/components/ui/tree/TreeNode.vue ================================================ <script setup lang="ts"> import type { CSSProperties } from 'vue' import type { DropPosition, TreeNode } from './types' import { onClickOutside } from '@vueuse/core' import { ChevronRight } from 'lucide-vue-next' import { dragNodeChildrenIds, dragNodeIds, dragStore, isDragAllowed, TREE_DND_TYPE, } from './composables' import { treeInjectionKey } from './keys' interface Props { index: number deep?: number node: TreeNode nodes: TreeNode[] indent?: number hoveredNodeId?: string } const props = withDefaults(defineProps<Props>(), { index: 0, deep: 0, indent: 10, }) const { clickNode, dblclickNode, dragNode, externalDrop, toggleNode, isHoveredByIdDisabled, contextMenu, updateLabel, cancelEdit, editableId, selectedIds, focusedId, highlightedIds, } = inject(treeInjectionKey)! const hoveredId = ref<string | number>() const overPosition = ref<DropPosition>() const isDragged = ref(false) const isDraggingExternal = ref(false) const rowRef = ref<HTMLElement>() const editInputRef = ref<HTMLInputElement>() const editValue = ref(props.node.label) const hasChildren = computed( () => props.node.children && props.node.children.length > 0, ) const isFirst = computed(() => props.index === 0) const isHovered = computed(() => { return props.node.id === hoveredId.value && overPosition.value === 'center' }) const isSelected = computed(() => { return ( selectedIds.value.length <= 1 && selectedIds.value.includes(props.node.id) ) }) const isMultiSelected = computed(() => { return ( selectedIds.value.length > 1 && selectedIds.value.includes(props.node.id) ) }) const isFocused = computed(() => focusedId.value === props.node.id) const isHighlighted = computed(() => highlightedIds.value.has(props.node.id)) const isEditing = computed(() => editableId.value === props.node.id) const isDragActive = computed(() => Boolean(dragStore.dragNode)) const isShowBetweenLine = computed(() => { if (!isDragAllowed.value) return false return overPosition.value === 'before' || overPosition.value === 'after' }) const indentStyle = computed(() => `${props.indent}px`) const hoveredOffsetStyle = computed(() => { return `${-(props.deep * props.indent)}px` }) const betweenLineStyle = computed(() => { const style: CSSProperties = { position: 'absolute', width: `calc(100% - ${props.deep} * ${indentStyle.value})`, } if (overPosition.value === 'before') { style.top = '-4px' } if (overPosition.value === 'after') { style.bottom = '-4px' } return style }) watch( () => props.node.label, (newLabel) => { editValue.value = newLabel }, ) watch(isEditing, (editing) => { if (editing) { nextTick(() => { editInputRef.value?.focus() editInputRef.value?.select() }) } }) onClickOutside(rowRef, () => { if (focusedId.value === props.node.id) { focusedId.value = undefined } highlightedIds.value.delete(props.node.id) }) function onClickArrow(node: TreeNode) { toggleNode(node) } function onClickNode(id: string | number, event?: MouseEvent) { focusedId.value = id clickNode(id, event) } function onDblclickLabel() { dblclickNode(props.node) } function onContextMenu() { highlightedIds.value.clear() highlightedIds.value.add(props.node.id) if ( selectedIds.value.length > 1 && selectedIds.value.includes(props.node.id) ) { selectedIds.value.forEach(id => highlightedIds.value.add(id)) } contextMenu(props.node) } // --- Drag and Drop --- function findNodeById( nodes: TreeNode[], id: string | number, ): TreeNode | undefined { for (const node of nodes) { if (node.id === id) return node if (node.children?.length) { const found = findNodeById(node.children, id) if (found) return found } } } function hasSelectedAncestor( nodeId: string | number, selection: Set<string | number>, rootNodes: TreeNode[], ): boolean { const findParentId = ( nodes: TreeNode[], targetId: string | number, parentId?: string | number, ): string | number | undefined => { for (const node of nodes) { if (node.id === targetId) return parentId if (node.children?.length) { const found = findParentId(node.children, targetId, node.id) if (found !== undefined) return found } } } let currentParentId = findParentId(rootNodes, nodeId) while (currentParentId !== undefined) { if (selection.has(currentParentId)) return true currentParentId = findParentId(rootNodes, currentParentId) } return false } function getDraggedNodes(rootNodes: TreeNode[]) { const selection = selectedIds.value.includes(props.node.id) ? selectedIds.value : [props.node.id] const selectionSet = new Set(selection) return selection .map(id => findNodeById(rootNodes, id)) .filter((node): node is TreeNode => Boolean(node)) .filter(node => !hasSelectedAncestor(node.id, selectionSet, rootNodes)) } function onDragStart(e: DragEvent) { let draggedNodes = getDraggedNodes(props.nodes) if (!draggedNodes.length) { draggedNodes = [props.node] } const isMultiDrag = selectedIds.value.length > 1 && selectedIds.value.includes(props.node.id) const ghostCount = isMultiDrag ? selectedIds.value.length : draggedNodes.length dragStore.dragNodes = draggedNodes dragStore.dragNode = draggedNodes[0] || props.node isHoveredByIdDisabled.value = true isDragged.value = true const el = document.createElement('div') el.className = 'fixed left-[-100%] text-foreground truncate max-w-[200px] flex items-center' el.id = 'ghost' el.innerHTML = ghostCount > 1 ? `<span class="rounded-full bg-primary text-white px-2 py-0.5 text-xs ml-3">${ghostCount}</span>` : props.node.label document.body.appendChild(el) e.dataTransfer!.setDragImage(el, 0, 0) setTimeout(() => el.remove(), 0) e.dataTransfer!.setData( TREE_DND_TYPE, JSON.stringify(draggedNodes.map(node => node.id)), ) } function onDragEnd() { dragStore.dragNode = undefined dragStore.dragNodes = undefined dragStore.dragEnterNode = undefined overPosition.value = undefined isDragged.value = false isHoveredByIdDisabled.value = false } function onDragEnter() { hoveredId.value = props.node.id dragStore.dragEnterNode = props.node } function onDragOver(e: DragEvent) { hoveredId.value = props.node.id if (!e.dataTransfer?.types.includes(TREE_DND_TYPE)) { isDraggingExternal.value = true overPosition.value = 'center' return } isDraggingExternal.value = false const isInvalidTarget = dragStore.dragNodes?.some(node => node.id === props.node.id) || dragStore.dragNode?.id === props.node.id || dragNodeIds.value.includes(props.node.id) || dragNodeChildrenIds.value.includes(props.node.id) if (isInvalidTarget) { overPosition.value = undefined return } const height = rowRef.value!.offsetHeight const before = height * 0.3 const after = height - before const isContainer = props.node.children !== undefined if (isContainer) { if (e.offsetY < before && isFirst.value) { overPosition.value = 'before' } else if (e.offsetY > after) { overPosition.value = 'after' } else { overPosition.value = 'center' } } else { if (e.offsetY < height / 2) { overPosition.value = isFirst.value ? 'before' : 'after' } else { overPosition.value = 'after' } } } function onDragLeave() { hoveredId.value = undefined overPosition.value = undefined isDraggingExternal.value = false } function onDrop(e: DragEvent) { if (!e.dataTransfer?.types.includes(TREE_DND_TYPE)) { if (e.dataTransfer) { externalDrop(e.dataTransfer, props.node, overPosition.value || 'center') } hoveredId.value = undefined overPosition.value = undefined isDraggingExternal.value = false return } if (!dragStore.dragNode || !isDragAllowed.value) return const draggedNodes = dragStore.dragNodes?.length ? dragStore.dragNodes : dragStore.dragNode ? [dragStore.dragNode] : [] if (overPosition.value && draggedNodes.length) { dragNode(draggedNodes, props.node, overPosition.value) } overPosition.value = undefined } // --- Inline Edit --- function onUpdateLabel() { const trimmed = editValue.value.trim() if (trimmed === '' || editValue.value === props.node.label) { editValue.value = props.node.label cancelEdit(props.node) return } updateLabel(props.node, editValue.value) } function onCancelEdit() { editValue.value = props.node.label cancelEdit(props.node) } </script> <template> <div data-tree-node class="ui-tree-node user-select-none relative" :class="{ 'has-children': hasChildren, 'is-dragged': isDragged, }" draggable="true" @dragstart.stop="onDragStart" @dragleave.stop="onDragLeave" @dragend.stop="onDragEnd" @drop.stop="onDrop" @dragover.prevent > <div :id="String(node.id)" ref="rowRef" class="ui-tree-node__row user-select-none relative flex py-px" :class="{ 'is-hovered': (isHovered && isDragAllowed) || (isHovered && isDraggingExternal) || hoveredNodeId === String(node.id), 'is-selected': isSelected && !isEditing, 'is-multi-selected': isMultiSelected && !isEditing, 'is-focused': isFocused && !isEditing, 'is-highlighted': isHighlighted && !isEditing, 'is-drag-active': isDragActive, 'is-editing': isEditing, }" @dragenter.stop="onDragEnter" @dragover="onDragOver" @click="(event) => onClickNode(node.id, event)" @contextmenu="onContextMenu" > <span class="ui-tree-node__name relative z-10 flex w-full items-center"> <div v-if="hasChildren" class="mx-1 flex h-4 w-4 flex-shrink-0 items-center justify-center" @click.stop="onClickArrow(node)" > <ChevronRight class="ui-tree-node__arrow h-3 w-3" :class="{ 'rotate-90': node.isExpanded }" /> </div> <span v-else class="w-6 flex-shrink-0" /> <slot name="icon" :node="node" /> <template v-if="!isEditing"> <span class="min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap" @dblclick="onDblclickLabel" > {{ node.label }} </span> </template> <input v-else ref="editInputRef" v-model="editValue" class="outline-primary min-w-0 flex-1 rounded-sm bg-transparent outline outline-1" @keydown.esc="onCancelEdit" @keydown.enter="onUpdateLabel" @blur="onUpdateLabel" @click.stop > </span> </div> <template v-if="node.children"> <TreeNode v-for="(child, idx) in node.children" v-show="node.isExpanded" :key="child.id" class="children pl-2" :index="idx" :deep="deep + 1" :node="child" :nodes="node.children" :indent="indent" :hovered-node-id="hoveredNodeId" > <template v-if="$slots.icon" #icon="iconProps" > <slot name="icon" v-bind="iconProps" /> </template> </TreeNode> </template> <svg v-if="isShowBetweenLine" class="pointer-events-none z-20" height="10" :style="betweenLineStyle" > <circle cx="5" cy="5" r="3" stroke="var(--primary)" fill="none" stroke-width="2" /> <line x1="100%" x2="8" y1="5" y2="5" stroke="var(--primary)" stroke-width="2" /> </svg> </div> </template> <style lang="scss"> @reference "../../../styles.css"; .ui-tree-node { $r: &; &__row { &.is-hovered, &.is-selected, &.is-focused, &.is-highlighted, &.is-multi-selected { @apply text-accent-foreground; &::before { content: ""; left: v-bind(hoveredOffsetStyle); @apply absolute top-0 right-0 bottom-0 z-0 rounded-md; } } &:hover:not(.is-selected):not(.is-focused):not(.is-multi-selected):not( .is-drag-active ):not(.is-editing) { @apply text-accent-foreground; &::before { content: ""; left: v-bind(hoveredOffsetStyle); @apply bg-accent-hover absolute top-0 right-0 bottom-0 z-0 rounded-md; } } &.is-hovered { &::before { @apply bg-accent-hover; } } &.is-selected { &::before { @apply bg-accent; } } &.is-multi-selected { &::before { @apply bg-accent/80; } } &.is-focused { @apply text-primary-foreground; &::before { @apply bg-primary; } } &.is-highlighted { @apply text-accent-foreground; &::before { @apply border-primary border-2 bg-transparent; } } } .children { padding-left: v-bind(indentStyle); } } </style> ================================================ FILE: src/renderer/components/ui/tree/composables.ts ================================================ import type { DragStore, TreeNode } from './types' import { computed, reactive } from 'vue' export const TREE_DND_TYPE = 'application/x-tree-node-ids' export const dragStore = reactive<DragStore>({}) const draggedNodes = computed<TreeNode[]>(() => { if (dragStore.dragNodes?.length) { return dragStore.dragNodes } return dragStore.dragNode ? [dragStore.dragNode] : [] }) export const dragNodeIds = computed<(string | number)[]>(() => draggedNodes.value.map(node => node.id), ) export const dragNodeChildrenIds = computed(() => { const ids: (string | number)[] = [] const collectIds = (nodes: TreeNode[]) => { nodes.forEach((node) => { ids.push(node.id) if (node.children?.length) { collectIds(node.children) } }) } draggedNodes.value.forEach(node => collectIds(node.children || [])) return ids }) export const isDragAllowed = computed(() => { if (!draggedNodes.value.length || !dragStore.dragEnterNode) return false const isSameNode = dragNodeIds.value.includes(dragStore.dragEnterNode.id) const isChildrenNode = dragNodeChildrenIds.value.includes( dragStore.dragEnterNode.id, ) return !isSameNode && !isChildrenNode }) export function flattenTree(nodes: TreeNode[] | undefined): TreeNode[] { if (!nodes) return [] const result: TreeNode[] = [] const walk = (items: TreeNode[]) => { items.forEach((node) => { result.push(node) if (node.children?.length) { walk(node.children) } }) } walk(nodes) return result } ================================================ FILE: src/renderer/components/ui/tree/index.ts ================================================ export { default as Tree } from './Tree.vue' export { default as TreeNode } from './TreeNode.vue' export type { DropPosition, TreeNode as TreeNodeData } from './types' ================================================ FILE: src/renderer/components/ui/tree/keys.ts ================================================ import type { InjectionKey, Ref } from 'vue' import type { DropPosition, TreeNode } from './types' export interface TreeInjection { clickNode: (id: string | number, event?: MouseEvent) => void dblclickNode: (node: TreeNode) => void dragNode: ( nodes: TreeNode[], target: TreeNode, position: DropPosition, ) => void externalDrop: ( data: DataTransfer, target: TreeNode, position: DropPosition, ) => void toggleNode: (node: TreeNode) => void contextMenu: (node: TreeNode) => void updateLabel: (node: TreeNode, value: string) => void cancelEdit: (node: TreeNode) => void isHoveredByIdDisabled: Ref<boolean> editableId: Ref<string | number | null> selectedIds: Ref<(string | number)[]> focusedId: Ref<string | number | undefined> highlightedIds: Ref<Set<string | number>> } export const treeInjectionKey: InjectionKey<TreeInjection> = Symbol('ui-tree') ================================================ FILE: src/renderer/components/ui/tree/types.ts ================================================ export interface TreeNode { id: string | number label: string children?: TreeNode[] isExpanded?: boolean } export type DropPosition = 'after' | 'before' | 'center' export interface DragStore { dragNode?: TreeNode dragNodes?: TreeNode[] dragEnterNode?: TreeNode } ================================================ FILE: src/renderer/composables/__tests__/useMathEngine.test.ts ================================================ /* eslint-disable test/prefer-lowercase-title */ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { useMathEngine } from '../math-notebook/useMathEngine' const TEST_CURRENCY_RATES = { USD: 1, EUR: 0.92, GBP: 0.79, CAD: 1.36, } const { evaluateDocument, setCurrencyServiceState, updateCurrencyRates } = useMathEngine() function evalLine(expr: string) { return evaluateDocument(expr)[0] } function evalLines(text: string) { return evaluateDocument(text) } function expectValue(expr: string, expected: string) { const result = evalLine(expr) expect(result.value).toBe(expected) } function expectNumericClose(expr: string, expected: number, precision = 2) { const result = evalLine(expr) const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBeCloseTo(expected, precision) } function expectDateWithYear(expr: string, year: string) { const result = evalLine(expr) expect(result.type).toBe('date') expect(result.value).toContain(year) } beforeEach(() => { updateCurrencyRates(TEST_CURRENCY_RATES) }) describe('arithmetic', () => { it('addition', () => expectValue('10 + 5', '15')) it('subtraction', () => expectValue('20 - 3', '17')) it('multiplication', () => expectValue('4 * 5', '20')) it('division', () => expectValue('100 / 4', '25')) it('parentheses', () => expectValue('(2 + 3) * 4', '20')) it('exponent', () => expectValue('2 ^ 10', '1,024')) it('negative numbers', () => expectValue('-5 + 3', '-2')) it('decimal', () => expectValue('0.1 + 0.2', '0.3')) it('complex expression', () => expectValue('2 + 3 * 4 - 1', '13')) it('implicit multiplication', () => expectValue('6 (3)', '18')) it('grouped thousands', () => expectValue('5 300', '5,300')) }) describe('math aliases', () => { it('fact', () => expectValue('fact(5)', '120')) it('arcsin', () => expectNumericClose('arcsin(1)', Math.PI / 2, 4)) it('arccos', () => expectNumericClose('arccos(1)', 0, 4)) it('arctan', () => expectNumericClose('arctan(1)', Math.PI / 4, 4)) it('root 2 (8)', () => expectNumericClose('root 2 (8)', Math.sqrt(8), 4)) it('log 2 (8)', () => expectNumericClose('log 2 (8)', 3, 4)) }) describe('word operators', () => { it('times', () => expectValue('8 times 9', '72')) it('plus', () => expectValue('10 plus 5', '15')) it('and', () => expectValue('10 and 5', '15')) it('with', () => expectValue('10 with 5', '15')) it('minus', () => expectValue('20 minus 3', '17')) it('subtract', () => expectValue('20 subtract 3', '17')) it('without', () => expectValue('20 without 3', '17')) it('multiplied by', () => expectValue('3 multiplied by 4', '12')) it('divide', () => expectValue('100 divide 4', '25')) it('divide by', () => expectValue('100 divide by 4', '25')) it('mul', () => expectValue('5 mul 6', '30')) it('mod', () => expectValue('17 mod 5', '2')) it('does not replace words inside variable names', () => { const results = evalLines('width = 100\nwidth * 2') expect(results[1].value).toBe('200') }) }) describe('variables', () => { it('assignment and reuse', () => { const results = evalLines('v = 20\nv * 7') expect(results[0].value).toBe('20') expect(results[0].type).toBe('assignment') expect(results[1].value).toBe('140') }) it('multiple variables', () => { const results = evalLines('a = 10\nb = 20\na + b') expect(results[2].value).toBe('30') }) it('variable with word operator', () => { const results = evalLines('v = 20\nv times 7') expect(results[1].value).toBe('140') }) it('variable reassignment', () => { const results = evalLines('x = 5\nx = 10\nx + 1') expect(results[2].value).toBe('11') }) }) describe('labels', () => { it('strip label and evaluate', () => { expectNumericClose('Price: 11 + 34.45', 45.45) }) it('label with currency', () => { const result = evalLine('Total: $100') expect(result.type).toBe('unit') }) it('label with multi-word', () => { expectNumericClose('Monthly cost: 1200 / 12', 100) }) it('no label — colon in time is not a label', () => { const result = evalLine('10 + 5') expect(result.value).toBe('15') }) }) describe('quoted text', () => { it('ignores inline quoted fragments', () => { const result = evalLine('$275 for the "Model 227"') expect(result.type).toBe('unit') expect(result.value).toContain('USD') expectNumericClose('$275 for the "Model 227"', 275) }) }) describe('percentage basic', () => { it('X + Y%', () => expectNumericClose('100 + 15%', 115)) it('X - Y%', () => expectNumericClose('200 - 10%', 180)) it('Y% of X', () => expectNumericClose('15% of 200', 30)) }) describe('percentage advanced', () => { it('Y% on X', () => expectNumericClose('5% on 200', 210)) it('Y% off X', () => expectNumericClose('5% off 200', 190)) it('X as a % of Y', () => expectNumericClose('50 as a % of 100', 50)) it('X as a % on Y', () => expectNumericClose('70 as a % on 20', 250)) it('X as a % off Y', () => expectNumericClose('20 as a % off 70', 71.43)) it('Y% of what is X', () => expectNumericClose('5% of what is 6', 120)) it('Y% on what is X', () => expectNumericClose('5% on what is 6', 5.71)) it('Y% off what is X', () => expectNumericClose('5% off what is 6', 6.32)) }) describe('scales', () => { it('2k', () => { const result = evalLine('2k') const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBe(2000) }) it('2 K stays kelvin', () => { const result = evalLine('2 K') expect(result.type).toBe('unit') expect(result.value).toContain('K') }) it('3M (millions)', () => { const result = evalLine('3M') const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBe(3000000) }) it('1.5 billion', () => { const result = evalLine('1.5 billion') const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBe(1500000000) }) it('10 thousand', () => { const result = evalLine('10 thousand') const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBe(10000) }) it('5 million', () => { const result = evalLine('5 million') const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBe(5000000) }) it('$2k as currency unit', () => { const result = evalLine('$2k') expect(result.type).toBe('unit') }) }) describe('currency', () => { it('waits for currency rates while loading', () => { setCurrencyServiceState('loading') const result = evalLine('100 USD to EUR') expect(result.type).toBe('pending') expect(result.value).toBeNull() }) it('shows service unavailable when rates cannot be loaded', () => { setCurrencyServiceState( 'unavailable', 'Currency rates service unavailable', ) const result = evalLine('100 USD to EUR') expect(result.type).toBe('empty') expect(result.error).toBe('Currency rates service unavailable') }) it('$ symbol', () => { const result = evalLine('$30') expect(result.type).toBe('unit') expect(result.value).toContain('USD') }) it('€ symbol', () => { const result = evalLine('€50') expect(result.type).toBe('unit') expect(result.value).toContain('EUR') }) it('£ symbol', () => { const result = evalLine('£20') expect(result.type).toBe('unit') expect(result.value).toContain('GBP') }) it('ISO code', () => { const result = evalLine('30 USD') expect(result.type).toBe('unit') expect(result.value).toContain('USD') }) it('currency addition', () => { const result = evalLine('$10 + $20') expect(result.type).toBe('unit') expect(result.value).toContain('USD') }) it('currency conversion', () => { const result = evalLine('100 USD to EUR') expect(result.type).toBe('unit') expect(result.value).toContain('EUR') expectNumericClose('100 USD to EUR', 92) }) it('label with currency', () => { const result = evalLine('Price: $11 + $34.45') expect(result.type).toBe('unit') expect(result.value).toContain('USD') }) it('currency word names', () => { const result = evalLine('5 dollars + 10 dollars') expect(result.type).toBe('unit') expect(result.value).toContain('USD') expectNumericClose('5 dollars + 10 dollars', 15) }) }) describe('unit conversion', () => { it('stacked units', () => { const result = evalLine('1 meter 20 cm') expect(result.type).toBe('unit') expect(result.value).toContain('m') expectNumericClose('1 meter 20 cm', 1.2, 2) }) it('stacked units inside addition', () => { const result = evalLine('1 meter 20 cm + 1 cm') expect(result.type).toBe('unit') expect(result.value).toContain('m') expectNumericClose('1 meter 20 cm + 1 cm', 1.21, 2) }) it('stacked time units inside addition', () => { const result = evalLine('1 hour 20 minutes + 30 minutes') expect(result.type).toBe('unit') expect(result.value).toContain('hour') expectNumericClose('1 hour 20 minutes + 30 minutes', 1.8333, 3) }) it('stacked imperial units inside subtraction', () => { const result = evalLine('10 ft 4 inch - 1 inch') expect(result.type).toBe('unit') expect(result.value).toContain('ft') expectNumericClose('10 ft 4 inch - 1 inch', 10.25, 2) }) it('stacked units with conversion', () => { const result = evalLine('1 meter 20 cm to cm') expect(result.type).toBe('unit') expect(result.value).toContain('cm') expectNumericClose('1 meter 20 cm to cm', 120, 2) }) it('km to mile', () => { const result = evalLine('5 km to mile') expect(result.type).toBe('unit') expect(result.value).toContain('mile') }) it('celsius to fahrenheit', () => { const result = evalLine('100 celsius to fahrenheit') expect(result.type).toBe('unit') expect(result.value).toContain('fahrenheit') }) it('kg to lb', () => { const result = evalLine('1 kg to lb') expect(result.type).toBe('unit') expect(result.value).toContain('lb') }) it('inch to cm', () => { const result = evalLine('1 inch to cm') expect(result.type).toBe('unit') expect(result.value).toContain('cm') }) it('as is alias for to', () => { const result = evalLine('5 km as mile') expect(result.type).toBe('unit') expect(result.value).toContain('mile') }) it('into is alias for to', () => { const result = evalLine('5 km into mile') expect(result.type).toBe('unit') expect(result.value).toContain('mile') }) it('nautical mile alias', () => { const result = evalLine('1 nautical mile to mile') expect(result.type).toBe('unit') expect(result.value).toContain('mile') expectNumericClose('1 nautical mile to mile', 1.15078, 4) }) it('centner alias', () => { const result = evalLine('1 centner to kg') expect(result.type).toBe('unit') expect(result.value).toContain('kg') expectNumericClose('1 centner to kg', 100, 2) }) it('pound alias', () => { const result = evalLine('1 pound to lb') expect(result.type).toBe('unit') expect(result.value).toContain('lb') expectNumericClose('1 pound to lb', 1, 2) }) it('carat alias', () => { const result = evalLine('1 carat to gram') expect(result.type).toBe('unit') expect(result.value).toContain('gram') expectNumericClose('1 carat to gram', 0.2, 2) }) }) describe('css units', () => { it('pt to px', () => expectNumericClose('12 pt in px', 16, 1)) it('pt into px', () => expectNumericClose('12 pt into px', 16, 1)) it('custom em', () => { const results = evalLines('em = 20px\n1.2 em in px') expect(results[0].type).toBe('assignment') expect(results[0].value).toBe('20 px') expectCloseInResults(results[1], 24) }) it('custom ppi', () => { const results = evalLines('ppi = 326\n1 cm in px') expect(results[0].type).toBe('assignment') expect(results[0].value).toBe('326') expectCloseInResults(results[1], 128.35) }) }) describe('math functions', () => { it('sqrt without parentheses', () => expectValue('sqrt 16', '4')) it('round without parentheses', () => expectValue('round 3.45', '3')) it('cbrt without parentheses', () => expectValue('cbrt 8', '2')) it('sqrt', () => expectValue('sqrt(16)', '4')) it('abs', () => expectValue('abs(-42)', '42')) it('round', () => expectValue('round(3.7)', '4')) it('ceil', () => expectValue('ceil(3.2)', '4')) it('floor', () => expectValue('floor(3.9)', '3')) it('sin(45 deg)', () => expectNumericClose('sin(45 deg)', 0.7071)) it('sin 45°', () => expectNumericClose('sin 45°', 0.7071)) it('cos(pi)', () => expectNumericClose('cos(pi)', -1)) it('log(100)', () => { const result = evalLine('log(100)') expect(result.error).toBeNull() expect(result.value).not.toBeNull() }) it('ln(e)', () => expectNumericClose('ln(e)', 1)) it('round(1 month in days)', () => expectValue('round(1 month in days)', '30')) it('round 1 month in days', () => expectValue('round 1 month in days', '30')) }) describe('strict time semantics', () => { it('1 month in days', () => expectNumericClose('1 month in days', 365 / 12, 3)) it('1 year in days', () => expectNumericClose('1 year in days', 365, 3)) it('2 hours + 30 minutes', () => expectNumericClose('2 hours + 30 minutes', 2.5, 2)) }) describe('number format', () => { it('in hex', () => { const result = evalLine('255 in hex') expect(result.value).toBe('0xFF') }) it('in bin', () => { const result = evalLine('10 in bin') expect(result.value).toBe('0b1010') }) it('in oct', () => { const result = evalLine('255 in oct') expect(result.value).toBe('0o377') }) it('in sci', () => { const result = evalLine('5300 in sci') expect(result.value).toBe('5.3e+3') }) it('grouped thousands in sci', () => { const result = evalLine('5 300 in sci') expect(result.value).toBe('5.3e+3') }) it('in scientific', () => { const result = evalLine('5300 in scientific') expect(result.value).toBe('5.3e+3') }) it('hex input', () => expectValue('0xFF', '255')) it('binary input', () => expectValue('0b1010', '10')) it('octal input', () => expectValue('0o377', '255')) it('0xFF in hex roundtrip', () => { const result = evalLine('0xFF in hex') expect(result.value).toBe('0xFF') }) }) describe('area and volume aliases', () => { it('sq alias', () => { const result = evalLine('20 sq cm to cm^2') expect(result.type).toBe('unit') expectNumericClose('20 sq cm to cm^2', 20, 2) }) it('square alias', () => { const result = evalLine('30 square inches to inch^2') expect(result.type).toBe('unit') expectNumericClose('30 square inches to inch^2', 30, 2) }) it('sqm alias', () => { const result = evalLine('11 sqm to m^2') expect(result.type).toBe('unit') expectNumericClose('11 sqm to m^2', 11, 2) }) it('cubic alias', () => { const result = evalLine('30 cubic inches to inch^3') expect(result.type).toBe('unit') expectNumericClose('30 cubic inches to inch^3', 30, 2) }) it('cbm alias', () => { const result = evalLine('11 cbm to m^3') expect(result.type).toBe('unit') expectNumericClose('11 cbm to m^3', 11, 2) }) }) describe('long-tail units', () => { it('point', () => expectNumericClose('1 point to inch', 1 / 72, 4)) it('line', () => expectNumericClose('1 line to inch', 1 / 12, 4)) it('hand', () => expectNumericClose('1 hand to inch', 4, 4)) it('rod', () => expectNumericClose('1 rod to ft', 16.5, 4)) it('chain', () => expectNumericClose('1 chain to ft', 66, 4)) it('furlong', () => expectNumericClose('1 furlong to mile', 0.125, 4)) it('cable', () => expectNumericClose('1 cable to m', 185.2, 4)) it('league', () => expectNumericClose('1 league to mile', 3, 4)) it('are', () => expectNumericClose('1 are to m^2', 100, 4)) it('tea spoon alias', () => expectNumericClose('1 tea spoon to teaspoon', 1, 4)) it('table spoon alias', () => expectNumericClose('1 table spoon to tablespoon', 1, 4)) it('degree to radian', () => expectNumericClose('1 degree to radian', Math.PI / 180, 4)) it('radian to degree', () => expectNumericClose('1 radian to degree', 180 / Math.PI, 4)) }) describe('prev', () => { it('references previous line result', () => { const results = evalLines('10 + 5\nprev * 2') expect(results[0].value).toBe('15') expect(results[1].value).toBe('30') }) it('chain prev across multiple lines', () => { const results = evalLines('10\nprev + 5\nprev * 2') expect(results[0].value).toBe('10') expect(results[1].value).toBe('15') expect(results[2].value).toBe('30') }) it('prev resets after empty line', () => { const results = evalLines('10\n\nprev + 5') expect(results[0].value).toBe('10') expect(results[1].type).toBe('empty') expect(results[2].error).not.toBeNull() }) it('prev - 10', () => { const results = evalLines('75\nprev - 10') expect(results[1].value).toBe('65') }) it('date prev + 1 day', () => { const results = evalLines('fromunix(1446587186)\nprev + 1 day') expect(results[1].type).toBe('date') expect(results[1].value).toBe( new Date((1446587186 + 86400) * 1000).toLocaleString(), ) }) }) describe('sum and total', () => { it('sum of lines above', () => { const results = evalLines('10 + 5\n20 * 3\nsum') expect(results[0].value).toBe('15') expect(results[1].value).toBe('60') expect(results[2].value).toBe('75') expect(results[2].type).toBe('aggregate') }) it('total is alias for sum', () => { const results = evalLines('10\n20\n30\ntotal') expect(results[3].value).toBe('60') }) it('sum resets after empty line', () => { const results = evalLines('10\n20\n\n5\n15\nsum') expect(results[5].value).toBe('20') }) it('sum of zero lines', () => { const results = evalLines('\nsum') expect(results[1].value).toBe('0') }) it('case insensitive', () => { const results = evalLines('10\n20\nSUM') expect(results[2].value).toBe('30') }) }) describe('average and avg', () => { it('average of lines above', () => { const results = evalLines('10\n20\n30\naverage') expect(results[3].value).toBe('20') expect(results[3].type).toBe('aggregate') }) it('avg is alias', () => { const results = evalLines('10\n20\n30\navg') expect(results[3].value).toBe('20') }) it('average resets after empty line', () => { const results = evalLines('10\n20\n\n100\naverage') expect(results[4].value).toBe('100') }) it('case insensitive', () => { const results = evalLines('10\n30\nAVERAGE') expect(results[2].value).toBe('20') }) }) describe('comments', () => { it('// comment', () => { const result = evalLine('// This is a comment') expect(result.type).toBe('comment') expect(result.value).toBeNull() }) it('# comment', () => { const result = evalLine('# This is a header') expect(result.type).toBe('comment') expect(result.value).toBeNull() }) it('comment does not break prev', () => { const results = evalLines('10\n// comment\nprev + 5') expect(results[0].value).toBe('10') expect(results[1].type).toBe('comment') expect(results[2].value).toBe('15') }) it('comment does not affect sum', () => { const results = evalLines('10\n// comment\n20\nsum') expect(results[3].value).toBe('30') }) }) describe('empty lines', () => { it('empty line produces empty result', () => { const result = evalLine('') expect(result.type).toBe('empty') expect(result.value).toBeNull() }) it('whitespace-only line is empty', () => { const result = evalLine(' ') expect(result.type).toBe('empty') expect(result.value).toBeNull() }) }) describe('fromunix', () => { it('converts unix timestamp to date', () => { const result = evalLine('fromunix(1446587186)') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('fromunix(0) is epoch', () => { const result = evalLine('fromunix(0)') expect(result.type).toBe('date') expect(result.value).toContain('1970') }) it('fromunix + 2 day', () => { const result = evalLine('fromunix(1446587186) + 2 day') expect(result.type).toBe('date') expect(result.value).toBe( new Date((1446587186 + 2 * 86400) * 1000).toLocaleString(), ) }) it('date variable + 2 day', () => { const results = evalLines('d = fromunix(1446587186)\nd + 2 day') expect(results[0].type).toBe('assignment') expect(results[1].type).toBe('date') expect(results[1].value).toBe( new Date((1446587186 + 2 * 86400) * 1000).toLocaleString(), ) }) it('local dotted date assignment + 2 day', () => { const results = evalLines('x = 12.03.2025\nx + 2 day') expect(results[0].type).toBe('assignment') expect(results[0].value).toBe(new Date(2025, 2, 12).toLocaleString()) expect(results[1].type).toBe('date') expect(results[1].value).toBe(new Date(2025, 2, 14).toLocaleString()) }) }) describe('time zones', () => { beforeEach(() => { vi.useFakeTimers() vi.setSystemTime(new Date('2026-03-06T12:00:00Z')) }) afterEach(() => { vi.useRealTimers() }) it('PST time', () => { const result = evalLine('PST time') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('time()', () => { const result = evalLine('time()') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('time() + 1 day', () => { const result = evalLine('time() + 1 day') expect(result.type).toBe('date') expect(result.value).toBe( new Date('2026-03-07T12:00:00Z').toLocaleString(), ) }) it('now()', () => { const result = evalLine('now()') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('now + 1 day', () => { const result = evalLine('now + 1 day') expect(result.type).toBe('date') expect(result.value).toBe( new Date('2026-03-07T12:00:00Z').toLocaleString(), ) }) it('Time in Madrid', () => { const result = evalLine('Time in Madrid') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('now in Madrid', () => { const result = evalLine('now in Madrid') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('Berlin now', () => { const result = evalLine('Berlin now') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('PST time - Berlin time', () => { const result = evalLine('PST time - Berlin time') expect(result.type).toBe('unit') expect(result.value).toContain('hour') expectNumericClose('PST time - Berlin time', -9, 2) }) it('2:30 pm HKT in Berlin', () => { const result = evalLine('2:30 pm HKT in Berlin') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('2:30 pm New York in Berlin', () => { const result = evalLine('2:30 pm New York in Berlin') expect(result.type).toBe('date') expect(result.value).not.toBeNull() }) it('2026-03-06 PST in Berlin', () => { expectDateWithYear('2026-03-06 PST in Berlin', '2026') }) it('2026-03-06 2:30 pm PST in Berlin', () => { expectDateWithYear('2026-03-06 2:30 pm PST in Berlin', '2026') }) it('Mar 6 2026 PST in Berlin', () => { expectDateWithYear('Mar 6 2026 PST in Berlin', '2026') }) it('2:30 pm Mar 6 2026 PST in Berlin', () => { expectDateWithYear('2:30 pm Mar 6 2026 PST in Berlin', '2026') }) it('tomorrow PST in Berlin', () => { expectDateWithYear('tomorrow PST in Berlin', '2026') }) }) describe('constants', () => { it('pi', () => expectNumericClose('pi', 3.14159, 4)) it('e', () => expectNumericClose('e', 2.71828, 4)) }) describe('bitwise operations', () => { it('AND', () => expectValue('5 & 3', '1')) it('OR', () => expectValue('5 | 3', '7')) it('XOR', () => expectValue('5 xor 3', '6')) it('left shift', () => expectValue('1 << 4', '16')) it('right shift', () => expectValue('16 >> 2', '4')) }) describe('error handling', () => { it('invalid expression returns error', () => { const result = evalLine('hello world') expect(result.error).not.toBeNull() expect(result.type).toBe('empty') }) it('division by zero', () => { const result = evalLine('1 / 0') expect(result.value).not.toBeNull() }) it('undefined variable', () => { const result = evalLine('unknownVar + 1') expect(result.error).not.toBeNull() }) }) describe('full document integration', () => { it('full document', () => { const doc = [ '8 times 9', '$2k', 'Price: $11 + $34.45', 'v = 20', 'v times 7', '100 + 15%', '5% on 200', '5% off 200', '50 as a % of 100', '5% of what is 6', '// This is comment', '# Header', '', '10 + 5', '20 * 3', 'sum', 'prev - 10', '0xFF in hex', '5300 in sci', 'sqrt(16)', ].join('\n') const results = evalLines(doc) expect(results[0].value).toBe('72') expect(results[1].type).toBe('unit') expect(results[2].type).toBe('unit') expect(results[3].type).toBe('assignment') expect(results[3].value).toBe('20') expect(results[4].value).toBe('140') expectCloseInResults(results[5], 115) expectCloseInResults(results[6], 210) expectCloseInResults(results[7], 190) expectCloseInResults(results[8], 50) expectCloseInResults(results[9], 120) expect(results[10].type).toBe('comment') expect(results[10].value).toBeNull() expect(results[11].type).toBe('comment') expect(results[11].value).toBeNull() expect(results[12].type).toBe('empty') expect(results[13].value).toBe('15') expect(results[14].value).toBe('60') expect(results[15].value).toBe('75') expect(results[16].value).toBe('65') expect(results[17].value).toBe('0xFF') expect(results[18].value).toBe('5.3e+3') expect(results[19].value).toBe('4') }) }) function expectCloseInResults( result: ReturnType<typeof evalLine>, expected: number, ) { const num = Number.parseFloat(result.value!.replace(/,/g, '')) expect(num).toBeCloseTo(expected, 1) } ================================================ FILE: src/renderer/composables/index.ts ================================================ export * from './math-notebook' export * from './useApp' export * from './useCopyToClipboard' export * from './useDialog' export * from './useEditor' export * from './useFolders' export * from './useSnippets' export * from './useSnippetUpdate' export * from './useSonner' export * from './useStorageMutation' export * from './useTags' export * from './useTheme' ================================================ FILE: src/renderer/composables/math-notebook/index.ts ================================================ export * from './useMathEngine' export * from './useMathNotebook' ================================================ FILE: src/renderer/composables/math-notebook/math-engine/constants.ts ================================================ const currencyWordNames: Record<string, string> = { dollar: 'USD', dollars: 'USD', euro: 'EUR', euros: 'EUR', pound: 'GBP', pounds: 'GBP', rouble: 'RUB', roubles: 'RUB', ruble: 'RUB', rubles: 'RUB', yen: 'JPY', yuan: 'CNY', rupee: 'INR', rupees: 'INR', real: 'BRL', reais: 'BRL', peso: 'MXN', pesos: 'MXN', } export const SUPPORTED_CURRENCY_CODES = [ 'USD', 'EUR', 'GBP', 'CAD', 'RUB', 'JPY', 'CNY', 'CHF', 'AUD', 'KRW', 'INR', 'BRL', 'MXN', 'PLN', 'SEK', 'NOK', 'DKK', 'CZK', 'HUF', 'TRY', 'NZD', 'SGD', 'HKD', 'ZAR', 'THB', 'UAH', 'ILS', ] as const export const currencySymbols: Record<string, string> = { '$': 'USD', '€': 'EUR', '£': 'GBP', '¥': 'JPY', '₽': 'RUB', '₴': 'UAH', '₩': 'KRW', '₹': 'INR', 'R$': 'BRL', } export { currencyWordNames } export const weightContextPattern = /\b(?:lb|lbs|kg|gram|grams|ounce|ounces|tonne|tonnes|stone|stones|centner|centners|carat|carats)\b/i export const knownUnitTokens = new Set([ ...SUPPORTED_CURRENCY_CODES.map(code => code.toLowerCase()), 'meter', 'meters', 'm', 'cm', 'mm', 'km', 'inch', 'inches', 'foot', 'feet', 'ft', 'yard', 'yards', 'mile', 'miles', 'gram', 'grams', 'kg', 'lb', 'lbs', 'pound', 'pounds', 'centner', 'centners', 'tonne', 'tonnes', 'stone', 'stones', 'carat', 'carats', 'ounce', 'ounces', 'second', 'seconds', 'minute', 'minutes', 'hour', 'hours', 'day', 'days', 'week', 'weeks', 'month', 'months', 'year', 'years', 'celsius', 'fahrenheit', 'kelvin', 'bit', 'byte', 'kb', 'mb', 'gb', 'tb', 'liter', 'liters', 'litre', 'litres', 'gallon', 'gallons', 'pint', 'pints', 'quart', 'quarts', 'cup', 'cups', 'teaspoon', 'teaspoons', 'tablespoon', 'tablespoons', 'mil', 'rod', 'rods', 'chain', 'chains', 'hectare', 'hectares', 'are', 'ares', 'acre', 'acres', 'point', 'points', 'line', 'lines', 'hand', 'hands', 'furlong', 'furlongs', 'cable', 'cables', 'nauticalmile', 'nauticalmiles', 'league', 'leagues', 'radian', 'radians', 'degree', 'degrees', 'mcsecond', 'mcminute', 'mchour', 'mcday', 'mcweek', 'mcmonth', 'mcyear', 'px', 'pixel', 'pixels', 'pt', 'point', 'points', 'em', ...Object.keys(currencyWordNames), ]) export const lengthInchesByUnit: Record<string, number> = { inch: 1, inches: 1, cm: 1 / 2.54, mm: 1 / 25.4, m: 39.37007874015748, meter: 39.37007874015748, meters: 39.37007874015748, km: 39370.07874015748, foot: 12, feet: 12, ft: 12, yard: 36, yards: 36, mile: 63360, miles: 63360, } export const timeZoneAliases: Record<string, string> = { pst: 'America/Los_Angeles', pdt: 'America/Los_Angeles', est: 'America/New_York', edt: 'America/New_York', cst: 'America/Chicago', cdt: 'America/Chicago', mst: 'America/Denver', mdt: 'America/Denver', hkt: 'Asia/Hong_Kong', jst: 'Asia/Tokyo', ist: 'Asia/Kolkata', gmt: 'Etc/GMT', utc: 'UTC', cet: 'Europe/Paris', cest: 'Europe/Paris', } export const DEFAULT_EM_IN_PX = 16 export const DEFAULT_PPI = 96 export const MATH_UNARY_FUNCTIONS = [ 'sqrt', 'cbrt', 'abs', 'ln', 'fact', 'round', 'ceil', 'floor', 'sin', 'cos', 'tan', 'arcsin', 'arccos', 'arctan', 'sinh', 'cosh', 'tanh', ] as const export const TIME_UNIT_TOKEN_MAP: Record<string, string> = { second: 'mcsecond', seconds: 'mcsecond', minute: 'mcminute', minutes: 'mcminute', hour: 'mchour', hours: 'mchour', day: 'mcday', days: 'mcday', week: 'mcweek', weeks: 'mcweek', month: 'mcmonth', months: 'mcmonth', year: 'mcyear', years: 'mcyear', } export const HUMANIZED_UNIT_NAMES: Record< string, { singular: string, plural: string } > = { mcsecond: { singular: 'second', plural: 'seconds' }, mcminute: { singular: 'minute', plural: 'minutes' }, mchour: { singular: 'hour', plural: 'hours' }, mcday: { singular: 'day', plural: 'days' }, mcweek: { singular: 'week', plural: 'weeks' }, mcmonth: { singular: 'month', plural: 'months' }, mcyear: { singular: 'year', plural: 'years' }, nauticalmile: { singular: 'nautical mile', plural: 'nautical miles' }, centner: { singular: 'centner', plural: 'centners' }, point: { singular: 'point', plural: 'points' }, line: { singular: 'line', plural: 'lines' }, hand: { singular: 'hand', plural: 'hands' }, furlong: { singular: 'furlong', plural: 'furlongs' }, cable: { singular: 'cable', plural: 'cables' }, league: { singular: 'league', plural: 'leagues' }, are: { singular: 'are', plural: 'ares' }, carat: { singular: 'carat', plural: 'carats' }, } export const MONTH_NAME_TO_INDEX: Record<string, number> = { jan: 1, january: 1, feb: 2, february: 2, mar: 3, march: 3, apr: 4, april: 4, may: 5, jun: 6, june: 6, jul: 7, july: 7, aug: 8, august: 8, sep: 9, sept: 9, september: 9, oct: 10, october: 10, nov: 11, november: 11, dec: 12, december: 12, } ================================================ FILE: src/renderer/composables/math-notebook/math-engine/css.ts ================================================ import type { CssContext, SpecialLineResult } from './types' import { lengthInchesByUnit } from './constants' import { splitByKeyword } from './preprocess' function normalizeCssUnit(unit: string) { const normalized = unit.toLowerCase() if (normalized === 'pixel' || normalized === 'pixels') return 'px' if (normalized === 'point' || normalized === 'points') return 'pt' if (normalized in lengthInchesByUnit) return normalized if (normalized === 'px' || normalized === 'pt' || normalized === 'em') return normalized return null } function parseCssQuantity(text: string) { const match = text.trim().match(/^(-?\d+(?:\.\d+)?)\s*([a-z]+)$/i) if (!match) return null const value = Number(match[1]) const unit = normalizeCssUnit(match[2]) if (Number.isNaN(value) || !unit) return null return { value, unit } } function toPx( quantity: { value: number, unit: string }, cssContext: CssContext, ) { switch (quantity.unit) { case 'px': return quantity.value case 'pt': return (quantity.value * cssContext.ppi) / 72 case 'em': return quantity.value * cssContext.emPx default: return ( quantity.value * lengthInchesByUnit[quantity.unit] * cssContext.ppi ) } } function fromPx(pxValue: number, targetUnit: string, cssContext: CssContext) { switch (targetUnit) { case 'px': return pxValue case 'pt': return (pxValue * 72) / cssContext.ppi case 'em': return pxValue / cssContext.emPx default: return pxValue / cssContext.ppi / lengthInchesByUnit[targetUnit] } } function formatNumberValue(value: number) { return Number.isInteger(value) ? value.toLocaleString('en-US') : value.toLocaleString('en-US', { maximumFractionDigits: 6 }) } function formatUnitValue(value: number, unit: string) { return `${formatNumberValue(value)} ${unit}` } export function evaluateCssLine( line: string, cssContext: CssContext, ): SpecialLineResult | null { const ppiAssignmentMatch = line.match(/^ppi\s*=\s*(-?\d+(?:\.\d+)?)$/i) if (ppiAssignmentMatch) { const nextPpi = Number(ppiAssignmentMatch[1]) if (Number.isNaN(nextPpi)) { return null } cssContext.ppi = nextPpi return { lineResult: { value: formatNumberValue(nextPpi), error: null, type: 'assignment', }, rawResult: nextPpi, } } const emAssignmentMatch = line.match(/^em\s*=\s*(-?\d+(?:\.\d+)?)\s*px$/i) if (emAssignmentMatch) { const nextEm = Number(emAssignmentMatch[1]) if (Number.isNaN(nextEm)) { return null } cssContext.emPx = nextEm return { lineResult: { value: formatUnitValue(nextEm, 'px'), error: null, type: 'assignment', }, rawResult: nextEm, } } const conversionParts = splitByKeyword(line, [ ' into ', ' in ', ' to ', ' as ', ]) if (!conversionParts) { return null } const source = parseCssQuantity(conversionParts[0]) const targetUnit = normalizeCssUnit(conversionParts[1]) if (!source || !targetUnit) { return null } const sourceIsCss = ['px', 'pt', 'em'].includes(source.unit) const targetIsCss = ['px', 'pt', 'em'].includes(targetUnit) const sourceIsLength = source.unit in lengthInchesByUnit const targetIsLength = targetUnit in lengthInchesByUnit if (!sourceIsCss && !targetIsCss && (!sourceIsLength || !targetIsLength)) { return null } const pxValue = toPx(source, cssContext) const converted = fromPx(pxValue, targetUnit, cssContext) return { lineResult: { value: formatUnitValue(converted, targetUnit), error: null, type: 'unit', }, rawResult: converted, } } ================================================ FILE: src/renderer/composables/math-notebook/math-engine/mathInstance.ts ================================================ import { all, create } from 'mathjs' function createUnitSafe( mathInstance: ReturnType<typeof create>, name: string, options: { definition?: string, aliases: string[] }, ) { try { mathInstance.createUnit(name, options) } catch { // Ignore duplicate or unsupported unit definitions and keep the rest of the registry intact. } } export function createMathInstance(currencyRates: Record<string, number>) { const mathInstance = create(all, { number: 'number', precision: 14, }) mathInstance.import( { fromunix: (ts: number) => new Date(ts * 1000), ln: (x: number) => Math.log(x), fact: (x: number) => mathInstance.factorial(x), root: (degree: number, value: number) => mathInstance.nthRoot(value, degree), arcsin: (x: number) => mathInstance.asin(x), arccos: (x: number) => mathInstance.acos(x), arctan: (x: number) => mathInstance.atan(x), unitValue: (value: any) => value && typeof value.toNumber === 'function' ? value.toNumber() : Number(value), }, { override: true }, ) createUnitSafe(mathInstance, 'USD', { aliases: ['usd'] }) createUnitSafe(mathInstance, 'mcsecond', { definition: '1 second', aliases: [], }) createUnitSafe(mathInstance, 'mcminute', { definition: '60 mcsecond', aliases: [], }) createUnitSafe(mathInstance, 'mchour', { definition: '60 mcminute', aliases: [], }) createUnitSafe(mathInstance, 'mcday', { definition: '24 mchour', aliases: [], }) createUnitSafe(mathInstance, 'mcweek', { definition: '7 mcday', aliases: [], }) createUnitSafe(mathInstance, 'mcyear', { definition: '365 mcday', aliases: [], }) createUnitSafe(mathInstance, 'mcmonth', { definition: `${365 / 12} mcday`, aliases: [], }) createUnitSafe(mathInstance, 'are', { definition: '100 m^2', aliases: ['ares'], }) createUnitSafe(mathInstance, 'carat', { definition: '0.2 gram', aliases: ['carats'], }) createUnitSafe(mathInstance, 'pound', { definition: '1 lb', aliases: ['pounds'], }) createUnitSafe(mathInstance, 'centner', { definition: '100 kg', aliases: ['centners'], }) createUnitSafe(mathInstance, 'point', { definition: '0.0138888888889 inch', aliases: ['points'], }) createUnitSafe(mathInstance, 'line', { definition: '0.0833333333333 inch', aliases: ['lines'], }) createUnitSafe(mathInstance, 'hand', { definition: '4 inch', aliases: ['hands'], }) createUnitSafe(mathInstance, 'furlong', { definition: '660 ft', aliases: ['furlongs'], }) createUnitSafe(mathInstance, 'cable', { definition: '185.2 m', aliases: ['cables'], }) createUnitSafe(mathInstance, 'nauticalmile', { definition: '1852 m', aliases: ['nauticalmiles'], }) createUnitSafe(mathInstance, 'league', { definition: '3 mile', aliases: ['leagues'], }) for (const [code, rate] of Object.entries(currencyRates)) { if (code === 'USD') continue createUnitSafe(mathInstance, code, { definition: `${1 / rate} USD`, aliases: [code.toLowerCase()], }) } return mathInstance } ================================================ FILE: src/renderer/composables/math-notebook/math-engine/preprocess.ts ================================================ import { currencySymbols, currencyWordNames, knownUnitTokens, MATH_UNARY_FUNCTIONS, SUPPORTED_CURRENCY_CODES, TIME_UNIT_TOKEN_MAP, weightContextPattern, } from './constants' function preprocessLabels(line: string): string { const match = line.match(/^([a-z][a-z0-9]*(?:\s[a-z0-9]+)*):\s(\S.*)$/i) if (match) return match[2] return line } function preprocessQuotedText(line: string): string { const stripped = line .replace(/"[^"]*"/g, ' ') .replace(/\s+/g, ' ') .trim() if (stripped === line) { return line } const tokens = stripped.split(' ') while (tokens.length > 1) { const lastToken = tokens.at(-1)!.toLowerCase() if (!/^[a-z-]+$/i.test(lastToken) || knownUnitTokens.has(lastToken)) { break } tokens.pop() } return tokens.join(' ') } function sanitizeForCurrencyDetection(line: string) { return preprocessQuotedText(preprocessLabels(line)) } function preprocessGroupedNumbers(line: string): string { return line.replace(/\b\d{1,3}(?:\s\d{3})+\b/g, match => match.replace(/\s+/g, '')) } function preprocessDegreeSigns(line: string): string { return line.replace(/(-?\d+(?:\.\d+)?)\s*°/g, '$1 deg') } function preprocessTimeUnits(line: string): string { return line.replace( /\b(seconds?|minutes?|hours?|days?|weeks?|months?|years?)\b/gi, match => TIME_UNIT_TOKEN_MAP[match.toLowerCase()] || match, ) } function normalizePowerUnit(unit: string) { switch (unit.toLowerCase()) { case 'inches': case 'inch': return 'inch' case 'feet': case 'foot': case 'ft': return 'ft' case 'meters': case 'meter': case 'm': return 'm' case 'centimeter': case 'centimeters': case 'cm': return 'cm' case 'millimeter': case 'millimeters': case 'mm': return 'mm' case 'kilometer': case 'kilometers': case 'km': return 'km' case 'yards': case 'yard': return 'yard' case 'miles': case 'mile': return 'mile' default: return unit.toLowerCase() } } function preprocessUnitAliases(line: string): string { return line .replace(/\btea\s+spoons?\b/gi, 'teaspoon') .replace(/\btable\s+spoons?\b/gi, 'tablespoon') .replace(/\bnautical\s+miles?\b/gi, 'nauticalmile') } function preprocessAreaVolumeAliases(line: string): string { line = line.replace(/\bsqm\b/gi, 'm^2') line = line.replace(/\bcbm\b/gi, 'm^3') line = line.replace( /(\d+(?:\.\d+)?)\s+(sq|square)\s+([a-z]+)/gi, (_, value: string, _prefix: string, unit: string) => `${value} ${normalizePowerUnit(unit)}^2`, ) line = line.replace( /(\b(?:in|to|as|into)\s+)(sq|square)\s+([a-z]+)/gi, (_, prefix: string, _keyword: string, unit: string) => `${prefix}${normalizePowerUnit(unit)}^2`, ) line = line.replace( /(\d+(?:\.\d+)?)\s+(cu|cubic|cb)\s+([a-z]+)/gi, (_, value: string, _prefix: string, unit: string) => `${value} ${normalizePowerUnit(unit)}^3`, ) line = line.replace( /(\b(?:in|to|as|into)\s+)(cu|cubic|cb)\s+([a-z]+)/gi, (_, prefix: string, _keyword: string, unit: string) => `${prefix}${normalizePowerUnit(unit)}^3`, ) return line } function preprocessFunctionExpression(expression: string): string { const trimmed = expression.trim() const openIndex = trimmed.indexOf('(') const closeIndex = trimmed.endsWith(')') ? trimmed.length - 1 : -1 if (openIndex > 0 && closeIndex > openIndex) { if (trimmed.toLowerCase().startsWith('root ')) { const degree = trimmed.slice(5, openIndex).trim() const value = trimmed.slice(openIndex + 1, closeIndex).trim() if (degree && value) { return `root(${degree}, ${value})` } } if (trimmed.toLowerCase().startsWith('log ')) { const base = trimmed.slice(4, openIndex).trim() const value = trimmed.slice(openIndex + 1, closeIndex).trim() if (base && value) { return `log(${value}, ${base})` } } } const unaryFunctionsPattern = MATH_UNARY_FUNCTIONS.join('|') const unaryMatch = trimmed.match( new RegExp(`^(${unaryFunctionsPattern})\\s+(.+)$`, 'i'), ) if (unaryMatch && !unaryMatch[2].trim().startsWith('(')) { return `${unaryMatch[1]}(${unaryMatch[2].trim()})` } return expression } function preprocessFunctionSyntax(line: string): string { const assignmentIndex = line.indexOf('=') if (assignmentIndex > 0) { const left = line.slice(0, assignmentIndex).trim() const right = line.slice(assignmentIndex + 1).trim() if (/^[a-z_]\w*$/i.test(left) && right) { return `${line.slice(0, assignmentIndex + 1)} ${preprocessFunctionExpression(right)}` } } return preprocessFunctionExpression(line) } function preprocessFunctionConversions(line: string): string { const unaryFunctionsPattern = MATH_UNARY_FUNCTIONS.join('|') return line.replace( new RegExp( `(^|[=,+\\-*/(]\\s*)(${unaryFunctionsPattern})\\(([^()]+?)\\s+(?:in|to|as|into)\\s+([a-z][a-z0-9^]*)\\)`, 'gi', ), (_, prefix: string, fn: string, source: string, target: string) => { return `${prefix}${fn}(unitValue(to(${source.trim()}, ${target.trim()})))` }, ) } function preprocessCurrencySymbols(line: string): string { let nextLine = line.replace( /R\$\s*(\d+(?:\.\d+)?(?:\s*[kKM])?)\b/g, '$1 BRL', ) for (const [symbol, code] of Object.entries(currencySymbols)) { if (symbol === 'R$') continue const escaped = symbol.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') nextLine = nextLine.replace( new RegExp(`${escaped}\\s*(\\d+(?:\\.\\d+)?(?:\\s*(?:k|M))?)\\b`, 'g'), `$1 ${code}`, ) } return nextLine } function preprocessCurrencyWords(line: string): string { return line.replace( /(\d+(?:\.\d+)?)\s+(dollars?|euros?|pounds?|roubles?|rubles?|yen|yuan|rupees?|reais|real|pesos?)\b/gi, ( _, amount: string, currencyName: string, _offset: number, fullLine: string, ) => { const lowerCurrencyName = currencyName.toLowerCase() if ( (lowerCurrencyName === 'pound' || lowerCurrencyName === 'pounds') && weightContextPattern.test(fullLine) ) { return `${amount} ${currencyName}` } const code = currencyWordNames[lowerCurrencyName] return code ? `${amount} ${code}` : `${amount} ${currencyName}` }, ) } function preprocessScales(line: string): string { return line .replace(/(\d+(?:\.\d+)?)\s*k\b/g, '($1 * 1000)') .replace(/(\d+(?:\.\d+)?)\s*M\b/g, '($1 * 1000000)') .replace(/(\d+(?:\.\d+)?)\s+billion\b/gi, '($1 * 1000000000)') .replace(/(\d+(?:\.\d+)?)\s+million\b/gi, '($1 * 1000000)') .replace(/(\d+(?:\.\d+)?)\s+thousand\b/gi, '($1 * 1000)') } function preprocessStackedUnits(line: string): string { return line.replace( /-?\d+(?:\.\d+)?\s+[a-z]+(?:\s+-?\d+(?:\.\d+)?\s+[a-z]+)+/gi, (match) => { const tokens = match.trim().split(/\s+/) const pairs: string[] = [] for (let index = 0; index < tokens.length; index += 2) { if (!/^-?\d+(?:\.\d+)?$/.test(tokens[index])) { return match } const unit = tokens[index + 1]?.toLowerCase() if (!unit || !knownUnitTokens.has(unit)) { return match } pairs.push(`${tokens[index]} ${tokens[index + 1]}`) } return pairs.length >= 2 ? `(${pairs.join(' + ')})` : match }, ) } function preprocessImplicitMultiplication(line: string): string { return line.replace(/(\d)\s*\(/g, '$1 * (') } function preprocessWordOperators(line: string): string { return line .replace(/\bmultiplied\s+by\b/gi, '*') .replace(/\bdivide\s+by\b/gi, '/') .replace(/(\S+)\s+xor\s+(\S+)/gi, 'bitXor($1, $2)') .replace(/\btimes\b/gi, '*') .replace(/\bdivide\b/gi, '/') .replace(/\bplus\b/gi, '+') .replace(/\band\b/gi, '+') .replace(/\bwith\b/gi, '+') .replace(/\bminus\b/gi, '-') .replace(/\bsubtract\b/gi, '-') .replace(/\bwithout\b/gi, '-') .replace(/\bmul\b/gi, '*') .replace(/\bmod\b/gi, '%') } function preprocessPercentages(line: string): string { return line .replace( /(\d+(?:\.\d+)?)%\s+of\s+what\s+is\s+(\d+(?:\.\d+)?)/gi, '$2 / ($1 / 100)', ) .replace( /(\d+(?:\.\d+)?)%\s+on\s+what\s+is\s+(\d+(?:\.\d+)?)/gi, '$2 / (1 + $1 / 100)', ) .replace( /(\d+(?:\.\d+)?)%\s+off\s+what\s+is\s+(\d+(?:\.\d+)?)/gi, '$2 / (1 - $1 / 100)', ) .replace( /(\d+(?:\.\d+)?)\s+as\s+a\s+%\s+of\s+(\d+(?:\.\d+)?)/gi, '($1 / $2) * 100', ) .replace( /(\d+(?:\.\d+)?)\s+as\s+a\s+%\s+on\s+(\d+(?:\.\d+)?)/gi, '(($1 - $2) / $2) * 100', ) .replace( /(\d+(?:\.\d+)?)\s+as\s+a\s+%\s+off\s+(\d+(?:\.\d+)?)/gi, '(($2 - $1) / $2) * 100', ) .replace(/(\d+(?:\.\d+)?)%\s+on\s+(\d+(?:\.\d+)?)/gi, '$2 * (1 + $1 / 100)') .replace( /(\d+(?:\.\d+)?)%\s+off\s+(\d+(?:\.\d+)?)/gi, '$2 * (1 - $1 / 100)', ) .replace(/(\d+(?:\.\d+)?)%\s+of\s+(\d+(?:\.\d+)?)/gi, '$1 / 100 * $2') .replace(/(\d+(?:\.\d+)?)\s*\+\s*(\d+(?:\.\d+)?)%/g, '$1 * (1 + $2 / 100)') .replace(/(\d+(?:\.\d+)?)\s*-\s*(\d+(?:\.\d+)?)%/g, '$1 * (1 - $2 / 100)') .replace(/(\d+(?:\.\d+)?)%(?!\s*\w)/g, '$1 / 100') } function preprocessConversions(line: string): string { return line.replace(/\s+as\s+/gi, ' to ').replace(/\s+into\s+/gi, ' to ') } export function splitByKeyword(line: string, keywords: string[]) { const lowerLine = line.toLowerCase() for (const keyword of keywords) { const index = lowerLine.lastIndexOf(keyword) if (index > 0) { return [ line.slice(0, index).trim(), line.slice(index + keyword.length).trim(), ] as const } } return null } export function hasCurrencyExpression(line: string) { const sanitized = sanitizeForCurrencyDetection(line) if (!sanitized) { return false } if ( Object.keys(currencySymbols).some(symbol => sanitized.includes(symbol)) ) { return true } const currencyCodePattern = new RegExp( `\\b(${SUPPORTED_CURRENCY_CODES.join('|')})\\b`, 'i', ) if (currencyCodePattern.test(sanitized)) { return true } return Object.keys(currencyWordNames).some((currencyName) => { if (!new RegExp(`\\b${currencyName}\\b`, 'i').test(sanitized)) { return false } if ( (currencyName === 'pound' || currencyName === 'pounds') && weightContextPattern.test(sanitized) ) { return false } return true }) } export function preprocessMathExpression(line: string) { let processed = preprocessLabels(line) processed = preprocessQuotedText(processed) processed = preprocessGroupedNumbers(processed) processed = preprocessDegreeSigns(processed) processed = preprocessTimeUnits(processed) processed = preprocessUnitAliases(processed) processed = preprocessCurrencySymbols(processed) processed = preprocessCurrencyWords(processed) processed = preprocessScales(processed) processed = preprocessAreaVolumeAliases(processed) processed = preprocessStackedUnits(processed) processed = preprocessFunctionSyntax(processed) processed = preprocessFunctionConversions(processed) processed = preprocessImplicitMultiplication(processed) processed = preprocessWordOperators(processed) processed = preprocessPercentages(processed) processed = preprocessConversions(processed) return processed } ================================================ FILE: src/renderer/composables/math-notebook/math-engine/timeZones.ts ================================================ import type { LineResult, SpecialLineResult } from './types' import { MONTH_NAME_TO_INDEX, timeZoneAliases } from './constants' import { splitByKeyword } from './preprocess' interface ParsedTemporalExpression { date: Date explicitDate: boolean } interface TimeZoneDifferenceOptions { createHourUnit: (hours: number) => any formatResult: (value: any) => LineResult } function getLocalTimeZone() { return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC' } function getSupportedTimeZones() { if (typeof Intl.supportedValuesOf !== 'function') return [] return Intl.supportedValuesOf('timeZone') } function normalizeTimeZoneInput(value: string) { return value.toLowerCase().replace(/_/g, ' ').replace(/\s+/g, ' ').trim() } function resolveTimeZone(value: string) { const normalized = normalizeTimeZoneInput(value) if (timeZoneAliases[normalized]) { return timeZoneAliases[normalized] } return ( getSupportedTimeZones().find((timeZone) => { const lowerTimeZone = normalizeTimeZoneInput( timeZone.replace(/\//g, ' '), ) const cityName = normalizeTimeZoneInput(timeZone.split('/').at(-1) || '') return lowerTimeZone === normalized || cityName === normalized }) || null ) } function getTimeZoneParts(date: Date, timeZone: string) { const formatter = new Intl.DateTimeFormat('en-US', { timeZone, hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', }) const parts = formatter.formatToParts(date) const getPartValue = (type: string) => Number(parts.find(part => part.type === type)?.value) return { year: getPartValue('year'), month: getPartValue('month'), day: getPartValue('day'), hour: getPartValue('hour'), minute: getPartValue('minute'), second: getPartValue('second'), } } function zonedDateToUtc( parts: { year: number month: number day: number hour: number minute: number }, timeZone: string, ) { let utcTimestamp = Date.UTC( parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, 0, ) for (let iteration = 0; iteration < 3; iteration++) { const actualParts = getTimeZoneParts(new Date(utcTimestamp), timeZone) const expectedTimestamp = Date.UTC( parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, 0, ) const actualTimestamp = Date.UTC( actualParts.year, actualParts.month - 1, actualParts.day, actualParts.hour, actualParts.minute, 0, ) utcTimestamp += expectedTimestamp - actualTimestamp } return new Date(utcTimestamp) } function formatTimeZoneDate(date: Date, timeZone: string, includeYear = false) { return new Intl.DateTimeFormat('en-US', { timeZone, hour: 'numeric', minute: '2-digit', month: 'short', day: 'numeric', ...(includeYear ? { year: 'numeric' as const } : {}), timeZoneName: 'short', }).format(date) } function getTimeZoneOffsetMinutes(date: Date, timeZone: string) { const parts = getTimeZoneParts(date, timeZone) const zonedTimestamp = Date.UTC( parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second, ) return (zonedTimestamp - date.getTime()) / (1000 * 60) } function parseClockParts(value: string) { const timeMatch = value .trim() .match(/^(\d{1,2})(?::(\d{2}))?(?:\s*(am|pm))?$/i) if (!timeMatch) { return null } const [, hourText, minuteText, meridiem] = timeMatch let hours = Number(hourText) const minutes = Number(minuteText || '0') if (Number.isNaN(hours) || Number.isNaN(minutes)) { return null } if (meridiem?.toLowerCase() === 'pm' && hours < 12) { hours += 12 } if (meridiem?.toLowerCase() === 'am' && hours === 12) { hours = 0 } return { hour: hours, minute: minutes } } function splitTemporalExpressionWithLeadingTime(value: string) { const tokens = value.trim().split(/\s+/).filter(Boolean) for (let length = Math.min(3, tokens.length); length >= 1; length--) { const timeCandidate = tokens.slice(0, length).join(' ') const timeParts = parseClockParts(timeCandidate) if (timeParts) { const remainder = tokens.slice(length).join(' ') if (remainder) { return { timeParts, remainder, } } } } return null } function getCurrentDatePartsInTimeZone(now: Date, timeZone: string) { const parts = getTimeZoneParts(now, timeZone) return { year: parts.year, month: parts.month, day: parts.day, } } function shiftDateParts( parts: { year: number, month: number, day: number }, dayDelta: number, ) { const shifted = new Date( Date.UTC(parts.year, parts.month - 1, parts.day + dayDelta), ) return { year: shifted.getUTCFullYear(), month: shifted.getUTCMonth() + 1, day: shifted.getUTCDate(), } } function parseDateParts(value: string, now: Date, timeZone: string) { const trimmed = value.trim().replace(/,/g, '') const currentDateParts = getCurrentDatePartsInTimeZone(now, timeZone) if (!trimmed) { return null } if (/^today$/i.test(trimmed)) { return currentDateParts } if (/^tomorrow$/i.test(trimmed)) { return shiftDateParts(currentDateParts, 1) } if (/^yesterday$/i.test(trimmed)) { return shiftDateParts(currentDateParts, -1) } const isoMatch = trimmed.match(/^(\d{4})-(\d{1,2})-(\d{1,2})$/) if (isoMatch) { return { year: Number(isoMatch[1]), month: Number(isoMatch[2]), day: Number(isoMatch[3]), } } const slashMatch = trimmed.match(/^(\d{1,2})\/(\d{1,2})(?:\/(\d{4}))?$/) if (slashMatch) { return { year: Number(slashMatch[3] || currentDateParts.year), month: Number(slashMatch[1]), day: Number(slashMatch[2]), } } const dottedMatch = trimmed.match(/^(\d{1,2})\.(\d{1,2})(?:\.(\d{4}))?$/) if (dottedMatch) { return { year: Number(dottedMatch[3] || currentDateParts.year), month: Number(dottedMatch[2]), day: Number(dottedMatch[1]), } } const monthNameMatch = trimmed.match( /^([a-z]+)\s+(\d{1,2})(?:\s+(\d{4}))?$/i, ) if (monthNameMatch) { const monthIndex = MONTH_NAME_TO_INDEX[monthNameMatch[1].toLowerCase()] if (!monthIndex) { return null } return { year: Number(monthNameMatch[3] || currentDateParts.year), month: monthIndex, day: Number(monthNameMatch[2]), } } return null } function resolveTrailingTimeZone(value: string) { const tokens = value.trim().split(/\s+/).filter(Boolean) const maxParts = Math.min(4, tokens.length) for (let length = maxParts; length >= 1; length--) { const timeZoneText = tokens.slice(-length).join(' ') const timeZone = resolveTimeZone(timeZoneText) if (timeZone) { return { timeZone, expression: tokens.slice(0, -length).join(' ').trim(), } } } return null } function parseTemporalBody( value: string, now: Date, timeZone: string, ): ParsedTemporalExpression | null { const trimmed = value.trim() if (!trimmed) { return null } const timeOnly = parseClockParts(trimmed) if (timeOnly) { const dateParts = getCurrentDatePartsInTimeZone(now, timeZone) return { date: zonedDateToUtc( { ...dateParts, hour: timeOnly.hour, minute: timeOnly.minute, }, timeZone, ), explicitDate: false, } } const timeAtEndMatch = trimmed.match( /^(.*\S)\s+(\d{1,2}(?::\d{2})?(?:\s*(?:am|pm))?)$/i, ) if (timeAtEndMatch) { const dateParts = parseDateParts(timeAtEndMatch[1], now, timeZone) const timeParts = parseClockParts(timeAtEndMatch[2]) if (dateParts && timeParts) { return { date: zonedDateToUtc( { ...dateParts, hour: timeParts.hour, minute: timeParts.minute, }, timeZone, ), explicitDate: true, } } } const leadingTime = splitTemporalExpressionWithLeadingTime(trimmed) if (leadingTime) { const dateParts = parseDateParts(leadingTime.remainder, now, timeZone) if (dateParts) { return { date: zonedDateToUtc( { ...dateParts, hour: leadingTime.timeParts.hour, minute: leadingTime.timeParts.minute, }, timeZone, ), explicitDate: true, } } } const dateParts = parseDateParts(trimmed, now, timeZone) if (dateParts) { return { date: zonedDateToUtc( { ...dateParts, hour: 0, minute: 0, }, timeZone, ), explicitDate: true, } } return null } function parseZonedTemporalExpression(value: string, now: Date) { const resolved = resolveTrailingTimeZone(value) if (!resolved) { return null } return parseTemporalBody(resolved.expression, now, resolved.timeZone) } export function parseExplicitLocalTemporalExpression(value: string, now: Date) { const trimmed = value.trim() const localTimeZone = getLocalTimeZone() if (!trimmed) { return null } const timeAtEndMatch = trimmed.match( /^(.*\S)\s+(\d{1,2}(?::\d{2})?(?:\s*(?:am|pm))?)$/i, ) if (timeAtEndMatch) { const dateParts = parseDateParts(timeAtEndMatch[1], now, localTimeZone) const timeParts = parseClockParts(timeAtEndMatch[2]) if (dateParts && timeParts) { return { date: new Date( dateParts.year, dateParts.month - 1, dateParts.day, timeParts.hour, timeParts.minute, ), explicitDate: true, } } } const leadingTime = splitTemporalExpressionWithLeadingTime(trimmed) if (leadingTime) { const dateParts = parseDateParts(leadingTime.remainder, now, localTimeZone) if (dateParts) { return { date: new Date( dateParts.year, dateParts.month - 1, dateParts.day, leadingTime.timeParts.hour, leadingTime.timeParts.minute, ), explicitDate: true, } } } const dateParts = parseDateParts(trimmed, now, localTimeZone) if (!dateParts) { return null } return { date: new Date(dateParts.year, dateParts.month - 1, dateParts.day, 0, 0), explicitDate: true, } } function resolveCurrentTimeZoneExpression(line: string) { const lowerLine = line.trim().toLowerCase() if ( lowerLine === 'time' || lowerLine === 'time()' || lowerLine === 'now' || lowerLine === 'now()' ) { return getLocalTimeZone() } if (lowerLine.endsWith(' time')) { return resolveTimeZone(line.slice(0, -5)) } if (lowerLine.endsWith(' now')) { return resolveTimeZone(line.slice(0, -4)) } if (lowerLine.startsWith('time in ')) { return resolveTimeZone(line.slice(8)) } if (lowerLine.startsWith('now in ')) { return resolveTimeZone(line.slice(7)) } return null } export function evaluateTimeZoneDifferenceLine( line: string, now: Date, options: TimeZoneDifferenceOptions, ): SpecialLineResult | null { const subtractionIndex = line.indexOf(' - ') if (subtractionIndex <= 0) { return null } const left = line.slice(0, subtractionIndex).trim() const right = line.slice(subtractionIndex + 3).trim() if (!left || !right) { return null } const leftTimeZone = resolveCurrentTimeZoneExpression(left) const rightTimeZone = resolveCurrentTimeZoneExpression(right) if (!leftTimeZone || !rightTimeZone) { return null } const diffHours = (getTimeZoneOffsetMinutes(now, leftTimeZone) - getTimeZoneOffsetMinutes(now, rightTimeZone)) / 60 const result = options.createHourUnit(diffHours) return { lineResult: options.formatResult(result), rawResult: result, } } export function evaluateTimeZoneLine( line: string, now: Date, ): SpecialLineResult | null { const lowerLine = line.toLowerCase() const localTimeZone = getLocalTimeZone() if ( lowerLine === 'time' || lowerLine === 'time()' || lowerLine === 'now' || lowerLine === 'now()' ) { return { lineResult: { value: formatTimeZoneDate(now, localTimeZone), error: null, type: 'date', }, rawResult: now, } } if (lowerLine.endsWith(' time')) { const timeZone = resolveTimeZone(line.slice(0, -5)) if (!timeZone) { return null } return { lineResult: { value: formatTimeZoneDate(now, timeZone), error: null, type: 'date', }, rawResult: now, } } if (lowerLine.endsWith(' now')) { const timeZone = resolveTimeZone(line.slice(0, -4)) if (!timeZone) { return null } return { lineResult: { value: formatTimeZoneDate(now, timeZone), error: null, type: 'date', }, rawResult: now, } } if (lowerLine.startsWith('time in ')) { const timeZone = resolveTimeZone(line.slice(8)) if (!timeZone) { return null } return { lineResult: { value: formatTimeZoneDate(now, timeZone), error: null, type: 'date', }, rawResult: now, } } if (lowerLine.startsWith('now in ')) { const timeZone = resolveTimeZone(line.slice(7)) if (!timeZone) { return null } return { lineResult: { value: formatTimeZoneDate(now, timeZone), error: null, type: 'date', }, rawResult: now, } } const conversionParts = splitByKeyword(line, [' in ']) if (!conversionParts) { return null } const targetTimeZone = resolveTimeZone(conversionParts[1]) if (!targetTimeZone) { return null } const parsedSourceExpression = parseZonedTemporalExpression(conversionParts[0], now) || parseTemporalBody(conversionParts[0], now, localTimeZone) if (!parsedSourceExpression) { return null } return { lineResult: { value: formatTimeZoneDate( parsedSourceExpression.date, targetTimeZone, parsedSourceExpression.explicitDate, ), error: null, type: 'date', }, rawResult: parsedSourceExpression.date, } } ================================================ FILE: src/renderer/composables/math-notebook/math-engine/types.ts ================================================ export interface LineResult { value: string | null error: string | null showError?: boolean type: | 'number' | 'unit' | 'date' | 'pending' | 'empty' | 'comment' | 'assignment' | 'aggregate' } export type CurrencyServiceState = 'loading' | 'ready' | 'unavailable' export interface CssContext { emPx: number ppi: number } export interface SpecialLineResult { lineResult: LineResult rawResult: any } ================================================ FILE: src/renderer/composables/math-notebook/useMathEngine.ts ================================================ import type { CssContext, CurrencyServiceState, LineResult, SpecialLineResult, } from './math-engine/types' import { DEFAULT_EM_IN_PX, DEFAULT_PPI, HUMANIZED_UNIT_NAMES, } from './math-engine/constants' import { evaluateCssLine } from './math-engine/css' import { createMathInstance } from './math-engine/mathInstance' import { hasCurrencyExpression, preprocessMathExpression, } from './math-engine/preprocess' import { evaluateTimeZoneDifferenceLine, evaluateTimeZoneLine, parseExplicitLocalTemporalExpression, } from './math-engine/timeZones' export type { LineResult } from './math-engine/types' interface FormatDirective { format: 'hex' | 'bin' | 'oct' | 'sci' | null expression: string } let activeCurrencyRates: Record<string, number> = {} let currencyServiceState: CurrencyServiceState = 'loading' let currencyUnavailableMessage = '' let math = createMathInstance(activeCurrencyRates) function detectFormatDirective(line: string): FormatDirective { const formatMap: Record<string, 'hex' | 'bin' | 'oct' | 'sci'> = { 'in hex': 'hex', 'in bin': 'bin', 'in oct': 'oct', 'in sci': 'sci', 'in scientific': 'sci', } const lower = line.toLowerCase() for (const [suffix, format] of Object.entries(formatMap)) { if (lower.endsWith(suffix)) { return { format, expression: line.slice(0, line.length - suffix.length).trim(), } } } return { format: null, expression: line } } function applyFormat( result: any, format: NonNullable<FormatDirective['format']>, ): LineResult { const num = typeof result === 'number' ? result : result && typeof result === 'object' && typeof result.toNumber === 'function' ? result.toNumber() : Number(result) if (Number.isNaN(num)) { return { value: String(result), error: null, type: 'number' } } const intValue = Math.round(num) switch (format) { case 'hex': return { value: `0x${intValue.toString(16).toUpperCase()}`, error: null, type: 'number', } case 'bin': return { value: `0b${intValue.toString(2)}`, error: null, type: 'number', } case 'oct': return { value: `0o${intValue.toString(8)}`, error: null, type: 'number', } case 'sci': return { value: num.toExponential(), error: null, type: 'number' } } } function humanizeFormattedUnits(value: string) { return value.replace( /(-?\d[\d,]*(?:\.\d+)?)\s+([a-z][a-z0-9]*)\b/gi, (match, amountText: string, unitId: string) => { const displayUnit = HUMANIZED_UNIT_NAMES[unitId] if (!displayUnit) { return match } const numericAmount = Number.parseFloat(amountText.replace(/,/g, '')) const unitLabel = Math.abs(numericAmount) === 1 ? displayUnit.singular : displayUnit.plural return `${amountText} ${unitLabel}` }, ) } function formatResult(result: any): LineResult { if (result === undefined || result === null) { return { value: null, error: null, type: 'empty' } } if (result instanceof Date) { return { value: result.toLocaleString(), error: null, type: 'date', } } if ( result && typeof result === 'object' && typeof result.toNumber === 'function' && result.units ) { return { value: humanizeFormattedUnits(math.format(result, { precision: 6 })), error: null, type: 'unit', } } if (typeof result === 'number') { const formatted = Number.isInteger(result) ? result.toLocaleString('en-US') : result.toLocaleString('en-US', { maximumFractionDigits: 6 }) return { value: formatted, error: null, type: 'number' } } if (typeof result === 'string') { return { value: result, error: null, type: 'number' } } if (result && typeof result.toString === 'function') { return { value: humanizeFormattedUnits(math.format(result, { precision: 6 })), error: null, type: 'number', } } return { value: String(result), error: null, type: 'number' } } function getNumericValue(result: any): number | null { if (typeof result === 'number') return result if ( result && typeof result === 'object' && typeof result.toNumber === 'function' ) { try { return result.toNumber() } catch { return null } } return null } function splitTopLevelAddSub(expression: string) { const terms: string[] = [] const operators: Array<'+' | '-'> = [] let depth = 0 let segmentStart = 0 for (let index = 0; index < expression.length; index++) { const char = expression[index] if (char === '(') { depth += 1 continue } if (char === ')') { depth = Math.max(0, depth - 1) continue } if (depth !== 0 || (char !== '+' && char !== '-')) { continue } let prevIndex = index - 1 while (prevIndex >= 0 && /\s/.test(expression[prevIndex])) { prevIndex -= 1 } let nextIndex = index + 1 while (nextIndex < expression.length && /\s/.test(expression[nextIndex])) { nextIndex += 1 } if (prevIndex < 0 || nextIndex >= expression.length) { continue } if ('+-*/%^,('.includes(expression[prevIndex])) { continue } terms.push(expression.slice(segmentStart, index).trim()) operators.push(char) segmentStart = index + 1 } if (operators.length === 0) { return null } terms.push(expression.slice(segmentStart).trim()) if (terms.some(term => !term)) { return null } return { terms, operators } } function evaluateDateLikeExpression( expression: string, now: Date, scope: Record<string, any>, ) { const timeZoneResult = evaluateTimeZoneLine(expression, now) if (timeZoneResult?.rawResult instanceof Date) { return timeZoneResult.rawResult } const localTemporalResult = parseExplicitLocalTemporalExpression( expression, now, ) if (localTemporalResult) { return localTemporalResult.date } try { const result = math.evaluate(expression, scope) return result instanceof Date ? result : null } catch { return null } } function evaluateDurationMilliseconds( expression: string, scope: Record<string, any>, ) { try { const result = math.evaluate(expression, scope) if ( result && typeof result === 'object' && typeof result.toNumber === 'function' ) { const milliseconds = result.toNumber('ms') return Number.isFinite(milliseconds) ? milliseconds : null } } catch { return null } return null } function evaluateDateArithmeticLine( line: string, now: Date, scope: Record<string, any>, ): SpecialLineResult | null { const split = splitTopLevelAddSub(line) if (!split) { return null } const initialDate = evaluateDateLikeExpression(split.terms[0], now, scope) const initialDuration = initialDate ? null : evaluateDurationMilliseconds(split.terms[0], scope) if (!initialDate && initialDuration === null) { return null } let currentDate = initialDate ? new Date(initialDate.getTime()) : null let currentDuration = initialDuration for (let index = 0; index < split.operators.length; index++) { const operator = split.operators[index] const term = split.terms[index + 1] const nextDate = evaluateDateLikeExpression(term, now, scope) const nextDuration = nextDate ? null : evaluateDurationMilliseconds(term, scope) if (currentDate) { if (nextDuration === null) { return null } currentDate = new Date( currentDate.getTime() + (operator === '+' ? nextDuration : -nextDuration), ) continue } if (nextDate) { if (operator !== '+' || currentDuration === null) { return null } currentDate = new Date(nextDate.getTime() + currentDuration) currentDuration = null continue } if (currentDuration === null || nextDuration === null) { return null } currentDuration = operator === '+' ? currentDuration + nextDuration : currentDuration - nextDuration } if (!currentDate) { return null } return { lineResult: formatResult(currentDate), rawResult: currentDate, } } function evaluateDateAssignmentLine( line: string, now: Date, scope: Record<string, any>, ): SpecialLineResult | null { const assignmentIndex = line.indexOf('=') if (assignmentIndex <= 0) { return null } const variableName = line.slice(0, assignmentIndex).trim() if (!/^[a-z_]\w*$/i.test(variableName)) { return null } const expression = line.slice(assignmentIndex + 1).trim() if (!expression) { return null } const dateValue = evaluateDateLikeExpression(expression, now, scope) if (!dateValue) { return null } scope[variableName] = dateValue return { lineResult: { ...formatResult(dateValue), type: 'assignment', }, rawResult: dateValue, } } export function useMathEngine() { function evaluateDocument(text: string): LineResult[] { const lines = text.split('\n') const results: LineResult[] = [] const scope: Record<string, any> = { em: DEFAULT_EM_IN_PX, ppi: DEFAULT_PPI, } const cssContext: CssContext = { emPx: DEFAULT_EM_IN_PX, ppi: DEFAULT_PPI, } const currentDate = new Date() let prevResult: any let numericBlock: number[] = [] for (const line of lines) { const trimmed = line.trim() if (!trimmed) { results.push({ value: null, error: null, type: 'empty' }) prevResult = undefined numericBlock = [] continue } if (trimmed.startsWith('//') || trimmed.startsWith('#')) { results.push({ value: null, error: null, type: 'comment' }) continue } if (prevResult !== undefined) { scope.prev = prevResult } const lowerTrimmed = trimmed.toLowerCase() if (lowerTrimmed === 'sum' || lowerTrimmed === 'total') { const total = numericBlock.reduce((sum, value) => sum + value, 0) const formatted = formatResult(total) formatted.type = 'aggregate' results.push(formatted) prevResult = total numericBlock.push(total) continue } if (lowerTrimmed === 'average' || lowerTrimmed === 'avg') { const total = numericBlock.reduce((sum, value) => sum + value, 0) const average = numericBlock.length > 0 ? total / numericBlock.length : 0 const formatted = formatResult(average) formatted.type = 'aggregate' results.push(formatted) prevResult = average numericBlock.push(average) continue } try { if ( currencyServiceState !== 'ready' && hasCurrencyExpression(trimmed) ) { results.push( currencyServiceState === 'loading' ? { value: null, error: null, type: 'pending' } : { value: null, error: currencyUnavailableMessage, showError: true, type: 'empty', }, ) prevResult = undefined continue } const timeZoneDifferenceResult = evaluateTimeZoneDifferenceLine( trimmed, currentDate, { createHourUnit: hours => math.unit(hours, 'hour'), formatResult, }, ) if (timeZoneDifferenceResult) { results.push(timeZoneDifferenceResult.lineResult) prevResult = timeZoneDifferenceResult.rawResult const numericValue = getNumericValue( timeZoneDifferenceResult.rawResult, ) if (numericValue !== null) { numericBlock.push(numericValue) } continue } const timeZoneResult = evaluateTimeZoneLine(trimmed, currentDate) if (timeZoneResult) { results.push(timeZoneResult.lineResult) prevResult = timeZoneResult.rawResult continue } const cssResult = evaluateCssLine(trimmed, cssContext) if (cssResult) { scope.em = cssContext.emPx scope.ppi = cssContext.ppi results.push(cssResult.lineResult) prevResult = cssResult.rawResult if (typeof cssResult.rawResult === 'number') { numericBlock.push(cssResult.rawResult) } continue } const processed = preprocessMathExpression(trimmed) const dateAssignmentResult = evaluateDateAssignmentLine( processed, currentDate, scope, ) if (dateAssignmentResult) { results.push(dateAssignmentResult.lineResult) prevResult = dateAssignmentResult.rawResult continue } const dateArithmeticResult = evaluateDateArithmeticLine( processed, currentDate, scope, ) if (dateArithmeticResult) { results.push(dateArithmeticResult.lineResult) prevResult = dateArithmeticResult.rawResult continue } const localTemporalResult = parseExplicitLocalTemporalExpression( processed, currentDate, ) if (localTemporalResult) { results.push(formatResult(localTemporalResult.date)) prevResult = localTemporalResult.date continue } const { format, expression } = detectFormatDirective(processed) const toEvaluate = format ? expression : processed const result = math.evaluate(toEvaluate, scope) if (result === undefined) { results.push({ value: null, error: null, type: 'empty' }) prevResult = undefined continue } if (format) { const formatted = applyFormat(result, format) results.push(formatted) prevResult = result const numericValue = getNumericValue(result) if (numericValue !== null) { numericBlock.push(numericValue) } continue } const formatted = formatResult(result) if ( /^[a-z_]\w*\s*=/i.test(trimmed) && !/^[a-z_]\w*\s*==/i.test(trimmed) ) { formatted.type = 'assignment' } results.push(formatted) prevResult = result const numericValue = getNumericValue(result) if (numericValue !== null) { numericBlock.push(numericValue) } } catch (error: any) { results.push({ value: null, error: error.message || 'Error', type: 'empty', }) prevResult = undefined } } return results } function updateCurrencyRates(rates: Record<string, number>) { currencyServiceState = 'ready' currencyUnavailableMessage = '' activeCurrencyRates = { ...rates, } math = createMathInstance(activeCurrencyRates) } function setCurrencyServiceState( state: CurrencyServiceState, errorMessage = '', ) { currencyServiceState = state currencyUnavailableMessage = state === 'unavailable' ? errorMessage : '' if (state !== 'ready') { activeCurrencyRates = {} math = createMathInstance(activeCurrencyRates) } } return { evaluateDocument, setCurrencyServiceState, updateCurrencyRates, } } ================================================ FILE: src/renderer/composables/math-notebook/useMathNotebook.ts ================================================ import type { MathSheet } from '~/main/store/types' import { markPersistedStorageMutation } from '@/composables/useStorageMutation' import { i18n, ipc } from '@/electron' import { useDebounceFn } from '@vueuse/core' import { nanoid } from 'nanoid' function escapeRegExp(value: string): string { return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') } function getNextIndexedName(baseName: string, existingNames: string[]): string { const normalizedBase = baseName.trim() const indexedNameRe = new RegExp( `^${escapeRegExp(normalizedBase)}(?:\\s+(\\d+))?$`, 'i', ) let maxIndex = 0 existingNames.forEach((name) => { const match = name.trim().match(indexedNameRe) if (!match) { return } const index = match[1] ? Number(match[1]) : 0 if (Number.isFinite(index)) { maxIndex = Math.max(maxIndex, index) } }) return `${normalizedBase} ${maxIndex + 1}` } const sheets = ref<MathSheet[]>([]) const activeSheetId = ref<string | null>(null) let initialized = false const activeSheet = computed(() => { return sheets.value.find(s => s.id === activeSheetId.value) }) function persist() { markPersistedStorageMutation() ipc.invoke('spaces:math:write', { sheets: JSON.parse(JSON.stringify(sheets.value)), activeSheetId: activeSheetId.value, }) } const debouncedPersist = useDebounceFn(persist, 500) async function loadFromDisk() { const data = await ipc.invoke('spaces:math:read', null) sheets.value = Array.isArray(data?.sheets) ? data.sheets : [] activeSheetId.value = data?.activeSheetId ?? null } export function useMathNotebook() { async function init() { if (initialized) { return } initialized = true await loadFromDisk() } async function reloadFromDisk() { await loadFromDisk() } function createSheet() { const nextSheetName = getNextIndexedName( i18n.t('mathNotebook.untitled'), sheets.value.map(sheet => sheet.name), ) const sheet: MathSheet = { id: nanoid(), name: nextSheetName, content: '', createdAt: Date.now(), updatedAt: Date.now(), } sheets.value = [...sheets.value, sheet] activeSheetId.value = sheet.id persist() return sheet.id } function deleteSheet(id: string) { const index = sheets.value.findIndex(s => s.id === id) if (index === -1) return const next = [...sheets.value] next.splice(index, 1) sheets.value = next if (activeSheetId.value === id) { activeSheetId.value = next.length > 0 ? next[Math.min(index, next.length - 1)].id : null } persist() } function updateSheet(id: string, content: string) { const sheet = sheets.value.find(s => s.id === id) if (sheet) { sheet.content = content sheet.updatedAt = Date.now() debouncedPersist() } } function selectSheet(id: string) { activeSheetId.value = id persist() } function renameSheet(id: string, name: string) { const sheet = sheets.value.find(s => s.id === id) if (sheet) { sheet.name = name sheet.updatedAt = Date.now() persist() } } return { sheets, activeSheetId, activeSheet, init, reloadFromDisk, createSheet, deleteSheet, updateSheet, selectSheet, renameSheet, } } ================================================ FILE: src/renderer/composables/types/index.ts ================================================ export const LibraryFilter = { All: 'all', Favorites: 'favorites', Inbox: 'inbox', Trash: 'trash', } as const export const LibraryTab = { Library: 'library', Tags: 'tags', } as const export type StateAction = 'beforeSearch' export interface SavedState { snippetId?: number snippetContentIndex?: number folderId?: number tagId?: number libraryFilter?: (typeof LibraryFilter)[keyof typeof LibraryFilter] isSidebarHidden?: boolean } ================================================ FILE: src/renderer/composables/useApp.ts ================================================ import type { SavedState, StateAction } from './types' import { store } from '@/electron' const isSponsored = import.meta.env.VITE_SPONSORED === 'true' const stateSnapshots = reactive<Record<StateAction, SavedState>>({ beforeSearch: {}, }) const state = reactive<SavedState>(store.app.get('state') as SavedState) const storedSidebarHidden = store.app.get('state.isSidebarHidden') as | boolean | undefined const isSidebarHidden = ref( storedSidebarHidden ?? state.isSidebarHidden ?? false, ) if (state.isSidebarHidden === undefined) state.isSidebarHidden = isSidebarHidden.value const highlightedFolderIds = ref<Set<number>>(new Set()) const highlightedSnippetIds = ref<Set<number>>(new Set()) const highlightedTagId = ref<number>() const focusedFolderId = ref<number | undefined>() const focusedSnippetId = ref<number | undefined>() const isAppLoading = ref(true) const isCodeSpaceInitialized = ref(false) const isFocusedSnippetName = ref(false) const isFocusedSearch = ref(false) const isShowMarkdown = ref(false) const isShowMarkdownPresentation = ref(false) const isShowMindmap = ref(false) const isShowCodePreview = ref(false) const isShowCodeImage = ref(false) const isShowJsonVisualizer = ref(false) function saveStateSnapshot(action: StateAction): void { stateSnapshots[action] = { snippetId: state.snippetId, folderId: state.folderId, tagId: state.tagId, snippetContentIndex: state.snippetContentIndex, libraryFilter: state.libraryFilter, isSidebarHidden: isSidebarHidden.value, } } function restoreStateSnapshot(action: StateAction): void { const snapshot = stateSnapshots[action] if (!snapshot) return if (snapshot.snippetId !== undefined) state.snippetId = snapshot.snippetId if (snapshot.folderId !== undefined) state.folderId = snapshot.folderId if (snapshot.tagId !== undefined) state.tagId = snapshot.tagId if (snapshot.snippetContentIndex !== undefined) state.snippetContentIndex = snapshot.snippetContentIndex if (snapshot.isSidebarHidden !== undefined) isSidebarHidden.value = snapshot.isSidebarHidden } watch( state, () => { store.app.set('state', JSON.parse(JSON.stringify(state))) }, { deep: true }, ) watch(isSidebarHidden, (value) => { state.isSidebarHidden = value }) export function useApp() { return { focusedFolderId, focusedSnippetId, isAppLoading, isCodeSpaceInitialized, highlightedFolderIds, highlightedSnippetIds, highlightedTagId, isFocusedSnippetName, isFocusedSearch, isShowCodeImage, isShowCodePreview, isShowMarkdown, isShowMarkdownPresentation, isShowMindmap, isShowJsonVisualizer, isSidebarHidden, isSponsored, restoreStateSnapshot, saveStateSnapshot, state, stateSnapshots, } } ================================================ FILE: src/renderer/composables/useCopyToClipboard.ts ================================================ import { useSonner } from '@/composables' import { i18n } from '@/electron' import { useClipboard } from '@vueuse/core' export function useCopyToClipboard() { const { copy: clipboard } = useClipboard() const { sonner } = useSonner() function copy(value: string) { clipboard(value) sonner({ message: i18n.t('messages:success.copied'), type: 'success' }) } return copy } ================================================ FILE: src/renderer/composables/useDialog.ts ================================================ import { Button } from '@/components/ui/shadcn/button' import * as Dialog from '@/components/ui/shadcn/dialog' import { i18n } from '@/electron' import { useEventListener } from '@vueuse/core' import { createVNode, defineComponent, h, onBeforeUnmount, ref, render, } from 'vue' export interface DialogOptions { title?: string description?: string confirmText?: string cancelText?: string content?: string | Component } export function useDialog() { const createDialogContainer = () => { const container = document.createElement('div') document.body.appendChild(container) return container } const showDialog = (options: DialogOptions = {}) => { const { title, description, confirmText, cancelText, content } = options const container = createDialogContainer() let isDialogActive = true const cleanup = () => { isDialogActive = false if (container && container.parentNode) { render(null, container) container.parentNode.removeChild(container) } } return new Promise<boolean>((resolve) => { const DialogComponent = defineComponent({ setup() { const isOpen = ref(true) const onConfirm = () => { if (!isDialogActive) return resolve(true) isOpen.value = false cleanup() } const onCancel = () => { if (!isDialogActive) return resolve(false) isOpen.value = false cleanup() } const handleKeyDown = (event: KeyboardEvent) => { if (event.key === 'Enter' && isOpen.value && isDialogActive) { event.preventDefault() onConfirm() } } useEventListener(document, 'keydown', handleKeyDown) onBeforeUnmount(() => { isDialogActive = false }) return () => h( Dialog.Dialog, { 'defaultOpen': isOpen.value, 'open': isOpen.value, 'onUpdate:open': (open: boolean) => { isOpen.value = open // Если диалог закрывается через UI, вызываем onCancel if (!open && isDialogActive) { onCancel() } }, }, { default: () => [ h( Dialog.DialogContent, { class: 'sm:max-w-[425px]' }, { default: () => [ h( Dialog.DialogHeader, {}, { default: () => [ h( Dialog.DialogTitle, {}, { default: () => title }, ), description ? h( Dialog.DialogDescription, {}, { default: () => description }, ) : null, ], }, ), content && typeof content === 'string' ? h('div', { class: '' }, { default: () => content }) : content && typeof content === 'object' ? h(content) : null, confirmText && cancelText ? h( Dialog.DialogFooter, {}, { default: () => [ h( Button, { variant: 'outline', onClick: onCancel, }, { default: () => cancelText }, ), h( Button, { onClick: onConfirm, }, { default: () => confirmText }, ), ], }, ) : null, ], }, ), ], }, ) }, }) render(createVNode(DialogComponent), container) }) } const confirm = (options: DialogOptions) => { const defaultOptions = { title: 'Confirm', confirmText: i18n.t('button.confirm'), cancelText: i18n.t('button.cancel'), } return showDialog({ ...defaultOptions, ...options }) } return { showDialog, confirm, } } ================================================ FILE: src/renderer/composables/useEditor.ts ================================================ import { store } from '@/electron' const cursorPosition = reactive({ row: 0, column: 0, }) const settings = reactive(store.preferences.get('editor')) watch( settings, () => { store.preferences.set('editor', JSON.parse(JSON.stringify(settings))) }, { deep: true }, ) export function useEditor() { return { cursorPosition, settings, } } ================================================ FILE: src/renderer/composables/useFolders.ts ================================================ import type { FoldersTreeResponse, FoldersUpdate, } from '@/services/api/generated' import { useApp, useSnippets } from '@/composables' import { markPersistedStorageMutation } from '@/composables/useStorageMutation' import { i18n } from '@/electron' import { api } from '@/services/api' import { getContiguousSelection, scrollToElement } from '../utils' const { state } = useApp() const folders = shallowRef<FoldersTreeResponse>() const renameFolderId = ref<number | null>(null) const selectedFolderIds = ref<number[]>(state.folderId ? [state.folderId] : []) const lastSelectedFolderId = ref<number | undefined>(state.folderId) function escapeRegExp(value: string): string { return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') } function getNextIndexedName(baseName: string, existingNames: string[]): string { const normalizedBase = baseName.trim() const indexedNameRe = new RegExp( `^${escapeRegExp(normalizedBase)}(?:\\s+(\\d+))?$`, 'i', ) let maxIndex = 0 existingNames.forEach((name) => { const match = name.trim().match(indexedNameRe) if (!match) { return } const index = match[1] ? Number(match[1]) : 0 if (Number.isFinite(index)) { maxIndex = Math.max(maxIndex, index) } }) return `${normalizedBase} ${maxIndex + 1}` } function getNextUntitledFolderName(parentId?: number): string { const normalizedParentId = parentId ?? null const siblingNames = flattenFolderTree(folders.value) .filter(folder => (folder.parentId ?? null) === normalizedParentId) .map(folder => folder.name) return getNextIndexedName(i18n.t('folder.untitled'), siblingNames) } function flattenFolderTree( nodes?: FoldersTreeResponse, acc: FoldersTreeResponse[0][] = [], ) { if (!nodes) { return acc } nodes.forEach((folder) => { acc.push(folder) if (folder.children?.length) { flattenFolderTree(folder.children, acc) } }) return acc } const flatFolderList = computed(() => flattenFolderTree(folders.value)) const folderOrderMap = computed(() => { const map = new Map<number, number>() flatFolderList.value.forEach((folder, index) => { map.set(folder.id, index) }) return map }) function sortFolderIdsByTreeOrder(ids: number[]) { const seen = new Set<number>() return ids .filter((id) => { if (seen.has(id)) { return false } seen.add(id) return folderOrderMap.value.has(id) }) .sort((a, b) => { const orderA = folderOrderMap.value.get(a) ?? Number.MAX_SAFE_INTEGER const orderB = folderOrderMap.value.get(b) ?? Number.MAX_SAFE_INTEGER return orderA - orderB }) } function syncSelectedFoldersWithTree() { // Если выбрана системная папка (Inbox, Favorites, All, Trash), // selectedFolderIds пуст — не нужно назначать fallback if (state.libraryFilter) { return } const orderedIds = flatFolderList.value.map(folder => folder.id) if (!orderedIds.length) { clearFolderSelection() return } const filteredSelection = selectedFolderIds.value.filter(id => folderOrderMap.value.has(id), ) if (!filteredSelection.length) { const fallbackId = state.folderId && folderOrderMap.value.has(state.folderId) ? state.folderId : orderedIds[0] if (fallbackId) { setFolderSelection([fallbackId]) } else { clearFolderSelection() } return } setFolderSelection(filteredSelection) } watch( () => state.folderId, (folderId) => { if (folderId === undefined) { selectedFolderIds.value = [] lastSelectedFolderId.value = undefined return } if (!selectedFolderIds.value.includes(folderId)) { selectedFolderIds.value = sortFolderIdsByTreeOrder([ folderId, ...selectedFolderIds.value, ]) } }, ) function clearFolderSelection() { selectedFolderIds.value = [] state.folderId = undefined state.snippetId = undefined lastSelectedFolderId.value = undefined } function setFolderSelection(ids: number[]) { if (!ids.length) { clearFolderSelection() return } const orderedSelection = sortFolderIdsByTreeOrder(ids) selectedFolderIds.value = orderedSelection state.folderId = orderedSelection[0] lastSelectedFolderId.value = orderedSelection[orderedSelection.length - 1] } function applySingleFolderSelection(folderId: number) { selectedFolderIds.value = [folderId] state.folderId = folderId lastSelectedFolderId.value = folderId } function applyRangeFolderSelection(folderId: number) { const orderedIds = flatFolderList.value.map(folder => folder.id) if (!orderedIds.length) { applySingleFolderSelection(folderId) return } const anchorId = state.folderId ?? selectedFolderIds.value[0] ?? folderId const rangeSelection = getContiguousSelection(orderedIds, anchorId, folderId) if (!rangeSelection.length) { applySingleFolderSelection(folderId) return } selectedFolderIds.value = rangeSelection lastSelectedFolderId.value = folderId } function applyToggleFolderSelection(folderId: number) { if (selectedFolderIds.value.includes(folderId)) { if (selectedFolderIds.value.length === 1) { return } selectedFolderIds.value = selectedFolderIds.value.filter( id => id !== folderId, ) state.folderId = selectedFolderIds.value[0] lastSelectedFolderId.value = selectedFolderIds.value[selectedFolderIds.value.length - 1] return } selectedFolderIds.value = sortFolderIdsByTreeOrder([ ...selectedFolderIds.value, folderId, ]) state.folderId = folderId lastSelectedFolderId.value = folderId } function findParentFolderIds(folderId: number, allFolders: any[]): number[] { const parentIds: number[] = [] function findParents(currentFolderId: number) { const folder = allFolders.find(f => f.id === currentFolderId) if (folder && folder.parentId) { parentIds.push(folder.parentId) findParents(folder.parentId) } } findParents(folderId) return parentIds } async function ensureSelectedFolderIsVisible() { if (!state.folderId || !folders.value) { return } const parentIds = findParentFolderIds(state.folderId, flatFolderList.value) if (parentIds.length === 0) { return } const foldersToOpen = parentIds.filter((parentId) => { const folder = flatFolderList.value.find(f => f.id === parentId) return folder && folder.isOpen === 0 }) if (foldersToOpen.length === 0) { return } try { const updateResults = await Promise.allSettled( foldersToOpen.map(folderId => api.folders.patchFoldersById(String(folderId), { isOpen: 1 }), ), ) const failedUpdates = updateResults .map((result, index) => ({ result, folderId: foldersToOpen[index] })) .filter(({ result }) => result.status === 'rejected') if (failedUpdates.length > 0) { console.warn('Some folders failed to open:', failedUpdates) } await getFolders(false) } catch (error) { console.error('Error while opening parent folders:', error) try { await getFolders(false) } catch (fallbackError) { console.error('Failed to refresh folders:', fallbackError) } } } function getFolderByIdFromTree( nodes: any[] | undefined, id: number | null, ): FoldersTreeResponse[0] | undefined { if (!nodes || id === null) { return undefined } for (const node of nodes) { if (node.id === id) { return node } if (node.children?.length) { const foundFolder = getFolderByIdFromTree(node.children, id) if (foundFolder) { return foundFolder } } } } async function getFolders(shouldEnsureVisibility = true) { try { const { data } = await api.folders.getFoldersTree() folders.value = data syncSelectedFoldersWithTree() if (shouldEnsureVisibility) { await ensureSelectedFolderIsVisible() } } catch (error) { console.error(error) } } async function createFolder(parentId?: number) { try { const nextFolderName = getNextUntitledFolderName(parentId) markPersistedStorageMutation() const { data } = await api.folders.postFolders({ name: nextFolderName, ...(parentId !== undefined && { parentId }), }) if (parentId) { await updateFolder(parentId, { isOpen: 1 }) } await getFolders(false) return data.id } catch (error) { console.error(error) } } async function createFolderAndSelect(parentId?: number) { const { clearSnippetsState } = useSnippets() const id = await createFolder(parentId) if (id) { await selectFolder(Number(id)) clearSnippetsState() scrollToElement(`[id="${id}"]`) renameFolderId.value = Number(id) } } async function updateFolder(folderId: number, data: FoldersUpdate) { try { markPersistedStorageMutation() await api.folders.patchFoldersById(String(folderId), data) await getFolders(false) if (folderId === state.folderId) { const { getSnippets } = useSnippets() await getSnippets({ folderId }) } } catch (error) { console.error(error) } } async function deleteFolder(folderId: number, shouldRefresh = true) { try { markPersistedStorageMutation() await api.folders.deleteFoldersById(String(folderId)) if (shouldRefresh) { await getFolders(false) } } catch (error) { console.error(error) } } interface SelectFolderOptions { mode?: 'single' | 'range' | 'toggle' ensureVisibility?: boolean } async function selectFolder( folderId: number, options: SelectFolderOptions = {}, ) { const mode = options.mode ?? 'single' const shouldEnsureVisibility = options.ensureVisibility ?? mode === 'single' if (mode === 'range') { applyRangeFolderSelection(folderId) } else if (mode === 'toggle') { applyToggleFolderSelection(folderId) } else { applySingleFolderSelection(folderId) state.libraryFilter = undefined state.tagId = undefined state.snippetId = undefined } if (folders.value?.length && shouldEnsureVisibility) { await ensureSelectedFolderIsVisible() } } export function useFolders() { return { createFolder, createFolderAndSelect, clearFolderSelection, deleteFolder, folders, getFolderByIdFromTree, getFolders, lastSelectedFolderId, renameFolderId, selectedFolderIds, setFolderSelection, selectFolder, updateFolder, } } ================================================ FILE: src/renderer/composables/useSnippetScroller.ts ================================================ interface SnippetScroller { scrollToItem: (index: number) => void } const snippetScrollerRef = ref<SnippetScroller | null>(null) const pendingScrollIndex = ref<number | null>(null) export function setSnippetScrollerRef(value: SnippetScroller | null) { snippetScrollerRef.value = value if (value && pendingScrollIndex.value !== null) { const index = pendingScrollIndex.value pendingScrollIndex.value = null nextTick(() => value.scrollToItem(index)) } } export function scrollToSnippetIndex(index: number) { if (index < 0) return if (snippetScrollerRef.value) { snippetScrollerRef.value.scrollToItem(index) return } pendingScrollIndex.value = index } ================================================ FILE: src/renderer/composables/useSnippetUpdate.ts ================================================ import type { SnippetContentsAdd, SnippetsUpdate, } from '../services/api/generated' import { useDebounceFn } from '@vueuse/core' import { useSnippets } from './useSnippets' import { markUserEdit } from './useStorageMutation' interface UpdateQueueItem { snippetId: number data: SnippetsUpdate } interface UpdateContentQueueItem { snippetId: number contentId: number data: SnippetContentsAdd } const UPDATE_DEBOUNCE_TIME = 500 const { updateSnippetContent, updateSnippet } = useSnippets() const updateQueue = ref<Map<string, UpdateQueueItem>>(new Map()) const updateContentQueue = ref<Map<string, UpdateContentQueueItem>>(new Map()) const contentUpdateTimers = ref<Map<string, ReturnType<typeof setTimeout>>>( new Map(), ) const inFlightContentKeys = ref<Set<string>>(new Set()) const updateDebounced = useDebounceFn((snippetId: number) => { const key = `${snippetId}` const update = updateQueue.value.get(key) if (update) { updateSnippet(update.snippetId, update.data) updateQueue.value.delete(key) } }, UPDATE_DEBOUNCE_TIME) function getContentUpdateKey(snippetId: number, contentId: number) { return `${snippetId}-${contentId}` } async function flushContentUpdate(key: string) { const update = updateContentQueue.value.get(key) if (!update) { return } updateContentQueue.value.delete(key) inFlightContentKeys.value.add(key) try { await updateSnippetContent(update.snippetId, update.contentId, update.data) } catch (error) { console.error(error) } finally { inFlightContentKeys.value.delete(key) if (updateContentQueue.value.has(key)) { scheduleContentUpdate(key) } } } function scheduleContentUpdate(key: string) { const pendingTimer = contentUpdateTimers.value.get(key) if (pendingTimer) { clearTimeout(pendingTimer) } const timer = setTimeout(() => { contentUpdateTimers.value.delete(key) void flushContentUpdate(key) }, UPDATE_DEBOUNCE_TIME) contentUpdateTimers.value.set(key, timer) } function addToUpdateQueue(snippetId: number, data: SnippetsUpdate) { markUserEdit() const key = `${snippetId}` updateQueue.value.set(key, { snippetId, data }) updateDebounced(snippetId) } function addToUpdateContentQueue( snippetId: number, contentId: number, data: SnippetContentsAdd, ) { markUserEdit() const key = getContentUpdateKey(snippetId, contentId) updateContentQueue.value.set(key, { snippetId, contentId, data }) if (inFlightContentKeys.value.has(key)) { return } scheduleContentUpdate(key) } function getPendingContentUpdate(snippetId: number, contentId: number) { const key = getContentUpdateKey(snippetId, contentId) return updateContentQueue.value.get(key)?.data } function isContentUpdateBusy(snippetId: number, contentId: number) { const key = getContentUpdateKey(snippetId, contentId) return ( updateContentQueue.value.has(key) || inFlightContentKeys.value.has(key) ) } function hasBusyContentUpdates() { return ( updateContentQueue.value.size > 0 || inFlightContentKeys.value.size > 0 ) } export function useSnippetUpdate() { return { addToUpdateContentQueue, addToUpdateQueue, getPendingContentUpdate, hasBusyContentUpdates, isContentUpdateBusy, } } ================================================ FILE: src/renderer/composables/useSnippets.ts ================================================ import type { SnippetContentsUpdate, SnippetsQuery, SnippetsResponse, SnippetsUpdate, } from '~/renderer/services/api/generated' import { markPersistedStorageMutation } from '@/composables/useStorageMutation' import { i18n } from '@/electron' import { getContiguousSelection } from '@/utils' import { api } from '~/renderer/services/api' import { useApp, useDialog, useFolders } from '.' import { LibraryFilter } from './types' import { scrollToSnippetIndex } from './useSnippetScroller' const { state, saveStateSnapshot, restoreStateSnapshot, isFocusedSnippetName } = useApp() const { folders, getFolderByIdFromTree } = useFolders() const selectedSnippetIds = ref<number[]>( state.snippetId ? [state.snippetId] : [], ) const lastSelectedSnippetId = ref<number | undefined>() const snippets = shallowRef<SnippetsResponse>() const snippetsBySearch = shallowRef<SnippetsResponse>() const searchQuery = ref('') const isSearch = ref(false) const isRestoreStateBlocked = ref(false) const searchSelectedIndex = ref<number>(-1) function escapeRegExp(value: string): string { return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') } function getNextIndexedName(baseName: string, existingNames: string[]): string { const normalizedBase = baseName.trim() const indexedNameRe = new RegExp( `^${escapeRegExp(normalizedBase)}(?:\\s+(\\d+))?$`, 'i', ) let maxIndex = 0 existingNames.forEach((name) => { const match = name.trim().match(indexedNameRe) if (!match) { return } const index = match[1] ? Number(match[1]) : 0 if (Number.isFinite(index)) { maxIndex = Math.max(maxIndex, index) } }) return `${normalizedBase} ${maxIndex + 1}` } async function getSnippetNamesForCreate( folderId: number | null, ): Promise<string[]> { const query: SnippetsQuery = folderId !== null ? { folderId, isDeleted: 0 } : { isInbox: 1, isDeleted: 0 } const { data } = await api.snippets.getSnippets(query) return data.map(snippet => snippet.name) } const displayedSnippets = computed(() => { if (isSearch.value) { return snippetsBySearch.value } return snippets.value }) const selectedSnippet = computed(() => { if (isSearch.value) { return snippetsBySearch.value?.find(s => s.id === state.snippetId) } return snippets.value?.find(s => s.id === state.snippetId) }) const selectedSnippetContent = computed(() => { return selectedSnippet.value?.contents[state.snippetContentIndex || 0] }) const selectedSnippets = computed(() => { const source = isSearch.value ? snippetsBySearch.value : snippets.value return source?.filter(s => selectedSnippetIds.value.includes(s.id)) || [] }) const queryByLibraryOrFolderOrSearch = computed(() => { const query: SnippetsQuery = {} if (isSearch.value) { query.search = searchQuery.value return query } if (state.tagId) { query.tagId = state.tagId return query } if (state.folderId) { query.folderId = state.folderId } else if (state.libraryFilter === LibraryFilter.Favorites) { query.isFavorites = 1 } else if (state.libraryFilter === LibraryFilter.Trash) { query.isDeleted = 1 } else if (state.libraryFilter === LibraryFilter.All) { query.isDeleted = 0 } else if (state.libraryFilter === LibraryFilter.Inbox) { query.isInbox = 1 } return query }) const isEmpty = computed(() => { if (isSearch.value) { return snippetsBySearch.value?.length === 0 } return snippets.value?.length === 0 }) const isAvailableToCodePreview = computed(() => { const langAvailable = ['html', 'css', 'javascript'] return langAvailable.includes(selectedSnippetContent.value?.language || '') }) async function getSnippets(query?: SnippetsQuery) { const { data } = await api.snippets.getSnippets( query || queryByLibraryOrFolderOrSearch.value, ) if (isSearch.value) { snippetsBySearch.value = data } else { snippets.value = data } } async function createSnippet() { try { const targetFolderId = state.folderId || null const folder = getFolderByIdFromTree(folders.value, targetFolderId) const existingNames = await getSnippetNamesForCreate(targetFolderId) const nextSnippetName = getNextIndexedName( i18n.t('snippet.untitled'), existingNames, ) markPersistedStorageMutation() const { data } = await api.snippets.postSnippets({ name: nextSnippetName, folderId: targetFolderId, }) await api.snippets.postSnippetsByIdContents(String(data.id), { label: `${i18n.t('fragment')} 1`, value: '', language: folder?.defaultLanguage || 'plain_text', }) if ( state.libraryFilter === LibraryFilter.Trash || state.libraryFilter === LibraryFilter.Favorites ) { state.libraryFilter = LibraryFilter.All } await getSnippets(queryByLibraryOrFolderOrSearch.value) } catch (error) { console.error(error) } } async function createSnippetAndSelect() { await createSnippet() selectFirstSnippet() isFocusedSnippetName.value = true } async function duplicateSnippet(snippetId: number) { const snippet = snippets.value?.find(s => s.id === snippetId) if (!snippet) { return } try { const { data } = await api.snippets.postSnippets({ name: `${snippet.name} - copy`, folderId: snippet.folder?.id || null, }) for (const content of snippet.contents) { await api.snippets.postSnippetsByIdContents(String(data.id), { label: content.label, value: content.value, language: content.language, }) } for (const tag of snippet.tags) { await api.snippets.postSnippetsByIdTagsByTagId( String(data.id), String(tag.id), ) } await getSnippets(queryByLibraryOrFolderOrSearch.value) } catch (error) { console.error(error) } } async function createSnippetContent(snippetId: number) { const lastContentIndex = selectedSnippet.value?.contents.length || 0 const folder = getFolderByIdFromTree( folders.value, selectedSnippet.value?.folder?.id || null, ) try { await api.snippets.postSnippetsByIdContents(String(snippetId), { label: `${i18n.t('fragment')} ${lastContentIndex + 1}`, value: '', language: folder?.defaultLanguage || 'plain_text', }) await getSnippets(queryByLibraryOrFolderOrSearch.value) return lastContentIndex } catch (error) { console.error(error) } } async function addFragment() { if (!selectedSnippet.value) { return } const index = await createSnippetContent(selectedSnippet.value.id) if (index) { state.snippetContentIndex = index } } async function updateSnippet(snippetId: number, data: SnippetsUpdate) { markPersistedStorageMutation() await api.snippets.patchSnippetsById(String(snippetId), data) await getSnippets(queryByLibraryOrFolderOrSearch.value) } async function updateSnippets(snippetIds: number[], data: SnippetsUpdate[]) { for (const [index, snippetId] of snippetIds.entries()) { await api.snippets.patchSnippetsById(String(snippetId), data[index]) } await getSnippets(queryByLibraryOrFolderOrSearch.value) } async function updateSnippetContent( snippetId: number, contentId: number, data: SnippetContentsUpdate, ) { markPersistedStorageMutation() await api.snippets.patchSnippetsByIdContentsByContentId( String(snippetId), String(contentId), data, ) await getSnippets(queryByLibraryOrFolderOrSearch.value) } async function deleteSnippet(snippetId: number) { markPersistedStorageMutation() await api.snippets.deleteSnippetsById(String(snippetId)) await getSnippets(queryByLibraryOrFolderOrSearch.value) } async function deleteSnippets(snippetIds: number[]) { for (const snippetId of snippetIds) { await api.snippets.deleteSnippetsById(String(snippetId)) } await getSnippets(queryByLibraryOrFolderOrSearch.value) } async function deleteSnippetContent(snippetId: number, contentId: number) { try { await api.snippets.deleteSnippetsByIdContentsByContentId( String(snippetId), String(contentId), ) await getSnippets(queryByLibraryOrFolderOrSearch.value) } catch (error) { console.error(error) } } async function addTagToSnippet(tagId: number, snippetId: number) { try { await api.snippets.postSnippetsByIdTagsByTagId( String(snippetId), String(tagId), ) await getSnippets(queryByLibraryOrFolderOrSearch.value) } catch (error) { console.error(error) } } async function deleteTagFromSnippet(tagId: number, snippetId: number) { try { await api.snippets.deleteSnippetsByIdTagsByTagId( String(snippetId), String(tagId), ) await getSnippets(queryByLibraryOrFolderOrSearch.value) } catch (error) { console.error(error) } } async function emptyTrash() { const { confirm } = useDialog() const isConfirmed = await confirm({ title: i18n.t('messages:confirm.emptyTrash'), content: i18n.t('messages:warning.noUndo'), }) if (isConfirmed) { await api.snippets.deleteSnippetsTrash() await getSnippets(queryByLibraryOrFolderOrSearch.value) } } function selectSnippet(snippetId: number, withShift = false) { if (!withShift) { selectedSnippetIds.value = [snippetId] state.snippetId = snippetId state.snippetContentIndex = 0 return } if (state.snippetId !== undefined) { const source = isSearch.value ? snippetsBySearch.value : snippets.value if (source?.length) { const orderedIds = source.map(snippet => snippet.id) const rangeSelection = getContiguousSelection( orderedIds, state.snippetId, snippetId, ) if (rangeSelection.length) { selectedSnippetIds.value = rangeSelection lastSelectedSnippetId.value = snippetId state.snippetContentIndex = 0 } } } else { selectedSnippetIds.value = [snippetId] lastSelectedSnippetId.value = snippetId state.snippetId = snippetId state.snippetContentIndex = 0 } } function selectFirstSnippet() { let firstSnippet: SnippetsResponse[0] | undefined if (isSearch.value) { firstSnippet = snippetsBySearch.value?.[0] } else { firstSnippet = snippets.value?.[0] } if (firstSnippet) { state.snippetId = firstSnippet.id selectedSnippetIds.value = [firstSnippet.id] lastSelectedSnippetId.value = firstSnippet.id } else { state.snippetId = undefined selectedSnippetIds.value = [] lastSelectedSnippetId.value = undefined } } function clearSnippets() { snippets.value = [] snippetsBySearch.value = [] } function clearSnippetsState() { clearSnippets() selectedSnippetIds.value = [] state.snippetId = undefined state.snippetContentIndex = 0 } async function search() { if (searchQuery.value) { if (!isSearch.value) { saveStateSnapshot('beforeSearch') state.snippetContentIndex = 0 } isSearch.value = true isRestoreStateBlocked.value = false await getSnippets({ search: searchQuery.value }) selectFirstSnippet() searchSelectedIndex.value = 0 nextTick(() => scrollToSnippetIndex(0)) } else { isSearch.value = false } } function selectSearchSnippet(index: number) { if ( !displayedSnippets.value || index < 0 || index >= displayedSnippets.value.length ) { return } const snippet = displayedSnippets.value[index] selectSnippet(snippet.id) searchSelectedIndex.value = index nextTick(() => scrollToSnippetIndex(index)) } function clearSearch(restoreState = false) { if (restoreState && !isRestoreStateBlocked.value) { restoreStateSnapshot('beforeSearch') } searchQuery.value = '' isSearch.value = false searchSelectedIndex.value = -1 } export function useSnippets() { return { addTagToSnippet, clearSearch, clearSnippets, clearSnippetsState, createSnippet, createSnippetContent, deleteSnippet, deleteSnippetContent, deleteSnippets, deleteTagFromSnippet, displayedSnippets, duplicateSnippet, emptyTrash, getSnippets, isEmpty, isRestoreStateBlocked, isSearch, lastSelectedSnippetId, addFragment, createSnippetAndSelect, search, searchQuery, searchSelectedIndex, selectedSnippet, selectedSnippetContent, selectedSnippetIds, selectedSnippets, selectFirstSnippet, selectSearchSnippet, selectSnippet, updateSnippet, updateSnippetContent, updateSnippets, isAvailableToCodePreview, } } ================================================ FILE: src/renderer/composables/useSonner.ts ================================================ import type { Props } from '@/components/ui/sonner/types' import Sonner from '@/components/ui/sonner/Sonner.vue' import { toast } from 'vue-sonner' export function useSonner() { const sonner = (config: Props) => { toast.custom(markRaw(Sonner), { componentProps: config, duration: config.action ? Infinity : config.duration || 5000, onDismiss: config.onClose, }) } return { sonner, } } ================================================ FILE: src/renderer/composables/useStorageMutation.ts ================================================ const MUTATION_COOLDOWN_MS = 1500 const EDIT_DEBOUNCE_MS = 1000 let lastMutationTimestamp = 0 let lastEditTimestamp = 0 export function markPersistedStorageMutation(): void { lastMutationTimestamp = Date.now() } export function markUserEdit(): void { lastEditTimestamp = Date.now() } export function shouldSkipStorageSyncRefresh(): boolean { const now = Date.now() if (now - lastMutationTimestamp < MUTATION_COOLDOWN_MS) { return true } if (now - lastEditTimestamp < EDIT_DEBOUNCE_MS) { return true } return false } export function useStorageMutation() { return { markPersistedStorageMutation, markUserEdit, shouldSkipStorageSyncRefresh, } } ================================================ FILE: src/renderer/composables/useTags.ts ================================================ import type { TagsResponse } from '@/services/api/generated' import { api } from '@/services/api' const tags = shallowRef<TagsResponse>([]) const isLoading = ref(false) async function getTags() { try { isLoading.value = true const { data } = await api.tags.getTags() tags.value = data } catch (error) { console.error(error) } finally { isLoading.value = false } } async function addTag(tagName: string) { const { data } = await api.tags.postTags({ name: tagName }) return data.id as number } async function deleteTag(tagId: number) { try { await api.tags.deleteTagsById(String(tagId)) await getTags() } catch (error) { console.error(error) } } export function useTags() { return { addTag, deleteTag, getTags, isLoading, tags, } } ================================================ FILE: src/renderer/composables/useTheme.ts ================================================ import type { ThemeEditorColors, ThemeFile, ThemeListItem, ThemeType, } from '~/main/store/types/theme' import { ipc, store } from '@/electron' import { useColorMode } from '@vueuse/core' type BuiltInThemeId = 'light' | 'dark' | 'auto' const BUILT_IN_THEMES = new Set<BuiltInThemeId>(['light', 'dark', 'auto']) const CUSTOM_STYLE_ID = 'masscode-custom-theme' const LIGHT_EDITOR_THEME = 'neo' const DARK_EDITOR_THEME = 'oceanic-next' const TOKEN_MIGRATION_MAP: Record<string, string> = { 'color-primary': 'primary', 'color-bg': 'background', 'color-fg': 'foreground', 'color-text': 'foreground', 'color-text-muted': 'muted-foreground', 'color-border': 'border', 'color-button': 'muted', 'color-list-selection': 'accent', 'color-list-selection-fg': 'accent-foreground', 'color-scrollbar': 'scrollbar', } const DROPPED_TOKENS = new Set(['color-button-hover']) const storedThemeId = String(store.preferences.get('theme') || 'auto') const colorMode = useColorMode() const colorModeStore = colorMode.store const currentThemeId = ref(storedThemeId) const customThemes = ref<ThemeListItem[]>([]) const resolvedThemeType = ref<ThemeType>('light') const currentCustomTheme = ref<ThemeFile | null>(null) const isDark = computed(() => resolvedThemeType.value === 'dark') let isInitialized = false let isThemeReloadInProgress = false let hasPendingThemeReload = false function persistThemePreference(id: string): void { if (store.preferences.get('theme') === id) { return } store.preferences.set('theme', id) } function isBuiltInTheme(id: string): id is BuiltInThemeId { return BUILT_IN_THEMES.has(id as BuiltInThemeId) } function getBuiltInThemeType(id: BuiltInThemeId): ThemeType { if (id === 'dark') { return 'dark' } if (id === 'light') { return 'light' } return colorMode.value === 'dark' ? 'dark' : 'light' } function removeCustomThemeStyle(): void { const style = document.getElementById(CUSTOM_STYLE_ID) if (style) { style.remove() } } function isValidCssToken(token: string): boolean { return /^[a-z0-9-]+$/i.test(token) } function hasCustomEditorColors(editorColors?: ThemeEditorColors): boolean { if (!editorColors) { return false } return Object.entries(editorColors).some(([key, value]) => { if (!key.startsWith('editor-')) { return false } return isValidCssToken(key) && Boolean(value.trim()) }) } function buildThemeCss(theme: ThemeFile): string { const chunks: string[] = [] const themeSelector = theme.type === 'dark' ? 'html.dark' : ':root' if (theme.colors) { const colorVars = Object.entries(theme.colors) .filter( ([key, value]) => !DROPPED_TOKENS.has(key) && isValidCssToken(key) && Boolean(value.trim()), ) .map(([key, value]) => { const resolvedKey = TOKEN_MIGRATION_MAP[key] ?? key return ` --${resolvedKey}: ${value};` }) if (colorVars.length) { chunks.push(`${themeSelector} {`) chunks.push(...colorVars) chunks.push('}') } } if (theme.editorColors) { const editorRules = Object.entries(theme.editorColors) .filter(([key, value]) => { if (!key.startsWith('editor-')) { return false } return isValidCssToken(key) && Boolean(value.trim()) }) .map(([key, value]) => { const token = key.slice('editor-'.length) if (!token) { return '' } return `.cm-s-masscode-custom span.cm-${token} { color: ${value} !important; }` }) .filter(Boolean) chunks.push(...editorRules) } return chunks.join('\n') } function applyCustomThemeStyle(theme: ThemeFile): void { removeCustomThemeStyle() const css = buildThemeCss(theme) if (!css) { return } const style = document.createElement('style') style.id = CUSTOM_STYLE_ID style.textContent = css document.head.append(style) } function applyBuiltInTheme(id: BuiltInThemeId): void { currentCustomTheme.value = null removeCustomThemeStyle() colorModeStore.value = id resolvedThemeType.value = getBuiltInThemeType(id) currentThemeId.value = id persistThemePreference(id) } async function applyCustomTheme(id: string): Promise<boolean> { const theme = await ipc.invoke<string, ThemeFile | null>('theme:get', id) if (!theme) { return false } colorModeStore.value = theme.type resolvedThemeType.value = theme.type currentCustomTheme.value = theme currentThemeId.value = id applyCustomThemeStyle(theme) persistThemePreference(id) return true } function fallbackToAuto(): void { applyBuiltInTheme('auto') } async function setTheme(id: string): Promise<void> { if (isBuiltInTheme(id)) { applyBuiltInTheme(id) return } const isApplied = await applyCustomTheme(id) if (!isApplied) { fallbackToAuto() } } async function loadCustomThemes(): Promise<void> { try { customThemes.value = await ipc.invoke<null, ThemeListItem[]>( 'theme:list', null, ) } catch (error) { customThemes.value = [] console.error('Failed to load custom themes', error) } } async function handleThemesChanged(): Promise<void> { await loadCustomThemes() const selectedId = currentThemeId.value if (isBuiltInTheme(selectedId)) { return } const exists = customThemes.value.some(theme => theme.id === selectedId) if (!exists) { fallbackToAuto() return } await setTheme(selectedId) } async function processThemeReloadQueue(): Promise<void> { if (isThemeReloadInProgress) { hasPendingThemeReload = true return } isThemeReloadInProgress = true try { do { hasPendingThemeReload = false await handleThemesChanged() } while (hasPendingThemeReload) } catch (error) { console.error('Failed to process theme updates', error) } finally { isThemeReloadInProgress = false } } const editorThemeName = computed(() => { const baseTheme = resolvedThemeType.value === 'dark' ? DARK_EDITOR_THEME : LIGHT_EDITOR_THEME if (!isBuiltInTheme(currentThemeId.value)) { const editorColors = currentCustomTheme.value?.editorColors if (hasCustomEditorColors(editorColors)) { return `${baseTheme} masscode-custom` } } return baseTheme }) async function initTheme(): Promise<void> { await loadCustomThemes() await setTheme(currentThemeId.value) } function onThemeChanged() { void processThemeReloadQueue() } watch( () => colorMode.value, () => { if (isBuiltInTheme(currentThemeId.value)) { resolvedThemeType.value = getBuiltInThemeType(currentThemeId.value) } }, ) export function useTheme() { if (!isInitialized) { isInitialized = true ipc.on('theme:changed', onThemeChanged) void initTheme() } return { currentThemeId, customThemes, resolvedThemeType, isDark, setTheme, loadCustomThemes, editorThemeName, } } ================================================ FILE: src/renderer/electron.ts ================================================ const { ipc, db, store, i18n } = window.electron export { db, i18n, ipc, store } ================================================ FILE: src/renderer/index.html ================================================ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>massCode
================================================ FILE: src/renderer/ipc/index.ts ================================================ import { registerMainMenuListeners } from './listeners/main-menu' import { registerSystemListeners } from './listeners/system' export function registerIPCListeners() { registerMainMenuListeners() registerSystemListeners() } ================================================ FILE: src/renderer/ipc/listeners/main-menu.ts ================================================ import { useApp, useFolders, useSnippets } from '@/composables' import { ipc } from '@/electron' import { router, RouterName } from '@/router' const { createSnippetAndSelect, addFragment } = useSnippets() const { createFolderAndSelect } = useFolders() const { isShowMarkdown, isShowMindmap, isShowCodePreview, isShowMarkdownPresentation, isShowJsonVisualizer, isSidebarHidden, } = useApp() export function registerMainMenuListeners() { ipc.on('main-menu:goto-preferences', () => { router.push({ name: RouterName.preferencesStorage }) }) ipc.on('main-menu:goto-devtools', () => { router.push({ name: RouterName.devtoolsCaseConverter }) }) ipc.on('main-menu:new-snippet', () => { createSnippetAndSelect() }) ipc.on('main-menu:new-fragment', () => { addFragment() }) ipc.on('main-menu:new-folder', () => { createFolderAndSelect() }) ipc.on('main-menu:preview-markdown', () => { isShowMarkdown.value = !isShowMarkdown.value }) ipc.on('main-menu:preview-mindmap', () => { isShowMindmap.value = !isShowMindmap.value }) ipc.on('main-menu:preview-code', () => { isShowCodePreview.value = !isShowCodePreview.value }) ipc.on('main-menu:preview-json', () => { isShowJsonVisualizer.value = !isShowJsonVisualizer.value }) ipc.on('main-menu:presentation-mode', () => { isShowMarkdownPresentation.value = !isShowMarkdownPresentation.value router.push({ name: RouterName.markdownPresentation }) }) ipc.on('main-menu:toggle-sidebar', () => { isSidebarHidden.value = !isSidebarHidden.value }) ipc.on('main-menu:goto-math-notebook', () => { router.push({ name: RouterName.mathNotebook }) }) } ================================================ FILE: src/renderer/ipc/listeners/system.ts ================================================ import { useApp, useFolders, useMathNotebook, useSnippets, useSnippetUpdate, useSonner, useStorageMutation, } from '@/composables' import { i18n, ipc } from '@/electron' import { router, RouterName } from '@/router' import { getActiveSpaceId } from '@/spaceDefinitions' import { repository } from '../../../../package.json' const { state, highlightedFolderIds, highlightedSnippetIds, focusedSnippetId, focusedFolderId, } = useApp() const { selectFolder, getFolders } = useFolders() const { selectSnippet, getSnippets, selectFirstSnippet, displayedSnippets } = useSnippets() const { hasBusyContentUpdates } = useSnippetUpdate() const { shouldSkipStorageSyncRefresh } = useStorageMutation() const { reloadFromDisk: reloadMathFromDisk } = useMathNotebook() const { sonner } = useSonner() let storageSyncDebounceTimer: ReturnType | null = null interface ReleaseNoticePayload { sqliteSunsetVersion?: string } async function refreshCodeSpace() { const selectedSnippetId = state.snippetId await getFolders(false) await getSnippets() if (!selectedSnippetId) { return } const snippetExists = displayedSnippets.value?.some( snippet => snippet.id === selectedSnippetId, ) if (!snippetExists) { selectFirstSnippet() } } async function refreshAfterStorageSync() { const activeSpace = getActiveSpaceId() switch (activeSpace) { case 'math': await reloadMathFromDisk() break case 'tools': break case 'code': default: await refreshCodeSpace() break } } function scheduleStorageSyncRefresh() { if (storageSyncDebounceTimer) { clearTimeout(storageSyncDebounceTimer) storageSyncDebounceTimer = null } storageSyncDebounceTimer = setTimeout(() => { if (shouldSkipStorageSyncRefresh() || hasBusyContentUpdates()) { scheduleStorageSyncRefresh() return } refreshAfterStorageSync().catch((error) => { console.error('Failed to refresh after storage sync:', error) }) }, 300) } export function registerSystemListeners() { ipc.on('system:deep-link', async (_, url: string) => { try { const u = new URL(url) const folderId = u.searchParams.get('folderId') const snippetId = u.searchParams.get('snippetId') if (folderId && snippetId) { const nextFolderId = Number(folderId) const nextSnippetId = Number(snippetId) highlightedFolderIds.value.clear() highlightedSnippetIds.value.clear() focusedSnippetId.value = undefined focusedFolderId.value = undefined await getSnippets({ folderId: nextFolderId }) await selectFolder(nextFolderId) selectSnippet(nextSnippetId) } } catch (error) { console.error(error) } }) ipc.on('system:update-available', () => { sonner({ message: 'Update available', type: 'success', action: { label: 'Go to GitHub', onClick: () => { ipc.invoke('system:open-external', `${repository}/releases`) }, }, }) }) ipc.on('system:feature-notice', (_, payload: ReleaseNoticePayload) => { sonner({ message: i18n.t('messages:release.mdVaultAvailable', { sqliteSunsetVersion: payload?.sqliteSunsetVersion || '5.0.0', }), type: 'success', action: { label: i18n.t('button.goToSettings'), onClick: () => { router.push({ name: RouterName.preferencesStorage }) }, }, }) }) ipc.on('system:storage-synced', () => { scheduleStorageSyncRefresh() }) ipc.on('system:error', (_, payload) => { console.error(`[system][${payload.context}]`, payload) }) } ================================================ FILE: src/renderer/main.ts ================================================ import { createApp } from 'vue' import VueVirtualScroller from 'vue-virtual-scroller' import App from './App.vue' import { router } from './router' import './styles.css' import 'vue-virtual-scroller/dist/vue-virtual-scroller.css' createApp(App).use(router).use(VueVirtualScroller).mount('#app') ================================================ FILE: src/renderer/router/index.ts ================================================ import { createRouter, createWebHashHistory } from 'vue-router' export const RouterName = { main: 'main', preferences: 'preferences', preferencesStorage: 'preferences/storage', preferencesLanguage: 'preferences/language', preferencesAppearance: 'preferences/appearance', preferencesEditor: 'preferences/editor', preferencesAPI: 'preferences/api', markdownPresentation: 'markdown-presentation', devtools: 'devtools', devtoolsCaseConverter: 'devtools/case-converter', devtoolsTextToUnicode: 'devtools/text-to-unicode', devtoolsTextToAscii: 'devtools/text-to-ascii', devtoolsBase64Converter: 'devtools/base64-converter', devtoolsJsonToYaml: 'devtools/json-to-yaml', devtoolsJsonToToml: 'devtools/json-to-toml', devtoolsJsonToXml: 'devtools/json-to-xml', devtoolsHash: 'devtools/hash', devtoolsHmac: 'devtools/hmac', devtoolsPassword: 'devtools/password', devtoolsUuid: 'devtools/uuid', devtoolsUrlParser: 'devtools/url-parser', devtoolsSlugify: 'devtools/slugify', devtoolsUrlEncoder: 'devtools/url-encoder', devtoolsColorConverter: 'devtools/color-converter', devtoolsJsonGenerator: 'devtools/json-generator', devtoolsLoremIpsumGenerator: 'devtools/lorem-ipsum-generator', devtoolsShadcnComparison: 'devtools/shadcn-comparison', mathNotebook: 'math-notebook', } as const const routes = [ { path: '/', name: RouterName.main, component: () => import('@/views/Main.vue'), }, { path: '/preferences', name: RouterName.preferences, component: () => import('@/views/Preferences.vue'), children: [ { path: 'storage', name: RouterName.preferencesStorage, component: () => import('@/components/preferences/Storage.vue'), }, { path: 'language', name: RouterName.preferencesLanguage, component: () => import('@/components/preferences/Language.vue'), }, { path: 'appearance', name: RouterName.preferencesAppearance, component: () => import('@/components/preferences/Appearance.vue'), }, { path: 'editor', name: RouterName.preferencesEditor, component: () => import('@/components/preferences/Editor.vue'), }, { path: 'api', name: RouterName.preferencesAPI, component: () => import('@/components/preferences/API.vue'), }, ], }, { path: '/markdown-presentation', name: RouterName.markdownPresentation, component: () => import('@/views/MarkdownPresentation.vue'), }, { path: '/devtools', name: RouterName.devtools, component: () => import('@/views/Devtools.vue'), children: [ { path: 'text/case-converter', name: RouterName.devtoolsCaseConverter, component: () => import('@/components/devtools/converters/CaseConverter.vue'), }, { path: 'text/to-unicode', name: RouterName.devtoolsTextToUnicode, component: () => import('@/components/devtools/converters/TextToUnicode.vue'), }, { path: 'text/to-ascii', name: RouterName.devtoolsTextToAscii, component: () => import('@/components/devtools/converters/TextToAsciiBinary.vue'), }, { path: 'base64-converter', name: RouterName.devtoolsBase64Converter, component: () => import('@/components/devtools/converters/Base64Converter.vue'), }, { path: 'json-to-yaml', name: RouterName.devtoolsJsonToYaml, component: () => import('@/components/devtools/converters/JsonToYaml.vue'), }, { path: 'json-to-toml', name: RouterName.devtoolsJsonToToml, component: () => import('@/components/devtools/converters/JsonToToml.vue'), }, { path: 'json-to-xml', name: RouterName.devtoolsJsonToXml, component: () => import('@/components/devtools/converters/JsonToXml.vue'), }, { path: 'hash', name: RouterName.devtoolsHash, component: () => import('@/components/devtools/crypto/Hash.vue'), }, { path: 'hmac', name: RouterName.devtoolsHmac, component: () => import('@/components/devtools/crypto/Hmac.vue'), }, { path: 'password', name: RouterName.devtoolsPassword, component: () => import('@/components/devtools/crypto/Password.vue'), }, { path: 'uuid', name: RouterName.devtoolsUuid, component: () => import('@/components/devtools/crypto/Uuid.vue'), }, { path: 'url-parser', name: RouterName.devtoolsUrlParser, component: () => import('@/components/devtools/web/UrlParser.vue'), }, { path: 'slugify', name: RouterName.devtoolsSlugify, component: () => import('@/components/devtools/web/Slugify.vue'), }, { path: 'url-encoder', name: RouterName.devtoolsUrlEncoder, component: () => import('@/components/devtools/web/UrlEncoder.vue'), }, { path: 'color-converter', name: RouterName.devtoolsColorConverter, component: () => import('@/components/devtools/converters/ColorConverter.vue'), }, { path: 'json-generator', name: RouterName.devtoolsJsonGenerator, component: () => import('@/components/devtools/generators/JsonGenerator.vue'), }, { path: 'lorem-ipsum-generator', name: RouterName.devtoolsLoremIpsumGenerator, component: () => import('@/components/devtools/generators/LoremIpsumGenerator.vue'), }, { path: 'shadcn-comparison', name: RouterName.devtoolsShadcnComparison, component: () => import('@/components/devtools/ShadcnComparison.vue'), }, ], }, { path: '/math-notebook', name: RouterName.mathNotebook, component: () => import('@/views/MathNotebook.vue'), }, ] export const router = createRouter({ history: createWebHashHistory(), routes, }) ================================================ FILE: src/renderer/services/api/generated/index.ts ================================================ /* eslint-disable */ /* tslint:disable */ /* * --------------------------------------------------------------- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## * ## ## * ## AUTHOR: acacode ## * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## * --------------------------------------------------------------- */ export interface SnippetContentsAdd { label: string; value: string | null; language: string; } export interface SnippetContentsUpdate { label?: string; value?: string | null; language?: string; } export interface SnippetsAdd { name: string; folderId?: number | null; } export interface SnippetsUpdate { name?: string; folderId?: number | null; description?: string | null; /** * @min 0 * @max 1 */ isDeleted?: number; /** * @min 0 * @max 1 */ isFavorites?: number; } export interface SnippetsCountsResponse { total: number; trash: number; } export interface SnippetsQuery { search?: string; sort?: string; order?: "ASC" | "DESC"; folderId?: number; tagId?: number; /** * @min 0 * @max 1 */ isFavorites?: number; /** * @min 0 * @max 1 */ isDeleted?: number; /** * @min 0 * @max 1 */ isInbox?: number; } export type SnippetsResponse = { id: number; name: string; description: string | null; tags: { id: number; name: string; }[]; folder: { id: number; name: string; } | null; contents: { id: number; label: string; value: string | null; language: string; }[]; isFavorites: number; isDeleted: number; createdAt: number; updatedAt: number; }[]; export interface FoldersAdd { name: string; parentId?: number | null; } export type FoldersResponse = { id: number; name: string; createdAt: number; updatedAt: number; icon: string | null; parentId: number | null; isOpen: number; defaultLanguage: string; orderIndex: number; }[]; export interface FoldersUpdate { name?: string; icon?: string | null; defaultLanguage?: string; parentId?: number | null; /** * @min 0 * @max 1 */ isOpen?: number; orderIndex?: number; } export type FoldersTreeResponse = { id: number; name: string; createdAt: number; updatedAt: number; icon: string | null; parentId: number | null; isOpen: number; defaultLanguage: string; orderIndex: number; children: any[]; }[]; export interface TagsAdd { name: string; } export type TagsResponse = { id: number; name: string; }[]; export interface TagsAddResponse { id: number; } export type QueryParamsType = Record; export type ResponseFormat = keyof Omit; export interface FullRequestParams extends Omit { /** set parameter to `true` for call `securityWorker` for this request */ secure?: boolean; /** request path */ path: string; /** content type of request body */ type?: ContentType; /** query params */ query?: QueryParamsType; /** format of response (i.e. response.json() -> format: "json") */ format?: ResponseFormat; /** request body */ body?: unknown; /** base url */ baseUrl?: string; /** request cancellation token */ cancelToken?: CancelToken; } export type RequestParams = Omit< FullRequestParams, "body" | "method" | "query" | "path" >; export interface ApiConfig { baseUrl?: string; baseApiParams?: Omit; securityWorker?: ( securityData: SecurityDataType | null, ) => Promise | RequestParams | void; customFetch?: typeof fetch; } export interface HttpResponse extends Response { data: D; error: E; } type CancelToken = Symbol | string | number; export enum ContentType { Json = "application/json", FormData = "multipart/form-data", UrlEncoded = "application/x-www-form-urlencoded", Text = "text/plain", } export class HttpClient { public baseUrl: string = ""; private securityData: SecurityDataType | null = null; private securityWorker?: ApiConfig["securityWorker"]; private abortControllers = new Map(); private customFetch = (...fetchParams: Parameters) => fetch(...fetchParams); private baseApiParams: RequestParams = { credentials: "same-origin", headers: {}, redirect: "follow", referrerPolicy: "no-referrer", }; constructor(apiConfig: ApiConfig = {}) { Object.assign(this, apiConfig); } public setSecurityData = (data: SecurityDataType | null) => { this.securityData = data; }; protected encodeQueryParam(key: string, value: any) { const encodedKey = encodeURIComponent(key); return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`; } protected addQueryParam(query: QueryParamsType, key: string) { return this.encodeQueryParam(key, query[key]); } protected addArrayQueryParam(query: QueryParamsType, key: string) { const value = query[key]; return value.map((v: any) => this.encodeQueryParam(key, v)).join("&"); } protected toQueryString(rawQuery?: QueryParamsType): string { const query = rawQuery || {}; const keys = Object.keys(query).filter( (key) => "undefined" !== typeof query[key], ); return keys .map((key) => Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key), ) .join("&"); } protected addQueryParams(rawQuery?: QueryParamsType): string { const queryString = this.toQueryString(rawQuery); return queryString ? `?${queryString}` : ""; } private contentFormatters: Record any> = { [ContentType.Json]: (input: any) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input, [ContentType.Text]: (input: any) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input, [ContentType.FormData]: (input: any) => Object.keys(input || {}).reduce((formData, key) => { const property = input[key]; formData.append( key, property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`, ); return formData; }, new FormData()), [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input), }; protected mergeRequestParams( params1: RequestParams, params2?: RequestParams, ): RequestParams { return { ...this.baseApiParams, ...params1, ...(params2 || {}), headers: { ...(this.baseApiParams.headers || {}), ...(params1.headers || {}), ...((params2 && params2.headers) || {}), }, }; } protected createAbortSignal = ( cancelToken: CancelToken, ): AbortSignal | undefined => { if (this.abortControllers.has(cancelToken)) { const abortController = this.abortControllers.get(cancelToken); if (abortController) { return abortController.signal; } return void 0; } const abortController = new AbortController(); this.abortControllers.set(cancelToken, abortController); return abortController.signal; }; public abortRequest = (cancelToken: CancelToken) => { const abortController = this.abortControllers.get(cancelToken); if (abortController) { abortController.abort(); this.abortControllers.delete(cancelToken); } }; public request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams): Promise> => { const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && (await this.securityWorker(this.securityData))) || {}; const requestParams = this.mergeRequestParams(params, secureParams); const queryString = query && this.toQueryString(query); const payloadFormatter = this.contentFormatters[type || ContentType.Json]; const responseFormat = format || requestParams.format; return this.customFetch( `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, { ...requestParams, headers: { ...(requestParams.headers || {}), ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), }, signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null, body: typeof body === "undefined" || body === null ? null : payloadFormatter(body), }, ).then(async (response) => { const r = response.clone() as HttpResponse; r.data = null as unknown as T; r.error = null as unknown as E; const data = !responseFormat ? r : await response[responseFormat]() .then((data) => { if (r.ok) { r.data = data; } else { r.error = data; } return r; }) .catch((e) => { r.error = e; return r; }); if (cancelToken) { this.abortControllers.delete(cancelToken); } if (!response.ok) throw data; return data; }); }; } /** * @title massCode API * @version 4.3.0 * * Development documentation */ export class Api< SecurityDataType extends unknown, > extends HttpClient { snippets = { /** * No description * * @tags Snippets * @name GetSnippets * @request GET:/snippets/ */ getSnippets: ( query?: { search?: string; sort?: string; order?: "ASC" | "DESC"; folderId?: number; tagId?: number; /** * @min 0 * @max 1 */ isFavorites?: number; /** * @min 0 * @max 1 */ isDeleted?: number; /** * @min 0 * @max 1 */ isInbox?: number; }, params: RequestParams = {}, ) => this.request({ path: `/snippets/`, method: "GET", query: query, format: "json", ...params, }), /** * No description * * @tags Snippets * @name PostSnippets * @request POST:/snippets/ */ postSnippets: (data: SnippetsAdd, params: RequestParams = {}) => this.request< { id: number | bigint; }, any >({ path: `/snippets/`, method: "POST", body: data, type: ContentType.Json, format: "json", ...params, }), /** * No description * * @tags Snippets * @name GetSnippetsCounts * @request GET:/snippets/counts */ getSnippetsCounts: (params: RequestParams = {}) => this.request({ path: `/snippets/counts`, method: "GET", format: "json", ...params, }), /** * No description * * @tags Snippets * @name PostSnippetsByIdContents * @request POST:/snippets/{id}/contents */ postSnippetsByIdContents: ( id: string, data: SnippetContentsAdd, params: RequestParams = {}, ) => this.request< { id: number | bigint; }, any >({ path: `/snippets/${id}/contents`, method: "POST", body: data, type: ContentType.Json, format: "json", ...params, }), /** * No description * * @tags Snippets * @name PatchSnippetsById * @request PATCH:/snippets/{id} */ patchSnippetsById: ( id: string, data: SnippetsUpdate, params: RequestParams = {}, ) => this.request({ path: `/snippets/${id}`, method: "PATCH", body: data, type: ContentType.Json, ...params, }), /** * No description * * @tags Snippets * @name DeleteSnippetsById * @request DELETE:/snippets/{id} */ deleteSnippetsById: (id: string, params: RequestParams = {}) => this.request({ path: `/snippets/${id}`, method: "DELETE", ...params, }), /** * No description * * @tags Snippets * @name PatchSnippetsByIdContentsByContentId * @request PATCH:/snippets/{id}/contents/{contentId} */ patchSnippetsByIdContentsByContentId: ( id: string, contentId: string, data: SnippetContentsUpdate, params: RequestParams = {}, ) => this.request({ path: `/snippets/${id}/contents/${contentId}`, method: "PATCH", body: data, type: ContentType.Json, ...params, }), /** * No description * * @tags Snippets * @name DeleteSnippetsByIdContentsByContentId * @request DELETE:/snippets/{id}/contents/{contentId} */ deleteSnippetsByIdContentsByContentId: ( id: string, contentId: string, params: RequestParams = {}, ) => this.request({ path: `/snippets/${id}/contents/${contentId}`, method: "DELETE", ...params, }), /** * No description * * @tags Snippets * @name PostSnippetsByIdTagsByTagId * @request POST:/snippets/{id}/tags/{tagId} */ postSnippetsByIdTagsByTagId: ( id: string, tagId: string, params: RequestParams = {}, ) => this.request({ path: `/snippets/${id}/tags/${tagId}`, method: "POST", ...params, }), /** * No description * * @tags Snippets * @name DeleteSnippetsByIdTagsByTagId * @request DELETE:/snippets/{id}/tags/{tagId} */ deleteSnippetsByIdTagsByTagId: ( id: string, tagId: string, params: RequestParams = {}, ) => this.request({ path: `/snippets/${id}/tags/${tagId}`, method: "DELETE", ...params, }), /** * No description * * @tags Snippets * @name DeleteSnippetsTrash * @request DELETE:/snippets/trash */ deleteSnippetsTrash: (params: RequestParams = {}) => this.request({ path: `/snippets/trash`, method: "DELETE", ...params, }), }; folders = { /** * No description * * @tags Folders * @name GetFolders * @request GET:/folders/ */ getFolders: (params: RequestParams = {}) => this.request({ path: `/folders/`, method: "GET", format: "json", ...params, }), /** * No description * * @tags Folders * @name PostFolders * @request POST:/folders/ */ postFolders: (data: FoldersAdd, params: RequestParams = {}) => this.request< { id: number | bigint; }, any >({ path: `/folders/`, method: "POST", body: data, type: ContentType.Json, format: "json", ...params, }), /** * No description * * @tags Folders * @name GetFoldersTree * @request GET:/folders/tree */ getFoldersTree: (params: RequestParams = {}) => this.request({ path: `/folders/tree`, method: "GET", format: "json", ...params, }), /** * No description * * @tags Folders * @name PatchFoldersById * @request PATCH:/folders/{id} */ patchFoldersById: ( id: string, data: FoldersUpdate, params: RequestParams = {}, ) => this.request({ path: `/folders/${id}`, method: "PATCH", body: data, type: ContentType.Json, ...params, }), /** * No description * * @tags Folders * @name DeleteFoldersById * @request DELETE:/folders/{id} */ deleteFoldersById: (id: string, params: RequestParams = {}) => this.request({ path: `/folders/${id}`, method: "DELETE", ...params, }), }; tags = { /** * No description * * @tags Tags * @name GetTags * @request GET:/tags/ */ getTags: (params: RequestParams = {}) => this.request({ path: `/tags/`, method: "GET", format: "json", ...params, }), /** * No description * * @tags Tags * @name PostTags * @request POST:/tags/ */ postTags: (data: TagsAdd, params: RequestParams = {}) => this.request({ path: `/tags/`, method: "POST", body: data, type: ContentType.Json, format: "json", ...params, }), /** * No description * * @tags Tags * @name DeleteTagsById * @request DELETE:/tags/{id} */ deleteTagsById: (id: string, params: RequestParams = {}) => this.request({ path: `/tags/${id}`, method: "DELETE", ...params, }), }; } ================================================ FILE: src/renderer/services/api/index.ts ================================================ import { store } from '@/electron' import ky from 'ky' import { Api } from './generated' const apiPort = store.preferences.get('apiPort') export const api = new Api({ baseUrl: `http://localhost:${apiPort}`, customFetch: ky, }) ================================================ FILE: src/renderer/services/notifications/donate.ts ================================================ import Donate from '@/components/ui/sonner/templates/Donate.vue' import { useApp, useSonner } from '@/composables' import { store } from '@/electron' import { addDays } from 'date-fns' const INTERVAL = 1000 * 60 * 60 * 3 // 3 часа const { sonner } = useSonner() const { isSponsored } = useApp() const isShownDonateNotification = ref(false) function setNextDonateNotification() { const nextDonateNotification = addDays(new Date(), 14) store.app.set('nextDonateNotification', nextDonateNotification.getTime()) } function initFirstDonateNotification() { const nextDonateNotification = store.app.get('nextDonateNotification') if (!nextDonateNotification) { setNextDonateNotification() } } function showDonateNotification() { if (isSponsored) { return } const nextDonateNotification = store.app.get('nextDonateNotification') const now = new Date().getTime() if ( !nextDonateNotification || nextDonateNotification > now || isShownDonateNotification.value ) { return } sonner({ closeButton: true, component: Donate, duration: Infinity, onClose: () => { isShownDonateNotification.value = false setNextDonateNotification() }, }) isShownDonateNotification.value = true } function startNotificationCheck() { initFirstDonateNotification() showDonateNotification() setInterval(() => { showDonateNotification() }, INTERVAL) } export function donateNotification() { startNotificationCheck() } ================================================ FILE: src/renderer/services/notifications/index.ts ================================================ import { donateNotification } from './donate' export function notifications() { donateNotification() } ================================================ FILE: src/renderer/spaceDefinitions.ts ================================================ import type { Component } from 'vue' import type { RouteLocationRaw, RouteRecordName } from 'vue-router' import { i18n } from '@/electron' import { router, RouterName } from '@/router' import { Blocks, Calculator, Code2 } from 'lucide-vue-next' export type SpaceId = 'code' | 'tools' | 'math' export interface SpaceDefinition { id: SpaceId label: string tooltip: string icon: Component to: RouteLocationRaw isActive: (routeName: RouteRecordName | null | undefined) => boolean } function isRouteNameInSpace( routeName: RouteRecordName | null | undefined, prefix: string, ) { return ( typeof routeName === 'string' && (routeName === prefix || routeName.startsWith(`${prefix}/`)) ) } export function getSpaceDefinitions(): SpaceDefinition[] { return [ { id: 'code', label: i18n.t('spaces.code'), tooltip: i18n.t('spaces.codeTooltip'), icon: Code2, to: { name: RouterName.main }, isActive: routeName => routeName === RouterName.main, }, { id: 'tools', label: i18n.t('spaces.tools'), tooltip: i18n.t('spaces.toolsTooltip'), icon: Blocks, to: { name: RouterName.devtoolsCaseConverter }, isActive: routeName => isRouteNameInSpace(routeName, RouterName.devtools), }, { id: 'math', label: i18n.t('spaces.math'), tooltip: i18n.t('spaces.mathTooltip'), icon: Calculator, to: { name: RouterName.mathNotebook }, isActive: routeName => routeName === RouterName.mathNotebook, }, ] } export function isSpaceRouteName( routeName: RouteRecordName | null | undefined, ) { return getSpaceDefinitions().some(space => space.isActive(routeName)) } export function getActiveSpaceId(): SpaceId | null { const routeName = router.currentRoute.value.name const space = getSpaceDefinitions().find(s => s.isActive(routeName)) return space?.id ?? null } ================================================ FILE: src/renderer/styles.css ================================================ @import "tailwindcss"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); :root { --content-top-offset: 8px; --editor-tool-header-height: 28px; --radius: 0.625rem; /* Core */ --background: oklch(100% 0 0); --foreground: oklch(20% 0 0); --card: color-mix(in oklch, var(--foreground) 4%, var(--background)); --card-foreground: oklch(20% 0 0); --popover: var(--background); --popover-foreground: oklch(20% 0 0); --primary: oklch(50% 0.19 260); --primary-foreground: oklch(100% 0 0); --secondary: oklch(97% 0 0); --secondary-foreground: oklch(20% 0 0); --muted: oklch(97% 0 0); --muted-foreground: oklch(60% 0 0); --accent: oklch(92% 0 0); --accent-hover: color-mix(in oklch, var(--accent) 50%, var(--background)); --accent-foreground: oklch(20% 0 0); --destructive: oklch(0.577 0.245 27.325); --border: oklch(90% 0 0); --input: oklch(90% 0 0); --ring: oklch(50% 0.19 260); /* Misc */ --text-highlight: oklch(90.5% 0.182 98.111); --scrollbar: oklch(0% 0 0 / 0.2); /* Charts */ --chart-1: oklch(0.646 0.222 41.116); --chart-2: oklch(0.6 0.118 184.704); --chart-3: oklch(0.398 0.07 227.392); --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08); /* Sidebar */ --sidebar: oklch(100% 0 0); --sidebar-foreground: oklch(20% 0 0); --sidebar-primary: oklch(50% 0.19 260); --sidebar-primary-foreground: oklch(100% 0 0); --sidebar-accent: oklch(97% 0 0); --sidebar-accent-foreground: oklch(20% 0 0); --sidebar-border: oklch(90% 0 0); --sidebar-ring: oklch(50% 0.19 260); } .dark { /* Core */ --background: oklch(24.78% 0 0); --foreground: oklch(75% 0 0); --card: color-mix(in oklch, var(--foreground) 4%, var(--background)); --card-foreground: oklch(75% 0 0); --popover: var(--background); --popover-foreground: oklch(75% 0 0); --primary: oklch(50% 0.19 260); --primary-foreground: oklch(100% 0 0); --secondary: oklch(27% 0 0); --secondary-foreground: oklch(95% 0 0); --muted: oklch(27% 0 0); --muted-foreground: oklch(60% 0 0); --accent: oklch(32% 0 0); --accent-hover: color-mix(in oklch, var(--accent) 50%, var(--background)); --accent-foreground: oklch(95% 0 0); --destructive: oklch(0.704 0.191 22.216); --border: oklch(30% 0 0); --input: oklch(30% 0 0); --ring: oklch(50% 0.19 260); /* Misc */ --text-highlight: oklch(90.5% 0.182 98.111); --scrollbar: oklch(100% 0 0 / 0.2); /* Charts */ --chart-1: oklch(0.488 0.243 264.376); --chart-2: oklch(0.696 0.17 162.48); --chart-3: oklch(0.769 0.188 70.08); --chart-4: oklch(0.627 0.265 303.9); --chart-5: oklch(0.645 0.246 16.439); /* Sidebar */ --sidebar: oklch(24.78% 0 0); --sidebar-foreground: oklch(75% 0 0); --sidebar-primary: oklch(50% 0.19 260); --sidebar-primary-foreground: oklch(100% 0 0); --sidebar-accent: oklch(27% 0 0); --sidebar-accent-foreground: oklch(95% 0 0); --sidebar-border: oklch(30% 0 0); --sidebar-ring: oklch(50% 0.19 260); } @theme inline { --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); /* Core */ --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-hover: var(--accent-hover); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); /* Misc */ --color-text-highlight: var(--text-highlight); --color-scrollbar: var(--scrollbar); /* Charts */ --color-chart-1: var(--chart-1); --color-chart-2: var(--chart-2); --color-chart-3: var(--chart-3); --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); /* Sidebar */ --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); } body { font-size: 14px; } .scrollbar { scrollbar-width: auto; scrollbar-color: var(--scrollbar) transparent; } .scrollbar::-webkit-scrollbar { width: 6px; } .scrollbar::-webkit-scrollbar-track { background: transparent; } .scrollbar::-webkit-scrollbar-thumb { background-color: var(--scrollbar); border-radius: 3px; opacity: 0.6; } .scrollbar::-webkit-scrollbar-thumb:hover { opacity: 0.8; } .scrollbar::-webkit-scrollbar-thumb:active { opacity: 1; } @layer base { * { @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; } } ================================================ FILE: src/renderer/utils/index.ts ================================================ import { type ClassValue, clsx } from 'clsx' import { twMerge } from 'tailwind-merge' export const isMac = navigator.userAgent.toLowerCase().includes('mac') export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } export function scrollToElement(selector: string) { const element = document.querySelector(selector) if (element) { element.scrollIntoView({ block: 'center' }) } } export function getContiguousSelection( orderedIds: number[], anchorId: number | undefined, targetId: number, ): number[] { if (!orderedIds.length) { return [] } const anchorIndex = anchorId !== undefined ? orderedIds.indexOf(anchorId) : -1 const targetIndex = orderedIds.indexOf(targetId) if (targetIndex === -1) { return [] } if (anchorIndex === -1) { return [targetId] } const startIndex = Math.min(anchorIndex, targetIndex) const endIndex = Math.max(anchorIndex, targetIndex) return orderedIds.slice(startIndex, endIndex + 1) } ================================================ FILE: src/renderer/views/Devtools.vue ================================================ ================================================ FILE: src/renderer/views/Main.vue ================================================ ================================================ FILE: src/renderer/views/MarkdownPresentation.vue ================================================ ================================================ FILE: src/renderer/views/MathNotebook.vue ================================================ ================================================ FILE: src/renderer/views/Preferences.vue ================================================ ================================================ FILE: src/renderer/vue-virtual-scroller.d.ts ================================================ declare module 'vue-virtual-scroller' { import type { DefineComponent } from 'vue' export const RecycleScroller: DefineComponent export const DynamicScroller: DefineComponent export const DynamicScrollerItem: DefineComponent const plugin: { install: (app: any) => void } export default plugin } ================================================ FILE: tsconfig.json ================================================ { "compilerOptions": { "target": "ESNext", "jsx": "preserve", "lib": ["ESNext", "DOM"], "baseUrl": ".", "module": "ESNext", "moduleResolution": "node", "paths": { "~/*": ["src/*"], "@/*": ["src/renderer/*"] }, "resolveJsonModule": true, "types": ["vite/client", "node"], "strict": true, "sourceMap": true, "esModuleInterop": true }, "include": [ "src/renderer/**/*.ts", "src/renderer/**/*.d.ts", "src/renderer/**/*.tsx", "src/renderer/**/*.vue", "src/main/types/**/*.ts" ] } ================================================ FILE: tsconfig.main.json ================================================ { "compilerOptions": { "target": "ES2023", "rootDir": "src/main", "module": "CommonJS", "resolveJsonModule": true, "strict": true, "inlineSources": true, "outDir": "build/main", "sourceMap": true, "esModuleInterop": true, "skipLibCheck": true }, "include": [ "src/main/**/*", "src/main/i18n/locales/**/*.json" ] } ================================================ FILE: vite.config.mjs ================================================ import path from 'node:path' import tailwindcss from '@tailwindcss/vite' import vue from '@vitejs/plugin-vue' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import { defineConfig } from 'vite' const root = path.resolve(__dirname) const rootSrc = path.resolve(__dirname, 'src') const rootRenderer = path.resolve(__dirname, 'src/renderer') export default defineConfig({ root: rootRenderer, base: './', plugins: [ vue(), tailwindcss(), AutoImport({ imports: ['vue'], }), Components({ dirs: [`${rootRenderer}/components`], extensions: ['vue'], dts: true, directoryAsNamespace: true, collapseSamePrefixes: true, }), ], build: { outDir: path.resolve(__dirname, 'build/renderer'), emptyOutDir: true, }, resolve: { alias: { '@': rootRenderer, '~': rootSrc, }, }, define: { 'process.env': {}, 'process': {}, }, server: { watch: { ignored: [ `${root}/src/main/i18n/locales/**/*`, `${root}/scripts/**/*`, `${root}/build/**/*`, `${root}/src/main/**/*`, ], }, }, }) ================================================ FILE: vitest.config.ts ================================================ import path from 'node:path' import { defineConfig } from 'vitest/config' export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, 'src/renderer'), '~': path.resolve(__dirname, 'src'), }, }, test: { globals: true, }, })