├── .editorconfig ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .remarkignore ├── changelog.md ├── funding.yml ├── index.d.ts ├── index.js ├── lang ├── annotation.liquidhaskell.haskell.js ├── config.xcompose.js ├── etc.js ├── file.lasso.js ├── go.mod.js ├── go.sum.js ├── hidden.manref.js ├── injections.etc.js ├── objdump.x86asm.js ├── source.2da.js ├── source.4dm.js ├── source.8xp.js ├── source.Caddyfile.js ├── source.QB64.js ├── source.abap.js ├── source.abapcds.js ├── source.abl.js ├── source.abnf.js ├── source.actionscript.3.js ├── source.ada.js ├── source.afm.js ├── source.agc.js ├── source.agda.js ├── source.ahk.js ├── source.aidl.js ├── source.al.js ├── source.alloy.js ├── source.ampl.js ├── source.angelscript.js ├── source.answersetprogramming.js ├── source.antlr.js ├── source.apache-config.js ├── source.apacheconf.js ├── source.apex.js ├── source.apl.js ├── source.applescript.js ├── source.arr.js ├── source.asl.js ├── source.asn.js ├── source.asp.js ├── source.aspectj.js ├── source.assembly.js ├── source.astro.js ├── source.ats.js ├── source.autoit.js ├── source.avro.js ├── source.awk.js ├── source.ballerina.js ├── source.basic.js ├── source.batchfile.js ├── source.bb.js ├── source.bdf.js ├── source.befunge.js ├── source.berry.js ├── source.bf.js ├── source.bh.js ├── source.bicep.js ├── source.blitzmax.js ├── source.boo.js ├── source.boogie.js ├── source.bp.js ├── source.bqn.js ├── source.brs.js ├── source.bsl.js ├── source.bst.js ├── source.bsv.js ├── source.c++.js ├── source.c.ec.js ├── source.c.js ├── source.c.linker.js ├── source.c.nwscript.js ├── source.c.platform.js ├── source.cabal.js ├── source.cadence.js ├── source.cairo.js ├── source.cairo0.js ├── source.camlp4.ocaml.js ├── source.capnp.js ├── source.cds.js ├── source.ceylon.js ├── source.cfscript.js ├── source.changelogs.rpm-spec.js ├── source.chapel.js ├── source.cil.js ├── source.circom.js ├── source.cirru.js ├── source.clar.js ├── source.clarion.js ├── source.clean.js ├── source.click.js ├── source.clips.js ├── source.clojure.js ├── source.cmake.js ├── source.cobol.js ├── source.coffee.js ├── source.commonlisp.js ├── source.context.js ├── source.cool.js ├── source.coq.js ├── source.crystal.js ├── source.cs.js ├── source.csound-document.js ├── source.csound-score.js ├── source.csound.js ├── source.css.js ├── source.css.less.js ├── source.css.mss.js ├── source.css.postcss.sugarss.js ├── source.css.scss.js ├── source.csswg.js ├── source.cuda-c++.js ├── source.cue.js ├── source.cuesheet.js ├── source.curlrc.js ├── source.curry.js ├── source.cwl.js ├── source.cylc.js ├── source.cypher.js ├── source.cython.js ├── source.d.js ├── source.d2.js ├── source.dart.js ├── source.data-weave.js ├── source.deb-control.js ├── source.denizenscript.js ├── source.desktop.js ├── source.diff.js ├── source.dircolors.js ├── source.ditroff.desc.js ├── source.ditroff.js ├── source.dm.js ├── source.dockerfile.js ├── source.dot.js ├── source.dotenv.js ├── source.dune.js ├── source.dylan.js ├── source.earthfile.js ├── source.ebnf.js ├── source.ecl.js ├── source.edgeql.js ├── source.editorconfig.js ├── source.eiffel.js ├── source.elixir.js ├── source.elm.js ├── source.elvish-transcript.js ├── source.elvish.js ├── source.emacs.lisp.js ├── source.erlang.js ├── source.euphoria.js ├── source.factor.js ├── source.fan.js ├── source.fancy.js ├── source.faust.js ├── source.figfont.js ├── source.firestore.js ├── source.firrtl.js ├── source.fish.js ├── source.fnl.js ├── source.fontdir.js ├── source.fontforge.js ├── source.forth.js ├── source.fortran.js ├── source.fortran.modern.js ├── source.fsharp.js ├── source.fstar.js ├── source.ftl.js ├── source.futhark.js ├── source.gap.js ├── source.gcode.js ├── source.gdb.js ├── source.gdresource.js ├── source.gdscript.js ├── source.gdshader.js ├── source.gedcom.js ├── source.gemfile-lock.js ├── source.gemini.js ├── source.generic-db.js ├── source.genero-4gl.js ├── source.genero-forms.js ├── source.genero-per.js ├── source.genero.js ├── source.gerber.js ├── source.gf.js ├── source.git-revlist.js ├── source.gitattributes.js ├── source.gitconfig.js ├── source.gitignore.js ├── source.gjs.js ├── source.gleam.js ├── source.glsl.js ├── source.gn.js ├── source.gnuplot.js ├── source.go.js ├── source.golo.js ├── source.gosu.2.js ├── source.grace.js ├── source.graphql.js ├── source.gremlin.js ├── source.groovy.gradle.js ├── source.groovy.js ├── source.gsc.js ├── source.gts.js ├── source.hack.js ├── source.haproxy-config.js ├── source.harbour.js ├── source.haskell.js ├── source.hc.js ├── source.hcl.js ├── source.hcl.terraform.js ├── source.hlsl.js ├── source.hocon.js ├── source.hoon.js ├── source.hosts.js ├── source.hql.js ├── source.httpspec.js ├── source.hx.js ├── source.hxml.js ├── source.hy.js ├── source.iCalendar.js ├── source.ice.js ├── source.ideal.js ├── source.idl.js ├── source.idris.js ├── source.igor.js ├── source.imba.js ├── source.inform7.js ├── source.ini.js ├── source.ini.npmrc.js ├── source.ink.js ├── source.inno.js ├── source.inputrc.js ├── source.io.js ├── source.ioke.js ├── source.isabelle.root.js ├── source.isabelle.theory.js ├── source.ispc.js ├── source.j.js ├── source.jai.js ├── source.janet.js ├── source.jasmin.js ├── source.java-properties.js ├── source.java.js ├── source.jcl.js ├── source.jest.snap.js ├── source.jflex.js ├── source.jison.js ├── source.jisonlex.js ├── source.jolie.js ├── source.jq.js ├── source.js.js ├── source.js.objj.js ├── source.js.regexp.js ├── source.jsdoc.js ├── source.json.comments.js ├── source.json.js ├── source.jsoniq.js ├── source.jsonnet.js ├── source.julia.console.js ├── source.julia.js ├── source.just.js ├── source.kakscript.js ├── source.kdl.js ├── source.kerboscript.js ├── source.keyvalues.js ├── source.kickstart.js ├── source.kotlin.js ├── source.kusto.js ├── source.lark.js ├── source.lean.js ├── source.lean.markdown.js ├── source.lean4.js ├── source.lean4.markdown.js ├── source.lex.js ├── source.lex.regexp.js ├── source.ligo.js ├── source.lilypond.js ├── source.lisp.js ├── source.litcoffee.js ├── source.livecodescript.js ├── source.livescript.js ├── source.llvm.js ├── source.logos.js ├── source.logtalk.js ├── source.lolcode.js ├── source.loomscript.js ├── source.lsl.js ├── source.ltspice.symbol.js ├── source.lua.js ├── source.luau.js ├── source.m2.js ├── source.m4.js ├── source.m68k.js ├── source.makefile.js ├── source.mask.js ├── source.mata.js ├── source.mathematica.js ├── source.matlab.js ├── source.maxscript.js ├── source.mc.js ├── source.mcfunction.js ├── source.mdx.js ├── source.mercury.js ├── source.mermaid.c4c-diagram.js ├── source.mermaid.class-diagram.js ├── source.mermaid.er-diagram.js ├── source.mermaid.flowchart.js ├── source.mermaid.gantt.js ├── source.mermaid.gitgraph.js ├── source.mermaid.js ├── source.mermaid.mindmap.js ├── source.mermaid.pie-chart.js ├── source.mermaid.requirement-diagram.js ├── source.mermaid.sequence-diagram.js ├── source.mermaid.state-diagram.js ├── source.mermaid.user-journey.js ├── source.meson.js ├── source.miniyaml.js ├── source.mint.js ├── source.ml.js ├── source.mligo.js ├── source.mlir.js ├── source.mo.js ├── source.modelica.js ├── source.modula-3.js ├── source.modula2.js ├── source.mojo.js ├── source.monkey.js ├── source.moonbit.js ├── source.moonscript.js ├── source.move.js ├── source.mql5.js ├── source.msg.js ├── source.msl.js ├── source.mupad.js ├── source.mzn.js ├── source.nanorc.js ├── source.nasal.js ├── source.nasl.js ├── source.ncl.js ├── source.ne.js ├── source.ned.js ├── source.nemerle.js ├── source.neon.js ├── source.nesc.js ├── source.netlinx.erb.js ├── source.netlinx.js ├── source.nextflow-groovy.js ├── source.nextflow.js ├── source.nginx.js ├── source.nim.js ├── source.ninja.js ├── source.nit.js ├── source.nix.js ├── source.nr.js ├── source.nsis.js ├── source.nu.js ├── source.nunjucks.js ├── source.nushell.js ├── source.nut.js ├── source.objc++.js ├── source.objc.js ├── source.objc.platform.js ├── source.objectscript.js ├── source.objectscript_macros.js ├── source.ocaml.js ├── source.odin-ehr.js ├── source.odin.js ├── source.ooc.js ├── source.opa.js ├── source.opal.js ├── source.openesql.js ├── source.opentype.js ├── source.opts.js ├── source.overpassql.js ├── source.ox.js ├── source.oz.js ├── source.p4.js ├── source.pact.js ├── source.pan.js ├── source.papyrus.skyrim.js ├── source.parrot.pir.js ├── source.pascal.js ├── source.pawn.js ├── source.pcb.board.js ├── source.pcb.schematic.js ├── source.pcb.sexp.js ├── source.pddl.js ├── source.peggy.js ├── source.pegjs.js ├── source.pep8.js ├── source.perl.6.js ├── source.perl.js ├── source.php.zephir.js ├── source.pic.js ├── source.pig_latin.js ├── source.pike.js ├── source.pip-requirements.js ├── source.pkl.js ├── source.plist.js ├── source.po.js ├── source.pogoscript.js ├── source.polar.js ├── source.pony.js ├── source.portugol.js ├── source.postcss.js ├── source.postscript.js ├── source.pov-ray sdl.js ├── source.powerbuilder.js ├── source.powershell.js ├── source.praat.js ├── source.prisma.js ├── source.processing.js ├── source.procfile.js ├── source.prolog.eclipse.js ├── source.prolog.js ├── source.promela.js ├── source.proto.js ├── source.puppet.js ├── source.purescript.js ├── source.python.js ├── source.python.kivy.js ├── source.q.js ├── source.qasm.js ├── source.ql.js ├── source.qmake.js ├── source.qml.js ├── source.qsharp.js ├── source.quake.js ├── source.quoting.raku.js ├── source.r.js ├── source.racket.js ├── source.raku.js ├── source.rascal.js ├── source.rbs.js ├── source.reason.js ├── source.rebol.js ├── source.record-jar.js ├── source.red.js ├── source.redirects.js ├── source.reg.js ├── source.regexp.extended.js ├── source.regexp.js ├── source.regexp.posix.js ├── source.regexp.python.js ├── source.regexp.raku.js ├── source.regexp.spin.js ├── source.rego.js ├── source.religo.js ├── source.renpy.js ├── source.rescript.js ├── source.rexx.js ├── source.rez.js ├── source.ring.js ├── source.roc.js ├── source.ron.js ├── source.rpgle.js ├── source.rpm-spec.js ├── source.ruby.js ├── source.rust.js ├── source.sas.js ├── source.sass.js ├── source.sassdoc.js ├── source.scad.js ├── source.scala.js ├── source.scaml.js ├── source.scenic.js ├── source.scheme.js ├── source.scilab.js ├── source.scm.js ├── source.sdbl.js ├── source.sed.js ├── source.sepolicy.js ├── source.sfv.js ├── source.shaderlab.js ├── source.shell.js ├── source.shellcheckrc.js ├── source.shen.js ├── source.sieve.js ├── source.singularity.js ├── source.slang.js ├── source.slice.js ├── source.slint.js ├── source.smali.js ├── source.smalltalk.js ├── source.smithy.js ├── source.smpl.js ├── source.smt.js ├── source.solidity.js ├── source.solution.js ├── source.sourcepawn.js ├── source.sparql.js ├── source.spin.js ├── source.sqf.js ├── source.sql.js ├── source.ssh-config.js ├── source.stan.js ├── source.star.js ├── source.stata.js ├── source.stl.js ├── source.string-template.js ├── source.stylus.js ├── source.supercollider.js ├── source.svelte.js ├── source.sway.js ├── source.swift.js ├── source.sy.js ├── source.systemverilog.js ├── source.tact.js ├── source.talon.js ├── source.tcl.js ├── source.tea.js ├── source.templ.js ├── source.terra.js ├── source.terraform.js ├── source.textgrid.js ├── source.textproto.js ├── source.thrift.js ├── source.tl.js ├── source.tla.js ├── source.tlverilog.js ├── source.tm-properties.js ├── source.toc.js ├── source.toit.js ├── source.toml.js ├── source.ts.js ├── source.tsp.js ├── source.tsql.js ├── source.tsx.js ├── source.turing.js ├── source.turtle.js ├── source.txl.js ├── source.typst.js ├── source.ur.js ├── source.v.js ├── source.vala.js ├── source.varnish.vcl.js ├── source.vba.js ├── source.vbnet.js ├── source.vcard.js ├── source.velocity.js ├── source.verilog.js ├── source.vhdl.js ├── source.vim-snippet.js ├── source.viml.js ├── source.vue.js ├── source.vyper.js ├── source.wavefront.mtl.js ├── source.wavefront.obj.js ├── source.wdl.js ├── source.webassembly.js ├── source.webidl.js ├── source.wgetrc.js ├── source.wgsl.js ├── source.whiley.js ├── source.win32-messages.js ├── source.wit.js ├── source.witcherscript.js ├── source.wollok.js ├── source.wren.js ├── source.wsd.js ├── source.x10.js ├── source.x86.js ├── source.x86asm.js ├── source.xc.js ├── source.xlfd.js ├── source.xmake.js ├── source.xojo.js ├── source.xq.js ├── source.xtend.js ├── source.yacc.js ├── source.yaml.js ├── source.yaml.salt.js ├── source.yang.js ├── source.yara.js ├── source.yasnippet.js ├── source.yul.js ├── source.zap.js ├── source.zeek.js ├── source.zenscript.js ├── source.zig.js ├── source.zil.js ├── text.adblock.js ├── text.bibtex.js ├── text.browserslist.js ├── text.cfml.basic.js ├── text.checksums.js ├── text.codeowners.js ├── text.conllu.js ├── text.crontab.js ├── text.dfy.dafny.js ├── text.elixir.js ├── text.eml.basic.js ├── text.gherkin.feature.js ├── text.grammarkdown.js ├── text.haml.js ├── text.html.asciidoc.js ├── text.html.asdoc.js ├── text.html.asp.js ├── text.html.basic.js ├── text.html.cfm.js ├── text.html.creole.js ├── text.html.cshtml.js ├── text.html.django.js ├── text.html.ecmarkup.js ├── text.html.ecr.js ├── text.html.edge.js ├── text.html.elixir.js ├── text.html.erb.js ├── text.html.ftl.js ├── text.html.handlebars.js ├── text.html.javadoc.js ├── text.html.js.js ├── text.html.jsp.js ├── text.html.jte.js ├── text.html.liquid.js ├── text.html.mako.js ├── text.html.markdown.d2.js ├── text.html.markdown.source.gfm.apib.js ├── text.html.markdown.source.gfm.mson.js ├── text.html.mediawiki.js ├── text.html.nunjucks.js ├── text.html.php.blade.js ├── text.html.php.js ├── text.html.riot.js ├── text.html.slash.js ├── text.html.smarty.js ├── text.html.soy.js ├── text.html.statamic.js ├── text.html.twig.js ├── text.html.vue.js ├── text.jade.js ├── text.marko.js ├── text.md.js ├── text.muse.js ├── text.python.console.js ├── text.python.traceback.js ├── text.rdoc.js ├── text.restructuredtext.js ├── text.robot.js ├── text.robots-txt.js ├── text.roff.js ├── text.rtf.js ├── text.runoff.js ├── text.sfd.js ├── text.shell-session.js ├── text.slim.js ├── text.srt.js ├── text.tex.js ├── text.tex.latex.haskell.js ├── text.tex.latex.js ├── text.tex.latex.sweave.js ├── text.texinfo.js ├── text.vim-help.js ├── text.vtt.js ├── text.xml.ant.js ├── text.xml.genshi.js ├── text.xml.js ├── text.xml.plist.js ├── text.xml.pom.js ├── text.xml.svg.js ├── text.xml.xsl.js └── text.zone_file.js ├── lib ├── all.js ├── common.js ├── get-oniguruma.default.js ├── get-oniguruma.fs.js ├── index.js ├── parse.js ├── theme.js ├── types.d.ts └── types.js ├── license ├── media ├── cover-dark.jpg ├── cover-light.jpg ├── cover.jpg ├── dark.png ├── light.png ├── slice-1.jpg ├── slice-2.jpg └── slice-3.jpg ├── notice ├── package.json ├── readme.md ├── script ├── build.js ├── common.js ├── css.js ├── graph.yml ├── info.js ├── list.js ├── preview.js └── support.js ├── style ├── both.css ├── colorblind-dark.css ├── colorblind-light.css ├── colorblind.css ├── core.css ├── dark.css ├── dimmed-dark.css ├── dimmed.css ├── high-contrast-dark.css ├── high-contrast-light.css ├── high-contrast.css ├── light.css ├── tritanopia-dark.css ├── tritanopia-light.css └── tritanopia.css ├── test.js └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | main: 3 | name: ${{matrix.node}} 4 | runs-on: ubuntu-latest 5 | steps: 6 | - uses: actions/checkout@v4 7 | - uses: actions/setup-node@v4 8 | with: 9 | node-version: ${{matrix.node}} 10 | - run: npm install 11 | - run: npm test 12 | - uses: codecov/codecov-action@v5 13 | strategy: 14 | matrix: 15 | node: 16 | - lts/hydrogen 17 | - node 18 | name: main 19 | on: 20 | - pull_request 21 | - push 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.d.ts 2 | *.log 3 | *.map 4 | *.tsbuildinfo 5 | .DS_Store 6 | coverage/ 7 | gems/ 8 | media/preview.html 9 | node_modules/ 10 | script/grammars.yml 11 | script/info/ 12 | yarn.lock 13 | !/index.d.ts 14 | !/lib/types.d.ts 15 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | ignore-scripts=true 2 | package-lock=false 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.md 2 | coverage/ 3 | gems/ 4 | script/info/ 5 | -------------------------------------------------------------------------------- /.remarkignore: -------------------------------------------------------------------------------- 1 | gems/ 2 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | See [GitHub Releases][releases] for the changelog. 4 | 5 | [releases]: https://github.com/wooorm/starry-night/releases 6 | -------------------------------------------------------------------------------- /funding.yml: -------------------------------------------------------------------------------- 1 | github: wooorm 2 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | export type {GetOnigurumaUrl, Grammar, Options} from './lib/types.js' 2 | export {grammars as all} from './lib/all.js' 3 | export {grammars as common} from './lib/common.js' 4 | export {createStarryNight} from './lib/index.js' 5 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // Note: types exposed from `index.d.ts`. 2 | export {grammars as all} from './lib/all.js' 3 | export {grammars as common} from './lib/common.js' 4 | export {createStarryNight} from './lib/index.js' 5 | -------------------------------------------------------------------------------- /lang/config.xcompose.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: [], 11 | names: ['xcompose'], 12 | patterns: [ 13 | {include: '#comment'}, 14 | {include: '#multikey'}, 15 | {include: '#key'}, 16 | {include: '#quoted'}, 17 | {include: '#function'}, 18 | {include: '#colon'}, 19 | {include: '#unicode'}, 20 | {include: '#keyword'} 21 | ], 22 | repository: { 23 | colon: {match: ':', name: 'entity.function.xcompose'}, 24 | comment: {match: '#.*', name: 'comment.block.xcompose'}, 25 | key: { 26 | captures: { 27 | 1: {name: 'entity.function.xcompose'}, 28 | 2: {name: 'keyword.xcompose.xcompose'}, 29 | 3: {name: 'entity.function.xcompose'} 30 | }, 31 | match: '(?x) ( < ) ( \\S+ ) ( > )' 32 | }, 33 | keyword: {match: '\binclude\b', name: 'entity.function.xcompose'}, 34 | multikey: { 35 | captures: { 36 | 1: {name: 'entity.function.xcompose'}, 37 | 2: {name: 'declaror.class.xcompose'}, 38 | 3: {name: 'entity.function.xcompose'} 39 | }, 40 | match: '(?x) ( < ) ( Multi_key ) ( > )' 41 | }, 42 | quoted: {match: '".*"', name: 'string.quoted.double.xcompose'}, 43 | unicode: {match: 'U[0-9A-Fa-f]+', name: 'storage.modifier.unicode.xcompose'} 44 | }, 45 | scopeName: 'config.xcompose' 46 | } 47 | 48 | export default grammar 49 | -------------------------------------------------------------------------------- /lang/go.sum.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['go-checksums', 'go.sum', 'go-sum', 'go.work.sum', 'go-work-sum'], 14 | patterns: [ 15 | {include: '#checksum'}, 16 | {include: '#semver'}, 17 | {include: '#unquoted_string'} 18 | ], 19 | repository: { 20 | checksum: { 21 | captures: { 22 | 1: { 23 | patterns: [ 24 | {match: '[a-zA-Z\\d+\\/]{43}', name: 'string.unquoted.go.sum'}, 25 | {match: '.*', name: 'invalid.illegal.unknown-hash.go.sum'} 26 | ] 27 | } 28 | }, 29 | match: 'h1:([^\\s]+)=' 30 | }, 31 | semver: { 32 | match: 33 | 'v(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[\\da-z-]+(?:\\.[\\da-z-]+)*)?(?:\\+[\\da-z-]+(?:\\.[\\da-z-]+)*)?', 34 | name: 'constant.language.go.sum' 35 | }, 36 | unquoted_string: {match: '[^\\s]+', name: 'string.unquoted.go.sum'} 37 | }, 38 | scopeName: 'go.sum' 39 | } 40 | 41 | export default grammar 42 | -------------------------------------------------------------------------------- /lang/hidden.manref.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @import {Grammar} from '@wooorm/starry-night' 3 | */ 4 | 5 | /** @type {Grammar} */ 6 | const grammar = { 7 | extensions: [], 8 | names: [], 9 | patterns: [ 10 | { 11 | captures: { 12 | 1: {name: 'manref.subject'}, 13 | 2: {name: 'manref.section'}, 14 | 3: {name: 'punctuation.definition.begin.manref'}, 15 | 4: {name: 'manref.section-number'}, 16 | 5: {name: 'manref.section-group'}, 17 | 6: {name: 'punctuation.definition.end.manref'} 18 | }, 19 | match: 20 | '(?xi)\n# Subject\n((?:\n\t[^:\\s()<>/"\'`{}!&*\\#?\\\\]\n\t|\n\t# Avoid matching scheme component of “man:man(1)” URLs\n\t(?-i: (? for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.c', 'source.c++'], 11 | extensions: [ 12 | '.c++-objdump', 13 | '.c++objdump', 14 | '.c-objdump', 15 | '.cpp-objdump', 16 | '.cppobjdump', 17 | '.cxx-objdump', 18 | '.d-objdump', 19 | '.objdump' 20 | ], 21 | names: ['c++-objdump', 'c-objdump', 'cpp-objdump', 'd-objdump', 'objdump'], 22 | patterns: [ 23 | { 24 | begin: '^(.*):\\s+file format (.*)$', 25 | beginCaptures: { 26 | 0: {name: 'comment.x86.assembly'}, 27 | 1: {name: 'entity.name.type.x86.assembly'} 28 | }, 29 | end: '^', 30 | name: 'meta.embedded.x86asm' 31 | }, 32 | { 33 | begin: '^Disassembly of section (.*):$', 34 | beginCaptures: { 35 | 0: {name: 'comment.x86.assembly'}, 36 | 1: {name: 'entity.name.tag.x86.assembly'} 37 | }, 38 | end: '^', 39 | name: 'meta.embedded.x86asm' 40 | }, 41 | { 42 | begin: '^[0-9A-Za-z]+ <(.*)>:$', 43 | beginCaptures: { 44 | 0: {name: 'comment.x86.assembly'}, 45 | 1: {name: 'entity.name.function.x86.assembly'} 46 | }, 47 | end: '^', 48 | name: 'meta.embedded.x86asm' 49 | }, 50 | { 51 | begin: '^\\s*[0-9A-Za-z]+:(?:\\t[0-9A-Za-z]{2}\\s+){0,1}(?:\\t|$)', 52 | beginCaptures: {0: {name: 'comment.x86.assembly'}}, 53 | end: '^', 54 | name: 'meta.embedded.x86asm', 55 | patterns: [{include: 'source.x86asm'}] 56 | }, 57 | {include: '#special_block'}, 58 | {include: 'source.c'}, 59 | {include: 'source.c++'} 60 | ], 61 | scopeName: 'objdump.x86asm' 62 | } 63 | 64 | export default grammar 65 | -------------------------------------------------------------------------------- /lang/source.agc.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `isc`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.agc'], 11 | names: ['apollo-guidance-computer'], 12 | patterns: [{include: '#main'}], 13 | repository: { 14 | comment: { 15 | patterns: [ 16 | { 17 | begin: '#', 18 | beginCaptures: {0: {name: 'punctuation.definition.comment.agc'}}, 19 | end: '$', 20 | name: 'comment.line.number-sign.agc', 21 | patterns: [ 22 | { 23 | match: 'TODO|FIXME|CHANGED|XXX|IDEA|HACK|NOTE|REVIEW|NB|BUG', 24 | name: 'disable-todo' 25 | } 26 | ] 27 | }, 28 | {match: '^\\t[-+]\\d+(?=\\t)', name: 'comment.annotation.numeric.agc'} 29 | ] 30 | }, 31 | identifier: { 32 | match: '^(?!\\$)(?:[^#\\s]{1,7}\\t|[^#\\s]{8})', 33 | name: 'entity.name.identifier.agc' 34 | }, 35 | inclusion: { 36 | begin: '^\\$', 37 | beginCaptures: {0: {name: 'punctuation.definition.directive.agc'}}, 38 | end: '(?=\\s)', 39 | name: 'meta.preprocessor.include.directive.agc' 40 | }, 41 | main: { 42 | patterns: [ 43 | {include: '#comment'}, 44 | {include: '#number'}, 45 | {include: '#inclusion'}, 46 | {include: '#identifier'}, 47 | {include: '#opcode'} 48 | ] 49 | }, 50 | number: {match: '[-+]\\d+(?:\\.\\d+)?D?', name: 'constant.numeric.agc'}, 51 | opcode: { 52 | begin: '(?<=\\t)([^#\\s]+)(?=\\s|$)', 53 | beginCaptures: {1: {name: 'keyword.function.opcode.agc'}}, 54 | end: '$|(?=#)|[^#\\s]+', 55 | endCaptures: {0: {name: 'variable.parameter.operand.agc'}}, 56 | name: 'meta.opcode.agc' 57 | } 58 | }, 59 | scopeName: 'source.agc' 60 | } 61 | 62 | export default grammar 63 | -------------------------------------------------------------------------------- /lang/source.agda.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.agda'], 13 | names: ['agda'], 14 | patterns: [ 15 | {begin: '--', end: '$', name: 'comment.line.double-dash.agda'}, 16 | {begin: '{-[^#]', end: '-}', name: 'comment.block.agda'}, 17 | {begin: '{-#', end: '#-}', name: 'support.other.agda'}, 18 | {begin: '"', end: '"', name: 'string.quoted.double.agda'}, 19 | {match: "'([^\\\\']|\\\\['\\\\\"[:alnum:]]+)'", name: 'constant.char.agda'}, 20 | { 21 | match: 22 | '(?<=^|[[:space:]\\(\\){}])(-?\\d+|0x[0-9A-F]+|-?\\d+\\.\\d+((e|E)(\\+|-)?\\d+)?|-?\\d+(e|E)(\\+|-)?\\d+)(?=[[:space:]\\(\\){}])', 23 | name: 'constant.numeric.agda' 24 | }, 25 | { 26 | captures: { 27 | 1: {name: 'keyword.other.agda'}, 28 | 2: {name: 'entity.name.type.agda'} 29 | }, 30 | match: 31 | '\\b(data|record|module|constructor|open *import|open|import)[[:space:]]+([^;\\(\\){}@"[:space:]]+)' 32 | }, 33 | { 34 | match: 35 | '((?<=^|[.;\\(\\){}@"[:space:]])\\?(?=[.;\\(\\){}@"[:space:]])|{!.*!})', 36 | name: 'entity.name.tag.agda' 37 | }, 38 | { 39 | match: 40 | '\\b(Set|Prop)[0123456789₀₁₂₃₄₅₆₇₈₉]*(?=$|[[:space:]\\(\\)\\{\\}])', 41 | name: 'constant.language.agda' 42 | }, 43 | { 44 | match: 45 | '(?<=^|[[:space:]\\(\\)\\{\\}])(λ|→|->|∀|=|←|:)(?=[[:space:]\\(\\)\\{\\}])', 46 | name: 'keyword.other.agda' 47 | }, 48 | { 49 | captures: { 50 | 1: {name: 'keyword.other.agda'}, 51 | 4: {name: 'entity.name.agda'} 52 | }, 53 | match: 54 | '^[[:space:]]*(((abstract|instance|macro|pattern|postulate|primitive|private|syntax|variable|where|let)[[:space:]]+)*)((([^;\\(\\){}@"[:space:]]+)[[:space:]]+)+)(?=:)' 55 | }, 56 | { 57 | match: 58 | '(?<=^|[[:space:]\\(\\){}])(abstract|constructor|data|do|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|interleaved|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)(?=$|[[:space:]\\(\\){}])', 59 | name: 'keyword.other.agda' 60 | } 61 | ], 62 | scopeName: 'source.agda' 63 | } 64 | 65 | export default grammar 66 | -------------------------------------------------------------------------------- /lang/source.alloy.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `apache-2.0`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.als'], 13 | names: ['alloy'], 14 | patterns: [ 15 | {match: '\\b(run|check)\\b', name: 'keyword.control.alloy'}, 16 | {match: "\\b(implies|or|and|not|'|;)\\b", name: 'keyword.operator.alloy'}, 17 | { 18 | match: 19 | '\\b(abstract|after|all|always|and|as|assert|before|but|check|disj|else|eventually|exactly|extends|fact|for|fun|historically|iden|iff|implies|in|Int|let|lone|module|no|none|once|one|open|or|pred|releases|run|set|sig|since|some|steps|sum|triggered|univ|until|var)\\b', 20 | name: 'keyword.other.alloy' 21 | }, 22 | {match: '\\/\\/.*', name: 'comment.line.double-slash.alloy'}, 23 | { 24 | match: '\\/\\*(.)*\\*\\/|\\s\\*\\s(.)*\\n|\\*/|\\/\\*(.)*', 25 | name: 'comment.block.empty.alloy' 26 | }, 27 | { 28 | match: '\\b(fact|sig|module|pred|fun|enum)\\b', 29 | name: 'storage.type.alloy' 30 | }, 31 | { 32 | begin: 'pred \\w*\\[(.)*]{', 33 | end: '}', 34 | name: 'entity.name.function.predicate.alloy', 35 | patterns: [{include: '$self'}] 36 | } 37 | ], 38 | scopeName: 'source.alloy' 39 | } 40 | 41 | export default grammar 42 | -------------------------------------------------------------------------------- /lang/source.apache-config.js: -------------------------------------------------------------------------------- 1 | // This is an alias, please use `source.apacheconf.js` instead. 2 | export {default} from './source.apacheconf.js' 3 | -------------------------------------------------------------------------------- /lang/source.arr.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.arr'], 13 | names: ['pyret'], 14 | patterns: [ 15 | { 16 | match: '(!|->|=>|:=|\\[|\\]|{|}|:\\s)', 17 | name: 'keyword.other.delimiters.arr' 18 | }, 19 | {match: '(\\(|\\)|\\.|::|=)', name: 'variable.arr'}, 20 | {match: '(\\|)', name: 'storage.type.delimiters.arr'}, 21 | { 22 | match: '(?|is-not==|is-not=~|is-not<=>|is|is-not|satisfies|violates| raises|does-not-raise|raises-violates|raises-satisfies|raises-other-than| data|with:|sharing:|deriving| for|from|and|or|not| if|else|when|cases|ask|then:|otherwise:) (?!-)(\\b|$)', 28 | name: 'keyword.operators.arr' 29 | }, 30 | { 31 | match: 32 | '(?x)(? | < | >= | <= | <> )', 41 | name: 'keyword.operator.arr' 42 | }, 43 | {begin: '(#\\|)', end: '(\\|#)', name: 'comment.block.arr'}, 44 | {match: '#.*$', name: 'comment.line.number-sign.arr'}, 45 | {match: "'[^']*'", name: 'string.quoted.single.arr'}, 46 | {match: '"[^"]*"', name: 'string.quoted.double.arr'}, 47 | {begin: '```', end: '```', name: 'string.quoted.triple.arr'}, 48 | {match: "'[^']*$", name: 'invalid.illegal'}, 49 | {match: '"[^"]*$', name: 'invalid.illegal'}, 50 | { 51 | match: '(? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.asn', '.asn1'], 13 | names: ['asn.1'], 14 | patterns: [ 15 | {match: '--.*$', name: 'comment.line.asn'}, 16 | {match: '::=', name: 'storage.type.asn'}, 17 | {match: '\\|', name: 'storage.type.asn'}, 18 | {match: '\\.\\.', name: 'keyword.operator.asn'}, 19 | {match: '(SEQUENCE|SET|CLASS|CHOICE|OF)', name: 'storage.type.asn'}, 20 | { 21 | match: 22 | '(BOOLEAN|INTEGER|ENUMERATED|REAL|(BIT|OCTET) STRING|NULL|OBJECT IDENTIFIER|ANY|DATE|DATE-TIME|(Numeric|Printable|Teletex|IA5|Visible|Graphic|General)String|(Generalized|UTC)Time|EXTERNAL|Object Descriptor)', 23 | name: 'variable.language.asn' 24 | }, 25 | { 26 | match: '([-+]?[0-9]+|[-+]?\\.[0-9]+)(?=\\)|\\.\\.)', 27 | name: 'constant.numeric.float.asn' 28 | }, 29 | {begin: '"', end: '"', name: 'string.quoted.double.asn'}, 30 | {match: 'OPTIONAL|SIZE|\\^ FROM', name: 'storage.modifier.asn'}, 31 | { 32 | match: 'DEFINITIONS|AUTOMATIC TAGS|BEGIN|END', 33 | name: 'entity.name.type.class.asn' 34 | }, 35 | {match: 'IMPORTS|FROM', name: 'support.constant.asn'}, 36 | {match: '(IM|EX)PLICIT', name: 'constant.language.asn'} 37 | ], 38 | scopeName: 'source.asn' 39 | } 40 | 41 | export default grammar 42 | -------------------------------------------------------------------------------- /lang/source.basic.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `apache-2.0`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['basic'], 14 | patterns: [ 15 | {match: '^\\s*\\d+', name: 'entity.name.tag.basic'}, 16 | { 17 | captures: { 18 | 1: {name: 'keyword.control.basic'}, 19 | 2: {name: 'entity.name.tag.basic'} 20 | }, 21 | match: '\\b((?i)THEN|ELSE|GO\\s*TO|GOSUB)\\s*(\\d+)' 22 | }, 23 | { 24 | match: '\\b(?:\\d\\.|\\d+\\.\\d+|\\.\\d+|\\d+)(?:[Ee][-+]?\\d+)?\\b', 25 | name: 'constant.numeric.basic' 26 | }, 27 | {match: '"[^"]*"', name: 'string.quoted.double.basic'}, 28 | {match: "(?i:\\bREM\\b.*|^'.*| '.*)", name: 'comment.line.basic'}, 29 | { 30 | match: '\\b(?i:FOR|TO|NEXT|IF|THEN|ELSE|GO\\s*TO|GOSUB|RETURN)\\b', 31 | name: 'keyword.control.basic' 32 | }, 33 | { 34 | match: 35 | '\\b(?i:\\?|\\&|\\!|ABSOLUTE|ACCESS|AS|BASE|BEEP|BLOAD|BSAVE|CALL|CASE|CHAIN|CHDIR|CIRCLE|CLEAR|CLOSE|CLS|COLOR|COM|COMMON|CONST|DATA|DECLARE|DEF|DEFDBL|DEFINT|DEFLNG|DEFSNG|DEFSTR|DIM|DO|DRAW|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FUNCTION|GET|HOME|IF|INPUT|INPUT#|IOCTL|KEY|KILL|LET|LINE|LOCATE|LOCK|LOOP|LPRINT|LSET|MKDIR|NAME|NEW|ON|OPEN|OPTION|OUT|PAINT|PALETTE|PCLEAR0|PCLEAR1|PCOPY|PEN|PLAY|PMAP|PMODE0|POKE|PRESET|PRINT|PRINT#|PSET|PUT|RANDOMIZE|READ|REDIM|REM|RESET|RESTORE|RESUME|RMDIR|RSET|RUN|SCREEN|SEEK|SELECT|SHARED|SHELL|SLEEP|SOUND|SOUNDRND|STATIC|STOP|STRIG|SUB|SWAP|SYSTEM|TIMER|TROFF|TRON|TYPE|UNLOCK|USING|VIEW|WAIT|WEND|WHILE|WINDOW|WRITE)\\b', 36 | name: 'entity.name.type.basic' 37 | }, 38 | { 39 | match: 40 | '\\b(?i:BIN|CHR|COMMAND|DATE|ENVIRON|ERDEV|HEX|INKEY|INPUT|IOCTL|LAFT|LCASES|LEFT|LTRIM|MID|MKD|MKDMBF|MKI|MKL|MKS|MKSMBF|OCT|RIGHT|RTRIM|SPACE|SPC|STR|STRING|TAB|TIME|UCASE|UPS|VARPTR)\\$', 41 | name: 'entity.name.function.basic' 42 | }, 43 | { 44 | match: 45 | '\\b(?i:ABS|ASC|ATN|BRK|CDBL|CINT|CLNG|COS|CSNG|CSRLIN|CTL|CVD|CVDMBF|CVI|CVL|CVS|CVSMBF|D2R|EOF|ERDEV|ERL|ERR|EXP|FILEATTR|FIX|FRE|FREEFILE|HEIGHT|INP|INSTR|INT|ITM|LBOUND|LEN|LG|LIN|LN|LOC|LOF|LOG|LOG10|LPOS|NINT|NUM|PEEK|PEN|POINT|POS|R2D|REC|RND|SADD|SCREEN|SEEK|SETMEM|SGN|SIN|SPA|SPC|SQR|SQRT|STICK|STRIG|SYS|TAB|TAN|TIM|TIMER|TYP|UBOUND|VAL|VALPTR|VALSEG|VARPTR|VARSEG|WIDTH)\\b', 46 | name: 'entity.name.function.basic' 47 | }, 48 | { 49 | match: 50 | '\\^|\\+|-|\\*\\*|\\*|/|=|<>|<=|=<|>=|=>|<|>|\\b(?i:MOD|NOT|AND|OR)\\b', 51 | name: 'keyword.operator.basic' 52 | } 53 | ], 54 | scopeName: 'source.basic' 55 | } 56 | 57 | export default grammar 58 | -------------------------------------------------------------------------------- /lang/source.befunge.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.befunge'], 11 | names: ['befunge'], 12 | patterns: [ 13 | {match: '[0-9]', name: 'constant.numberic.bf'}, 14 | {match: '[+\\-*/%!`]', name: 'storage.type.bf'}, 15 | {match: '[#<>^v?|_@]', name: 'storage.type.bf'}, 16 | {match: '[:$"]', name: 'stack.bf'}, 17 | {match: '[.,&~]', name: 'function.io.bf'}, 18 | {match: '[pg]', name: 'storage.type.bf'}, 19 | {match: '"(.*?)"', name: 'comment.block.bf'} 20 | ], 21 | scopeName: 'source.befunge' 22 | } 23 | 24 | export default grammar 25 | -------------------------------------------------------------------------------- /lang/source.berry.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.be'], 13 | names: ['berry', 'be'], 14 | patterns: [ 15 | {include: '#controls'}, 16 | {include: '#strings'}, 17 | {include: '#comment-block'}, 18 | {include: '#comments'}, 19 | {include: '#keywords'}, 20 | {include: '#function'}, 21 | {include: '#member'}, 22 | {include: '#identifier'}, 23 | {include: '#number'}, 24 | {include: '#operator'} 25 | ], 26 | repository: { 27 | 'comment-block': { 28 | begin: '\\#\\-', 29 | end: '\\-#', 30 | name: 'comment.berry', 31 | patterns: [] 32 | }, 33 | comments: { 34 | begin: '\\#', 35 | end: '\\n', 36 | name: 'comment.line.berry', 37 | patterns: [] 38 | }, 39 | controls: { 40 | patterns: [ 41 | { 42 | match: 43 | '\\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\\b', 44 | name: 'keyword.control.berry' 45 | } 46 | ] 47 | }, 48 | function: { 49 | patterns: [ 50 | { 51 | match: '\\b([a-zA-Z_][a-zA-Z0-9_]*(?=\\s*\\())', 52 | name: 'entity.name.function.berry' 53 | } 54 | ] 55 | }, 56 | identifier: { 57 | patterns: [{match: '\\b[_A-Za-z]\\w+\\b', name: 'identifier.berry'}] 58 | }, 59 | keywords: { 60 | patterns: [ 61 | { 62 | match: 63 | '\\b(var|static|def|class|true|false|nil|self|super|import|as)\\b', 64 | name: 'keyword.berry' 65 | } 66 | ] 67 | }, 68 | member: { 69 | patterns: [ 70 | { 71 | captures: {0: {name: 'entity.other.attribute-name.berry'}}, 72 | match: '\\.([a-zA-Z_][a-zA-Z0-9_]*)' 73 | } 74 | ] 75 | }, 76 | number: { 77 | patterns: [ 78 | { 79 | match: '0x[a-fA-F0-9]+|\\d+|(\\d+\\.?|\\.\\d)\\d*([eE][+-]?\\d+)?', 80 | name: 'constant.numeric.berry' 81 | } 82 | ] 83 | }, 84 | operator: { 85 | patterns: [ 86 | { 87 | match: '\\(|\\)|\\[|\\]|\\.|-|\\!|~|\\*|/|%|\\+|&|\\^|\\||<|>|=|:', 88 | name: 'keyword.operator.berry' 89 | } 90 | ] 91 | }, 92 | strings: { 93 | patterns: [ 94 | {match: '"(\\\\.|[^"])*"', name: 'string.quoted.double.berry'}, 95 | {match: "'(\\\\.|[^'])*'", name: 'string.quoted.single.berry'} 96 | ] 97 | } 98 | }, 99 | scopeName: 'source.berry' 100 | } 101 | 102 | export default grammar 103 | -------------------------------------------------------------------------------- /lang/source.bf.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.b'], 13 | names: ['brainfuck'], 14 | patterns: [ 15 | {match: '[+-]', name: 'constant.character.modify-value.bf'}, 16 | {match: '[<>]', name: 'keyword.operator.modify-pointer.bf'}, 17 | {match: '[.,]', name: 'entity.name.function.io.bf'}, 18 | {match: '\\[', name: 'punctuation.definition.tag.begin.bf'}, 19 | {match: '\\]', name: 'punctuation.definition.tag.end.bf'}, 20 | {match: '[^-.,+<>\\[\\]]', name: 'comment.block.bf'} 21 | ], 22 | scopeName: 'source.bf' 23 | } 24 | 25 | export default grammar 26 | -------------------------------------------------------------------------------- /lang/source.c.ec.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `unlicense`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.c'], 13 | extensions: ['.ec', '.eh'], 14 | names: ['ec'], 15 | patterns: [ 16 | {include: 'source.c'}, 17 | { 18 | match: 19 | '\\b(property|import|delete|new|new0|renew|renew0|define|get|set|remote|dllexport|dllimport|stdcall|subclass|__on_register_module|namespace|using|typed_object|any_object|incref|register|watch|stopwatching|firewatchers|watchable|class_designer|class_fixed|class_no_expansion|isset|class_default_property|property_category|class_data|class_property|virtual|thisclass|dbtable|dbindex|database_open|dbfield|this|value)\\b', 20 | name: 'keyword.other.ec' 21 | }, 22 | {match: '\\b(true|false)\\b', name: 'constant.language.boolean.ec'}, 23 | {match: '\\bnull\\b', name: 'constant.language.null.ec'}, 24 | {match: '\\bclass\\b', name: 'storage.type.class.ec'}, 25 | {match: '\\b(private|public)\\b', name: 'storage.modifier.ec'}, 26 | { 27 | match: 28 | '\\b(unichar|uint|uint32|uint16|uint64|bool|byte|int64|uintptr|intptr|intsize|uintsize)\\b', 29 | name: 'storage.type.ec' 30 | } 31 | ], 32 | scopeName: 'source.c.ec' 33 | } 34 | 35 | export default grammar 36 | -------------------------------------------------------------------------------- /lang/source.c.linker.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.ld', '.lds', '.x'], 13 | names: ['linker-script'], 14 | patterns: [ 15 | { 16 | match: 17 | '\\b(?:S(?:E(?:ARCH_DIR|CTIONS)|IZEOF(?:_HEADERS)?|TARTUP)|IN(?:HIBIT_COMMON_ALLOCATION|CLUDE|PUT)|D(?:ATA_SEGMENT_(?:ALIGN|END)|EFINED)|O(?:UTPUT(?:_(?:FORMAT|ARCH))?|RIGIN)|C(?:REATE_OBJECT_SYMBOL|ONSTRUCTOR)S|(?:FORCE_COMMON_ALLOCATIO|HIDDE)N|E(?:X(?:CLUDE_FILE|TERN)|NTRY)|P(?:ROVIDE(?:_HIDDEN)?|HDRS)|A(?:BSOLUTE|SSERT|LIGN|DDR)|N(?:OCROSSREFS|EXT)|L(?:OADADDR|ENGTH)|M(?:EMORY|AX|IN)|sizeof_headers|l(?:en)?|o(?:rg)?|TARGET|BLOCK|GROUP)\\b', 18 | name: 'support.function.ld' 19 | }, 20 | { 21 | captures: { 22 | 1: {name: 'storage.type.ld'}, 23 | 2: {name: 'constant.numeric.ld'} 24 | }, 25 | match: '(BYTE|SHORT|LONG|S?QUAD)\\s*\\(([^\\)]*)\\)' 26 | }, 27 | { 28 | captures: { 29 | 1: {name: 'variable.other.source.ld'}, 30 | 2: {name: 'constant.other.section.ld'} 31 | }, 32 | match: '((?=.*[^A-Z])[^\\s\\(;\\:\\{\\}]*)\\s*\\(([^\\),"]*)\\)' 33 | }, 34 | { 35 | captures: { 36 | 1: {name: 'constant.other.section.ld'}, 37 | 2: {name: 'constant.numeric.address.ld'}, 38 | 3: {name: 'keyword.other.at.ld'} 39 | }, 40 | match: 41 | '([^\\s\\(;\\:\\{\\}]*)(\\s+[^\\(\\s\\:\\}]+|\\s*\\([^\\)]*\\))?\\s*\\:\\s*(AT\\s*\\([^\\)]*\\))?' 42 | }, 43 | { 44 | captures: { 45 | 1: {name: 'constant.numeric.memory.ld'}, 46 | 2: {name: 'keyword.other.at.ld'}, 47 | 4: {name: 'constant.numeric.memory.ld'}, 48 | 5: {name: 'constant.numeric.address.ld'} 49 | }, 50 | match: 51 | '\\}\\s*\\>\\s*([^\\s\\>\\:]*)\\s*(AT\\s*)?(?:\\>\\s*)?([^\\=\\>]*)?\\=\\s*([^\\s;\\}]*)' 52 | }, 53 | { 54 | captures: { 55 | 1: {name: 'constant.numeric.memory.ld'}, 56 | 2: {name: 'support.constant.permissions.ld'} 57 | }, 58 | match: '([^\\s\\(;\\{\\}]*)\\s*\\(\\s*([RrWwXx\\!]{,4})\\s*\\)' 59 | } 60 | ], 61 | scopeName: 'source.c.linker' 62 | } 63 | 64 | export default grammar 65 | -------------------------------------------------------------------------------- /lang/source.c.nwscript.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.c'], 13 | extensions: ['.nss'], 14 | injections: { 15 | 'R:source.c.nwscript - (string | comment)': { 16 | patterns: [ 17 | { 18 | match: 19 | '\\b(?:effect|itemproperty|location|object|string|talent|vector)\\b', 20 | name: 'support.type.nwscript.c' 21 | }, 22 | {match: '\\b[A-Z_][A-Z0-9_]*\\b', name: 'support.constant.nwscript.c'} 23 | ] 24 | } 25 | }, 26 | names: ['nwscript'], 27 | patterns: [{include: 'source.c'}], 28 | scopeName: 'source.c.nwscript' 29 | } 30 | 31 | export default grammar 32 | -------------------------------------------------------------------------------- /lang/source.cabal.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.cabal'], 13 | names: ['cabal-config', 'cabal'], 14 | patterns: [ 15 | { 16 | captures: {1: {name: 'keyword.other'}, 2: {name: 'constant.numeric'}}, 17 | match: '(version)\\W*:\\W*([\\d.]+)', 18 | name: 'version' 19 | }, 20 | { 21 | captures: {1: {name: 'keyword.other'}}, 22 | match: '(\\S+):[^/]', 23 | name: 'cabal-keyword' 24 | }, 25 | {match: '&&', name: 'keyword.other'}, 26 | { 27 | captures: {1: {name: 'keyword.other'}, 2: {name: 'constant.numeric'}}, 28 | match: '([><=]+)\\s*([\\d.]+)', 29 | name: 'cabal-keyword' 30 | }, 31 | { 32 | captures: {1: {name: 'entity.name.function'}, 2: {name: 'support.other'}}, 33 | match: 34 | '(benchmark|common|executable|flag|source-repository|test-suite)\\s+(\\S+)', 35 | name: 'module-type' 36 | }, 37 | {match: 'library', name: 'entity.name.function'}, 38 | {match: '--.*\\n', name: 'comment'} 39 | ], 40 | scopeName: 'source.cabal' 41 | } 42 | 43 | export default grammar 44 | -------------------------------------------------------------------------------- /lang/source.camlp4.ocaml.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.ocaml'], 11 | extensions: [], 12 | names: [], 13 | patterns: [ 14 | { 15 | begin: '(\\[<)(?=.*?>])', 16 | beginCaptures: {1: {name: 'punctuation.definition.camlp4-stream.ocaml'}}, 17 | end: '(?=>])', 18 | endCaptures: {1: {name: 'punctuation.definition.camlp4-stream.ocaml'}}, 19 | name: 'meta.camlp4-stream.ocaml', 20 | patterns: [{include: '#camlpppp-streams'}] 21 | }, 22 | {match: '\\[<|>]', name: 'punctuation.definition.camlp4-stream.ocaml'}, 23 | { 24 | match: '\\bparser\\b|<(<|:)|>>|\\$(:|\\${0,1})', 25 | name: 'keyword.other.camlp4.ocaml' 26 | } 27 | ], 28 | repository: { 29 | 'camlpppp-streams': { 30 | patterns: [ 31 | { 32 | begin: "(')", 33 | beginCaptures: { 34 | 1: {name: 'punctuation.definition.camlp4.simple-element.ocaml'} 35 | }, 36 | end: "(;)(?=\\s*')|(?=\\s*>])", 37 | endCaptures: {1: {name: 'punctuation.separator.camlp4.ocaml'}}, 38 | name: 'meta.camlp4-stream.element.ocaml', 39 | patterns: [{include: 'source.ocaml'}] 40 | } 41 | ] 42 | } 43 | }, 44 | scopeName: 'source.camlp4.ocaml' 45 | } 46 | 47 | export default grammar 48 | -------------------------------------------------------------------------------- /lang/source.capnp.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.capnp'], 11 | names: ["cap'n-proto"], 12 | patterns: [ 13 | { 14 | captures: { 15 | 1: {name: 'keyword.other.struct.capnp'}, 16 | 2: {name: 'entity.name.type.capnp'} 17 | }, 18 | match: '\\b(struct)(?:\\s+([A-Za-z]+))?' 19 | }, 20 | { 21 | match: '\\b(using|import|union|enum|const|interface|annotation)\\b', 22 | name: 'keyword.other.capnp' 23 | }, 24 | { 25 | match: 26 | ':(Void|Bool|U?Int(8|16|32|64)|Float(32|64)|Text|Data|List\\([.a-zA-Z0-9()]*\\)|Object|union|group)', 27 | name: 'storage.type.builtin.capnp' 28 | }, 29 | {match: ':[.a-zA-Z0-9()]+', name: 'storage.type.custom.capnp'}, 30 | {match: '\\b(true|false|void)\\b', name: 'constant.language.capnp'}, 31 | { 32 | match: '\\b(0x[0-9A-Fa-f]+|\\d+(\\.\\d+)?)\\b', 33 | name: 'constant.numeric.capnp' 34 | }, 35 | {match: '@0x[0-9A-Fa-f]+', name: 'constant.numeric.unique-id.capnp'}, 36 | {match: '@\\d+', name: 'constant.numeric.ordinal.capnp'}, 37 | { 38 | begin: '"', 39 | end: '"', 40 | name: 'string.quoted.double.capnp', 41 | patterns: [{match: '\\.', name: 'constant.character.escape.capnp'}] 42 | }, 43 | { 44 | begin: '(^[ \\t]+)?(?=#)', 45 | beginCaptures: { 46 | 1: {name: 'punctuation.whitespace.comment.leading.capnp'} 47 | }, 48 | end: '(?!\\G)', 49 | patterns: [ 50 | { 51 | begin: '#', 52 | beginCaptures: {0: {name: 'punctuation.definition.comment.capnp'}}, 53 | end: '\\n', 54 | name: 'comment.line.number-sign.capnp' 55 | } 56 | ] 57 | }, 58 | { 59 | captures: { 60 | 1: {name: 'punctuation.section.block.begin.capnp'}, 61 | 2: {name: 'punctuation.section.block.end.capnp'} 62 | }, 63 | match: '(\\{)(\\})' 64 | } 65 | ], 66 | scopeName: 'source.capnp' 67 | } 68 | 69 | export default grammar 70 | -------------------------------------------------------------------------------- /lang/source.ceylon.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `apache-2.0`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.ceylon'], 11 | names: ['ceylon'], 12 | patterns: [ 13 | {include: '#comments'}, 14 | {match: '//.*$', name: 'comment.singleline.ceylon'}, 15 | {match: '^#!/.*$', name: 'comment.shebang.ceylon'}, 16 | { 17 | match: 18 | '\\b(assembly|module|package|import|alias|class|interface|object|given|value|assign|void|function|new|of|extends|satisfies|adapts|abstracts|in|out|return|break|continue|throw|assert|dynamic|if|else|switch|case|for|while|try|catch|finally|then|let|this|outer|super|is|exists|nonempty)\\b', 19 | name: 'keyword.control.ceylon' 20 | }, 21 | { 22 | match: 23 | '\\b(doc|by|license|see|throws|tagged|shared|abstract|formal|default|actual|variable|late|native|deprecated|final|sealed|annotation|suppressWarnings|static)\\b', 24 | name: 'keyword.other.ceylon' 25 | }, 26 | { 27 | match: '([A-Z][a-zA-Z0-9_]*|\\\\I[a-zA-Z0-9_]+)', 28 | name: 'entity.name.class.ceylon' 29 | }, 30 | { 31 | match: '([a-z][a-zA-Z0-9_]*|\\\\i[a-zA-Z0-9_]+)', 32 | name: 'variable.other.ceylon' 33 | }, 34 | {begin: '"""', end: '"""', name: 'string.verbatim.ceylon'}, 35 | { 36 | begin: "'", 37 | end: "'", 38 | name: 'string.ceylon', 39 | patterns: [{match: '\\\\.', name: 'constant.character.escape.ceylon'}] 40 | }, 41 | { 42 | begin: '"', 43 | end: '"|(``)', 44 | name: 'string.template.head.ceylon', 45 | patterns: [{match: '\\\\.', name: 'constant.character.escape.ceylon'}] 46 | }, 47 | {begin: '``', end: '"|``', name: 'string.template.midOrtail.ceylon'}, 48 | { 49 | match: '\\$(([01]+(_[01]+)+)|[01]+)', 50 | name: 'constant.numeric.binary.ceylon' 51 | }, 52 | { 53 | match: '#(([0-9ABCDEF]+(_[0-9ABCDEF]+)+)|[0-9ABCDEF]+)', 54 | name: 'constant.numeric.hexa.ceylon' 55 | }, 56 | { 57 | match: 58 | '-?(([0-9]+(_[0-9]+)+)|[0-9]+)\\.(([0-9]+(_[0-9]+)+)|[0-9]+)(([eE]-?(([0-9]+(_[0-9]+)+)|[0-9]+))|[kmgtpKMGTP])?', 59 | name: 'constant.numeric.floating.ceylon' 60 | }, 61 | { 62 | match: '-?(([0-9]+(_[0-9]+)+)|[0-9]+)[kmgtpKMGTP]?', 63 | name: 'constant.numeric.decimal.ceylon' 64 | } 65 | ], 66 | repository: { 67 | comments: { 68 | begin: '/\\*', 69 | end: '\\*/', 70 | name: 'comment.multiline.ceylon', 71 | patterns: [{include: '#comments'}] 72 | } 73 | }, 74 | scopeName: 'source.ceylon' 75 | } 76 | 77 | export default grammar 78 | -------------------------------------------------------------------------------- /lang/source.changelogs.rpm-spec.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: [], 11 | names: [], 12 | patterns: [ 13 | {match: '^[*+=-]{30}[+==-]*', name: 'entity.section.name.changelogs'}, 14 | {captures: {1: {name: 'comment.changelogs'}}, match: '^[ \\t]*- (.+)'}, 15 | { 16 | captures: { 17 | 1: {name: 'constant.changelogs'}, 18 | 2: {name: 'entity.name.changelogs'}, 19 | 3: {name: 'variable.other.changelogs'}, 20 | 4: {name: 'constant.numeric.changelogs'} 21 | }, 22 | match: 23 | '^(?:\\* )?([a-zA-Z]{3} [a-zA-Z]{3}[ ]+\\d+ \\d+:\\d+:\\d+ [A-Z]+ \\d{4}) - (.*) (<.*>) ([#_a-zA-Z0-9.-]+)$' 24 | }, 25 | { 26 | captures: { 27 | 1: {name: 'constant.changelogs'}, 28 | 2: {name: 'entity.name.changelogs'}, 29 | 3: {name: 'variable.other.changelogs'}, 30 | 4: {name: 'constant.numeric.changelogs'} 31 | }, 32 | match: 33 | '^(?:\\* )?([a-zA-Z]{3} [a-zA-Z]{3}[ ]+\\d+(?: \\d+:\\d+:\\d+ [A-Z]+)? \\d{4}) (.*) (<.*>)(?: -)? ([#a-zA-Z0-9.-]+)?$' 34 | }, 35 | { 36 | captures: { 37 | 1: {name: 'constant.changelogs'}, 38 | 2: {name: 'entity.name.changelogs'}, 39 | 3: {name: 'variable.other.changelogs'}, 40 | 4: {name: 'constant.numeric.changelogs'} 41 | }, 42 | match: 43 | '^(?:\\* )?([a-zA-Z]{3} [a-zA-Z]{3}[ ]+\\d+(?: \\d+:\\d+:\\d+ [A-Z]+)? \\d{4}) (.*) (<.*>)(?: -) (.*)$' 44 | }, 45 | { 46 | captures: { 47 | 1: {name: 'constant.changelogs'}, 48 | 2: {name: 'variable.other.changelogs'} 49 | }, 50 | match: 51 | '^(?:\\* )?([a-zA-Z]{3} [a-zA-Z]{3}[ ]+\\d+(?: \\d+:\\d+:\\d+ [A-Z]+)? \\d{4})(?: -) (.+@.+)$' 52 | }, 53 | { 54 | captures: { 55 | 1: {name: 'constant.changelogs'}, 56 | 2: {name: 'variable.other.changelogs'} 57 | }, 58 | match: '^(?:\\* )?([a-zA-Z]{3} [a-zA-Z]+[ ]+\\d+ \\d{4}) (.+@.+)$' 59 | } 60 | ], 61 | scopeName: 'source.changelogs.rpm-spec' 62 | } 63 | 64 | export default grammar 65 | -------------------------------------------------------------------------------- /lang/source.cirru.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.cirru'], 13 | names: ['cirru'], 14 | patterns: [ 15 | { 16 | begin: '"', 17 | end: '"', 18 | name: 'string.quoted.double.cirru', 19 | patterns: [{match: '\\\\.', name: 'constant.character.escape.cirru'}] 20 | }, 21 | {match: '-?\\b\\d\\S*\\b', name: 'constant.numeric.cirru'}, 22 | {match: '(?=^)\\s*\\,', name: 'keyword.operator.cirru'}, 23 | {match: '\\s\\$\\s*$', name: 'keyword.operator.cirru'}, 24 | { 25 | match: '(?=^)\\s*[^\\(\\)\\s][^\\(\\)\\s]*', 26 | name: 'support.function.cirru' 27 | }, 28 | { 29 | match: '(?<=\\()[^\\(\\)\\s][^\\(\\)\\s]*', 30 | name: 'support.function.cirru' 31 | }, 32 | { 33 | match: '(?=\\$\\s+)[^\\(\\)\\s][^\\(\\)\\s]*', 34 | name: 'support.function.cirru' 35 | }, 36 | { 37 | captures: { 38 | 1: {name: 'keyword.operator.cirru'}, 39 | 3: {name: 'support.function.cirru'} 40 | }, 41 | match: '\\s+((\\$\\s+)+)([^\\(\\)\\s][^\\(\\)\\s]*)', 42 | name: 'entity.cirru' 43 | }, 44 | {match: '[\\)\\(]', name: 'keyword.operator.cirru'}, 45 | { 46 | match: '(?!=($\\s+))[^\\(\\)\\s][^\\(\\)\\s]*', 47 | name: 'variable.parameter.cirru' 48 | } 49 | ], 50 | scopeName: 'source.cirru' 51 | } 52 | 53 | export default grammar 54 | -------------------------------------------------------------------------------- /lang/source.click.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.click'], 11 | names: ['click'], 12 | patterns: [ 13 | { 14 | match: '\\b(\\d{1,3}\\.){3}\\d{1,3}\\b', 15 | name: 'constant.other.ipv4.click' 16 | }, 17 | { 18 | match: '\\b(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}\\b', 19 | name: 'constant.other.ipv6.click' 20 | }, 21 | { 22 | match: '\\b(?:[a-fA-F0-9]{1,2}:){5}[a-fA-F0-9]{1,2}\\b', 23 | name: 'constant.other.eth.click' 24 | }, 25 | { 26 | captures: { 27 | 1: {name: 'constant.numeric.click'}, 28 | 2: {name: 'constant.numeric.click'} 29 | }, 30 | match: '\\b([0-9a-fA-F]+)/([0-9a-fA-F]+)\\b' 31 | }, 32 | {match: '\\b[\\+-]?\\d+(\\.?\\d+)?\\b', name: 'constant.numeric.click'}, 33 | {match: '\\b0x[0-9a-fA-F]+\\b', name: 'constant.numeric.click'}, 34 | { 35 | match: '\\b(define|input|library|output|read|require|write)\\b', 36 | name: 'keyword.other.click' 37 | }, 38 | { 39 | captures: { 40 | 1: {name: 'storage.type.class.click'}, 41 | 2: {name: 'entity.name.type.class.click'} 42 | }, 43 | match: '\\b(elementclass)\\b\\s*([_A-Za-z][_A-Za-z0-9]*\\b)' 44 | }, 45 | {match: '->', name: 'keyword.operator.click'}, 46 | { 47 | begin: '"', 48 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.click'}}, 49 | end: '"', 50 | endCaptures: {0: {name: 'punctuation.definition.string.end.click'}}, 51 | name: 'string.quoted.double.click' 52 | }, 53 | { 54 | match: '[\\b]*\\$[_]*[a-zA-Z][_a-zA-Z0-9]*\\b', 55 | name: 'variable.language.click' 56 | }, 57 | {match: '\\/\\/.*', name: 'comment.click'}, 58 | { 59 | captures: {2: {name: 'entity.name.type.instance.click'}}, 60 | match: '(::)?\\s*(\\w+)\\s*\\(' 61 | }, 62 | { 63 | captures: {1: {name: 'entity.name.type.instance.click'}}, 64 | match: '::\\s*(\\w+)' 65 | }, 66 | {captures: {1: {name: 'constant.language.click'}}, match: ',\\s*(-)'}, 67 | {match: '\\b(no|false|true|yes)\\b', name: 'constant.language.click'} 68 | ], 69 | scopeName: 'source.click' 70 | } 71 | 72 | export default grammar 73 | -------------------------------------------------------------------------------- /lang/source.clips.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.clp'], 11 | names: ['clips'], 12 | patterns: [ 13 | { 14 | begin: ';', 15 | captures: {0: {name: 'punctuation.definition.comment.clips'}}, 16 | end: '$\n?', 17 | name: 'comment.line.double-slash.clips' 18 | }, 19 | { 20 | match: 21 | '\\b(type|default|allowed-values|slot|not|or|and|assert|retract|gensym|printout|declare|salience|modify|export)\\b', 22 | name: 'keyword.control.clips' 23 | }, 24 | {match: '=>', name: 'constant.language.clips'}, 25 | { 26 | captures: {1: {name: 'keyword.clips'}, 2: {name: 'variable.parameter'}}, 27 | match: '(\\?)([a-zA-Z0-9_\\-]*)', 28 | name: 'meta.function.clips' 29 | }, 30 | { 31 | captures: { 32 | 2: {name: 'entity.name.function.clips'}, 33 | 3: {name: 'variable.clips'} 34 | }, 35 | match: 36 | '(^.*(defrule|deffacts|defmodule|deftemplate)[ \\t]+)([a-zA-Z0-9_\\-]+)' 37 | }, 38 | { 39 | match: 40 | '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b', 41 | name: 'constant.other.color.rgb-value.css' 42 | }, 43 | {match: '(<-|~|%)', name: 'constant.language.clips'}, 44 | { 45 | match: '(|=|>|\\+|\\*|\\/|~|%|neq|eq)', 46 | name: 'entity.name.function.clips' 47 | }, 48 | {captures: {2: {name: 'entity.name.function.clips'}}, match: '(\\()(\\-)'} 49 | ], 50 | scopeName: 'source.clips' 51 | } 52 | 53 | export default grammar 54 | -------------------------------------------------------------------------------- /lang/source.cool.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: [], 11 | names: ['cool'], 12 | patterns: [ 13 | {match: '--(.*)\\n', name: 'comment.line.double-dash'}, 14 | { 15 | begin: '\\(\\*', 16 | end: '\\*\\)', 17 | name: 'comment.block.documentation', 18 | patterns: [{include: '#comment.block.documentation'}] 19 | }, 20 | {match: '(Int|String|Bool|Object|IO)', name: 'support.class'}, 21 | { 22 | match: '(abort\\(\\)|type_name\\(\\)|copy\\(\\))', 23 | name: 'support.function' 24 | }, 25 | { 26 | match: '\\b(if|fi|else|then|loop|pool|while|case|esac)\\b', 27 | name: 'keyword.control' 28 | }, 29 | { 30 | match: '\\b(in|inherits|isvoid|let|new|of|new|not)\\b', 31 | name: 'keyword.operator' 32 | }, 33 | {match: '\\b(true|false)\\b', name: 'constant.language'}, 34 | {match: "(?x)\\b((?i:( [0-9]+ ( ' [0-9]+ )* )))", name: 'constant.numeric'}, 35 | { 36 | match: '\\b([A-Z]([A-Z]|[a-z]|[0-9]|_)*|SELF_TYPE)\\b', 37 | name: 'entity.name.type' 38 | }, 39 | {match: '\\b(class)\\b', name: 'storage.modifier'}, 40 | {match: '\\b(self)\\b', name: 'variable.language'}, 41 | {match: '\\b[a-z]([A-z]|[a-z]|[0-9]|_)*\\b', name: 'variable.parameter'}, 42 | {match: '\\b[a-z]*\\(.*\\)\\b', name: 'entity.name.function'}, 43 | { 44 | begin: '"', 45 | beginCaptures: {}, 46 | end: '"', 47 | endCaptures: {}, 48 | name: 'string.quoted.double', 49 | patterns: [{include: '#string_placeholder'}] 50 | } 51 | ], 52 | repository: { 53 | formal_param: { 54 | patterns: [{match: '\\s#variable.parameter : entity.name.type\\s'}] 55 | }, 56 | formals: { 57 | patterns: [{match: '\\s(#formal_param, #formals|#formal_param|)\\s'}] 58 | } 59 | }, 60 | scopeName: 'source.cool' 61 | } 62 | 63 | export default grammar 64 | -------------------------------------------------------------------------------- /lang/source.cuesheet.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['cue-sheet'], 14 | patterns: [ 15 | { 16 | match: 17 | '\\b(CATALOG|CDTEXTFILE|FILE|FLAGS|INDEX|ISRC|PERFORMER|(POST|PRE)GAP|REM (GENRE|DATE|DISCID|DISCNUMBER|TOTALDISCS|COMMENT)|SONGWRITER|TITLE|TRACK)\\b', 18 | name: 'keyword' 19 | }, 20 | { 21 | match: '\\b(BINARY|MOTOROLA|AIFF|WAVE|MP3)\\w*\\b', 22 | name: 'constant.other' 23 | }, 24 | {match: '\\b(4CH|DCP|PRE|SCMS)\\w*\\b', name: 'constant.other'}, 25 | { 26 | match: 27 | '\\b(AUDIO|CDG|MODE(1/(2048|2336)|2/(2336|2352))|CDI/23(36|52))\\w*\\b', 28 | name: 'constant.other' 29 | }, 30 | {match: '\\b[0-9]{2}:[0-9]{2}:[0-9]{2}\\b', name: 'constant.numeric'}, 31 | { 32 | begin: '"', 33 | beginCaptures: {0: {name: 'punctuation.definition.string.begin'}}, 34 | end: '"', 35 | endCaptures: {0: {name: 'punctuation.definition.string.end'}}, 36 | name: 'variable.parameter' 37 | } 38 | ], 39 | scopeName: 'source.cuesheet' 40 | } 41 | 42 | export default grammar 43 | -------------------------------------------------------------------------------- /lang/source.desktop.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.desktop', '.desktop.in', '.service'], 11 | names: ['desktop'], 12 | patterns: [ 13 | { 14 | begin: '(^[ \\t]+)?(?=#)', 15 | beginCaptures: { 16 | 1: {name: 'punctuation.whitespace.comment.leading.desktop'} 17 | }, 18 | end: '(?!\\G)', 19 | patterns: [ 20 | { 21 | begin: '#', 22 | beginCaptures: { 23 | 0: {name: 'punctuation.defdesktoption.comment.desktop'} 24 | }, 25 | end: '\\n', 26 | name: 'comment.line.number-sign.desktop' 27 | } 28 | ] 29 | }, 30 | { 31 | captures: { 32 | 1: {name: 'keyword.other.defdesktoption.desktop'}, 33 | 2: {name: 'punctuation.separator.key-value.desktop'} 34 | }, 35 | match: '\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)' 36 | }, 37 | { 38 | captures: { 39 | 1: {name: 'punctuation.defdesktoption.entity.desktop'}, 40 | 3: {name: 'punctuation.defdesktoption.entity.desktop'} 41 | }, 42 | match: '^(\\[)(.*?)(\\])', 43 | name: 'entity.name.section.group-title.desktop' 44 | }, 45 | { 46 | begin: "'", 47 | beginCaptures: { 48 | 0: {name: 'punctuation.defdesktoption.string.begin.desktop'} 49 | }, 50 | end: "'", 51 | endCaptures: {0: {name: 'punctuation.defdesktoption.string.end.desktop'}}, 52 | name: 'string.quoted.single.desktop', 53 | patterns: [{match: '\\\\.', name: 'constant.character.escape.desktop'}] 54 | }, 55 | { 56 | begin: '"', 57 | beginCaptures: { 58 | 0: {name: 'punctuation.defdesktoption.string.begin.desktop'} 59 | }, 60 | end: '"', 61 | endCaptures: {0: {name: 'punctuation.defdesktoption.string.end.desktop'}}, 62 | name: 'string.quoted.double.desktop' 63 | } 64 | ], 65 | scopeName: 'source.desktop' 66 | } 67 | 68 | export default grammar 69 | -------------------------------------------------------------------------------- /lang/source.dockerfile.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.dockerfile', '.containerfile'], 13 | names: ['dockerfile', 'containerfile'], 14 | patterns: [ 15 | {match: '\\\\.', name: 'constant.character.escaped.dockerfile'}, 16 | { 17 | captures: { 18 | 1: {name: 'keyword.control.dockerfile'}, 19 | 2: {name: 'keyword.other.special-method.dockerfile'} 20 | }, 21 | match: 22 | '^\\s*(?:(ONBUILD)\\s+)?(ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)\\s' 23 | }, 24 | { 25 | captures: { 26 | 1: {name: 'keyword.operator.dockerfile'}, 27 | 2: {name: 'keyword.other.special-method.dockerfile'} 28 | }, 29 | match: '^\\s*(?:(ONBUILD)\\s+)?(CMD|ENTRYPOINT)\\s' 30 | }, 31 | { 32 | begin: '"', 33 | beginCaptures: { 34 | 1: {name: 'punctuation.definition.string.begin.dockerfile'} 35 | }, 36 | end: '"', 37 | endCaptures: {1: {name: 'punctuation.definition.string.end.dockerfile'}}, 38 | name: 'string.quoted.double.dockerfile', 39 | patterns: [ 40 | {match: '\\\\.', name: 'constant.character.escaped.dockerfile'} 41 | ] 42 | }, 43 | { 44 | begin: "'", 45 | beginCaptures: { 46 | 1: {name: 'punctuation.definition.string.begin.dockerfile'} 47 | }, 48 | end: "'", 49 | endCaptures: {1: {name: 'punctuation.definition.string.end.dockerfile'}}, 50 | name: 'string.quoted.single.dockerfile', 51 | patterns: [ 52 | {match: '\\\\.', name: 'constant.character.escaped.dockerfile'} 53 | ] 54 | }, 55 | { 56 | captures: { 57 | 1: {name: 'punctuation.whitespace.comment.leading.dockerfile'}, 58 | 2: {name: 'comment.line.number-sign.dockerfile'}, 59 | 3: {name: 'punctuation.definition.comment.dockerfile'} 60 | }, 61 | match: '^(\\s*)((#).*$\\n?)' 62 | } 63 | ], 64 | scopeName: 'source.dockerfile' 65 | } 66 | 67 | export default grammar 68 | -------------------------------------------------------------------------------- /lang/source.elvish-transcript.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `bsd-2-clause`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.elvish'], 13 | extensions: [], 14 | names: ['elvish-transcript'], 15 | patterns: [ 16 | { 17 | begin: '(^|\\G)[~/][^ ]*> ', 18 | contentName: 'meta.embedded.block.elvish', 19 | patterns: [{include: 'source.elvish'}], 20 | while: '(^|\\G) ' 21 | }, 22 | {match: '(^|\\G)# .* #$', name: 'markup.heading.1.elvish-transcript'}, 23 | {match: '(^|\\G)## .* ##$', name: 'markup.heading.2.elvish-transcript'}, 24 | {match: '(^|\\G)//.*$', name: 'comment.line.double-slash.elvish-transcript'} 25 | ], 26 | scopeName: 'source.elvish-transcript' 27 | } 28 | 29 | export default grammar 30 | -------------------------------------------------------------------------------- /lang/source.fontdir.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.xlfd'], 13 | extensions: [], 14 | names: ['x-font-directory-index'], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | comment: { 18 | begin: '^!', 19 | beginCaptures: {0: {name: 'punctuation.definition.comment.fontdir'}}, 20 | end: '(?=$)', 21 | name: 'comment.line.bang.exclamation-mark.fontdir' 22 | }, 23 | entryCount: { 24 | match: '\\A([0-9]+)(?=\\s|$)', 25 | name: 'constant.numeric.integer.int.decimal.fontdir' 26 | }, 27 | entryName: { 28 | patterns: [ 29 | {include: '#string'}, 30 | { 31 | match: '^(?:[^-\\s]|\\s(?!-|\\S+$)|(? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['gemfile.lock'], 14 | patterns: [{include: '#dependencies-sections'}, {include: '#other-sections'}], 15 | repository: { 16 | 'dependencies-sections': { 17 | begin: '^(GEM|PATH|GIT|DEPENDENCIES)$', 18 | beginCaptures: {0: {name: 'keyword.control.section.gemfile-lock'}}, 19 | end: '^$', 20 | name: 'section.gemfile-lock', 21 | patterns: [{include: '#entries'}, {include: '#dependency-specs'}] 22 | }, 23 | 'dependency-specs': { 24 | patterns: [ 25 | { 26 | begin: '^ {2,6}([^ !]+)\\s*(\\()?', 27 | beginCaptures: { 28 | 1: {name: 'entity.package.gemfile-lock'}, 29 | 2: {name: 'punctuation.parenthesis.begin.gemfile-lock'} 30 | }, 31 | end: '($|\\))', 32 | endCaptures: {1: {name: 'punctuation.parenthesis.end.gemfile-lock'}}, 33 | name: 'dependency.gemfile-lock', 34 | patterns: [{include: '#versions'}] 35 | } 36 | ] 37 | }, 38 | entries: { 39 | patterns: [ 40 | { 41 | captures: { 42 | 1: {name: 'meta.property-name.gemfile-lock'}, 43 | 2: {name: 'string.gemfile-lock'} 44 | }, 45 | match: '^ +([a-z]+:) ?(.*)$', 46 | name: 'entry.gemfile-lock' 47 | } 48 | ] 49 | }, 50 | 'other-sections': { 51 | begin: '^[A-Z ]+$', 52 | beginCaptures: {0: {name: 'keyword.control.section.gemfile-lock'}}, 53 | end: '^$', 54 | name: 'section.gemfile-lock', 55 | patterns: [ 56 | {captures: {1: {name: 'string.gemfile-lock'}}, match: '^\\s+(.*)$'} 57 | ] 58 | }, 59 | versions: { 60 | patterns: [ 61 | { 62 | captures: { 63 | 1: {name: 'keyword.operator.comparison.gemfile-lock'}, 64 | 2: {name: 'constant.numeric.gemfile-lock'}, 65 | 3: {name: 'punctuation.separator.gemfile-lock'} 66 | }, 67 | match: '(?:(<=|>=|=|~>|<|>|!=) )?([0-9A-Za-z_\\-\\.]+)(,)?', 68 | name: 'version.gemfile-lock' 69 | } 70 | ] 71 | } 72 | }, 73 | scopeName: 'source.gemfile-lock' 74 | } 75 | 76 | export default grammar 77 | -------------------------------------------------------------------------------- /lang/source.gemini.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.gmi'], 13 | names: ['gemini', 'gemtext'], 14 | patterns: [ 15 | {include: '#headings'}, 16 | {include: '#links'}, 17 | {include: '#quote'}, 18 | {include: '#raw'}, 19 | {include: '#unorderedLists'} 20 | ], 21 | repository: { 22 | headings: { 23 | patterns: [ 24 | { 25 | captures: {1: {name: 'punctuation.definition.heading.1.gemini'}}, 26 | match: '^(#)(?:[^#].*)?\n', 27 | name: 'markup.heading.1.gemini' 28 | }, 29 | { 30 | captures: {1: {name: 'punctuation.definition.heading.2.gemini'}}, 31 | match: '^(##)(?:[^#].*)?\n', 32 | name: 'markup.heading.2.gemini' 33 | }, 34 | { 35 | captures: {1: {name: 'punctuation.definition.heading.3.gemini'}}, 36 | match: '^(###)(?:[^#].*)?\n', 37 | name: 'markup.heading.3.gemini' 38 | } 39 | ] 40 | }, 41 | links: { 42 | patterns: [ 43 | { 44 | captures: { 45 | 1: {name: 'markup.underline.link.markdown.gemini'}, 46 | 2: {name: 'string.other.link.title.markdown.gemini'} 47 | }, 48 | match: '^=>[ \t]+([^ \t]+)(?:[ \t]+(.*))?' 49 | } 50 | ] 51 | }, 52 | quote: { 53 | patterns: [ 54 | { 55 | captures: { 56 | 1: {name: 'punctuation.definition.quote.begin.markdown.gemini'} 57 | }, 58 | match: '^(>).*$', 59 | name: 'markup.quote.markdown.gemini' 60 | } 61 | ] 62 | }, 63 | raw: { 64 | patterns: [ 65 | {begin: '^```.*\n', end: '^```.*\n', name: 'markup.raw.gemini'} 66 | ] 67 | }, 68 | unorderedLists: { 69 | patterns: [ 70 | { 71 | captures: { 72 | 1: {name: 'punctuation.definition.list.begin.markdown.gemini'} 73 | }, 74 | match: '^(\\*)[ \t]+.+\n', 75 | name: 'markup.list.unnumbered.gemini' 76 | } 77 | ] 78 | } 79 | }, 80 | scopeName: 'source.gemini' 81 | } 82 | 83 | export default grammar 84 | -------------------------------------------------------------------------------- /lang/source.gf.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.gf'], 13 | names: ['grammatical-framework', 'gf'], 14 | patterns: [ 15 | { 16 | match: 17 | '\\b(abstract|concrete|interface|instance|resource|incomplete|of|with|open|in)\\b', 18 | name: 'keyword.module.gf' 19 | }, 20 | { 21 | match: 22 | '\\b(cat|fun|def|data|lincat|lin|lindef|linref|printname|printname|param|oper|flags)\\b', 23 | name: 'keyword.judgement.gf' 24 | }, 25 | { 26 | match: '\\b(table|pre|case|variants|let|in|where)\\b', 27 | name: 'keyword.other.gf' 28 | }, 29 | {match: '(=>|->|:|=|\\.|\\+|\\*|!|\\||\\\\)', name: 'constant.gf'}, 30 | {match: '(;|,)', name: 'constant.gf'}, 31 | { 32 | begin: '"', 33 | beginCaptures: {0: {name: 'punctuation.string.begin.gf'}}, 34 | end: '"', 35 | endCaptures: {0: {name: 'punctuation.string.end.gf'}}, 36 | name: 'string.quoted.double.gf' 37 | }, 38 | {begin: '--', end: '$', name: 'comment.line.gf'}, 39 | {begin: '{-', end: '-}', name: 'comment.block.gf'} 40 | ], 41 | scopeName: 'source.gf' 42 | } 43 | 44 | export default grammar 45 | -------------------------------------------------------------------------------- /lang/source.git-revlist.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['git-revision-list', 'git-blame-ignore-revs'], 14 | patterns: [{include: '#main'}], 15 | repository: { 16 | comment: { 17 | begin: '#', 18 | beginCaptures: {0: {name: 'punctuation.definition.comment.git-revlist'}}, 19 | end: '$', 20 | name: 'comment.line.number-sign.git-revlist' 21 | }, 22 | invalid: {match: '\\S.*?(?=\\s*$)', name: 'invalid.illegal.git-revlist'}, 23 | main: { 24 | patterns: [ 25 | {include: '#comment'}, 26 | {include: '#sha'}, 27 | {include: '#invalid'} 28 | ] 29 | }, 30 | sha: {name: 'constant.numeric.sha.git-revlist'} 31 | }, 32 | scopeName: 'source.git-revlist' 33 | } 34 | 35 | export default grammar 36 | -------------------------------------------------------------------------------- /lang/source.groovy.gradle.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `apache-2.0`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.groovy'], 11 | extensions: ['.gradle'], 12 | names: ['gradle'], 13 | patterns: [{include: '#gradle'}], 14 | repository: { 15 | blocks: { 16 | patterns: [ 17 | { 18 | begin: '(?! 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.hoon'], 13 | names: ['hoon'], 14 | patterns: [ 15 | {begin: '::', end: '\\n', name: 'comment.line.hoon'}, 16 | {begin: '\\s*"""', end: '\\s*"""', name: 'string.double.hoon'}, 17 | {begin: "\\s*'''", end: "\\s*'''", name: 'string.double.hoon'}, 18 | { 19 | begin: '\\"', 20 | end: '\\"', 21 | name: 'string.double.hoon', 22 | patterns: [{match: '\\\\.|[^"]'}] 23 | }, 24 | { 25 | begin: "\\'", 26 | end: "\\'", 27 | name: 'string.single.hoon', 28 | patterns: [{match: "\\\\.|[^']"}] 29 | }, 30 | { 31 | match: '[a-z]([a-z0-9-]*[a-z0-9])?(?=\\=)', 32 | name: 'constant.character.hoon' 33 | }, 34 | { 35 | begin: '\\+[-+] (?=[a-z]([a-z0-9-]*[a-z0-9])?)', 36 | contentName: 'entity.name.function.hoon', 37 | end: '(?![a-z0-9-])' 38 | }, 39 | {match: '%[a-z]([a-z0-9-]*[a-z0-9])?', name: 'constant.character.hoon'}, 40 | {match: '@(?:[a-z0-9-]*[a-z0-9])?|\\*', name: 'storage.type.hoon'}, 41 | { 42 | match: 43 | '\\.[\\^\\+\\*=\\?]|![><:\\.=\\?!]|=[>|:,\\.\\-\\^<+;/~\\*\\?]|\\?[>|:\\.\\-\\^<\\+&~=@!]|\\|[\\$_%:\\.\\-\\^~\\*=@\\?]|\\+[|\\$\\+\\*]|:[_\\-\\^\\+~\\*]|%[_:\\.\\-\\^\\+~\\*=]|\\^[|:\\.\\-\\+&~\\*=\\?]|\\$[|_%:<>\\-\\^&~@=\\?]|;[:<\\+;\\/~\\*=]|~[>|\\$_%<\\+\\/&=\\?!]|--|==', 44 | name: 'keyword.control.hoon' 45 | }, 46 | { 47 | begin: ';script(type "text/coffeescript")', 48 | end: '==', 49 | name: 'keyword.control.hoon' 50 | } 51 | ], 52 | scopeName: 'source.hoon' 53 | } 54 | 55 | export default grammar 56 | -------------------------------------------------------------------------------- /lang/source.hxml.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.hx'], 13 | extensions: ['.hxml'], 14 | names: ['hxml'], 15 | patterns: [ 16 | { 17 | captures: {1: {name: 'punctuation.definition.comment.hxml'}}, 18 | match: '(#).*$\\n?', 19 | name: 'comment.line.number-sign.hxml' 20 | }, 21 | { 22 | begin: '(? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.ics', '.ical'], 13 | names: ['icalendar', 'ical'], 14 | patterns: [ 15 | {match: '^(BEGIN|END)', name: 'keyword.command.icalObject'}, 16 | { 17 | match: ':(VCALENDAR|VEVENT|VTODO|VJOURNAL|VFREEBUSY|VTIMEZONE|VALARM)$', 18 | name: 'constant.language.icalObjectType' 19 | }, 20 | {match: ':(DAYLIGHT|STANDARD)$', name: 'constant.language.icalObjectType'}, 21 | { 22 | match: '^(DTSTART|PRODID|VERSION|CALSCALE|METHOD)', 23 | name: 'keyword.other.icalProperty' 24 | }, 25 | { 26 | match: '^(DTEND|DTSTAMP|ORGANIZER|UID|CLASS|CREATED)', 27 | name: 'keyword.other.icalProperty' 28 | }, 29 | { 30 | match: '^(LOCATION|SEQUENCE|STATUS|SUMMARY|COMMENT)', 31 | name: 'keyword.other.icalProperty' 32 | }, 33 | { 34 | match: '^(TRANSP|ATTENDEE|ATTACH|FREEBUSY|METHOD|CONTACT)', 35 | name: 'keyword.other.icalProperty' 36 | }, 37 | { 38 | match: '^(DURATION|RRULE|EXDATE|EXRULE|URL|DESCRIPTION|ACTION)', 39 | name: 'keyword.other.icalProperty' 40 | }, 41 | { 42 | match: '^(LAST-MODIFIED|RECURRENCE-ID|TRIGGER|RELATED-TO|RDATE)', 43 | name: 'keyword.other.icalProperty' 44 | }, 45 | { 46 | match: '^(TZID|TZOFFSETFROM|TZOFFSETTO|TZNAME|TZURL)', 47 | name: 'keyword.other.icalProperty' 48 | }, 49 | { 50 | match: '^(PRIORITY|DUE|COMPLETED|PERCENT-COMPLETE|CATEGORIES)', 51 | name: 'keyword.other.icalProperty' 52 | }, 53 | { 54 | match: '^(RESOURCES|REPEAT|REQUEST-STATUS)', 55 | name: 'keyword.other.icalProperty' 56 | }, 57 | {match: '^X-[A-Z-]+', name: 'keyword.other.icalCustom'}, 58 | {match: '[0-9]{8}T[0-9]{6}Z?', name: 'string.interpolated.icalDate'}, 59 | {match: '[A-Z0-9-]+=[^;:]+', name: 'variable.parameter.icalParameter'}, 60 | { 61 | match: '(CONFIRMED|TENTATIVE|CANCELLED|DELEGATED|OPAQUE)', 62 | name: 'constant.other.icalSetValue' 63 | }, 64 | { 65 | match: '(NEEDS-ACTION|ACCEPTED|DECLINED|IN-PROGRESS)', 66 | name: 'constant.other.icalSetValue' 67 | }, 68 | { 69 | match: '(PRIVATE|PUBLIC|PUBLISH|GREGORIAN|DISPLAY)', 70 | name: 'constant.other.icalSetValue' 71 | }, 72 | {match: ':COMPLETED$', name: 'constant.other.icalSetValue'} 73 | ], 74 | scopeName: 'source.iCalendar' 75 | } 76 | 77 | export default grammar 78 | -------------------------------------------------------------------------------- /lang/source.ini.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: [ 11 | '.cnf', 12 | '.dof', 13 | '.ini', 14 | '.lektorproject', 15 | '.outjob', 16 | '.pcbdoc', 17 | '.prefs', 18 | '.prjpcb', 19 | '.properties', 20 | '.schdoc', 21 | '.url' 22 | ], 23 | names: ['altium', 'altium-designer', 'dosini', 'ini'], 24 | patterns: [ 25 | { 26 | begin: '(^[ \\t]+)?(?=#)', 27 | beginCaptures: {1: {name: 'punctuation.whitespace.comment.leading.ini'}}, 28 | end: '(?!\\G)', 29 | patterns: [ 30 | { 31 | begin: '#', 32 | beginCaptures: {0: {name: 'punctuation.definition.comment.ini'}}, 33 | end: '\\n', 34 | name: 'comment.line.number-sign.ini' 35 | } 36 | ] 37 | }, 38 | { 39 | begin: '(^[ \\t]+)?(?=;)', 40 | beginCaptures: {1: {name: 'punctuation.whitespace.comment.leading.ini'}}, 41 | end: '(?!\\G)', 42 | patterns: [ 43 | { 44 | begin: ';', 45 | beginCaptures: {0: {name: 'punctuation.definition.comment.ini'}}, 46 | end: '\\n', 47 | name: 'comment.line.semicolon.ini' 48 | } 49 | ] 50 | }, 51 | { 52 | captures: { 53 | 1: {name: 'keyword.other.definition.ini'}, 54 | 2: {name: 'punctuation.separator.key-value.ini'} 55 | }, 56 | match: '\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)' 57 | }, 58 | { 59 | captures: { 60 | 1: {name: 'punctuation.definition.entity.ini'}, 61 | 3: {name: 'punctuation.definition.entity.ini'} 62 | }, 63 | match: '^(\\[)(.*?)(\\])', 64 | name: 'entity.name.section.group-title.ini' 65 | }, 66 | { 67 | begin: "'", 68 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.ini'}}, 69 | end: "'", 70 | endCaptures: {0: {name: 'punctuation.definition.string.end.ini'}}, 71 | name: 'string.quoted.single.ini', 72 | patterns: [{match: '\\\\.', name: 'constant.character.escape.ini'}] 73 | }, 74 | { 75 | begin: '"', 76 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.ini'}}, 77 | end: '"', 78 | endCaptures: {0: {name: 'punctuation.definition.string.end.ini'}}, 79 | name: 'string.quoted.double.ini' 80 | } 81 | ], 82 | scopeName: 'source.ini' 83 | } 84 | 85 | export default grammar 86 | -------------------------------------------------------------------------------- /lang/source.isabelle.root.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `bsd-2-clause`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['isabelle-root'], 14 | patterns: [ 15 | { 16 | match: 17 | '\\b(chapter|session|in|description|options|global_theories|theories|files|document_files|sessions|directories)\\b', 18 | name: 'keyword.control' 19 | }, 20 | { 21 | match: 22 | '\\b(browser_info|condition|document|document_graph|document_output|document_variants|eta_contract|goals_limit|names_long|names_short|names_unique|pretty_margin|print_mode|show_brackets|show_consts|show_main_goal|show_question_marks|show_sorts|show_types|thy_output_break|thy_output_display|thy_output_indent|thy_output_modes|thy_output_quotes|thy_output_source|timeout|global)\\b', 23 | name: 'keyword.other.option' 24 | }, 25 | {match: '\\b(true|false)\\b', name: 'support.constant'}, 26 | { 27 | captures: { 28 | 1: {name: 'keyword.other.option'}, 29 | 2: {name: 'keyword.operator'}, 30 | 3: {name: 'support.constant'} 31 | }, 32 | match: '\\b(quick_and_dirty|skip_proofs)[ ]*(\\=)[ ]*(false)\\b', 33 | name: 'meta.abandon-proof.false' 34 | }, 35 | { 36 | match: '\\b(quick_and_dirty|skip_proofs)\\b', 37 | name: 'invalid.illegal.abandon-proof' 38 | }, 39 | {begin: '"', end: '"', name: 'string.quoted.double'}, 40 | {begin: '\\{\\*', end: '\\*\\}', name: 'comment.block.documentation'}, 41 | {begin: '\\(\\*', end: '\\*\\)', name: 'comment.block'}, 42 | {match: '\\(|\\)|\\[|\\]|\\=|\\+|\\,', name: 'keyword.operator'}, 43 | { 44 | match: "\\??'?([^\\W\\d]|\\\\<\\w+\\>)([.\\w\\']|\\\\<\\w+\\>)*", 45 | name: 'variable.other' 46 | }, 47 | {match: '[0-9]+', name: 'constant.numeric'} 48 | ], 49 | scopeName: 'source.isabelle.root' 50 | } 51 | 52 | export default grammar 53 | -------------------------------------------------------------------------------- /lang/source.java-properties.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed permissive. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['java-properties'], 14 | patterns: [ 15 | {match: '^\\s*$'}, 16 | {include: '#comment-line'}, 17 | {include: '#property-name'}, 18 | {include: '#property-definition'} 19 | ], 20 | repository: { 21 | 'comment-line': { 22 | captures: { 23 | 1: {name: 'punctuation.whitespace.comment.leading.java-properties'}, 24 | 2: {name: 'punctuation.definition.comment.java-properties'} 25 | }, 26 | match: '^(\\s*)([#!])(.+)?$\\n?', 27 | name: 'comment.line.java-properties' 28 | }, 29 | 'property-definition': { 30 | begin: '^(\\s*)((?:\\\\[ \\t]|\\\\:|\\\\=|[^:=\\s])+)(?:\\s*([:=]))?\\s*', 31 | beginCaptures: { 32 | 1: {name: 'punctuation.whitespace.leading.java-properties'}, 33 | 2: { 34 | name: 'support.constant.java-properties', 35 | patterns: [ 36 | { 37 | match: '\\\\(?:[ \\t:=\\\\ntfr\\"\']|u[0-9A-Fa-f]{4})', 38 | name: 'constant.character.escape.java-properties' 39 | } 40 | ] 41 | }, 42 | 3: {name: 'punctuation.separator.key-value.java-properties'} 43 | }, 44 | contentName: 'string.unquoted.java-properties', 45 | end: '(? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.julia', 'source.shell'], 13 | extensions: [], 14 | names: ['julia-repl'], 15 | patterns: [ 16 | { 17 | captures: { 18 | 1: {name: 'punctuation.separator.prompt.julia.console'}, 19 | 2: {patterns: [{include: 'source.julia'}]} 20 | }, 21 | match: '^(julia>|\\.{3}|In \\[\\d+\\]:) (.+)$' 22 | }, 23 | { 24 | captures: { 25 | 1: {name: 'punctuation.separator.prompt.shell.julia.console'}, 26 | 2: {patterns: [{include: 'source.shell'}]} 27 | }, 28 | match: '^(shell>) (.+)$' 29 | }, 30 | { 31 | captures: { 32 | 1: {name: 'punctuation.separator.prompt.help.julia.console'}, 33 | 2: {patterns: [{include: 'source.julia'}]} 34 | }, 35 | match: '^(help\\?>) (.+)$' 36 | } 37 | ], 38 | scopeName: 'source.julia.console' 39 | } 40 | 41 | export default grammar 42 | -------------------------------------------------------------------------------- /lang/source.keyvalues.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.vdf'], 13 | names: ['valve-data-format', 'keyvalues', 'vdf'], 14 | patterns: [{include: '#main'}], 15 | repository: { 16 | block: { 17 | begin: '{', 18 | beginCaptures: { 19 | 0: {name: 'punctuation.definition.block.begin.keyvalues'} 20 | }, 21 | end: '}', 22 | endCaptures: {0: {name: 'punctuation.definition.block.end.keyvalues'}}, 23 | name: 'meta.structure.block.keyvalues', 24 | patterns: [{include: '#main'}] 25 | }, 26 | comment: { 27 | begin: '/', 28 | beginCaptures: {0: {name: 'punctuation.definition.comment.keyvalues'}}, 29 | end: '$', 30 | name: 'comment.line.slash.keyvalues' 31 | }, 32 | main: { 33 | patterns: [ 34 | {include: '#block'}, 35 | {include: '#comment'}, 36 | {include: '#string'}, 37 | {include: '#number'} 38 | ] 39 | }, 40 | number: {match: '\\b\\d+\\b$', name: 'constant.numeric.integer.keyvalues'}, 41 | string: { 42 | patterns: [ 43 | {include: '#string_parts'}, 44 | { 45 | begin: '"', 46 | beginCaptures: { 47 | 0: {name: 'punctuation.definition.string.begin.keyvalues'} 48 | }, 49 | end: '"', 50 | endCaptures: { 51 | 0: {name: 'punctuation.definition.string.end.keyvalues'} 52 | }, 53 | name: 'string.quoted.double.keyvalues', 54 | patterns: [{include: '#string_parts'}] 55 | }, 56 | { 57 | match: '[^\\s{}]+', 58 | name: 'string.unquoted.keyvalues', 59 | patterns: [{include: '#string_parts'}] 60 | } 61 | ] 62 | }, 63 | string_parts: { 64 | patterns: [ 65 | { 66 | captures: {1: {name: 'punctuation.definition.include.keyvalues'}}, 67 | match: '(? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.ligo'], 13 | names: ['ligolang'], 14 | patterns: [ 15 | {include: '#string'}, 16 | {include: '#block_comment'}, 17 | {include: '#line_comment'}, 18 | {include: '#attribute'}, 19 | {include: '#macro'}, 20 | {include: '#controlkeywords'}, 21 | {include: '#function'}, 22 | {include: '#operators'}, 23 | {include: '#typedefinition'}, 24 | {include: '#module'}, 25 | {include: '#identifierconstructor'}, 26 | {include: '#constorvar'}, 27 | {include: '#numericliterals'} 28 | ], 29 | repository: { 30 | attribute: {match: '\\[@.*\\]', name: 'keyword.control.attribute.ligo'}, 31 | block_comment: {begin: '\\(\\*', end: '\\*\\)', name: 'comment.block.ligo'}, 32 | constorvar: { 33 | captures: {1: {name: 'keyword.other.ligo'}}, 34 | match: '\\b(const|var)\\b' 35 | }, 36 | controlkeywords: { 37 | match: 38 | '\\b(case|with|if|then|else|assert|failwith|begin|end|in|is|from|skip|block|contains|to|step|of|while|for|remove)\\b', 39 | name: 'keyword.control.ligo' 40 | }, 41 | function: { 42 | captures: { 43 | 1: {name: 'keyword.other.ligo'}, 44 | 2: {name: 'entity.name.function.ligo'} 45 | }, 46 | match: '\\b(function)\\b\\s*\\b([a-zA-Z$_][a-zA-Z0-9$_]*)' 47 | }, 48 | identifierconstructor: { 49 | captures: {1: {name: 'variable.other.enummember.ligo'}}, 50 | match: '\\b([A-Z][a-zA-Z0-9_$]*)\\s+' 51 | }, 52 | line_comment: {match: '\\/\\/.*$', name: 'comment.block.ligo'}, 53 | macro: {match: '^\\#[a-zA-Z]+', name: 'meta.preprocessor.ligo'}, 54 | module: { 55 | captures: { 56 | 1: {name: 'storage.class.ligo'}, 57 | 2: {name: 'storage.var.ligo'} 58 | }, 59 | match: '\\b([A-Z][a-zA-Z0-9_$]*)\\.([a-z][a-zA-Z0-9_$]*)' 60 | }, 61 | numericliterals: { 62 | match: '(\\+|\\-)?[0-9]+(n|tz|tez|mutez|)\\b', 63 | name: 'constant.numeric.ligo' 64 | }, 65 | operators: { 66 | match: 67 | '\\s+(\\-|\\+|mod|land|lor|lxor|lsl|lsr|&&|\\|\\||>|=/=|<=|=>|<|>)\\s+', 68 | name: 'keyword.operator.ligo' 69 | }, 70 | string: {begin: '\\"', end: '\\"', name: 'string.quoted.double.ligo'}, 71 | typedefinition: {match: '\\b(type)\\b', name: 'entity.name.type.ligo'} 72 | }, 73 | scopeName: 'source.ligo' 74 | } 75 | 76 | export default grammar 77 | -------------------------------------------------------------------------------- /lang/source.logos.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.c++', 'source.objc'], 13 | extensions: ['.xm', '.xi'], 14 | names: ['logos'], 15 | patterns: [ 16 | { 17 | match: 18 | '%(init|hook|subclass|group|class|new|ctor|end|config|orig|log|hookf|dtor|property|c)', 19 | name: 'keyword.source.logos' 20 | }, 21 | { 22 | captures: {1: {name: 'keyword.source.logos'}}, 23 | match: '%c\\(([A-Za-z$_]+)\\)' 24 | }, 25 | {include: 'source.objc'}, 26 | {include: 'source.c++'} 27 | ], 28 | scopeName: 'source.logos' 29 | } 30 | 31 | export default grammar 32 | -------------------------------------------------------------------------------- /lang/source.mermaid.c4c-diagram.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.mermaid', 'source.mermaid.user-journey', 'source.wsd'], 13 | extensions: [], 14 | names: [], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | main: { 18 | patterns: [ 19 | {include: 'source.mermaid#a11y'}, 20 | {include: 'source.mermaid#directive'}, 21 | {include: 'source.mermaid#comment'}, 22 | {include: 'source.mermaid#direction'}, 23 | {include: 'source.mermaid.user-journey#title'}, 24 | {include: 'source.wsd'} 25 | ] 26 | } 27 | }, 28 | scopeName: 'source.mermaid.c4c-diagram' 29 | } 30 | 31 | export default grammar 32 | -------------------------------------------------------------------------------- /lang/source.mermaid.pie-chart.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.mermaid'], 13 | extensions: [], 14 | names: [], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | main: { 18 | patterns: [ 19 | {include: 'source.mermaid#a11y'}, 20 | {include: 'source.mermaid#directive'}, 21 | {include: 'source.mermaid#comment'}, 22 | {include: '#show-data'}, 23 | {include: '#title'}, 24 | {include: '#slice'} 25 | ] 26 | }, 27 | 'show-data': { 28 | captures: {1: {name: 'keyword.operator.show-data.mermaid'}}, 29 | match: '(?i)(?:\\G|(?<=pie))\\s+(showData)(?=$|\\s)' 30 | }, 31 | slice: { 32 | captures: { 33 | 1: {name: 'string.quoted.double.data-key.mermaid'}, 34 | 2: {patterns: [{include: 'source.mermaid#entity'}]}, 35 | 4: {name: 'punctuation.definition.string.end.mermaid'}, 36 | 5: {patterns: [{include: 'source.mermaid#colon'}]}, 37 | 6: {name: 'constant.numeric.decimal.data-value.mermaid'} 38 | }, 39 | match: '^\\s*((")([^"]*)("))\\s*(:)[ \\t]*(?:([-+]?\\d+(?:\\.\\d+)?))?', 40 | name: 'meta.data-set.mermaid' 41 | }, 42 | title: { 43 | begin: '(?i)(?:^|\\G|(?<=\\s))\\s*(title)(?=$|\\s)[ \\t]*', 44 | beginCaptures: {1: {name: 'storage.type.title.mermaid'}}, 45 | contentName: 'string.unquoted.diagram-title.mermaid', 46 | end: '(?=\\s*$)', 47 | name: 'meta.title.mermaid', 48 | patterns: [{include: 'source.mermaid#entity'}] 49 | } 50 | }, 51 | scopeName: 'source.mermaid.pie-chart' 52 | } 53 | 54 | export default grammar 55 | -------------------------------------------------------------------------------- /lang/source.mermaid.user-journey.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.mermaid'], 13 | extensions: [], 14 | names: [], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | main: { 18 | patterns: [ 19 | {include: 'source.mermaid#a11y'}, 20 | {include: 'source.mermaid#directive'}, 21 | {include: 'source.mermaid#comment'}, 22 | {include: '#title'}, 23 | {include: '#section'} 24 | ] 25 | }, 26 | section: { 27 | begin: '(?i)section(?=$|\\s)[ \\t]*', 28 | beginCaptures: {0: {name: 'storage.type.section.mermaid'}}, 29 | end: '(?=\\s*section(?:$|\\s))|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)', 30 | name: 'meta.section.mermaid', 31 | patterns: [ 32 | { 33 | begin: '\\G(?=\\S)', 34 | end: '(?=\\s*$)', 35 | name: 'string.unquoted.section-description.mermaid', 36 | patterns: [{include: 'source.mermaid#entity'}] 37 | }, 38 | {include: 'source.mermaid#a11y'}, 39 | {include: 'source.mermaid#directive'}, 40 | {include: 'source.mermaid#comment'}, 41 | {include: '#task'} 42 | ] 43 | }, 44 | task: { 45 | begin: 46 | '(?x)\n((?=\\S)(?:[^:%]|%(?!%))+?)\n\\s* (:) \\s* ([-+]?\\d+(?:\\.\\d+)?)?\n\\s* (:) [ \\t]*', 47 | beginCaptures: { 48 | 1: {name: 'entity.name.task.mermaid'}, 49 | 2: {patterns: [{include: 'source.mermaid#colon'}]}, 50 | 3: {name: 'constant.numeric.decimal.score.mermaid'}, 51 | 4: {patterns: [{include: 'source.mermaid#colon'}]} 52 | }, 53 | contentName: 'meta.actors.mermaid', 54 | end: '(?=\\s*$)', 55 | name: 'meta.task.mermaid', 56 | patterns: [ 57 | {match: '(?=\\S)[^,\\r\\n]+', name: 'variable.parameter.actor.mermaid'}, 58 | {include: 'source.mermaid#comma'} 59 | ] 60 | }, 61 | title: { 62 | begin: '(?i)title(?=$|\\s)[ \\t]*', 63 | beginCaptures: {0: {name: 'storage.type.title.mermaid'}}, 64 | contentName: 'string.unquoted.diagram-title.mermaid', 65 | end: '(?=\\s*$)', 66 | name: 'meta.title.mermaid', 67 | patterns: [{include: 'source.mermaid#entity'}] 68 | } 69 | }, 70 | scopeName: 'source.mermaid.user-journey' 71 | } 72 | 73 | export default grammar 74 | -------------------------------------------------------------------------------- /lang/source.miniyaml.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | extensionsWithDot: ['.yaml', '.yml'], 14 | names: ['miniyaml'], 15 | patterns: [{include: '#comment'}, {include: '#node'}], 16 | repository: { 17 | 'block-pair': { 18 | match: '^\\t*(\\S+?)(?=@|:)', 19 | name: 'entity.name.tag.yaml', 20 | patterns: [{include: '#node-identifier'}] 21 | }, 22 | comment: { 23 | begin: '(?<=^|\\s)#(?!{)', 24 | beginCaptures: {0: {name: 'punctuation.definition.comment.yaml'}}, 25 | end: '$', 26 | name: 'comment.line.number-sign.yaml' 27 | }, 28 | constants: { 29 | match: '(?::\\s)(true|false|True|False|TRUE|FALSE|~)(?=\\s*$)', 30 | name: 'constant.language.yaml' 31 | }, 32 | node: { 33 | patterns: [ 34 | {include: '#node-removal'}, 35 | {include: '#block-pair'}, 36 | {include: '#node-identifier'}, 37 | {include: '#scalar-content'} 38 | ] 39 | }, 40 | 'node-identifier': {match: '(?<=\\S)(@\\S+)(?=:\\s)', name: 'support.yaml'}, 41 | 'node-removal': {match: '^\\t+(-.+?)(?=@|:\\s)', name: 'entity.yaml'}, 42 | numeric: { 43 | patterns: [ 44 | { 45 | match: '(?::\\s)[-+]?[0-9]+(?=\\s*($|#(?!#{)))', 46 | name: 'constant.numeric.integer.yaml' 47 | }, 48 | { 49 | match: '(?::\\s)0o[0-7]+(?=\\s*($|#(?!#{)))', 50 | name: 'constant.numeric.octal.yaml' 51 | }, 52 | { 53 | match: '(?::\\s)0x[0-9a-fA-F]+(?=\\s*($|#(?!#{)))', 54 | name: 'constant.numeric.hexadecimal.yaml' 55 | }, 56 | { 57 | match: 58 | '(?::\\s)[-+]?(.[0-9]+|[0-9]+(.[0-9]*)?)([eE][-+]?[0-9]+)?(?=\\s*($|#(?!#{)))', 59 | name: 'constant.numeric.float.yaml' 60 | }, 61 | { 62 | match: '(?::\\s)[-+]?(.inf|.Inf|.INF)(?=\\s*($|#(?!#{)))', 63 | name: 'constant.numeric.float.yaml' 64 | }, 65 | { 66 | match: '(?::\\s)(.nan|.NaN|.NAN)(?=\\s*($|#(?!#{)))', 67 | name: 'constant.numeric.float.yaml' 68 | } 69 | ] 70 | }, 71 | 'scalar-content': { 72 | patterns: [ 73 | {include: '#comment'}, 74 | {include: '#constants'}, 75 | {include: '#numeric'}, 76 | {include: '#strings'} 77 | ] 78 | }, 79 | strings: { 80 | patterns: [ 81 | { 82 | match: '[^\\s"\'\\n](?!\\s*#(?!{))([^#\\n]|((? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.mligo'], 13 | names: ['cameligo'], 14 | patterns: [ 15 | {include: '#string'}, 16 | {include: '#block_comment'}, 17 | {include: '#line_comment'}, 18 | {include: '#attribute'}, 19 | {include: '#macro'}, 20 | {include: '#letbinding'}, 21 | {include: '#lambda'}, 22 | {include: '#typedefinition'}, 23 | {include: '#controlkeywords'}, 24 | {include: '#numericliterals'}, 25 | {include: '#operators'}, 26 | {include: '#identifierconstructor'}, 27 | {include: '#module'} 28 | ], 29 | repository: { 30 | attribute: {match: '\\[@.*\\]', name: 'keyword.control.attribute.mligo'}, 31 | block_comment: { 32 | begin: '\\(\\*', 33 | end: '\\*\\)', 34 | name: 'comment.block.mligo' 35 | }, 36 | controlkeywords: { 37 | match: '\\b(match|with|if|then|else|assert|failwith|begin|end|in)\\b', 38 | name: 'keyword.control.mligo' 39 | }, 40 | identifierconstructor: { 41 | captures: {1: {name: 'variable.other.enummember.mligo'}}, 42 | match: '\\b([A-Z][a-zA-Z0-9_$]*)\\s+' 43 | }, 44 | lambda: { 45 | begin: '\\b(fun)\\b', 46 | beginCaptures: {1: {name: 'keyword.other.mligo'}}, 47 | end: '(->)', 48 | endCaptures: {1: {name: 'keyword.operator.mligo'}} 49 | }, 50 | letbinding: { 51 | captures: { 52 | 1: {name: 'keyword.other.mligo'}, 53 | 2: {name: 'storage.modifier.mligo'}, 54 | 3: {name: 'entity.name.function.mligo'} 55 | }, 56 | match: '\\b(let)\\b\\s*\\b(rec|)\\s*\\b([a-zA-Z$_][a-zA-Z0-9$_]*)' 57 | }, 58 | line_comment: {match: '\\/\\/.*$', name: 'comment.block.mligo'}, 59 | macro: {match: '^\\#[a-zA-Z]+', name: 'meta.preprocessor.mligo'}, 60 | module: { 61 | captures: { 62 | 1: {name: 'storage.class.mligo'}, 63 | 2: {name: 'storage.var.mligo'} 64 | }, 65 | match: '\\b([A-Z][a-zA-Z0-9_$]*)\\.([a-z][a-zA-Z0-9_$]*)' 66 | }, 67 | numericliterals: { 68 | match: '(\\+|\\-)?[0-9]+(n|tz|tez|mutez|)\\b', 69 | name: 'constant.numeric.mligo' 70 | }, 71 | operators: { 72 | match: 73 | '\\s+(::|\\-|\\+|mod|land|lor|lxor|lsl|lsr|&&|\\|\\||>|<>|<=|=>|<|>)\\s+', 74 | name: 'keyword.operator.mligo' 75 | }, 76 | string: {begin: '\\"', end: '\\"', name: 'string.quoted.double.mligo'}, 77 | typedefinition: {match: '\\b(type)\\b', name: 'entity.name.type.mligo'} 78 | }, 79 | scopeName: 'source.mligo' 80 | } 81 | 82 | export default grammar 83 | -------------------------------------------------------------------------------- /lang/source.modula2.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.ob2'], 13 | names: ['modula-2', 'oberon'], 14 | patterns: [ 15 | { 16 | captures: { 17 | 1: {name: 'storage.type.function.modula2'}, 18 | 2: {name: 'entity.name.function.modula2'} 19 | }, 20 | match: 21 | '\\b(PROCEDURE|DEFINITION MODULE|IMPLEMENTATION MODULE|MODULE)\\b\\s+(\\w+(\\.\\w+)?)' 22 | }, 23 | { 24 | captures: { 25 | 1: {name: 'keyword.control.modula2'}, 26 | 2: {name: 'entity.name.function.end.modula2'} 27 | }, 28 | match: '\\b(END)\\b\\s+(\\w+(\\.\\w+)?)' 29 | }, 30 | { 31 | captures: { 32 | 1: {name: 'storage.type.function.modula2'}, 33 | 2: {name: 'entity.name.function.modula2'} 34 | }, 35 | match: 36 | '\\b(ABS|ADDRES|ADR|BITSET|BOOLEAN|BYTE|CAP|CARDINAL|CHAR|CHR|DEC|DISPOSE|EXCL|FALSE|FLOAT|HALT|HIGH|INC|INCL|INTEGER|LONGCARD|LONGINT|LONGREAL|LONGWORD|NEW|NULLPROC|ODD|ORD|PROC|REAL|SHORTADDR|SHORTCARD|SHORTINT|SIZE|TRUE|TRUNC|VAL|VSIZE|WORD)\\b', 37 | name: 'meta.function.modula2' 38 | }, 39 | { 40 | match: 41 | '\\b(AND|ARRAY|BEGIN|BY|CASE|CONST|DIV|DO|ELSE|ELSIF|END|EXIT|EXPORT|FOR|FORWARD|FROM|GOTO|IF|IMPORT|IN|LABEL|LOOP|MOD|NOT|OF|OR|POINTER|QUALIFIED|RECORD|REPEAT|RETURN|SET|THEN|TO|DOWNTO|TYPE|UNTIL|VAR|WHILE|WITH|NIL)\\b', 42 | name: 'keyword.control.modula2' 43 | }, 44 | {include: '#block_comment'}, 45 | { 46 | begin: '"', 47 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.modula2'}}, 48 | end: '"', 49 | endCaptures: {0: {name: 'punctuation.definition.string.end.modula2'}}, 50 | name: 'string.quoted.double.modula2', 51 | patterns: [{match: '\\.', name: 'constant.character.escape.modula2'}] 52 | }, 53 | { 54 | match: 55 | '\\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', 56 | name: 'constant.numeric.modula2' 57 | }, 58 | { 59 | match: '(\\(|\\)|\\+|-|\\*|/|:|;|\\.|\\^|=|:=|<|>|#)', 60 | name: 'variable.parameter.function.modula2' 61 | } 62 | ], 63 | repository: { 64 | block_comment: { 65 | applyEndPatternLast: true, 66 | begin: '\\(\\*', 67 | captures: {0: {name: 'punctuation.definition.comment.modula2'}}, 68 | end: '\\*\\)', 69 | name: 'comment.block.modula2.one', 70 | patterns: [{include: '#block_comment'}] 71 | } 72 | }, 73 | scopeName: 'source.modula2' 74 | } 75 | 76 | export default grammar 77 | -------------------------------------------------------------------------------- /lang/source.msg.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.msg'], 13 | names: ['omnet++-msg', 'omnetpp-msg'], 14 | patterns: [ 15 | {include: '#keyword'}, 16 | {include: '#comment'}, 17 | {include: '#property'}, 18 | {include: '#types'} 19 | ], 20 | repository: { 21 | comment: { 22 | patterns: [{match: '//.*$', name: 'comment.line.double-slash.msg'}] 23 | }, 24 | keyword: { 25 | patterns: [ 26 | { 27 | match: 28 | '\\b(?:cplusplus|namespace|struct|message|packet|class|enum|extends|import)\\b', 29 | name: 'keyword.other.msg' 30 | } 31 | ] 32 | }, 33 | property: {patterns: [{match: '@[a-zA-Z]+', name: 'entity.name.tag.msg'}]}, 34 | string: {patterns: [{match: '"[^"]*"', name: 'string.quoted.msg'}]}, 35 | types: { 36 | patterns: [ 37 | { 38 | match: 39 | '\\b(?:abstract|bool|char|short|int|long|float|double|unsigned|string|simtime_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int16|int32|int64|uint8|uint16|uint32|uint64)\\b', 40 | name: 'storage.type.common' 41 | } 42 | ] 43 | } 44 | }, 45 | scopeName: 'source.msg' 46 | } 47 | 48 | export default grammar 49 | -------------------------------------------------------------------------------- /lang/source.ne.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `unlicense`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.ne', '.nearley'], 13 | names: ['nearley'], 14 | patterns: [ 15 | {match: '@include|@builtin|@lexer', name: 'keyword.control.ne'}, 16 | { 17 | captures: { 18 | 1: {name: 'entity.name.type.ne'}, 19 | 2: {name: 'variable.parameter.ne'}, 20 | 3: {name: 'keyword.operator.ne'} 21 | }, 22 | match: '([\\w+?]+)(\\[.+\\])?\\s+((-|=)+>)' 23 | }, 24 | {match: '\\$[\\w+?]+', name: 'variable.parameter.ne'}, 25 | {match: '%[\\w+?]+', name: 'storage.type.ne'}, 26 | {match: 'null', name: 'constant.language.ne'}, 27 | { 28 | begin: '([\\w+?]+\\[)', 29 | captures: { 30 | 1: {name: 'entity.name.function'}, 31 | 2: {name: 'entity.name.function'} 32 | }, 33 | end: '(\\])', 34 | patterns: [{include: '$self'}] 35 | }, 36 | {match: '[\\w+?]+', name: 'entity.name.type.ne'}, 37 | { 38 | match: '(\\|)|(:\\+)|(:\\*)|(:\\?)|(\\()|(\\))', 39 | name: 'keyword.operator.ne' 40 | }, 41 | {begin: '#', end: '\\n', name: 'comment.line.ne'}, 42 | { 43 | begin: '\\[', 44 | end: '\\]', 45 | name: 'string.regex.ne', 46 | patterns: [{match: '\\\\.', name: 'constant.character.escape.ne'}] 47 | }, 48 | { 49 | begin: '"', 50 | end: '"', 51 | name: 'string.quoted.double.ne', 52 | patterns: [{match: '\\\\.', name: 'constant.character.escape.ne'}] 53 | }, 54 | { 55 | begin: '(@?{%)', 56 | captures: {1: {name: 'comment.block.ne'}, 2: {name: 'comment.block.ne'}}, 57 | end: '(%})', 58 | patterns: [{include: 'source.js'}] 59 | } 60 | ], 61 | scopeName: 'source.ne' 62 | } 63 | 64 | export default grammar 65 | -------------------------------------------------------------------------------- /lang/source.ned.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.ned'], 13 | names: ['omnet++-ned', 'omnetpp-ned'], 14 | patterns: [ 15 | {include: '#comment'}, 16 | {include: '#property'}, 17 | {include: '#type'}, 18 | {include: '#string'}, 19 | {include: '#expr'}, 20 | {include: '#non_expr'} 21 | ], 22 | repository: { 23 | comment: { 24 | patterns: [{match: '//.*$', name: 'comment.line.double-slash.ned'}] 25 | }, 26 | expr: { 27 | patterns: [ 28 | { 29 | match: '\\b(?:sizeof|const|default|ask|this|index|typename)\\b', 30 | name: 'keyword.other.ned' 31 | } 32 | ] 33 | }, 34 | non_expr: { 35 | patterns: [ 36 | { 37 | match: 38 | '\\b(?:channel|channelinterface|simple|module|network|moduleinterface|parameters|gates|types|submodules|connections|allowunconnected|extends|for|if|import|like|package|property)\\b', 39 | name: 'keyword.other.ned' 40 | } 41 | ] 42 | }, 43 | property: {patterns: [{match: '@[a-zA-Z]+', name: 'entity.name.tag.ned'}]}, 44 | string: {patterns: [{match: '"[^"]*"', name: 'string.quoted.msg'}]}, 45 | type: { 46 | patterns: [ 47 | { 48 | match: 49 | '\\b(?:inout|input|output|bool|double|int|string|object|xml|-->|<--|<-->|\\.\\.|volatile|false|true|undefined|nan|inf|null|nullptr)\\b', 50 | name: 'storage.type.common.ned' 51 | } 52 | ] 53 | } 54 | }, 55 | scopeName: 'source.ned' 56 | } 57 | 58 | export default grammar 59 | -------------------------------------------------------------------------------- /lang/source.nesc.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.c'], 11 | extensions: ['.nc'], 12 | names: ['nesc'], 13 | patterns: [ 14 | {include: 'source.c'}, 15 | { 16 | match: 17 | '\\b(abstract|as|async|atomic|call|command|components|configuration|event|implementation|includes|interface|generic|module|new|norace|post|provides|signal|task|uses|nx_struct)\\b', 18 | name: 'keyword.control.nesc' 19 | }, 20 | { 21 | match: 22 | '\\b(result_t|error_t|nx_uint8_t|nx_uint16_t|nx_uint32_t|nx_int8_t|nx_int16_t|nx_int32_t|message_t|void)\\b', 23 | name: 'storage.type.nesc' 24 | }, 25 | {match: '\\b(SUCCESS|FAIL)\\b', name: 'constant.language.nesc'} 26 | ], 27 | scopeName: 'source.nesc' 28 | } 29 | 30 | export default grammar 31 | -------------------------------------------------------------------------------- /lang/source.netlinx.erb.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.netlinx'], 11 | extensions: ['.axs.erb', '.axi.erb'], 12 | names: ['netlinx+erb'], 13 | patterns: [{include: '#erb'}, {include: 'source.netlinx'}], 14 | repository: { 15 | erb: { 16 | begin: '<%', 17 | beginCaptures: {0: {name: 'punctuation.section.scope.netlinx.erb'}}, 18 | end: '%>', 19 | endCaptures: {0: {name: 'punctuation.section.scope.netlinx.erb'}}, 20 | name: 'meta.block.netlinx.erb', 21 | patterns: [{include: 'source.ruby'}] 22 | } 23 | }, 24 | scopeName: 'source.netlinx.erb' 25 | } 26 | 27 | export default grammar 28 | -------------------------------------------------------------------------------- /lang/source.nextflow.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.nextflow-groovy'], 11 | extensions: ['.nf'], 12 | names: ['nextflow'], 13 | patterns: [{include: '#nfl-rules'}], 14 | repository: { 15 | 'code-block': { 16 | begin: '{', 17 | end: '}', 18 | name: 'code.block.nextflow', 19 | patterns: [{include: '#nfl-rules'}] 20 | }, 21 | 'nfl-rules': { 22 | patterns: [ 23 | {include: '#process-def'}, 24 | {include: '#code-block'}, 25 | {include: 'source.nextflow-groovy'} 26 | ] 27 | }, 28 | 'process-body': { 29 | begin: '{', 30 | end: '(?=})', 31 | name: 'process.body.nextflow', 32 | patterns: [ 33 | { 34 | match: 35 | '(?:accelerator|afterScript|beforeScript|cache|cpus|conda|container|containerOptions|clusterOptions|disk|echo|errorStrategy|executor|ext|label|machineType|maxErrors|maxForks|maxRetries|memory|module|penv|pod|publishDir|queue|scratch|stageInMode|stageOutMode|storeDir|tag|time|validExitStatus)\\b', 36 | name: 'process.directive.type.nextflow' 37 | }, 38 | { 39 | match: '(?:input|output|when|script|shell|exec):', 40 | name: 'constant.block.nextflow' 41 | }, 42 | {include: 'source.nextflow-groovy#comments'}, 43 | {include: 'source.nextflow-groovy#support-functions'}, 44 | {include: 'source.nextflow-groovy#keyword'}, 45 | {include: 'source.nextflow-groovy#values'}, 46 | {include: 'source.nextflow-groovy#anonymous-classes-and-new'}, 47 | {include: 'source.nextflow-groovy#types'}, 48 | {include: 'source.nextflow-groovy#parens'}, 49 | {include: 'source.nextflow-groovy#closures'}, 50 | {include: 'source.nextflow-groovy#braces'} 51 | ] 52 | }, 53 | 'process-def': { 54 | begin: '^\\s*(process)\\s+(\\w+|"[^"]+"|\'[^\']+\')\\s*', 55 | beginCaptures: { 56 | 1: {name: 'keyword.nextflow'}, 57 | 2: {name: 'function.nextflow'} 58 | }, 59 | end: '}', 60 | name: 'process.nextflow', 61 | patterns: [{include: '#process-body'}] 62 | } 63 | }, 64 | scopeName: 'source.nextflow' 65 | } 66 | 67 | export default grammar 68 | -------------------------------------------------------------------------------- /lang/source.objc++.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.c++', 'source.objc'], 11 | extensions: ['.mm'], 12 | names: ['objective-c++', 'obj-c++', 'objc++', 'objectivec++'], 13 | patterns: [{include: 'source.c++'}, {include: 'source.objc'}], 14 | scopeName: 'source.objc++' 15 | } 16 | 17 | export default grammar 18 | -------------------------------------------------------------------------------- /lang/source.opts.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['etc'], 13 | extensions: [], 14 | names: ['option-list', 'opts', 'ackrc'], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | escape: { 18 | patterns: [ 19 | {include: 'etc#esc'}, 20 | { 21 | captures: { 22 | 1: {name: 'punctuation.definition.character.percentage.opts'} 23 | }, 24 | match: '(%)[A-Fa-f0-9]{2}', 25 | name: 'constant.character.percent.url-encoded.opts' 26 | } 27 | ] 28 | }, 29 | main: { 30 | patterns: [ 31 | {include: 'etc#comment'}, 32 | {include: '#option'}, 33 | {include: '#escape'} 34 | ] 35 | }, 36 | option: { 37 | patterns: [ 38 | { 39 | begin: '((--?)[^-\\s=][^\\s=]*)', 40 | beginCaptures: { 41 | 1: {name: 'entity.name.option.opts'}, 42 | 2: {name: 'punctuation.definition.option.name.dash.opts'} 43 | }, 44 | end: '(?!\\G)(?=\\$|\\S)', 45 | name: 'meta.option.opts', 46 | patterns: [ 47 | { 48 | captures: { 49 | 1: { 50 | name: 'string.regexp.opts', 51 | patterns: [{include: 'source.regexp'}] 52 | } 53 | }, 54 | match: 55 | '(?xi)\n(?<= # HACK: Fixed-width look-behinds enforced by Oniguruma\n\t\\w[-_]pattern \\G\n\t| reg[-_]exp \\G\n\t| regexp \\G\n\t| reg[-_]ex \\G\n\t| regex \\G\n) \\s+ (\\S+)' 56 | }, 57 | { 58 | captures: { 59 | 1: {patterns: [{include: 'etc#eql'}]}, 60 | 2: {patterns: [{include: '#value'}]} 61 | }, 62 | match: '\\G(=)(\\S*)' 63 | }, 64 | { 65 | captures: {1: {patterns: [{include: '#value'}]}}, 66 | match: '\\G\\s+(?!#|-)(\\S+)' 67 | } 68 | ] 69 | } 70 | ] 71 | }, 72 | value: {patterns: [{include: 'etc'}, {include: 'etc#bareword'}]} 73 | }, 74 | scopeName: 'source.opts' 75 | } 76 | 77 | export default grammar 78 | -------------------------------------------------------------------------------- /lang/source.ox.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.ox', '.oxh', '.oxo'], 11 | names: ['ox'], 12 | patterns: [ 13 | {include: '#comments'}, 14 | { 15 | match: 16 | '\\b(break|case|continue|default|delete|do|else|for|new|parallel for|foreach|goto|if|_Pragma|return|switch|switch_single|while)\\b', 17 | name: 'keyword.control.ox' 18 | }, 19 | { 20 | match: 21 | '\\b(array|char|class|const|decl|double|enum|extern|int|matrix|static|serial|string|struct)\\b', 22 | name: 'storage.type.ox' 23 | }, 24 | { 25 | match: '^\\s*.\\s*(.NaN|.Inf|TRUE|FALSE)\\b', 26 | name: 'constant.language.ox' 27 | }, 28 | { 29 | match: 30 | '\\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', 31 | name: 'constant.numeric.ox' 32 | }, 33 | { 34 | begin: '"', 35 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.ox'}}, 36 | end: '"', 37 | endCaptures: {0: {name: 'punctuation.definition.string.end.ox'}}, 38 | name: 'string.quoted.double.ox', 39 | patterns: [ 40 | {include: '#string_escaped_char'}, 41 | {include: '#string_placeholder'} 42 | ] 43 | }, 44 | { 45 | begin: '^\\s*#\\s*(include|import|pragma)\\b\\s+', 46 | captures: {1: {name: 'keyword.control.import.include.ox'}}, 47 | end: '(?=(?://|/\\*))|$' 48 | } 49 | ], 50 | repository: { 51 | comments: { 52 | patterns: [ 53 | { 54 | begin: '/\\*', 55 | captures: {0: {name: 'punctuation.definition.comment.ox'}}, 56 | end: '\\*/', 57 | name: 'comment.block.ox' 58 | }, 59 | { 60 | begin: '//', 61 | beginCaptures: {0: {name: 'punctuation.definition.comment.ox'}}, 62 | end: '$\\n?', 63 | name: 'comment.line.double-slash.ox', 64 | patterns: [ 65 | { 66 | match: '(?>\\\\\\s*\\n)', 67 | name: 'punctuation.separator.continuation.ox' 68 | } 69 | ] 70 | } 71 | ] 72 | } 73 | }, 74 | scopeName: 'source.ox' 75 | } 76 | 77 | export default grammar 78 | -------------------------------------------------------------------------------- /lang/source.oz.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.oz'], 11 | names: ['oz'], 12 | patterns: [ 13 | {match: '(%).*$\\n?', name: 'comment.line.percentage.oz'}, 14 | {begin: '/\\*', end: '\\*/', name: 'comment.block.documentation.oz'}, 15 | { 16 | match: 17 | '(?x)\\b(\n andthen|at|attr|case|catch|class|choice|cond|\n declare|define|do|dis|else|elsecase|elseif|\n end|export|feat|finally|for|from|fun|functor|\n if|in|import|lex|local|lock|meth|mode|not|of|\n or|orelse|parser|prepare|proc|prod|prop|raise|require|\n scanner|skip|syn|then|thread|token|try)\\b\n |\n ^\\s*\\[\\]', 18 | name: 'keyword.control.oz' 19 | }, 20 | {match: '=|:=', name: 'keyword.operator.assignement.oz'}, 21 | {match: '<|=<|==|\\\\=|>=|>', name: 'keyword.operator.comparison.oz'}, 22 | { 23 | match: '(\\*|\\+|\\-|/|~)|\\b(div|mod)\\b', 24 | name: 'keyword.operator.arithmetic.oz' 25 | }, 26 | {match: '\\b(\\d+)\\b', name: 'constant.numeric.oz'}, 27 | {match: '\\b(nil|true|false)\\b', name: 'constant.language.oz'}, 28 | {match: '\\b\\|\\b', name: 'keyword.operator.list.oz'}, 29 | { 30 | captures: { 31 | 1: {name: 'keyword.control.proc.oz'}, 32 | 2: {name: 'entity.name.function.oz'}, 33 | 3: {name: 'variable.parameter.function.oz'} 34 | }, 35 | match: 36 | '(?x)\n\t\t\t \\b(fun|proc)\\b\\s+\n\t\t\t \\{(\\w+)\n\t\t\t ((?:\\s\\w+)*)\n\t\t\t \\}', 37 | name: 'meta.function.oz' 38 | }, 39 | {match: '\\[|\\]', name: 'punctuation.section.array.oz'}, 40 | { 41 | begin: "'", 42 | end: "'", 43 | name: 'string.quoted.simple.oz', 44 | patterns: [{match: '\\\\.', name: 'constant.character.escape.oz'}] 45 | }, 46 | {match: '(@)[A-Z]\\w*', name: 'variable.other.readwrite.cell.oz'} 47 | ], 48 | scopeName: 'source.oz' 49 | } 50 | 51 | export default grammar 52 | -------------------------------------------------------------------------------- /lang/source.pegjs.js: -------------------------------------------------------------------------------- 1 | // This is an alias, please use `source.peggy.js` instead. 2 | export {default} from './source.peggy.js' 3 | -------------------------------------------------------------------------------- /lang/source.pike.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `unlicense`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.pike', '.pmod'], 11 | names: ['pike'], 12 | patterns: [ 13 | { 14 | match: '\\b(public|nomask|private|optional|local|final|static)\\b', 15 | name: 'storage.modifier.pike' 16 | }, 17 | { 18 | match: 19 | '\\b(import|inherit|this|foreach|break|continue|while|do|return|if|else|case|switch)\\b', 20 | name: 'keyword.control.pike' 21 | }, 22 | { 23 | match: 24 | '\\b(constant|int|float|string|array|mapping|multiset|program|class|object|mixed|void)\\b', 25 | name: 'storage.type.pike' 26 | }, 27 | {match: '\\b(UNDEFINED)\\b', name: 'constant.language.pike'}, 28 | { 29 | match: 30 | '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b', 31 | name: 'constant.numeric.pike' 32 | }, 33 | {begin: '"', end: '"', name: 'string.quoted.double.pike'}, 34 | {begin: "'", end: "'", name: 'string.quoted.single.pike'}, 35 | {begin: '/\\*', end: '\\*/', name: 'comment.block.pike'}, 36 | {match: '//.*$', name: 'comment.line.double-slash.pike'}, 37 | {match: '^[ \\t]*#[a-zA-Z]+', name: 'other.preprocessor.pike'} 38 | ], 39 | scopeName: 'source.pike' 40 | } 41 | 42 | export default grammar 43 | -------------------------------------------------------------------------------- /lang/source.pip-requirements.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['pip-requirements'], 14 | patterns: [ 15 | {match: '\\s*\\\\s*$', name: 'constant.character.escape'}, 16 | {match: '#.*', name: 'comment.line.number-sign'}, 17 | {begin: "'", end: "'", name: 'string.quoted.single'}, 18 | {begin: '"', end: '"', name: 'string.quoted.double'}, 19 | {match: '/?(\\S+/)+\\S*', name: 'string.path'}, 20 | { 21 | captures: {1: {name: 'entity.name.class'}}, 22 | match: '^\\s*([A-Za-z0-9][A-Za-z0-9._-]*[A-Za-z0-9]|[A-Za-z0-9])' 23 | }, 24 | {captures: {1: {name: 'entity.name.tag'}}, match: '\\[([^\\]]+)\\]'}, 25 | { 26 | captures: { 27 | 1: {name: 'keyword.operator.comparison'}, 28 | 2: {name: 'constant.numeric'} 29 | }, 30 | match: '(<|<=|!=|==|>=|>|~=|===)\\s*([\\w.*+!-]+)' 31 | }, 32 | { 33 | captures: { 34 | 1: {name: 'entity.name.selector'}, 35 | 2: {name: 'keyword.operator.comparison'} 36 | }, 37 | match: 38 | ';\\s*(python_version|python_full_version|os_name|sys_platform|platform_release|platform_system|platform_version|platform_machine|platform_python_implementation|implementation_name|implementation_version|extra)\\s*(<|<=|!=|==|>=|>|~=|===)' 39 | }, 40 | {match: '-[^\\s=]+', name: 'entity.other.attribute-name'} 41 | ], 42 | scopeName: 'source.pip-requirements' 43 | } 44 | 45 | export default grammar 46 | -------------------------------------------------------------------------------- /lang/source.pogoscript.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.pogo'], 11 | names: ['pogoscript'], 12 | patterns: [ 13 | {match: '[(){}@]', name: 'variable.language.pogoscript'}, 14 | {match: '\\b[0-9]+\\b', name: 'constant.numeric.pogoscript'}, 15 | {match: '//[^\\n]*', name: 'comment.line.double-slash.pogoscript'}, 16 | {begin: '/\\*', end: '\\*/', name: 'comment.block.pogoscript'}, 17 | {match: '=>|[.:?!;,=]|self', name: 'keyword'}, 18 | {match: '\\t', name: 'invalid'}, 19 | { 20 | begin: "'", 21 | end: "'", 22 | name: 'string.quoted.single.pogoscript', 23 | patterns: [{match: '\\\\.', name: 'constant.character.escape.pogoscript'}] 24 | }, 25 | { 26 | begin: 'r/', 27 | end: '/[gim]?', 28 | name: 'string.regexp.pogoscript', 29 | patterns: [{match: '\\\\.', name: 'constant.character.escape.pogoscript'}] 30 | }, 31 | { 32 | begin: '"', 33 | end: '"', 34 | name: 'string.quoted.double.pogoscript', 35 | patterns: [{include: '#interpolated'}] 36 | } 37 | ], 38 | repository: { 39 | interpolated: { 40 | patterns: [ 41 | { 42 | begin: '#\\(', 43 | end: '\\)', 44 | name: 'source.pogoscript', 45 | patterns: [{include: 'source.pogoscript'}] 46 | } 47 | ] 48 | } 49 | }, 50 | scopeName: 'source.pogoscript' 51 | } 52 | 53 | export default grammar 54 | -------------------------------------------------------------------------------- /lang/source.procfile.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `bsd-3-clause`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.shell'], 13 | extensions: [], 14 | names: ['procfile'], 15 | patterns: [{include: '#process'}, {include: '#ignored'}], 16 | repository: { 17 | ignored: {match: '^(?![\\w-]+:).*$', name: 'comment.line.procfile'}, 18 | process: { 19 | begin: '^(?=[\\w-]+:)', 20 | contentName: 'meta.function.procfile', 21 | end: '$', 22 | patterns: [ 23 | { 24 | begin: '^(?=[\\w-]+:)', 25 | contentName: 'support.function.procfile', 26 | end: '(?<=:)', 27 | patterns: [ 28 | {match: '^(web|release)(?=:)', name: 'keyword.heroku.procfile'}, 29 | {match: '^[\\w-]+(?=:)', name: 'entity.name.function.procfile'}, 30 | { 31 | match: '(?<=[\\w-]):', 32 | name: 'punctuation.separator.colon.procfile' 33 | } 34 | ] 35 | }, 36 | { 37 | begin: '(?<=[\\w-]:)', 38 | end: '$', 39 | name: 'meta.embedded.line.shell', 40 | patterns: [{include: 'source.shell'}] 41 | } 42 | ] 43 | } 44 | }, 45 | scopeName: 'source.procfile' 46 | } 47 | 48 | export default grammar 49 | -------------------------------------------------------------------------------- /lang/source.promela.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.pml'], 13 | names: ['promela'], 14 | patterns: [ 15 | {begin: '\\/\\*', end: '\\*\\/', name: 'comment.block'}, 16 | { 17 | match: '\\b(assert|else|fi|if|unless|xr|xs|do|od|break|skip|atomic)\\b', 18 | name: 'keyword.control' 19 | }, 20 | {match: '\\b(run)\\b', name: 'keyword.operator'}, 21 | { 22 | captures: { 23 | 2: {name: 'keyword.operator'}, 24 | 3: {name: 'entity.name.function'} 25 | }, 26 | match: '^(#)\\s*(define)\\s*([a-zA-Z_]+[0-9a-zA-Z_]*)' 27 | }, 28 | {match: '\\b[a-zA-Z_]+[0-9a-zA-Z_]*(\\s)*:', name: 'variable.other'}, 29 | { 30 | match: '\\b(printf|len|empty|nempty|full|nfull|enabled|eval|pc_value)\\b', 31 | name: 'entity.name.function' 32 | }, 33 | { 34 | begin: '\\b([a-zA-Z_]+[0-9a-zA-Z_]*)\\(', 35 | beginCaptures: {1: {name: 'entity.name.function'}}, 36 | end: '\\)', 37 | patterns: [{include: '$self'}] 38 | }, 39 | { 40 | begin: '\\b(ltl)(\\s)+([a-zA-Z_]+[0-9a-zA-Z_]*)(\\s)*{', 41 | beginCaptures: { 42 | 1: {name: 'storage.type'}, 43 | 3: {name: 'entity.name.function'} 44 | }, 45 | end: '}', 46 | patterns: [{include: '$self'}] 47 | }, 48 | {match: '"([^\\\\"]|\\\\.)*"', name: 'string.quoted.double'}, 49 | {match: '\\b([0-9])+\\b', name: 'constant.numeric'}, 50 | {match: '\\b(true|false|TRUE|FALSE)\\b', name: 'constant.language'}, 51 | { 52 | match: 53 | '\\b(bit|bool|byte|pid|chan|int|mtype|proctype|short|unsigned|Dproctype)\\b', 54 | name: 'storage.type' 55 | }, 56 | { 57 | match: '\\b(hidden|init|inline|active|local|show)\\b', 58 | name: 'storage.modifier' 59 | }, 60 | {match: '\\b(typedef|c_state)\\b', name: 'storage.modifier'}, 61 | {match: '\\/\\/.*$', name: 'comment.double-slash'} 62 | ], 63 | scopeName: 'source.promela' 64 | } 65 | 66 | export default grammar 67 | -------------------------------------------------------------------------------- /lang/source.python.kivy.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.python'], 13 | extensions: ['.kv'], 14 | names: ['kvlang'], 15 | patterns: [ 16 | {match: '#:.*?$', name: 'support.type.kivy'}, 17 | {match: '#.*?$', name: 'comment.kivy'}, 18 | {match: '\\<.+\\>', name: 'support.class.kivy'}, 19 | {match: '[A-Za-z][A-Za-z0-9]+$', name: 'support.function.kivy'}, 20 | {match: '.*?:$', name: 'support.function.kivy'}, 21 | {match: '(.*?):$', name: 'entity.name.section.kivy'}, 22 | {include: 'source.python'} 23 | ], 24 | scopeName: 'source.python.kivy' 25 | } 26 | 27 | export default grammar 28 | -------------------------------------------------------------------------------- /lang/source.qasm.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.qasm'], 11 | names: ['openqasm'], 12 | patterns: [ 13 | {match: '\\/\\/.*$', name: 'comment.line.double-slash'}, 14 | {match: '#.*$', name: 'comment.line.number-sign'}, 15 | { 16 | match: 17 | '^(?x) # At beggining of line\n(\\.) # Valid function name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | # # - A comment\n)', 18 | name: 'entity.name.function' 19 | }, 20 | { 21 | match: '(?x)\\b(include|OPENQASM|version)\\b', 22 | name: 'entity.name.section' 23 | }, 24 | {match: '(?x)\\b(qubit|qubits|map)\\b', name: 'variable.language'}, 25 | { 26 | match: '(?<=(\\w\\[)|(:))( *\\d *)(?=(\\s*\\])|(:))', 27 | name: 'constant.other' 28 | }, 29 | {match: '->', name: 'keyword.storage.modifier'}, 30 | {match: "('.*')", name: 'constant.string.single'}, 31 | {match: '".*"', name: 'constant.string.double'}, 32 | {match: '(?x)^\\b(?:(qreg|creg)| (gate|opaque))\\b', name: 'storage.type'}, 33 | { 34 | match: 35 | '(?x)\\b(?:(prep_x|prep_y|prep_z|error_model)| (measure_x|measure_y|measure_z|measure_all|measure_parity|measure)| (display|display_binary))\\b', 36 | name: 'support.function' 37 | }, 38 | { 39 | match: 40 | '(?i)(?x)\\b(?:((i|h|x|y|z)| (rx|ry|rz)| (x90|y90|z90|rx90|ry90|rz90|mx90|my90|mz90)| (x180|y180|z180|rx180|ry180|rz180|mx180|my180|mz180)| (u1|u2|u3|cu1|cu2|cu3)| (s|sdag|t|tdag)| (cnot|cx|cz|cr|crk|toffoli|ccx|ccnot)| (swap) ))\\b', 41 | name: 'keyword.control' 42 | }, 43 | { 44 | match: 45 | '(?i)(?x)\\bc-(?:((i|h|x|y|z)| (rx|ry|rz)| (x90|y90|z90|rx90|ry90|rz90|mx90|my90|mz90)| (x180|y180|z180|rx180|ry180|rz180|mx180|my180|mz180)| (u1|u2|u3)| (s|sdag|t|tdag)| (cnot|cx|cz|cr|crk|toffoli|ccx|ccnot)| (swap) ))\\b', 46 | name: 'keyword.control' 47 | }, 48 | {match: '(?i)(?x)\\b(?:(not )|(if(?=[( ])))\\b', name: 'keyword.control'}, 49 | { 50 | match: '\\b(depolarizing_channel|load_state|barrier)\\b', 51 | name: 'variable.language' 52 | } 53 | ], 54 | scopeName: 'source.qasm' 55 | } 56 | 57 | export default grammar 58 | -------------------------------------------------------------------------------- /lang/source.quake.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `bsd-3-clause`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: [], 11 | names: ['quake'], 12 | patterns: [ 13 | { 14 | match: 15 | '\\b(and|contains|else|end|for|foreach|if|in|is|local|not|or|proc|readonly|return)\\b', 16 | name: 'keyword.quake' 17 | }, 18 | {match: '\\b[0-9]+\\b', name: 'constant.numeric.integer.quake'}, 19 | {match: '%.*$', name: 'comment.line.percentage.quake'}, 20 | {include: '#block_comment'}, 21 | { 22 | begin: '"', 23 | end: '"', 24 | name: 'string.quoted.double.quake', 25 | patterns: [ 26 | { 27 | match: '\\\\[0-7]{3}|\\\\[\\\\fnrt\\"\\\']', 28 | name: 'constant.character.escape.quake' 29 | } 30 | ] 31 | } 32 | ], 33 | repository: { 34 | block_comment: { 35 | begin: '\\/\\*', 36 | end: '\\*\\/', 37 | name: 'comment.block.quake', 38 | patterns: [{include: '#block_comment'}] 39 | } 40 | }, 41 | scopeName: 'source.quake' 42 | } 43 | 44 | export default grammar 45 | -------------------------------------------------------------------------------- /lang/source.redirects.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['redirect-rules', 'redirects'], 14 | patterns: [{include: '#main'}], 15 | repository: { 16 | code: { 17 | match: '(?<==)[a-z]{2}(?:-[A-Z]{2})?(?=\\s|$)', 18 | name: 'string.unquoted.code.redirects' 19 | }, 20 | comment: { 21 | begin: '#', 22 | beginCaptures: {0: {name: 'punctuation.definition.comment.redirects'}}, 23 | end: '$', 24 | name: 'comment.line.hash.redirects' 25 | }, 26 | main: { 27 | patterns: [ 28 | {include: '#comment'}, 29 | {include: '#uri'}, 30 | {include: '#query'}, 31 | {include: '#number'}, 32 | {include: '#code'}, 33 | {include: '#punct'}, 34 | {include: '#text'} 35 | ] 36 | }, 37 | number: { 38 | captures: { 39 | 1: {name: 'constant.numeric.integer.redirects'}, 40 | 2: {name: 'constant.character.force.redirects'} 41 | }, 42 | match: '(\\d+)(!)?' 43 | }, 44 | punct: { 45 | patterns: [ 46 | {match: ':|=', name: 'punctuation.accessor.redirects'}, 47 | {match: ',(?!\\s)', name: 'punctuation.separator.redirects'} 48 | ] 49 | }, 50 | query: { 51 | match: '[^\\s]+(?==)', 52 | name: 'keyword.other.query-selector.redirects' 53 | }, 54 | splat: {match: ':\\w+', name: 'variable.other.splat.redirects'}, 55 | text: {match: '(?<==)[^\\s]+', name: 'string.unquoted.text.redirects'}, 56 | uri: { 57 | begin: '(?:[a-z]+:)?\\/', 58 | end: '[\\s$]', 59 | name: 'string.unquoted.uri.redirects', 60 | patterns: [{include: '#wildcard'}, {include: '#splat'}] 61 | }, 62 | wildcard: {match: '\\*', name: 'constant.character.wildcard.redirects'} 63 | }, 64 | scopeName: 'source.redirects' 65 | } 66 | 67 | export default grammar 68 | -------------------------------------------------------------------------------- /lang/source.religo.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.religo'], 13 | names: ['reasonligo'], 14 | patterns: [ 15 | {include: '#string'}, 16 | {include: '#block_comment'}, 17 | {include: '#line_comment'}, 18 | {include: '#attribute'}, 19 | {include: '#macro'}, 20 | {include: '#letbinding'}, 21 | {include: '#typedefinition'}, 22 | {include: '#controlkeywords'}, 23 | {include: '#numericliterals'}, 24 | {include: '#operators'}, 25 | {include: '#identifierconstructor'}, 26 | {include: '#module'} 27 | ], 28 | repository: { 29 | attribute: {match: '\\[@.*\\]', name: 'keyword.control.attribute.religo'}, 30 | block_comment: {begin: '/\\*', end: '\\*\\/', name: 'comment.block.religo'}, 31 | controlkeywords: { 32 | match: '\\b(switch|if|else|assert|failwith)\\b', 33 | name: 'keyword.control.religo' 34 | }, 35 | identifierconstructor: { 36 | captures: {1: {name: 'variable.other.enummember.religo'}}, 37 | match: '\\b([A-Z][a-zA-Z0-9_$]*)\\s+' 38 | }, 39 | letbinding: { 40 | captures: { 41 | 1: {name: 'keyword.other.religo'}, 42 | 2: {name: 'storage.modifier.religo'}, 43 | 3: {name: 'entity.name.function.religo'} 44 | }, 45 | match: '\\b(let)\\b\\s*\\b(rec|)\\s*\\b([a-zA-Z$_][a-zA-Z0-9$_]*)' 46 | }, 47 | line_comment: {match: '\\/\\/.*$', name: 'comment.block.religo'}, 48 | macro: {match: '^\\#[a-zA-Z]+', name: 'meta.preprocessor.religo'}, 49 | module: { 50 | captures: { 51 | 1: {name: 'storage.class.religo'}, 52 | 2: {name: 'storage.var.religo'} 53 | }, 54 | match: '\\b([A-Z][a-zA-Z0-9_$]*)\\.([a-z][a-zA-Z0-9_$]*)' 55 | }, 56 | numericliterals: { 57 | match: '(\\+|\\-)?[0-9]+(n|tz|tez|mutez|)\\b', 58 | name: 'constant.numeric.religo' 59 | }, 60 | operators: { 61 | match: 62 | '\\s+(\\-|\\+|mod|land|lor|lxor|lsl|lsr|&&|\\|\\||>|!=|<=|=>|<|>)\\s+', 63 | name: 'keyword.operator.religo' 64 | }, 65 | string: {begin: '\\"', end: '\\"', name: 'string.quoted.double.religo'}, 66 | typedefinition: {match: '\\b(type)\\b', name: 'entity.name.type.religo'} 67 | }, 68 | scopeName: 'source.religo' 69 | } 70 | 71 | export default grammar 72 | -------------------------------------------------------------------------------- /lang/source.rexx.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.rexx', '.pprx', '.rex'], 13 | names: ['rexx', 'arexx'], 14 | patterns: [ 15 | {begin: '/\\*', end: '\\*/', name: 'comment.rexx'}, 16 | {match: '([\'"])[01 ]+\\1(?i:b)', name: 'constant.rexx'}, 17 | {match: '([\'"])[0-9a-fA-F ]+\\1(?i:x)', name: 'constant.rexx'}, 18 | {begin: '([\'"])', end: '\\1', name: 'string.rexx'}, 19 | { 20 | match: '\\b[A-Za-z@#$!?_][A-Za-z@#$!?_0-9]*:', 21 | name: 'entity.name.function.rexx' 22 | }, 23 | { 24 | match: 25 | '([0-9]+(\\.)?[0-9]*(?i:e[-+]?[0-9]+)?|[0-9]*(\\.)?[0-9]+)(?i:e[-+]?[0-9]+)?\\b', 26 | name: 'constant.numeric.rexx' 27 | }, 28 | {match: '[0-9\\.][A-Za-z0-9@#$¢.!?_]*', name: 'constant.other.rexx'}, 29 | {match: '([\\+-/*%&|()¬\\\\=<>])', name: 'keyword.operator.rexx'}, 30 | { 31 | match: 32 | '\\b(?i:do|forever|while|until|to|by|for|end|exit|if|then|else|iterate|leave|nop|return|select|when|otherwise|call(\\s+(off|on)\\s+(error|failure(\\s+name)?|halt))?|signal(\\s+(off|on)\\s+(error|failure(\\s+name)?|halt|novalue|syntax))|address\\s+\\w+|arg|drop|interpret|numeric\\s+(digits|form(\\s+(scientific|engineering|value))?|fuzz)|options|parse(\\s+upper)?\\s+(external|numeric|source|value|var|version)?|with|procedure(\\s+expose)?|pull|push|queue|say|trace\\s+\\w+|upper)\\b(?!\\.)', 33 | name: 'keyword.rexx' 34 | }, 35 | {match: '\\b[A-Za-z@#$!?_0-9]+(?=\\()', name: 'support.function.rexx'}, 36 | {match: '\\b[A-Za-z@#$¢!?_][A-Za-z0-9@#$¢.!?_]*', name: 'variable.rexx'} 37 | ], 38 | scopeName: 'source.rexx' 39 | } 40 | 41 | export default grammar 42 | -------------------------------------------------------------------------------- /lang/source.scilab.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.sci', '.sce'], 11 | names: ['scilab'], 12 | patterns: [ 13 | { 14 | begin: '(^[ \\t]+)?(?=//)', 15 | beginCaptures: { 16 | 1: {name: 'punctuation.whitespace.comment.leading.scilab'} 17 | }, 18 | end: '(?!\\G)', 19 | patterns: [ 20 | { 21 | begin: '//', 22 | beginCaptures: {0: {name: 'punctuation.definition.comment.scilab'}}, 23 | end: '\\n', 24 | name: 'comment.line.double-slash.scilab' 25 | } 26 | ] 27 | }, 28 | { 29 | match: '\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?\\b', 30 | name: 'constant.numeric.scilab' 31 | }, 32 | { 33 | match: '(%inf|%i|%pi|%eps|%e|%nan|%s|%t|%f)\\b', 34 | name: 'support.constant.scilab' 35 | }, 36 | { 37 | begin: '"', 38 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.scilab'}}, 39 | end: '"(?!")', 40 | endCaptures: {0: {name: 'punctuation.definition.string.end.scilab'}}, 41 | name: 'string.quoted.double.scilab', 42 | patterns: [{match: '\'\'|""', name: 'constant.character.escape.scilab'}] 43 | }, 44 | { 45 | begin: "(? 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['tree-sitter-query', 'tsq'], 14 | patterns: [{include: '#expression'}], 15 | repository: { 16 | 'bracket-expression': { 17 | begin: '\\[', 18 | beginCaptures: {0: {name: 'punctuation.paren.open'}}, 19 | end: '\\]', 20 | endCaptures: {0: {name: 'punctuation.paren.close'}}, 21 | name: 'expression.group', 22 | patterns: [{include: '#expression'}] 23 | }, 24 | capture: { 25 | patterns: [ 26 | {match: '\\@[a-zA-Z_.]+', name: 'variable.other.readwrite.scm'} 27 | ] 28 | }, 29 | comment: { 30 | begin: ';;', 31 | beginCaptures: {0: {name: 'comment.line.scm'}}, 32 | end: '\\n', 33 | name: 'comment.line.scm' 34 | }, 35 | expression: { 36 | patterns: [ 37 | {include: '#comment'}, 38 | {include: '#field'}, 39 | {include: '#capture'}, 40 | {include: '#node'}, 41 | {include: '#parent-expression'}, 42 | {include: '#bracket-expression'} 43 | ] 44 | }, 45 | field: {patterns: [{match: '[a-zA-Z_]+:', name: 'entity.name.scm'}]}, 46 | node: {patterns: [{match: '[a-zA-Z_]+', name: 'node.scm'}]}, 47 | 'paren-expression': { 48 | begin: '\\(', 49 | beginCaptures: {0: {name: 'punctuation.paren.open'}}, 50 | end: '\\)', 51 | endCaptures: {0: {name: 'punctuation.paren.close'}}, 52 | name: 'expression.group', 53 | patterns: [{include: '#expression'}] 54 | } 55 | }, 56 | scopeName: 'source.scm' 57 | } 58 | 59 | export default grammar 60 | -------------------------------------------------------------------------------- /lang/source.slice.js: -------------------------------------------------------------------------------- 1 | // This is an alias, please use `source.ice.js` instead. 2 | export {default} from './source.ice.js' 3 | -------------------------------------------------------------------------------- /lang/source.sparql.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.turtle'], 13 | extensions: ['.sparql', '.rq'], 14 | names: ['sparql'], 15 | patterns: [ 16 | {include: 'source.turtle#sparqlKeywords'}, 17 | {include: 'source.turtle#sparqlFilterFns'}, 18 | {include: 'source.turtle#sparqlLangConsts'}, 19 | {include: 'source.turtle'} 20 | ], 21 | scopeName: 'source.sparql' 22 | } 23 | 24 | export default grammar 25 | -------------------------------------------------------------------------------- /lang/source.stl.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['etc'], 13 | extensions: ['.stl'], 14 | names: ['stl', 'ascii-stl', 'stla'], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | facet: { 18 | begin: '(?:^|\\G|(?<=\\s))[ \\t]*(facet)(?:$|[ \\t]+)', 19 | beginCaptures: {1: {name: 'keyword.control.begin.facet.stl'}}, 20 | end: '(?:^|\\G|(?<=\\s))[ \\t]*(endfacet)(?=$|\\s)', 21 | endCaptures: {1: {name: 'keyword.control.end.facet.stl'}}, 22 | name: 'meta.facet.stl', 23 | patterns: [{include: '#normal'}, {include: '#loop'}, {include: '#vertex'}] 24 | }, 25 | loop: { 26 | begin: '(?:^|\\G|(?<=\\s))[ \\t]*(outer[ \\t]+loop)(?=$|\\s)', 27 | beginCaptures: {1: {name: 'keyword.control.begin.loop.stl'}}, 28 | end: '(?:^|\\G|(?<=\\s))[ \\t]*(endloop)(?=$|\\s)', 29 | endCaptures: {1: {name: 'keyword.control.end.loop.stl'}}, 30 | name: 'meta.loop.stl', 31 | patterns: [{include: '#vertex'}] 32 | }, 33 | main: { 34 | patterns: [ 35 | {include: '#solid'}, 36 | {include: '#facet'}, 37 | {include: '#loop'}, 38 | {include: '#vertex'} 39 | ] 40 | }, 41 | normal: { 42 | begin: '(?:^|\\G|(?<=\\s))normal(?=$|\\s)', 43 | beginCaptures: {0: {name: 'storage.type.normal.stl'}}, 44 | end: '(?=[ \\t]*$)', 45 | name: 'meta.normal.stl', 46 | patterns: [{include: 'etc#num'}] 47 | }, 48 | solid: { 49 | begin: 50 | '(?:^?|\\G|(?<=\\s))[ \\t]*(solid)(?:[ \\t]+(\\S+)(?:[ \\t]+(\\S.*))?)?[ \\t]*$', 51 | beginCaptures: { 52 | 0: {name: 'meta.definition.header.stl'}, 53 | 1: {name: 'keyword.control.start.solid.stl'}, 54 | 2: {name: 'entity.name.solid.stl'}, 55 | 3: {name: 'comment.line.ignored.stl'} 56 | }, 57 | end: '(?:^?|\\G|(?<=\\s))[ \\t]*(endsolid)(?:[ \\t]+(\\2)(?=$|\\s))?(?:[ \\t]+(\\S.*))?[ \\t]*$', 58 | endCaptures: { 59 | 0: {name: 'meta.definition.footer.stl'}, 60 | 1: {name: 'keyword.control.end.solid.stl'}, 61 | 2: {name: 'entity.name.solid.stl'}, 62 | 3: {name: 'comment.line.ignored.stl'} 63 | }, 64 | name: 'meta.solid.stl', 65 | patterns: [{include: '#facet'}] 66 | }, 67 | vertex: { 68 | begin: '(?:^|\\G|(?<=\\s))[ \\t]*(vertex)(?=$|\\s)', 69 | beginCaptures: {1: {name: 'storage.type.vertex.stl'}}, 70 | end: '$', 71 | name: 'meta.vertex.stl', 72 | patterns: [{include: 'etc#num'}] 73 | } 74 | }, 75 | scopeName: 'source.stl' 76 | } 77 | 78 | export default grammar 79 | -------------------------------------------------------------------------------- /lang/source.supercollider.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['supercollider'], 14 | patterns: [ 15 | { 16 | match: 17 | '\\b(arg|var|classvar|const|this|thisThread|thisMethod|thisFunction|thisFunctionDef|thisProcess|true|false|inf|nil)\\b', 18 | name: 'keyword.control.supercollider' 19 | }, 20 | { 21 | begin: '"', 22 | end: '"', 23 | name: 'string.quoted.double.supercollider', 24 | patterns: [ 25 | {match: '\\\\.', name: 'constant.character.escape.supercollider'} 26 | ] 27 | }, 28 | { 29 | begin: "'", 30 | end: "'", 31 | name: 'entity.name.symbol.supercollider', 32 | patterns: [ 33 | {match: '\\\\.', name: 'constant.character.escape.supercollider'} 34 | ] 35 | }, 36 | {match: '[a-z][a-zA-Z0-9_]*\\:', name: 'support.name.tag.supercollider'}, 37 | { 38 | captures: {1: {name: 'entity.name.class.supercollider'}}, 39 | match: 40 | '^\\s*\\+*\\s*([A-Z]{1}[a-zA-Z0-9_]*)\\s*\\:{1}\\s*([A-Z]{1}[a-zA-Z0-9_]*)\\s*\\{' 41 | }, 42 | { 43 | captures: {1: {name: 'entity.name.class.supercollider'}}, 44 | match: '^([A-Z_]{1}[a-zA-Z0-9_]*)[^a-zA-Z0-9_]' 45 | }, 46 | { 47 | match: '\\|[a-zA-Z0-9\\#\\[\\]\\"\\_\\=\\.\\(\\)[[:space:]]\\,]+\\|', 48 | name: 'variable.parameter.function.supercollider' 49 | }, 50 | { 51 | captures: {1: {name: 'entity.name.class.supercollider'}}, 52 | match: '[^a-zA-Z0-9\\\\]([A-Z_]{1}[a-zA-Z0-9_]*)[^a-zA-Z0-9_]' 53 | }, 54 | {match: '\\\\[a-zA-Z0-9\\_]+', name: 'entity.name.symbol.supercollider'}, 55 | { 56 | captures: {1: {name: 'entity.name.function.supercollider'}}, 57 | match: '^\\s*(\\**[a-z]{1}[a-zA-Z0-9_]+)\\s*\\{' 58 | }, 59 | {match: '\\~[a-z][a-zA-Z0-9_]*', name: 'variable.language.supercollider'}, 60 | {match: '\\/\\/.*', name: 'comment.single.supercollider'}, 61 | {begin: '\\/\\*', end: '\\*\\/', name: 'comment.multiline.supercollider'}, 62 | { 63 | match: 64 | '\\b(0[xX][0-9A-Fa-f](?>_?[0-9A-Fa-f])*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0[bB][01]+)\\b', 65 | name: 'constant.numeric.supercollider' 66 | } 67 | ], 68 | scopeName: 'source.supercollider' 69 | } 70 | 71 | export default grammar 72 | -------------------------------------------------------------------------------- /lang/source.terraform.js: -------------------------------------------------------------------------------- 1 | // This is an alias, please use `source.hcl.js` instead. 2 | export {default} from './source.hcl.js' 3 | -------------------------------------------------------------------------------- /lang/source.textgrid.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.textgrid'], 13 | names: ['textgrid'], 14 | patterns: [ 15 | { 16 | match: 17 | '((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)', 18 | name: 'constant.numeric.textgrid' 19 | }, 20 | { 21 | begin: '"', 22 | beginCaptures: { 23 | 0: {name: 'punctuation.definition.string.begin.textgrid'} 24 | }, 25 | contentName: 'meta.string-contents.quoted.double.textgrid', 26 | end: '"', 27 | endCaptures: {0: {name: 'punctuation.definition.string.end.textgrid'}}, 28 | name: 'string.quoted.double.textgrid' 29 | }, 30 | { 31 | match: '(x(min|max)|class|name|text|size|number|mark)', 32 | name: 'constant.language.textgrid' 33 | }, 34 | { 35 | match: '(intervals|points|item)', 36 | name: 'entity.name.type.module.textgrid' 37 | }, 38 | { 39 | match: '(File type|Object class|\\|\\)', 40 | name: 'keyword.control.language.textgrid' 41 | }, 42 | {match: '=', name: 'keyword.operator.key.textgrid'}, 43 | { 44 | captures: { 45 | 0: {name: 'constant.language.textgrid'}, 46 | 1: {name: 'entity.name.type.module.textgrid'} 47 | }, 48 | match: 'tiers(\\?)' 49 | } 50 | ], 51 | scopeName: 'source.textgrid' 52 | } 53 | 54 | export default grammar 55 | -------------------------------------------------------------------------------- /lang/source.toc.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `unlicense`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['world-of-warcraft-addon-data'], 14 | patterns: [ 15 | { 16 | captures: { 17 | 1: {name: 'keyword.tag.toc'}, 18 | 2: { 19 | name: 'keyword.tag.toc', 20 | patterns: [ 21 | {match: '[Xx]-[^:]+', name: 'entity.name.tag.custom.toc'}, 22 | { 23 | match: 24 | '(?i)(Title-|Notes-|Category-|)(?-i)(enUS|enCN|enGB|enTW|frFR|deDE|esES|esMX|itIT|ptBR|ptPT|ruRU|koKR|zhTW|zhCN)', 25 | name: 'entity.name.tag.localized.toc' 26 | }, 27 | { 28 | match: 29 | '(?i)(Interface|Title|Notes|RequiredDeps|\\bDep[^:]*|OptionalDeps|LoadOnDemand|LoadWith|LoadManagers|SavedVariablesPerCharacter|SavedVariables|DefaultState|Author|Version|AddonCompartmentFunc(OnEnter|OnLeave)?|IconAtlas|IconTexture|Category|Group)', 30 | name: 'entity.name.tag.toc' 31 | }, 32 | { 33 | match: 34 | '(?i)(AllowLoad(GameType)?|OnlyBetaAndPTR|SavedVariablesMachine|Secure|LoadFirst|UseSecureEnvironment)', 35 | name: 'entity.name.tag.restricted.toc' 36 | }, 37 | {match: '\\S[^:]+', name: 'invalid.tag.toc'} 38 | ] 39 | }, 40 | 3: {name: 'punctuation.separator.key-value'}, 41 | 4: { 42 | name: 'string.value.toc', 43 | patterns: [ 44 | { 45 | captures: { 46 | 1: {name: 'constant.character.escape.toc'}, 47 | 2: {name: 'string.escape.coloring.toc'} 48 | }, 49 | match: '(\\|c)([a-fA-F0-9]{8})' 50 | }, 51 | {match: '(\\|r)', name: 'constant.character.escape.toc'}, 52 | {match: '@.*?@', name: 'constant.other.packager.toc'} 53 | ] 54 | } 55 | }, 56 | match: '^(##\\s*(\\S+))\\s*(:)\\s*(.*)$' 57 | }, 58 | {match: '#.*$', name: 'comment.toc'}, 59 | {match: '^(?!#)[^ ].+\\.xml', name: 'meta.require.xml.toc'}, 60 | {match: '@.*?@', name: 'constant.other.packager.toc'} 61 | ], 62 | scopeName: 'source.toc' 63 | } 64 | 65 | export default grammar 66 | -------------------------------------------------------------------------------- /lang/source.txl.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `apache-2.0`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.txl'], 13 | names: ['txl'], 14 | patterns: [ 15 | { 16 | match: 17 | "\\b(?|\\^|\\.|div|rem|:|#|index|_|length|select|head|tail|,|~=|>=|<=|grep|\\$|quote|unquote|parse|unparse|reparse|typeof|istype|read|write|fget|getp|fput|putp|fputp|fputs|fclose|fopen|fgets|message|pragma|quit|system|pipe|attr) .+?\\]", 31 | name: 'entity.name.function' 32 | }, 33 | { 34 | match: 35 | "(? for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.ur', '.urs'], 11 | names: ['urweb', 'ur/web', 'ur'], 12 | patterns: [ 13 | { 14 | match: 15 | '\\b(EQUAL|GREATER|LESS|NONE|SOME|abstraction|abstype|and|andalso|array|as|before|bool|case|char|datatype|do|else|end|eqtype|exception|exn|false|fn|fun|functor|handle|if|in|include|infix|infixr|int|let|list|local|nil|nonfix|not|o|of|op|open|option|orelse|overload|print|raise|real|rec|ref|sharing|sig|signature|string|struct|structure|substring|then|true|type|unit|val|vector|where|while|with|withtype|word)\\b', 16 | name: 'keyword.source.ur' 17 | }, 18 | {match: '\\b[0-9]+\\b', name: 'constant.numeric.ur'}, 19 | {match: '\\b[A-Z]([A-z0-9]*)\\b', name: 'support.type.ur'}, 20 | {match: '"(\\\\"|[^"])*"', name: 'string.ur'}, 21 | {begin: '\\(\\*', end: '\\*\\)', name: 'comment.ur'}, 22 | {match: '(\\(\\)|=>|::|\\[\\]|->|:>)', name: 'constant.character.ur'} 23 | ], 24 | scopeName: 'source.ur' 25 | } 26 | 27 | export default grammar 28 | -------------------------------------------------------------------------------- /lang/source.vcard.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['vcard', 'virtual-contact-file', 'electronic-business-card'], 14 | patterns: [ 15 | { 16 | begin: '^BEGIN:VCARD$', 17 | end: '^END:VCARD$', 18 | name: 'support.function.vcard', 19 | patterns: [ 20 | {include: '#versionNum'}, 21 | {include: '#properties'}, 22 | {include: '#extensionProperties'}, 23 | {include: '#attributeTypes'}, 24 | {include: '#attributeValues'}, 25 | {include: '#values'}, 26 | {include: '#valuesMultiline'} 27 | ] 28 | } 29 | ], 30 | repository: { 31 | attributeTypes: { 32 | patterns: [ 33 | { 34 | match: '(?<=;)\\b\\w+?\\b(?=[:;=])', 35 | name: 'entity.name.type.attribute.vcard' 36 | } 37 | ] 38 | }, 39 | attributeValues: { 40 | patterns: [ 41 | {match: '(?<=\\=).+?(?=[:;])', name: 'variable.attribute.vcard'} 42 | ] 43 | }, 44 | extensionProperties: { 45 | patterns: [ 46 | {match: '^\\S.*?(?=:)', name: 'keyword.other.expansion.property.vcard'} 47 | ] 48 | }, 49 | properties: { 50 | patterns: [ 51 | { 52 | match: 53 | '^\\b(VERSION|ADR|AGENT|ANNIVERSARY|BDAY|CALADRURI|CALURI|CATEGORIES|CLASS|CLIENTPIDMAP|EMAIL|FBURL|FN|GENDER|GEO|IMPP|KEY|KIND|LABEL|LANG|LOGO|MAILER|MEMBER|N|NAME|NICKNAME|NOTE|ORG|PHOTO|PRODID|PROFILE|RELATED|REV|ROLE|SORT-STRING|SOUND|SOURCE|TEL|TITLE|TZ|UID|URL|XML)\\b', 54 | name: 'keyword.control.property.vcard' 55 | } 56 | ] 57 | }, 58 | values: { 59 | patterns: [{match: '(?<=:).+', name: 'string.unquoted.value.vcard'}] 60 | }, 61 | valuesMultiline: { 62 | patterns: [{match: '^ \\S.*', name: 'string.unquoted.value.vcard'}] 63 | }, 64 | versionNum: { 65 | patterns: [ 66 | {match: '(?<=^VERSION:).+$', name: 'variable.language.version.vcard'} 67 | ] 68 | } 69 | }, 70 | scopeName: 'source.vcard' 71 | } 72 | 73 | export default grammar 74 | -------------------------------------------------------------------------------- /lang/source.win32-messages.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['win32-message-file'], 14 | patterns: [{include: '#main'}], 15 | repository: { 16 | comment: { 17 | begin: ';', 18 | beginCaptures: { 19 | 0: {name: 'punctuation.definition.comment.win32-messages'} 20 | }, 21 | end: '$', 22 | name: 'meta.comment.line.semicolon.win32-messages', 23 | patterns: [{include: 'source.c'}] 24 | }, 25 | delim: {match: '^\\.$', name: 'meta.separator.win32-messages'}, 26 | insert: { 27 | captures: { 28 | 1: {name: 'constant.language.insert.win32-messages'}, 29 | 2: {name: 'entity.name.tag.insert.format.win32-messages'}, 30 | 3: {name: 'punctuation.definition.insert.format.begin.win32-messages'}, 31 | 4: {name: 'punctuation.definition.insert.format.end.win32-messages'} 32 | }, 33 | match: '(?x) (%(?:.|\\d{1,2})) ((!)(\\w+)(!))? ', 34 | name: 'meta.line.insert.win32-messages' 35 | }, 36 | main: { 37 | patterns: [ 38 | {include: '#comment'}, 39 | {include: '#insert'}, 40 | {include: '#message'}, 41 | {include: '#statement'} 42 | ] 43 | }, 44 | message: {match: '^[^=]+$', name: 'string.unquoted.message.win32-messages'}, 45 | statement: { 46 | patterns: [ 47 | { 48 | captures: { 49 | 1: {name: 'punctuation.definition.statement.win32-messages'} 50 | }, 51 | match: '[^=()]+(?=(=))', 52 | name: 'keyword.control.statement.win32-messages' 53 | }, 54 | {match: '(?:0\\w)?\\d+', name: 'constant.numeric.win32-messages'}, 55 | { 56 | begin: '(?<==)(?!\\()', 57 | beginCaptures: { 58 | 0: {name: 'punctuation.definition.statement.win32-messages'} 59 | }, 60 | end: '$', 61 | name: 'string.unquoted.value.win32-messages' 62 | }, 63 | { 64 | begin: '(?<==)\\(', 65 | beginCaptures: { 66 | 0: {name: 'punctuation.definition.block.group.begin.win32-messages'} 67 | }, 68 | end: '\\)', 69 | endCaptures: { 70 | 0: {name: 'punctuation.definition.block.group.end.win32-messages'} 71 | }, 72 | name: 'meta.block.statement.value.win32-messages', 73 | patterns: [{include: '#statement'}] 74 | } 75 | ] 76 | } 77 | }, 78 | scopeName: 'source.win32-messages' 79 | } 80 | 81 | export default grammar 82 | -------------------------------------------------------------------------------- /lang/source.wollok.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.wlk'], 11 | names: ['wollok'], 12 | patterns: [{include: '#general'}], 13 | repository: { 14 | commentBlock: { 15 | patterns: [ 16 | {match: '(//).*', name: 'comment.line.double-slash.source.wollok'}, 17 | {begin: '/\\*', end: '\\*/', name: 'comment.block.source.wollok'} 18 | ] 19 | }, 20 | general: { 21 | patterns: [ 22 | {include: '#commentBlock'}, 23 | {include: '#operators'}, 24 | {include: '#keywords'}, 25 | {include: '#numbers'}, 26 | {include: '#stringSingleQuote'}, 27 | {include: '#stringDoubleQuote'} 28 | ] 29 | }, 30 | keywords: { 31 | match: 32 | '\\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', 33 | name: 'keyword.source.wollok' 34 | }, 35 | numbers: { 36 | match: 37 | '(?=?|(? for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.x10'], 11 | names: ['x10', 'xten'], 12 | patterns: [ 13 | { 14 | match: 15 | '\\b(assert|async|at|athome|ateach|atomic|break|case|catch|clocked|continue|def|default|do|else|finally|finish|for|goto|if|in|new|offer|operator|return|switch|throw|try|val|var|when|while)\\b', 16 | name: 'keyword.control.x10' 17 | }, 18 | { 19 | match: '\\b(as|haszero|instanceof|isref)\\b', 20 | name: 'keyword.operator.x10' 21 | }, 22 | {match: '\\b(false|null|true)\\b', name: 'constant.language.x10'}, 23 | {match: '\\b(here|self|super|this)\\b', name: 'variable.language.x10:'}, 24 | { 25 | match: '\\b(class|interface|struct|type)\\b', 26 | name: 'entity.name.type.x10' 27 | }, 28 | {match: '\\b(void)\\b', name: 'storage.type.primitive.x10'}, 29 | { 30 | match: 31 | '\\b(abstract|extends|final|implements|native|offers|private|property|protected|public|static|throws|transient)\\b', 32 | name: 'storage.modifier.x10' 33 | }, 34 | {match: '\\b(import|package)\\b', name: 'keyword.other.x10'}, 35 | { 36 | begin: '"', 37 | end: '"', 38 | name: 'string.quoted.double.x10', 39 | patterns: [{match: '\\\\.', name: 'constant.character.escape.x10'}] 40 | }, 41 | {begin: '//', end: '\\n', name: 'comment.line.double-slash.x10'}, 42 | {begin: '/\\*\\*', end: '\\*/', name: 'comment.block.documentationx10'}, 43 | {begin: '/\\*', end: '\\*/', name: 'comment.block.x10'} 44 | ], 45 | scopeName: 'source.x10' 46 | } 47 | 48 | export default grammar 49 | -------------------------------------------------------------------------------- /lang/source.yang.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.yang'], 11 | names: ['yang'], 12 | patterns: [ 13 | {match: '//.+', name: 'comment.line.source.yang'}, 14 | {begin: '/\\*', end: '\\*/', name: 'comment.block.source.yang'}, 15 | {begin: '"', end: '"', name: 'string.quoted.source.yang'}, 16 | {begin: "'", end: "'", name: 'string.quoted.source.yang'}, 17 | { 18 | captures: {2: {name: 'keyword.source.yang'}}, 19 | match: 20 | '((?<=[^\\w-]|^))(anyxml|argument|augment|base|belongs-to|bit|case|choice|config|contact|container|default|description|enum|error-app-tag|error-message|extension|deviation|deviate|feature|fraction-digits|grouping|identity|if-feature|import|include|input|key|leaf|leaf-list|length|list|mandatory|max-elements|min-elements|module|must|namespace|ordered-by|organization|output|path|pattern|position|prefix|presence|range|reference|refine|require-instance|revision|revision-date|status|submodule|type|typedef|unique|units|uses|value|when|yang-version|yin-element)((?=[^\\w-]|$))' 21 | }, 22 | { 23 | captures: {2: {name: 'keyword.other.source.yang'}}, 24 | match: 25 | '((?<=[^\\w-]|^))(add|current|delete|deprecated|max|min|not-supported|obsolete|replace|system|unbounded|user)((?=[^\\w-]|$))' 26 | }, 27 | { 28 | match: 29 | '\\bdecimal64|int8|int16|int32|int64|uint8|uint16|uint32|uint64|string|boolean|enumeration|bits|binary|leafref|identityref|empty|instance-identifier\\b', 30 | name: 'storage.type.source.yang' 31 | }, 32 | { 33 | captures: {2: {name: 'constant.language.source.yang}'}}, 34 | match: '(\\b)(true|false)(\\b)' 35 | }, 36 | { 37 | captures: { 38 | 1: {name: 'constant.numeric.source.yang'}, 39 | 2: {name: 'constant.numeric.source.yang'}, 40 | 3: {name: 'constant.numeric.source.yang'} 41 | }, 42 | match: '(\\b|\\.)(\\d+)(\\b|\\.)' 43 | }, 44 | { 45 | captures: { 46 | 1: {name: 'keyword.source.yang'}, 47 | 3: {name: 'entity.name.function.source.yang'} 48 | }, 49 | match: '(\\brpc|\\bnotification)(\\s+)([\\w_\\-\\d]+)' 50 | } 51 | ], 52 | scopeName: 'source.yang' 53 | } 54 | 55 | export default grammar 56 | -------------------------------------------------------------------------------- /lang/text.codeowners.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['etc'], 13 | extensions: [], 14 | names: ['codeowners'], 15 | patterns: [{include: '#main'}], 16 | repository: { 17 | main: { 18 | patterns: [ 19 | {include: 'etc#comment'}, 20 | {include: 'etc#esc'}, 21 | {include: '#pattern'} 22 | ] 23 | }, 24 | owner: { 25 | captures: { 26 | 1: {name: 'keyword.operator.mention.codeowners'}, 27 | 2: {name: 'variable.assignment.team'} 28 | }, 29 | match: '(@)((?:[-.\\w]+/)?[-.\\w]+)(?=$| |#)', 30 | name: 'meta.owner.codeowners' 31 | }, 32 | pattern: { 33 | begin: '^((?:[^#\\s\\\\]|\\\\[^#])++)', 34 | beginCaptures: { 35 | 1: { 36 | patterns: [ 37 | { 38 | match: '\\*\\*', 39 | name: 'keyword.operator.glob.wildcard.globstar.codeowners' 40 | }, 41 | {match: '[*?]', name: 'keyword.operator.glob.wildcard.codeowners'}, 42 | { 43 | match: '/', 44 | name: 'punctuation.directory.separator.meta.codeowners' 45 | }, 46 | { 47 | match: '[^\\[\\]\\\\*?#/\\s]+', 48 | name: 'entity.other.file.name.codeowners' 49 | } 50 | ] 51 | } 52 | }, 53 | end: '$|(?=#)', 54 | name: 'meta.pattern.codeowners', 55 | patterns: [ 56 | {include: '#comment'}, 57 | { 58 | begin: '\\s', 59 | end: '(?=$|#)', 60 | patterns: [{include: 'etc#emailUnquoted'}, {include: '#owner'}] 61 | } 62 | ] 63 | } 64 | }, 65 | scopeName: 'text.codeowners' 66 | } 67 | 68 | export default grammar 69 | -------------------------------------------------------------------------------- /lang/text.conllu.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `apache-2.0`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.conllu', '.conll'], 11 | names: ['conll-u', 'conll', 'conll-x'], 12 | patterns: [ 13 | {match: '^# .+$', name: 'comment.line.number-sign.conllu'}, 14 | { 15 | captures: { 16 | 1: {name: 'constant.numeric.id.conllu'}, 17 | 10: {name: 'entity.name.section.misc.conllu'}, 18 | 2: {name: 'storage.type.form.conllu'}, 19 | 3: {name: 'entity.name.section.lemma.conllu'}, 20 | 4: {name: 'constant.language.upostag.conllu'}, 21 | 5: {name: 'entity.name.section.xpostag.conllu'}, 22 | 6: {name: 'markup.list.unnumbered.feats.conllu'}, 23 | 7: {name: 'constant.numeric.head.conllu'}, 24 | 8: {name: 'keyword.control.deprel.conllu'}, 25 | 9: {name: 'markup.list.numbered.deps.conllu'} 26 | }, 27 | match: 28 | '^([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)$', 29 | name: 'entity.name.section.token.conllu' 30 | } 31 | ], 32 | scopeName: 'text.conllu' 33 | } 34 | 35 | export default grammar 36 | -------------------------------------------------------------------------------- /lang/text.elixir.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `apache-2.0`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.elixir'], 13 | extensions: [], 14 | names: [], 15 | patterns: [ 16 | { 17 | begin: '<%+#', 18 | captures: {0: {name: 'punctuation.definition.comment.eex'}}, 19 | end: '%>', 20 | name: 'comment.block.elixir' 21 | }, 22 | { 23 | begin: '<%+(?!>)[-=]*', 24 | beginCaptures: {0: {name: 'punctuation.section.embedded.begin.elixir'}}, 25 | contentName: 'source.elixir', 26 | end: '(-)%>|(%)>', 27 | endCaptures: { 28 | 0: {name: 'punctuation.section.embedded.end.elixir'}, 29 | 1: {name: 'source.elixir'}, 30 | 2: {name: 'source.elixir'} 31 | }, 32 | name: 'meta.embedded.line.elixir', 33 | patterns: [ 34 | { 35 | captures: {1: {name: 'punctuation.definition.comment.elixir'}}, 36 | match: '(#).*?(?=-?%>)', 37 | name: 'comment.line.number-sign.elixir' 38 | }, 39 | {include: 'source.elixir'} 40 | ] 41 | } 42 | ], 43 | scopeName: 'text.elixir' 44 | } 45 | 46 | export default grammar 47 | -------------------------------------------------------------------------------- /lang/text.html.asp.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.asp', 'text.html.basic'], 11 | extensions: ['.asax', '.ascx', '.ashx', '.asmx', '.asp', '.aspx', '.axd'], 12 | names: ['asp', 'asp.net', 'aspx', 'aspx-vb', 'classic-asp'], 13 | patterns: [ 14 | { 15 | begin: '<%--', 16 | beginCaptures: {0: {name: 'punctuation.definition.comment.begin.asp'}}, 17 | end: '--%>', 18 | endCaptures: {0: {name: 'punctuation.definition.comment.end.asp'}}, 19 | name: 'comment.block.asp.server' 20 | }, 21 | { 22 | begin: '<%=?', 23 | beginCaptures: {0: {name: 'punctuation.section.embedded.begin.asp'}}, 24 | end: '%>', 25 | endCaptures: {0: {name: 'punctuation.section.embedded.end.asp'}}, 26 | name: 'source.asp.embedded.html', 27 | patterns: [ 28 | { 29 | captures: {1: {name: 'punctuation.definition.comment.asp'}}, 30 | match: "(').*?(?=%>)", 31 | name: 'comment.line.apostrophe.asp' 32 | }, 33 | {include: 'source.asp'} 34 | ] 35 | }, 36 | {include: 'text.html.basic'} 37 | ], 38 | scopeName: 'text.html.asp' 39 | } 40 | 41 | export default grammar 42 | -------------------------------------------------------------------------------- /lang/text.html.django.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed permissive. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['text.html.basic'], 11 | extensions: ['.jinja', '.j2', '.jinja2'], 12 | names: ['jinja', 'django', 'html+django', 'html+jinja', 'htmldjango'], 13 | patterns: [ 14 | {include: 'text.html.basic'}, 15 | { 16 | begin: '{% comment %}', 17 | end: '{% endcomment %}', 18 | name: 'comment.block.django.template' 19 | }, 20 | {begin: '{#', end: '#}', name: 'comment.line.django.template'}, 21 | { 22 | begin: '{{', 23 | end: '}}', 24 | name: 'meta.tag.template.variable.django.template', 25 | patterns: [ 26 | { 27 | match: '[\\S&&[^}]]+', 28 | name: 'variable.other.readwrite.django.template' 29 | } 30 | ] 31 | }, 32 | { 33 | begin: '({%)', 34 | captures: {1: {name: 'entity.other.django.tagbraces'}}, 35 | end: '(%})', 36 | name: 'meta.scope.django.template.tag', 37 | patterns: [ 38 | { 39 | match: 40 | '\\b(autoescape|endautoescape|block|endblock|trans|blocktrans|endblocktrans|plural|debug|extends|filter|firstof|for|endfor|if|include|else|endif|ifchanged|endifchanged|ifequal|endifequal|ifnotequal|endifnotequal|load|now|regroup|ssi|spaceless|templatetag|widthratio)\\b', 41 | name: 'keyword.control.django.template' 42 | }, 43 | { 44 | match: '\\b(and|or|not|in|by|as)\\b', 45 | name: 'keyword.operator.django.template' 46 | }, 47 | { 48 | match: 49 | '\\|(add|addslashes|capfirst|center|cut|date|default|default_if_none|dictsort|dictsortreversed|divisibleby|escape|filesizeformat|first|fix_ampersands|floatformat|get_digit|join|length|length_is|linebreaks|linebreaksbr|linenumbers|ljust|lower|make_list|phone2numeric|pluralize|pprint|random|removetags|rjust|safe|slice|slugify|stringformat|striptags|time|timesince|title|truncatewords|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|yesno)\\b', 50 | name: 'support.function.filter.django' 51 | }, 52 | {begin: '(\'|")', end: '\\1', name: 'string.other.django.template.tag'}, 53 | {match: '[a-zA-Z_]+', name: 'string.unquoted.django.template.tag'} 54 | ] 55 | } 56 | ], 57 | scopeName: 'text.html.django' 58 | } 59 | 60 | export default grammar 61 | -------------------------------------------------------------------------------- /lang/text.html.ecr.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.crystal', 'text.html.basic'], 13 | extensions: ['.ecr'], 14 | injections: {'text.html.ecr': {patterns: [{include: '#tags'}]}}, 15 | names: ['html+ecr', 'ecr'], 16 | patterns: [{include: 'text.html.basic'}], 17 | repository: { 18 | tags: { 19 | patterns: [ 20 | { 21 | begin: '(<%)(=)?', 22 | beginCaptures: { 23 | 0: {name: 'punctuation.section.embedded.begin.ecr'}, 24 | 2: {name: 'punctuation.section.embedded.return.ecr'} 25 | }, 26 | contentName: 'source.crystal.embedded.ecr', 27 | end: '%>', 28 | endCaptures: {0: {name: 'punctuation.section.embedded.end.ecr'}}, 29 | name: 'meta.embedded.line.ecr', 30 | patterns: [{include: 'source.crystal'}] 31 | } 32 | ] 33 | } 34 | }, 35 | scopeName: 'text.html.ecr' 36 | } 37 | 38 | export default grammar 39 | -------------------------------------------------------------------------------- /lang/text.html.elixir.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `apache-2.0`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['text.elixir', 'text.html.basic'], 13 | extensions: ['.html.eex', '.heex', '.leex'], 14 | injections: { 15 | 'R:text.html.elixir meta.tag meta.attribute string.quoted': { 16 | patterns: [{include: 'text.elixir'}] 17 | } 18 | }, 19 | names: ['html+eex', 'eex', 'heex', 'leex'], 20 | patterns: [{include: 'text.elixir'}, {include: 'text.html.basic'}], 21 | scopeName: 'text.html.elixir' 22 | } 23 | 24 | export default grammar 25 | -------------------------------------------------------------------------------- /lang/text.html.ftl.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['text.html.basic'], 11 | extensions: [], 12 | names: ['freemarker', 'ftl'], 13 | patterns: [ 14 | { 15 | begin: '[<\\[]#--', 16 | captures: {0: {name: 'punctuation.definition.comment.ftl'}}, 17 | end: '--[>\\]]', 18 | name: 'comment.block.ftl' 19 | }, 20 | { 21 | captures: { 22 | 1: {name: 'punctuation.definition.function.ftl'}, 23 | 2: {name: 'punctuation.definition.function.ftl'}, 24 | 3: {name: 'entity.name.function.ftl'}, 25 | 5: {name: 'variable.parameter.function.ftl'}, 26 | 8: {name: 'entity.name.function.ftl'}, 27 | 9: {name: 'punctuation.definition.function.ftl'} 28 | }, 29 | match: 30 | '([<\\[](#|@))(\\w+(\\.\\w+)*)((\\s+[^>\\]]+)*?)\\s*((\\/)?([>\\]]))', 31 | name: 'meta.function.ftl' 32 | }, 33 | { 34 | captures: { 35 | 1: {name: 'punctuation.definition.function.ftl'}, 36 | 2: {name: 'punctuation.definition.function.ftl'}, 37 | 3: {name: 'entity.name.function.ftl'}, 38 | 5: {name: 'punctuation.definition.function.ftl'} 39 | }, 40 | match: '([<\\[]\\/(#|@))(\\w+(\\.\\w+)*)\\s*([>\\]])', 41 | name: 'meta.function.ftl' 42 | }, 43 | { 44 | captures: { 45 | 1: {name: 'punctuation.definition.variable.ftl'}, 46 | 3: {name: 'entity.name.function.ftl'}, 47 | 4: {name: 'punctuation.definition.variable.ftl'} 48 | }, 49 | match: 50 | '(\\$\\{)\\.?[a-zA-Z_\\(][\\w\\(\\)+-\\/\\*]+(\\.?[\\w\\(\\)+-\\/\\*]+)*(.*?|\\?\\?|\\!)?(\\})', 51 | name: 'variable.other.readwrite.local.ftl' 52 | }, 53 | {include: 'text.html.basic'} 54 | ], 55 | scopeName: 'text.html.ftl' 56 | } 57 | 58 | export default grammar 59 | -------------------------------------------------------------------------------- /lang/text.html.js.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['text.html.basic'], 11 | extensions: ['.ejs', '.ect', '.ejs.t', '.jst'], 12 | names: ['ejs'], 13 | patterns: [ 14 | { 15 | begin: '<%=?', 16 | captures: {0: {name: 'punctuation.section.embedded.js'}}, 17 | end: '%>', 18 | name: 'source.js.embedded.html', 19 | patterns: [{include: 'source.js'}] 20 | }, 21 | {include: 'text.html.basic'} 22 | ], 23 | scopeName: 'text.html.js' 24 | } 25 | 26 | export default grammar 27 | -------------------------------------------------------------------------------- /lang/text.html.nunjucks.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['source.nunjucks', 'text.html.basic'], 11 | extensions: ['.njk'], 12 | names: ['nunjucks', 'njk'], 13 | patterns: [{include: 'source.nunjucks'}, {include: 'text.html.basic'}], 14 | scopeName: 'text.html.nunjucks' 15 | } 16 | 17 | export default grammar 18 | -------------------------------------------------------------------------------- /lang/text.html.vue.js: -------------------------------------------------------------------------------- 1 | // This is an alias, please use `source.vue.js` instead. 2 | export {default} from './source.vue.js' 3 | -------------------------------------------------------------------------------- /lang/text.python.console.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.python'], 13 | extensions: [], 14 | names: ['python-console', 'pycon'], 15 | patterns: [ 16 | { 17 | captures: { 18 | 1: {name: 'punctuation.separator.prompt.python.console'}, 19 | 2: {patterns: [{include: 'source.python'}]} 20 | }, 21 | match: '^(>{3}|\\.{3}|In \\[\\d+\\]:) (.+)$' 22 | } 23 | ], 24 | scopeName: 'text.python.console' 25 | } 26 | 27 | export default grammar 28 | -------------------------------------------------------------------------------- /lang/text.python.traceback.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.python'], 13 | extensions: ['.pytb'], 14 | names: ['python-traceback'], 15 | patterns: [ 16 | { 17 | captures: { 18 | 1: {name: 'string.python.traceback'}, 19 | 2: {name: 'constant.numeric.python.traceback'}, 20 | 3: {name: 'entity.name.function.python.traceback'} 21 | }, 22 | match: '^ File ("[^"]+"), line (\\d+)(?:, in (.+))?$' 23 | }, 24 | { 25 | captures: {1: {patterns: [{include: 'source.python'}]}}, 26 | match: '^ (.+)$' 27 | }, 28 | { 29 | captures: { 30 | 1: {name: 'entity.name.type.class.python.traceback'}, 31 | 2: {name: 'string.python.traceback'} 32 | }, 33 | match: '^([^\\s:]+):(?: (.+))?$' 34 | } 35 | ], 36 | scopeName: 'text.python.traceback' 37 | } 38 | 39 | export default grammar 40 | -------------------------------------------------------------------------------- /lang/text.rdoc.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is licensed `mit`. 3 | // See for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | extensions: ['.rdoc'], 11 | names: ['rdoc'], 12 | patterns: [ 13 | { 14 | captures: {1: {name: 'punctuation.definition.item.text'}}, 15 | match: '^\\s*(•).*$\\n?', 16 | name: 'meta.bullet-point.strong.text' 17 | }, 18 | { 19 | captures: {1: {name: 'punctuation.definition.item.text'}}, 20 | match: '^\\s*(·).*$\\n?', 21 | name: 'meta.bullet-point.light.text' 22 | }, 23 | { 24 | captures: {1: {name: 'punctuation.definition.item.text'}}, 25 | match: '^\\s*(\\*).*$\\n?', 26 | name: 'meta.bullet-point.star.text' 27 | }, 28 | { 29 | begin: '^([ \\t]*)(?=\\S)', 30 | contentName: 'meta.paragraph.text', 31 | end: '^(?!\\1(?=\\S))', 32 | patterns: [ 33 | { 34 | match: 35 | '(?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_.,~%+/?=&#]+(? 4 | // and licensed `apache-2.0`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.robot', '.resource'], 13 | names: ['robotframework'], 14 | patterns: [ 15 | { 16 | begin: 17 | '(?i)^\\*+\\s*(settings?|metadata|(user )?keywords?|test ?cases?|variables?)', 18 | end: '$', 19 | name: 'string.robot.header' 20 | }, 21 | { 22 | begin: '(?i)^\\s*\\[?Documentation\\]?', 23 | end: '^(?!\\s*+\\.\\.\\.)', 24 | name: 'comment' 25 | }, 26 | { 27 | match: 28 | '(?i)\\[(Arguments|Setup|Teardown|Precondition|Postcondition|Template|Return|Timeout)\\]', 29 | name: 'storage.type.method.robot' 30 | }, 31 | { 32 | begin: '(?i)\\[Tags\\]', 33 | end: '^(?!\\s*+\\.\\.\\.)', 34 | name: 'storage.type.method.robot', 35 | patterns: [{match: '^\\s*\\.\\.\\.', name: 'comment'}] 36 | }, 37 | {match: '\\b([0-9]*(\\.[0-9]+)?)\\b', name: 'constant.numeric.robot'}, 38 | { 39 | begin: '((? 4 | // and licensed `isc`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: [], 13 | names: ['robots.txt', 'robots', 'robots-txt'], 14 | patterns: [{include: '#main'}], 15 | repository: { 16 | comment: { 17 | begin: '#', 18 | beginCaptures: {0: {name: 'punctuation.definition.comment.robots-txt'}}, 19 | end: '$', 20 | name: 'comment.line.hash.robots-txt' 21 | }, 22 | directive: { 23 | begin: '^[A-Z][a-z-]*', 24 | end: '\\s*:', 25 | name: 'keyword.control.directive.robots-txt' 26 | }, 27 | main: { 28 | patterns: [ 29 | {include: '#comment'}, 30 | {include: '#directive'}, 31 | {include: '#wildcard'}, 32 | {include: '#uri'}, 33 | {include: '#text'}, 34 | {include: '#number'} 35 | ] 36 | }, 37 | number: {match: '\\d+', name: 'constant.numeric.integer.robots-txt'}, 38 | text: {match: '[A-Za-z-]+', name: 'string.unquoted.text.robots-txt'}, 39 | uri: { 40 | begin: '(?:[a-z]+:)?\\/', 41 | end: '$', 42 | name: 'string.unquoted.uri.robots-txt' 43 | }, 44 | wildcard: {match: '\\*', name: 'constant.character.wildcard.robots-txt'} 45 | }, 46 | scopeName: 'text.robots-txt' 47 | } 48 | 49 | export default grammar 50 | -------------------------------------------------------------------------------- /lang/text.shell-session.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | dependencies: ['source.shell'], 13 | extensions: ['.sh-session'], 14 | names: ['shellsession', 'bash-session', 'console'], 15 | patterns: [ 16 | { 17 | captures: { 18 | 1: {name: 'entity.other.prompt-prefix.shell-session'}, 19 | 2: {name: 'punctuation.separator.prompt.shell-session'}, 20 | 3: {name: 'source.shell', patterns: [{include: 'source.shell'}]} 21 | }, 22 | match: 23 | '(?x) ^ (?: ( (?:\\(\\S+\\)\\s*)? (?: sh\\S*? | \\w+\\S+[@:]\\S+(?:\\s+\\S+)? | \\[\\S+?[@:][^\\n]+?\\].*? ) ) \\s* )? ( [>$#%❯➜] | \\p{Greek} ) \\s+ (.*) $' 24 | }, 25 | {match: '^.+$', name: 'meta.output.shell-session'} 26 | ], 27 | scopeName: 'text.shell-session' 28 | } 29 | 30 | export default grammar 31 | -------------------------------------------------------------------------------- /lang/text.xml.genshi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @import {Grammar} from '@wooorm/starry-night' 3 | */ 4 | 5 | /** @type {Grammar} */ 6 | const grammar = { 7 | dependencies: ['source.python', 'text.xml'], 8 | extensions: ['.kid'], 9 | names: ['genshi', 'xml+genshi', 'xml+kid'], 10 | patterns: [ 11 | {begin: '', name: 'comment.block.xml.genshi'}, 12 | { 13 | begin: '(? for more info. 4 | /** 5 | * @import {Grammar} from '@wooorm/starry-night' 6 | */ 7 | 8 | /** @type {Grammar} */ 9 | const grammar = { 10 | dependencies: ['text.xml'], 11 | extensions: ['.xslt', '.xsl'], 12 | names: ['xslt', 'xsl'], 13 | patterns: [ 14 | { 15 | begin: '(<)(xsl)((:))(template)', 16 | captures: { 17 | 1: {name: 'punctuation.definition.tag.xml'}, 18 | 2: {name: 'entity.name.tag.namespace.xml'}, 19 | 3: {name: 'entity.name.tag.xml'}, 20 | 4: {name: 'punctuation.separator.namespace.xml'}, 21 | 5: {name: 'entity.name.tag.localname.xml'} 22 | }, 23 | end: '(>)', 24 | name: 'meta.tag.xml.template', 25 | patterns: [ 26 | { 27 | captures: { 28 | 1: {name: 'entity.other.attribute-name.namespace.xml'}, 29 | 2: {name: 'entity.other.attribute-name.xml'}, 30 | 3: {name: 'punctuation.separator.namespace.xml'}, 31 | 4: {name: 'entity.other.attribute-name.localname.xml'} 32 | }, 33 | match: ' (?:([-_a-zA-Z0-9]+)((:)))?([a-zA-Z-]+)' 34 | }, 35 | {include: '#doublequotedString'}, 36 | {include: '#singlequotedString'} 37 | ] 38 | }, 39 | {include: 'text.xml'} 40 | ], 41 | repository: { 42 | doublequotedString: { 43 | begin: '"', 44 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.xml'}}, 45 | end: '"', 46 | endCaptures: {0: {name: 'punctuation.definition.string.end.xml'}}, 47 | name: 'string.quoted.double.xml' 48 | }, 49 | singlequotedString: { 50 | begin: "'", 51 | beginCaptures: {0: {name: 'punctuation.definition.string.begin.xml'}}, 52 | end: "'", 53 | endCaptures: {0: {name: 'punctuation.definition.string.end.xml'}}, 54 | name: 'string.quoted.single.xml' 55 | } 56 | }, 57 | scopeName: 'text.xml.xsl' 58 | } 59 | 60 | export default grammar 61 | -------------------------------------------------------------------------------- /lang/text.zone_file.js: -------------------------------------------------------------------------------- 1 | // This is a TextMate grammar distributed by `starry-night`. 2 | // This grammar is developed at 3 | // 4 | // and licensed `mit`. 5 | // See for more info. 6 | /** 7 | * @import {Grammar} from '@wooorm/starry-night' 8 | */ 9 | 10 | /** @type {Grammar} */ 11 | const grammar = { 12 | extensions: ['.zone', '.arpa'], 13 | names: ['dns-zone'], 14 | patterns: [ 15 | {match: ';.*', name: 'comment.line.semicolon.zone_file'}, 16 | {match: '@', name: 'keyword.directive.zone_file'}, 17 | { 18 | captures: { 19 | 2: {name: 'variable.other.directive.zone_file'}, 20 | 3: {name: 'comment.line.semicolon.zone_file'} 21 | }, 22 | match: '\\$(ORIGIN|origin|TTL|ttl|INCLUDE|include)\\s*([^;]*)(;.*)?', 23 | name: 'keyword.directive.zone_file' 24 | }, 25 | { 26 | match: '\\d+(H|h|D|d|W|w|M|m|Y|y)', 27 | name: 'variable.other.timeunit.zone_file' 28 | }, 29 | { 30 | begin: 31 | '([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)\\(', 32 | beginCaptures: { 33 | 2: {name: 'variable.other.timeunit.zone_file'}, 34 | 3: {name: 'keyword.resourcetype.zone_file'}, 35 | 4: {name: 'string.quoted.single.resource.address.zone_file'} 36 | }, 37 | end: '\\)', 38 | name: 'string.quoted.single.address.zone_file', 39 | patterns: [{match: ';.*', name: 'comment.line.semicolon.zone_file'}] 40 | }, 41 | { 42 | captures: { 43 | 2: {name: 'variable.other.timeunit.zone_file'}, 44 | 3: {name: 'keyword.resourcetype.zone_file'}, 45 | 4: {name: 'string.quoted.single.resource.address.zone_file'} 46 | }, 47 | match: 48 | '([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)', 49 | name: 'string.quoted.single.address.zone_file' 50 | } 51 | ], 52 | scopeName: 'text.zone_file' 53 | } 54 | 55 | export default grammar 56 | -------------------------------------------------------------------------------- /lib/common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @import {Grammar} from '@wooorm/starry-night' 3 | */ 4 | 5 | import sourceC from '@wooorm/starry-night/source.c' 6 | import sourceCpp from '@wooorm/starry-night/source.c++' 7 | import sourceCPlatform from '@wooorm/starry-night/source.c.platform' 8 | import sourceCs from '@wooorm/starry-night/source.cs' 9 | import sourceCss from '@wooorm/starry-night/source.css' 10 | import sourceCssLess from '@wooorm/starry-night/source.css.less' 11 | import sourceCssScss from '@wooorm/starry-night/source.css.scss' 12 | import sourceDiff from '@wooorm/starry-night/source.diff' 13 | import sourceGo from '@wooorm/starry-night/source.go' 14 | import sourceGraphql from '@wooorm/starry-night/source.graphql' 15 | import sourceIni from '@wooorm/starry-night/source.ini' 16 | import sourceJava from '@wooorm/starry-night/source.java' 17 | import sourceJs from '@wooorm/starry-night/source.js' 18 | import sourceJson from '@wooorm/starry-night/source.json' 19 | import sourceKotlin from '@wooorm/starry-night/source.kotlin' 20 | import sourceLua from '@wooorm/starry-night/source.lua' 21 | import sourceMakefile from '@wooorm/starry-night/source.makefile' 22 | import sourceObjc from '@wooorm/starry-night/source.objc' 23 | import sourceObjcPlatform from '@wooorm/starry-night/source.objc.platform' 24 | import sourcePerl from '@wooorm/starry-night/source.perl' 25 | import sourcePython from '@wooorm/starry-night/source.python' 26 | import sourceR from '@wooorm/starry-night/source.r' 27 | import sourceRuby from '@wooorm/starry-night/source.ruby' 28 | import sourceRust from '@wooorm/starry-night/source.rust' 29 | import sourceShell from '@wooorm/starry-night/source.shell' 30 | import sourceSql from '@wooorm/starry-night/source.sql' 31 | import sourceSwift from '@wooorm/starry-night/source.swift' 32 | import sourceTs from '@wooorm/starry-night/source.ts' 33 | import sourceVbnet from '@wooorm/starry-night/source.vbnet' 34 | import sourceYaml from '@wooorm/starry-night/source.yaml' 35 | import textHtmlBasic from '@wooorm/starry-night/text.html.basic' 36 | import textHtmlPhp from '@wooorm/starry-night/text.html.php' 37 | import textMd from '@wooorm/starry-night/text.md' 38 | import textXml from '@wooorm/starry-night/text.xml' 39 | import textXmlSvg from '@wooorm/starry-night/text.xml.svg' 40 | 41 | /** @type {ReadonlyArray} */ 42 | export const grammars = [ 43 | sourceC, 44 | sourceCpp, 45 | sourceCPlatform, 46 | sourceCs, 47 | sourceCss, 48 | sourceCssLess, 49 | sourceCssScss, 50 | sourceDiff, 51 | sourceGo, 52 | sourceGraphql, 53 | sourceIni, 54 | sourceJava, 55 | sourceJs, 56 | sourceJson, 57 | sourceKotlin, 58 | sourceLua, 59 | sourceMakefile, 60 | sourceObjc, 61 | sourceObjcPlatform, 62 | sourcePerl, 63 | sourcePython, 64 | sourceR, 65 | sourceRuby, 66 | sourceRust, 67 | sourceShell, 68 | sourceSql, 69 | sourceSwift, 70 | sourceTs, 71 | sourceVbnet, 72 | sourceYaml, 73 | textHtmlBasic, 74 | textHtmlPhp, 75 | textMd, 76 | textXml, 77 | textXmlSvg 78 | ] 79 | -------------------------------------------------------------------------------- /lib/get-oniguruma.default.js: -------------------------------------------------------------------------------- 1 | /// 2 | /* eslint-env browser */ 3 | 4 | /** 5 | * @import {Options} from './types.js' 6 | */ 7 | 8 | /** 9 | * Browser (and Node 18+) WASM loader. 10 | * 11 | * @param {Readonly | undefined} [options] 12 | * Configuration (optional). 13 | * @returns {Promise} 14 | * Fetch response. 15 | */ 16 | export async function getOniguruma(options) { 17 | const url = 18 | options && options.getOnigurumaUrlFetch 19 | ? await options.getOnigurumaUrlFetch() 20 | : new URL('https://esm.sh/vscode-oniguruma@2/release/onig.wasm') 21 | 22 | return fetch(url) 23 | } 24 | -------------------------------------------------------------------------------- /lib/get-oniguruma.fs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @import {Options} from './types.js' 3 | */ 4 | 5 | import fs from 'node:fs/promises' 6 | import {resolve} from 'import-meta-resolve' 7 | 8 | /** 9 | * Node w/o fetch. 10 | * 11 | * @param {Readonly | undefined} [options] 12 | * Configuration (optional). 13 | * @returns {Promise} 14 | * Uint8 array. 15 | */ 16 | export async function getOniguruma(options) { 17 | const url = 18 | options && options.getOnigurumaUrlFs 19 | ? await options.getOnigurumaUrlFs() 20 | : new URL('onig.wasm', resolve('vscode-oniguruma', import.meta.url)) 21 | 22 | return fs.readFile(url) 23 | } 24 | -------------------------------------------------------------------------------- /lib/types.js: -------------------------------------------------------------------------------- 1 | // Note: types exposed from `types.d.ts`. 2 | export {} 3 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2022 Titus Wormer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /media/cover-dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/cover-dark.jpg -------------------------------------------------------------------------------- /media/cover-light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/cover-light.jpg -------------------------------------------------------------------------------- /media/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/cover.jpg -------------------------------------------------------------------------------- /media/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/dark.png -------------------------------------------------------------------------------- /media/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/light.png -------------------------------------------------------------------------------- /media/slice-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/slice-1.jpg -------------------------------------------------------------------------------- /media/slice-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/slice-2.jpg -------------------------------------------------------------------------------- /media/slice-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wooorm/starry-night/a429705b215ab3084f8f489e51427bc0660704b4/media/slice-3.jpg -------------------------------------------------------------------------------- /script/common.js: -------------------------------------------------------------------------------- 1 | // These are all manually mapped from highlight.js/lowlight/refractor: 2 | // * 3 | // * , 4 | // into scopes matching `linguist.yml`. 5 | /** @type {ReadonlyArray} */ 6 | export const common = [ 7 | 'source.c', // `c` 8 | 'source.c++', // `arduino`, `cpp` 9 | 'source.cs', // `csharp` 10 | 'source.css', // `css` 11 | 'source.css.less', // `less` 12 | 'source.css.scss', // `scss` 13 | 'source.diff', // `diff` 14 | 'source.go', // `go` 15 | 'source.ini', // `ini` 16 | 'source.java', // `java` 17 | 'source.js', // `javascript` 18 | 'source.json', // `json` 19 | 'source.kotlin', // `kotlin` 20 | 'source.lua', // `lua` 21 | 'source.makefile', // `makefile` 22 | 'source.objc', // `objectivec` 23 | 'source.perl', // `perl` 24 | 'source.python', // `python`, `python-repl` 25 | 'source.r', // `r` 26 | 'source.ruby', // `ruby` 27 | 'source.rust', // `rust` 28 | 'source.shell', // `bash`, `shell` 29 | 'source.sql', // `sql` 30 | 'source.swift', // `swift` 31 | 'source.ts', // `typescript` 32 | 'source.vbnet', // `vbnet` 33 | 'source.yaml', // `yaml` 34 | 'text.html.basic', // `xml` (HTML) 35 | 'text.html.php', // `php`, `php-template` 36 | 'text.md', // `markdown` 37 | 'text.xml', // `xml` 38 | 'text.xml.svg', // `xml` (SVG) 39 | 40 | // The only scope included in several of the above. 41 | 'source.graphql' // Used in `js`, `ruby`, and `html` 42 | 43 | // Not included but used in the included: 44 | // 'source.applescript' referenced in `source.shell` 45 | // 'source.coffee' referenced in `text.html.basic` 46 | // 'text.html.smarty' referenced in `text.html.basic` 47 | 48 | // Included in lowlight or refractor but without textmate equivalent: 49 | // `plaintext` 50 | ] 51 | -------------------------------------------------------------------------------- /script/preview.js: -------------------------------------------------------------------------------- 1 | // 1. Run this script 2 | // 2. Open `media/preview.html` in Safari 3 | // 3. Turn extensions off for a second. (CMD+,) 4 | // 4. Change the URL bar (CMD+L) to `starry-night` (then click in window) 5 | // 5. Resize to fit snugly 6 | // 6. Take a screenshot 7 | // 7. Switch theme in preferences, another screenshot. 8 | // 8. Lay then over `cover.jpg` in media, export as `-dark` and `-light`. 9 | import fs from 'node:fs/promises' 10 | import {toHtml} from 'hast-util-to-html' 11 | import {common, createStarryNight} from '../index.js' 12 | 13 | const highlighter = await createStarryNight(common) 14 | 15 | const document = ` 16 | 17 | Example 18 | 19 | 23 | 24 |
25 |

In a browser, include the module:

26 | ${generate( 27 | ``, 30 | 'text.html.basic' 31 | )} 32 |

…add the CSS:

33 | ${generate( 34 | ``, 35 | 'text.html.basic' 36 | )} 37 |

…then to use starry-night:

38 | ${generate( 39 | `const starryNight = await createStarryNight(common) 40 | 41 | const scope = starryNight.flagToScope('markdown') 42 | const tree = starryNight.highlight('# hi', scope) 43 | 44 | console.log(tree)`, 45 | 'source.js' 46 | )} 47 |
48 | 49 | 50 | ` 51 | 52 | fs.writeFile(new URL('../media/preview.html', import.meta.url), document) 53 | 54 | /** 55 | * @param {string} value 56 | * Value to highlight. 57 | * @param {string} scope 58 | * Scope to highlight with. 59 | */ 60 | function generate(value, scope) { 61 | const className = scope.replace(/^source\./, '').replace(/\./g, '-') 62 | return `
${toHtml(
63 |     highlighter.highlight(value, scope)
64 |   )}
65 | 
` 66 | } 67 | -------------------------------------------------------------------------------- /script/support.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @import {ListContent, PhrasingContent, Root} from 'mdast' 3 | */ 4 | 5 | import {zone} from 'mdast-zone' 6 | import {u} from 'unist-builder' 7 | import {common as commonGrammars} from '../index.js' 8 | import {info} from './info.js' 9 | 10 | const common = new Set( 11 | commonGrammars.map(function (d) { 12 | return d.scopeName 13 | }) 14 | ) 15 | 16 | /** 17 | * @returns 18 | * Transform. 19 | */ 20 | export default function support() { 21 | /** 22 | * @param {Root} tree 23 | * Tree. 24 | * @returns {undefined} 25 | * Nothing. 26 | */ 27 | return function (tree) { 28 | /** @type {Array} */ 29 | const items = Object.keys(info) 30 | .sort(function (a, b) { 31 | const aCommon = common.has(a) 32 | const bCommon = common.has(b) 33 | return aCommon === bCommon ? a.localeCompare(b) : aCommon ? -1 : 1 34 | }) 35 | .map(function (scope) { 36 | const {dependencies, homepage, license} = info[scope] 37 | /** @type {Array} */ 38 | const content = [ 39 | u('link', {url: 'lang/' + scope + '.js'}, [u('inlineCode', scope)]) 40 | ] 41 | 42 | if (license) { 43 | content.push(u('text', ' (' + license + ')')) 44 | } 45 | 46 | if (homepage) { 47 | content.push( 48 | u('text', ' — '), 49 | u('link', {url: homepage}, [u('text', 'upstream')]) 50 | ) 51 | } 52 | 53 | if (dependencies && dependencies.length > 0) { 54 | content.push(u('text', ' — needs: ')) 55 | let index = -1 56 | while (++index < dependencies.length) { 57 | content.push(u('inlineCode', dependencies[index])) 58 | if (index !== dependencies.length - 1) { 59 | content.push(u('text', ', ')) 60 | } 61 | } 62 | } 63 | 64 | return u('listItem', {checked: common.has(scope)}, [ 65 | u('paragraph', content) 66 | ]) 67 | }) 68 | 69 | zone(tree, 'support', function (start, _, end) { 70 | return [start, u('list', {spread: false}, items), end] 71 | }) 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "checkJs": true, 4 | "customConditions": ["development"], 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "exactOptionalPropertyTypes": true, 9 | "lib": ["es2022"], 10 | "module": "node16", 11 | "strict": true, 12 | "target": "es2022" 13 | }, 14 | "exclude": ["coverage/", "node_modules/"], 15 | "include": ["**/*.js", "lib/types.d.ts", "index.d.ts"] 16 | } 17 | --------------------------------------------------------------------------------