pygments.rb 2.4.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (348) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +8 -8
  3. data/.github/workflows/release.yml +5 -5
  4. data/.gitignore +2 -0
  5. data/.rubocop.yml +1 -1
  6. data/CHANGELOG.adoc +9 -1
  7. data/README.adoc +2 -2
  8. data/lib/pygments/version.rb +1 -1
  9. data/pygments.rb.gemspec +2 -2
  10. data/vendor/pygments-main/bin/pygmentize +1 -1
  11. data/vendor/pygments-main/pygments/__init__.py +2 -2
  12. data/vendor/pygments-main/pygments/__main__.py +1 -1
  13. data/vendor/pygments-main/pygments/cmdline.py +12 -12
  14. data/vendor/pygments-main/pygments/console.py +5 -5
  15. data/vendor/pygments-main/pygments/filter.py +2 -3
  16. data/vendor/pygments-main/pygments/filters/__init__.py +4 -4
  17. data/vendor/pygments-main/pygments/formatter.py +6 -1
  18. data/vendor/pygments-main/pygments/formatters/__init__.py +7 -8
  19. data/vendor/pygments-main/pygments/formatters/_mapping.py +0 -0
  20. data/vendor/pygments-main/pygments/formatters/bbcode.py +2 -2
  21. data/vendor/pygments-main/pygments/formatters/groff.py +3 -3
  22. data/vendor/pygments-main/pygments/formatters/html.py +38 -40
  23. data/vendor/pygments-main/pygments/formatters/img.py +51 -11
  24. data/vendor/pygments-main/pygments/formatters/irc.py +1 -1
  25. data/vendor/pygments-main/pygments/formatters/latex.py +24 -27
  26. data/vendor/pygments-main/pygments/formatters/other.py +3 -4
  27. data/vendor/pygments-main/pygments/formatters/pangomarkup.py +2 -2
  28. data/vendor/pygments-main/pygments/formatters/rtf.py +228 -25
  29. data/vendor/pygments-main/pygments/formatters/svg.py +17 -20
  30. data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
  31. data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
  32. data/vendor/pygments-main/pygments/lexer.py +51 -33
  33. data/vendor/pygments-main/pygments/lexers/__init__.py +12 -12
  34. data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +1 -1
  35. data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
  36. data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
  37. data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
  38. data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +1 -1
  39. data/vendor/pygments-main/pygments/lexers/_css_builtins.py +1 -1
  40. data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +1 -1
  41. data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
  42. data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +1 -1
  43. data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +5 -5
  44. data/vendor/pygments-main/pygments/lexers/_luau_builtins.py +62 -0
  45. data/vendor/pygments-main/pygments/lexers/_mapping.py +41 -11
  46. data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
  47. data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +3 -3
  48. data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
  49. data/vendor/pygments-main/pygments/lexers/_php_builtins.py +3 -3
  50. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +5 -5
  51. data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +1 -1
  52. data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1 -1
  53. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +4 -4
  54. data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +3 -3
  55. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +1 -1
  56. data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
  57. data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
  58. data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
  59. data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
  60. data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
  61. data/vendor/pygments-main/pygments/lexers/actionscript.py +6 -8
  62. data/vendor/pygments-main/pygments/lexers/ada.py +3 -3
  63. data/vendor/pygments-main/pygments/lexers/agile.py +3 -1
  64. data/vendor/pygments-main/pygments/lexers/algebra.py +9 -13
  65. data/vendor/pygments-main/pygments/lexers/ambient.py +2 -3
  66. data/vendor/pygments-main/pygments/lexers/amdgpu.py +3 -3
  67. data/vendor/pygments-main/pygments/lexers/ampl.py +2 -3
  68. data/vendor/pygments-main/pygments/lexers/apdlexer.py +4 -3
  69. data/vendor/pygments-main/pygments/lexers/apl.py +2 -3
  70. data/vendor/pygments-main/pygments/lexers/archetype.py +8 -12
  71. data/vendor/pygments-main/pygments/lexers/arrow.py +2 -3
  72. data/vendor/pygments-main/pygments/lexers/arturo.py +2 -3
  73. data/vendor/pygments-main/pygments/lexers/asc.py +4 -4
  74. data/vendor/pygments-main/pygments/lexers/asm.py +28 -15
  75. data/vendor/pygments-main/pygments/lexers/asn1.py +178 -0
  76. data/vendor/pygments-main/pygments/lexers/automation.py +6 -8
  77. data/vendor/pygments-main/pygments/lexers/bare.py +2 -3
  78. data/vendor/pygments-main/pygments/lexers/basic.py +48 -57
  79. data/vendor/pygments-main/pygments/lexers/bdd.py +3 -4
  80. data/vendor/pygments-main/pygments/lexers/berry.py +4 -4
  81. data/vendor/pygments-main/pygments/lexers/bibtex.py +5 -5
  82. data/vendor/pygments-main/pygments/lexers/blueprint.py +173 -0
  83. data/vendor/pygments-main/pygments/lexers/boa.py +4 -4
  84. data/vendor/pygments-main/pygments/lexers/bqn.py +109 -0
  85. data/vendor/pygments-main/pygments/lexers/business.py +21 -22
  86. data/vendor/pygments-main/pygments/lexers/c_cpp.py +9 -4
  87. data/vendor/pygments-main/pygments/lexers/c_like.py +99 -27
  88. data/vendor/pygments-main/pygments/lexers/capnproto.py +2 -3
  89. data/vendor/pygments-main/pygments/lexers/carbon.py +10 -11
  90. data/vendor/pygments-main/pygments/lexers/cddl.py +8 -9
  91. data/vendor/pygments-main/pygments/lexers/chapel.py +2 -3
  92. data/vendor/pygments-main/pygments/lexers/clean.py +2 -1
  93. data/vendor/pygments-main/pygments/lexers/comal.py +2 -1
  94. data/vendor/pygments-main/pygments/lexers/compiled.py +2 -1
  95. data/vendor/pygments-main/pygments/lexers/configs.py +342 -108
  96. data/vendor/pygments-main/pygments/lexers/console.py +5 -5
  97. data/vendor/pygments-main/pygments/lexers/cplint.py +2 -3
  98. data/vendor/pygments-main/pygments/lexers/crystal.py +4 -5
  99. data/vendor/pygments-main/pygments/lexers/csound.py +6 -8
  100. data/vendor/pygments-main/pygments/lexers/css.py +5 -5
  101. data/vendor/pygments-main/pygments/lexers/d.py +4 -3
  102. data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -3
  103. data/vendor/pygments-main/pygments/lexers/data.py +8 -12
  104. data/vendor/pygments-main/pygments/lexers/dax.py +2 -3
  105. data/vendor/pygments-main/pygments/lexers/devicetree.py +2 -3
  106. data/vendor/pygments-main/pygments/lexers/diff.py +7 -6
  107. data/vendor/pygments-main/pygments/lexers/dns.py +109 -0
  108. data/vendor/pygments-main/pygments/lexers/dotnet.py +19 -14
  109. data/vendor/pygments-main/pygments/lexers/dsls.py +24 -35
  110. data/vendor/pygments-main/pygments/lexers/dylan.py +8 -16
  111. data/vendor/pygments-main/pygments/lexers/ecl.py +2 -3
  112. data/vendor/pygments-main/pygments/lexers/eiffel.py +3 -4
  113. data/vendor/pygments-main/pygments/lexers/elm.py +3 -4
  114. data/vendor/pygments-main/pygments/lexers/elpi.py +28 -21
  115. data/vendor/pygments-main/pygments/lexers/email.py +3 -3
  116. data/vendor/pygments-main/pygments/lexers/erlang.py +22 -24
  117. data/vendor/pygments-main/pygments/lexers/esoteric.py +11 -12
  118. data/vendor/pygments-main/pygments/lexers/ezhil.py +2 -3
  119. data/vendor/pygments-main/pygments/lexers/factor.py +2 -3
  120. data/vendor/pygments-main/pygments/lexers/fantom.py +3 -3
  121. data/vendor/pygments-main/pygments/lexers/felix.py +9 -10
  122. data/vendor/pygments-main/pygments/lexers/fift.py +2 -1
  123. data/vendor/pygments-main/pygments/lexers/floscript.py +2 -3
  124. data/vendor/pygments-main/pygments/lexers/forth.py +2 -3
  125. data/vendor/pygments-main/pygments/lexers/fortran.py +6 -7
  126. data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
  127. data/vendor/pygments-main/pygments/lexers/freefem.py +2 -3
  128. data/vendor/pygments-main/pygments/lexers/func.py +3 -1
  129. data/vendor/pygments-main/pygments/lexers/functional.py +2 -1
  130. data/vendor/pygments-main/pygments/lexers/futhark.py +6 -7
  131. data/vendor/pygments-main/pygments/lexers/gcodelexer.py +3 -3
  132. data/vendor/pygments-main/pygments/lexers/gdscript.py +2 -1
  133. data/vendor/pygments-main/pygments/lexers/go.py +3 -4
  134. data/vendor/pygments-main/pygments/lexers/grammar_notation.py +6 -9
  135. data/vendor/pygments-main/pygments/lexers/graph.py +12 -9
  136. data/vendor/pygments-main/pygments/lexers/graphics.py +13 -17
  137. data/vendor/pygments-main/pygments/lexers/graphql.py +176 -0
  138. data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -3
  139. data/vendor/pygments-main/pygments/lexers/gsql.py +2 -3
  140. data/vendor/pygments-main/pygments/lexers/haskell.py +27 -32
  141. data/vendor/pygments-main/pygments/lexers/haxe.py +3 -5
  142. data/vendor/pygments-main/pygments/lexers/hdl.py +8 -7
  143. data/vendor/pygments-main/pygments/lexers/hexdump.py +3 -3
  144. data/vendor/pygments-main/pygments/lexers/html.py +34 -13
  145. data/vendor/pygments-main/pygments/lexers/idl.py +2 -3
  146. data/vendor/pygments-main/pygments/lexers/igor.py +305 -290
  147. data/vendor/pygments-main/pygments/lexers/inferno.py +2 -3
  148. data/vendor/pygments-main/pygments/lexers/installers.py +7 -9
  149. data/vendor/pygments-main/pygments/lexers/int_fiction.py +150 -162
  150. data/vendor/pygments-main/pygments/lexers/iolang.py +2 -3
  151. data/vendor/pygments-main/pygments/lexers/j.py +2 -3
  152. data/vendor/pygments-main/pygments/lexers/javascript.py +18 -19
  153. data/vendor/pygments-main/pygments/lexers/jmespath.py +2 -1
  154. data/vendor/pygments-main/pygments/lexers/jslt.py +2 -3
  155. data/vendor/pygments-main/pygments/lexers/jsonnet.py +4 -3
  156. data/vendor/pygments-main/pygments/lexers/jsx.py +75 -0
  157. data/vendor/pygments-main/pygments/lexers/julia.py +4 -5
  158. data/vendor/pygments-main/pygments/lexers/jvm.py +98 -116
  159. data/vendor/pygments-main/pygments/lexers/kuin.py +2 -3
  160. data/vendor/pygments-main/pygments/lexers/kusto.py +93 -0
  161. data/vendor/pygments-main/pygments/lexers/ldap.py +155 -0
  162. data/vendor/pygments-main/pygments/lexers/lean.py +241 -0
  163. data/vendor/pygments-main/pygments/lexers/lilypond.py +2 -3
  164. data/vendor/pygments-main/pygments/lexers/lisp.py +373 -65
  165. data/vendor/pygments-main/pygments/lexers/macaulay2.py +53 -4
  166. data/vendor/pygments-main/pygments/lexers/make.py +7 -5
  167. data/vendor/pygments-main/pygments/lexers/markup.py +242 -91
  168. data/vendor/pygments-main/pygments/lexers/math.py +2 -1
  169. data/vendor/pygments-main/pygments/lexers/matlab.py +10 -12
  170. data/vendor/pygments-main/pygments/lexers/maxima.py +2 -3
  171. data/vendor/pygments-main/pygments/lexers/meson.py +2 -3
  172. data/vendor/pygments-main/pygments/lexers/mime.py +4 -4
  173. data/vendor/pygments-main/pygments/lexers/minecraft.py +24 -27
  174. data/vendor/pygments-main/pygments/lexers/mips.py +3 -1
  175. data/vendor/pygments-main/pygments/lexers/ml.py +59 -61
  176. data/vendor/pygments-main/pygments/lexers/modeling.py +19 -22
  177. data/vendor/pygments-main/pygments/lexers/modula2.py +2 -3
  178. data/vendor/pygments-main/pygments/lexers/mojo.py +704 -0
  179. data/vendor/pygments-main/pygments/lexers/monte.py +2 -3
  180. data/vendor/pygments-main/pygments/lexers/mosel.py +3 -3
  181. data/vendor/pygments-main/pygments/lexers/ncl.py +4 -3
  182. data/vendor/pygments-main/pygments/lexers/nimrod.py +7 -8
  183. data/vendor/pygments-main/pygments/lexers/nit.py +2 -3
  184. data/vendor/pygments-main/pygments/lexers/nix.py +40 -31
  185. data/vendor/pygments-main/pygments/lexers/oberon.py +3 -3
  186. data/vendor/pygments-main/pygments/lexers/objective.py +14 -6
  187. data/vendor/pygments-main/pygments/lexers/ooc.py +2 -3
  188. data/vendor/pygments-main/pygments/lexers/openscad.py +96 -0
  189. data/vendor/pygments-main/pygments/lexers/other.py +2 -1
  190. data/vendor/pygments-main/pygments/lexers/parasail.py +2 -3
  191. data/vendor/pygments-main/pygments/lexers/parsers.py +41 -44
  192. data/vendor/pygments-main/pygments/lexers/pascal.py +6 -3
  193. data/vendor/pygments-main/pygments/lexers/pawn.py +5 -5
  194. data/vendor/pygments-main/pygments/lexers/perl.py +3 -3
  195. data/vendor/pygments-main/pygments/lexers/phix.py +2 -3
  196. data/vendor/pygments-main/pygments/lexers/php.py +4 -5
  197. data/vendor/pygments-main/pygments/lexers/pointless.py +2 -3
  198. data/vendor/pygments-main/pygments/lexers/pony.py +3 -3
  199. data/vendor/pygments-main/pygments/lexers/praat.py +2 -3
  200. data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
  201. data/vendor/pygments-main/pygments/lexers/prolog.py +23 -9
  202. data/vendor/pygments-main/pygments/lexers/promql.py +2 -1
  203. data/vendor/pygments-main/pygments/lexers/prql.py +251 -0
  204. data/vendor/pygments-main/pygments/lexers/ptx.py +119 -0
  205. data/vendor/pygments-main/pygments/lexers/python.py +24 -24
  206. data/vendor/pygments-main/pygments/lexers/q.py +5 -6
  207. data/vendor/pygments-main/pygments/lexers/qlik.py +3 -3
  208. data/vendor/pygments-main/pygments/lexers/qvt.py +5 -3
  209. data/vendor/pygments-main/pygments/lexers/r.py +8 -6
  210. data/vendor/pygments-main/pygments/lexers/rdf.py +19 -13
  211. data/vendor/pygments-main/pygments/lexers/rebol.py +7 -7
  212. data/vendor/pygments-main/pygments/lexers/resource.py +5 -6
  213. data/vendor/pygments-main/pygments/lexers/ride.py +4 -5
  214. data/vendor/pygments-main/pygments/lexers/rita.py +2 -3
  215. data/vendor/pygments-main/pygments/lexers/rnc.py +2 -3
  216. data/vendor/pygments-main/pygments/lexers/roboconf.py +5 -5
  217. data/vendor/pygments-main/pygments/lexers/robotframework.py +2 -3
  218. data/vendor/pygments-main/pygments/lexers/ruby.py +8 -13
  219. data/vendor/pygments-main/pygments/lexers/rust.py +9 -10
  220. data/vendor/pygments-main/pygments/lexers/sas.py +3 -3
  221. data/vendor/pygments-main/pygments/lexers/savi.py +131 -130
  222. data/vendor/pygments-main/pygments/lexers/scdoc.py +13 -7
  223. data/vendor/pygments-main/pygments/lexers/scripting.py +354 -42
  224. data/vendor/pygments-main/pygments/lexers/sgf.py +2 -3
  225. data/vendor/pygments-main/pygments/lexers/shell.py +107 -129
  226. data/vendor/pygments-main/pygments/lexers/sieve.py +3 -3
  227. data/vendor/pygments-main/pygments/lexers/slash.py +4 -5
  228. data/vendor/pygments-main/pygments/lexers/smalltalk.py +3 -5
  229. data/vendor/pygments-main/pygments/lexers/smithy.py +2 -3
  230. data/vendor/pygments-main/pygments/lexers/smv.py +3 -3
  231. data/vendor/pygments-main/pygments/lexers/snobol.py +3 -3
  232. data/vendor/pygments-main/pygments/lexers/solidity.py +3 -3
  233. data/vendor/pygments-main/pygments/lexers/soong.py +78 -0
  234. data/vendor/pygments-main/pygments/lexers/sophia.py +3 -4
  235. data/vendor/pygments-main/pygments/lexers/special.py +8 -3
  236. data/vendor/pygments-main/pygments/lexers/spice.py +15 -16
  237. data/vendor/pygments-main/pygments/lexers/sql.py +24 -18
  238. data/vendor/pygments-main/pygments/lexers/srcinfo.py +3 -3
  239. data/vendor/pygments-main/pygments/lexers/stata.py +2 -3
  240. data/vendor/pygments-main/pygments/lexers/supercollider.py +2 -3
  241. data/vendor/pygments-main/pygments/lexers/tact.py +303 -0
  242. data/vendor/pygments-main/pygments/lexers/tal.py +13 -10
  243. data/vendor/pygments-main/pygments/lexers/tcl.py +2 -3
  244. data/vendor/pygments-main/pygments/lexers/teal.py +2 -3
  245. data/vendor/pygments-main/pygments/lexers/templates.py +131 -72
  246. data/vendor/pygments-main/pygments/lexers/teraterm.py +2 -3
  247. data/vendor/pygments-main/pygments/lexers/testing.py +4 -5
  248. data/vendor/pygments-main/pygments/lexers/text.py +2 -1
  249. data/vendor/pygments-main/pygments/lexers/textedit.py +9 -6
  250. data/vendor/pygments-main/pygments/lexers/textfmts.py +20 -15
  251. data/vendor/pygments-main/pygments/lexers/theorem.py +41 -115
  252. data/vendor/pygments-main/pygments/lexers/thingsdb.py +50 -26
  253. data/vendor/pygments-main/pygments/lexers/tlb.py +3 -1
  254. data/vendor/pygments-main/pygments/lexers/tls.py +54 -0
  255. data/vendor/pygments-main/pygments/lexers/tnt.py +2 -3
  256. data/vendor/pygments-main/pygments/lexers/trafficscript.py +3 -3
  257. data/vendor/pygments-main/pygments/lexers/typoscript.py +6 -7
  258. data/vendor/pygments-main/pygments/lexers/typst.py +104 -0
  259. data/vendor/pygments-main/pygments/lexers/ul4.py +47 -5
  260. data/vendor/pygments-main/pygments/lexers/unicon.py +9 -7
  261. data/vendor/pygments-main/pygments/lexers/urbi.py +3 -3
  262. data/vendor/pygments-main/pygments/lexers/usd.py +6 -11
  263. data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
  264. data/vendor/pygments-main/pygments/lexers/verification.py +4 -5
  265. data/vendor/pygments-main/pygments/lexers/verifpal.py +65 -0
  266. data/vendor/pygments-main/pygments/lexers/vip.py +150 -0
  267. data/vendor/pygments-main/pygments/lexers/vyper.py +140 -0
  268. data/vendor/pygments-main/pygments/lexers/web.py +2 -1
  269. data/vendor/pygments-main/pygments/lexers/webassembly.py +2 -3
  270. data/vendor/pygments-main/pygments/lexers/webidl.py +2 -3
  271. data/vendor/pygments-main/pygments/lexers/webmisc.py +11 -15
  272. data/vendor/pygments-main/pygments/lexers/wgsl.py +6 -7
  273. data/vendor/pygments-main/pygments/lexers/whiley.py +2 -3
  274. data/vendor/pygments-main/pygments/lexers/wowtoc.py +3 -3
  275. data/vendor/pygments-main/pygments/lexers/wren.py +3 -4
  276. data/vendor/pygments-main/pygments/lexers/x10.py +6 -7
  277. data/vendor/pygments-main/pygments/lexers/xorg.py +2 -1
  278. data/vendor/pygments-main/pygments/lexers/yang.py +2 -3
  279. data/vendor/pygments-main/pygments/lexers/yara.py +69 -0
  280. data/vendor/pygments-main/pygments/lexers/zig.py +2 -1
  281. data/vendor/pygments-main/pygments/modeline.py +4 -4
  282. data/vendor/pygments-main/pygments/plugin.py +3 -19
  283. data/vendor/pygments-main/pygments/regexopt.py +1 -1
  284. data/vendor/pygments-main/pygments/scanner.py +1 -1
  285. data/vendor/pygments-main/pygments/sphinxext.py +38 -8
  286. data/vendor/pygments-main/pygments/style.py +8 -2
  287. data/vendor/pygments-main/pygments/styles/__init__.py +17 -59
  288. data/vendor/pygments-main/pygments/styles/_mapping.py +54 -0
  289. data/vendor/pygments-main/pygments/styles/abap.py +5 -1
  290. data/vendor/pygments-main/pygments/styles/algol.py +5 -1
  291. data/vendor/pygments-main/pygments/styles/algol_nu.py +5 -1
  292. data/vendor/pygments-main/pygments/styles/arduino.py +76 -72
  293. data/vendor/pygments-main/pygments/styles/autumn.py +6 -1
  294. data/vendor/pygments-main/pygments/styles/borland.py +6 -1
  295. data/vendor/pygments-main/pygments/styles/bw.py +6 -1
  296. data/vendor/pygments-main/pygments/styles/coffee.py +80 -0
  297. data/vendor/pygments-main/pygments/styles/colorful.py +6 -1
  298. data/vendor/pygments-main/pygments/styles/default.py +6 -1
  299. data/vendor/pygments-main/pygments/styles/dracula.py +68 -80
  300. data/vendor/pygments-main/pygments/styles/emacs.py +6 -1
  301. data/vendor/pygments-main/pygments/styles/friendly.py +6 -1
  302. data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +6 -1
  303. data/vendor/pygments-main/pygments/styles/fruity.py +7 -1
  304. data/vendor/pygments-main/pygments/styles/gh_dark.py +7 -1
  305. data/vendor/pygments-main/pygments/styles/gruvbox.py +10 -1
  306. data/vendor/pygments-main/pygments/styles/igor.py +6 -1
  307. data/vendor/pygments-main/pygments/styles/inkpot.py +7 -2
  308. data/vendor/pygments-main/pygments/styles/lightbulb.py +110 -0
  309. data/vendor/pygments-main/pygments/styles/lilypond.py +8 -2
  310. data/vendor/pygments-main/pygments/styles/lovelace.py +16 -10
  311. data/vendor/pygments-main/pygments/styles/manni.py +7 -2
  312. data/vendor/pygments-main/pygments/styles/material.py +21 -14
  313. data/vendor/pygments-main/pygments/styles/monokai.py +16 -10
  314. data/vendor/pygments-main/pygments/styles/murphy.py +7 -2
  315. data/vendor/pygments-main/pygments/styles/native.py +10 -5
  316. data/vendor/pygments-main/pygments/styles/nord.py +9 -3
  317. data/vendor/pygments-main/pygments/styles/onedark.py +6 -2
  318. data/vendor/pygments-main/pygments/styles/paraiso_dark.py +7 -2
  319. data/vendor/pygments-main/pygments/styles/paraiso_light.py +7 -2
  320. data/vendor/pygments-main/pygments/styles/pastie.py +7 -1
  321. data/vendor/pygments-main/pygments/styles/perldoc.py +7 -1
  322. data/vendor/pygments-main/pygments/styles/rainbow_dash.py +26 -19
  323. data/vendor/pygments-main/pygments/styles/rrt.py +8 -2
  324. data/vendor/pygments-main/pygments/styles/sas.py +6 -1
  325. data/vendor/pygments-main/pygments/styles/solarized.py +9 -1
  326. data/vendor/pygments-main/pygments/styles/staroffice.py +6 -1
  327. data/vendor/pygments-main/pygments/styles/stata_dark.py +6 -2
  328. data/vendor/pygments-main/pygments/styles/stata_light.py +6 -1
  329. data/vendor/pygments-main/pygments/styles/tango.py +7 -3
  330. data/vendor/pygments-main/pygments/styles/trac.py +7 -1
  331. data/vendor/pygments-main/pygments/styles/vim.py +7 -1
  332. data/vendor/pygments-main/pygments/styles/vs.py +7 -2
  333. data/vendor/pygments-main/pygments/styles/xcode.py +6 -1
  334. data/vendor/pygments-main/pygments/styles/zenburn.py +6 -1
  335. data/vendor/pygments-main/pygments/token.py +2 -1
  336. data/vendor/pygments-main/pygments/unistring.py +5 -5
  337. data/vendor/pygments-main/pygments/util.py +13 -19
  338. data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/METADATA +14 -13
  339. data/vendor/pygments-main/pygments-2.18.0.dist-info/RECORD +663 -0
  340. data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/WHEEL +1 -2
  341. data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/AUTHORS +13 -0
  342. metadata +39 -15
  343. data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +0 -614
  344. data/vendor/pygments-main/Pygments-2.15.1.dist-info/top_level.txt +0 -1
  345. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/INSTALLER +0 -0
  346. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/REQUESTED +0 -0
  347. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/entry_points.txt +0 -0
  348. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,54 @@
1
+ """
2
+ pygments.lexers.tls
3
+ ~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for the TLS presentation language.
6
+
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+ import re
11
+
12
+ from pygments.lexer import RegexLexer, words
13
+ from pygments.token import Comment, Operator, Keyword, Name, String, \
14
+ Number, Punctuation, Whitespace
15
+
16
+ __all__ = ['TlsLexer']
17
+
18
+
19
+ class TlsLexer(RegexLexer):
20
+ """
21
+ The TLS presentation language, described in RFC 8446.
22
+ """
23
+ name = 'TLS Presentation Language'
24
+ url = 'https://www.rfc-editor.org/rfc/rfc8446#section-3'
25
+ filenames = []
26
+ aliases = ['tls']
27
+ mimetypes = []
28
+ version_added = '2.16'
29
+
30
+ flags = re.MULTILINE | re.DOTALL
31
+
32
+ tokens = {
33
+ 'root': [
34
+ (r'\s+', Whitespace),
35
+ # comments
36
+ (r'/[*].*?[*]/', Comment.Multiline),
37
+ # Keywords
38
+ (words(('struct', 'enum', 'select', 'case'), suffix=r'\b'),
39
+ Keyword),
40
+ (words(('uint8', 'uint16', 'uint24', 'uint32', 'uint64', 'opaque'),
41
+ suffix=r'\b'), Keyword.Type),
42
+ # numeric literals
43
+ (r'0x[0-9a-fA-F]+', Number.Hex),
44
+ (r'[0-9]+', Number.Integer),
45
+ # string literal
46
+ (r'"(\\.|[^"\\])*"', String),
47
+ # tokens
48
+ (r'[.]{2}', Operator),
49
+ (r'[+\-*/&^]', Operator),
50
+ (r'[|<>=!()\[\]{}.,;:\?]', Punctuation),
51
+ # identifiers
52
+ (r'[^\W\d]\w*', Name.Other),
53
+ ]
54
+ }
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexer for Typographic Number Theory.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -21,14 +21,13 @@ class TNTLexer(Lexer):
21
21
  """
22
22
  Lexer for Typographic Number Theory, as described in the book
23
23
  Gödel, Escher, Bach, by Douglas R. Hofstadter
24
-
25
- .. versionadded:: 2.7
26
24
  """
27
25
 
28
26
  name = 'Typographic Number Theory'
29
27
  url = 'https://github.com/Kenny2github/language-tnt'
30
28
  aliases = ['tnt']
31
29
  filenames = ['*.tnt']
30
+ version_added = '2.7'
32
31
 
33
32
  cur = []
34
33
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexer for RiverBed's TrafficScript (RTS) language.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -17,12 +17,12 @@ __all__ = ['RtsLexer']
17
17
  class RtsLexer(RegexLexer):
18
18
  """
19
19
  For Riverbed Stingray Traffic Manager
20
-
21
- .. versionadded:: 2.1
22
20
  """
23
21
  name = 'TrafficScript'
24
22
  aliases = ['trafficscript', 'rts']
25
23
  filenames = ['*.rts']
24
+ url = 'https://riverbed.com'
25
+ version_added = '2.1'
26
26
 
27
27
  tokens = {
28
28
  'root' : [
@@ -13,7 +13,7 @@
13
13
  `TypoScriptHtmlDataLexer`
14
14
  Lexer that highlights markers, constants and registers within html tags.
15
15
 
16
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
16
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
17
17
  :license: BSD, see LICENSE for details.
18
18
  """
19
19
 
@@ -29,12 +29,12 @@ __all__ = ['TypoScriptLexer', 'TypoScriptCssDataLexer', 'TypoScriptHtmlDataLexer
29
29
  class TypoScriptCssDataLexer(RegexLexer):
30
30
  """
31
31
  Lexer that highlights markers, constants and registers within css blocks.
32
-
33
- .. versionadded:: 2.2
34
32
  """
35
33
 
36
34
  name = 'TypoScriptCssData'
37
35
  aliases = ['typoscriptcssdata']
36
+ url = 'http://docs.typo3.org/typo3cms/TyposcriptReference/'
37
+ version_added = '2.2'
38
38
 
39
39
  tokens = {
40
40
  'root': [
@@ -64,12 +64,12 @@ class TypoScriptCssDataLexer(RegexLexer):
64
64
  class TypoScriptHtmlDataLexer(RegexLexer):
65
65
  """
66
66
  Lexer that highlights markers, constants and registers within html tags.
67
-
68
- .. versionadded:: 2.2
69
67
  """
70
68
 
71
69
  name = 'TypoScriptHtmlData'
72
70
  aliases = ['typoscripthtmldata']
71
+ url = 'http://docs.typo3.org/typo3cms/TyposcriptReference/'
72
+ version_added = '2.2'
73
73
 
74
74
  tokens = {
75
75
  'root': [
@@ -99,8 +99,6 @@ class TypoScriptHtmlDataLexer(RegexLexer):
99
99
  class TypoScriptLexer(RegexLexer):
100
100
  """
101
101
  Lexer for TypoScript code.
102
-
103
- .. versionadded:: 2.2
104
102
  """
105
103
 
106
104
  name = 'TypoScript'
@@ -108,6 +106,7 @@ class TypoScriptLexer(RegexLexer):
108
106
  aliases = ['typoscript']
109
107
  filenames = ['*.typoscript']
110
108
  mimetypes = ['text/x-typoscript']
109
+ version_added = '2.2'
111
110
 
112
111
  flags = re.DOTALL | re.MULTILINE
113
112
 
@@ -0,0 +1,104 @@
1
+ """
2
+ pygments.lexers.typst
3
+ ~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for Typst language.
6
+
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, words, bygroups, include
12
+ from pygments.token import Comment, Keyword, Name, String, Punctuation, \
13
+ Whitespace, Generic, Operator, Number, Text
14
+
15
+ __all__ = ['TypstLexer']
16
+
17
+
18
+ class TypstLexer(RegexLexer):
19
+ """
20
+ For Typst code.
21
+ """
22
+
23
+ name = 'Typst'
24
+ aliases = ['typst']
25
+ filenames = ['*.typ']
26
+ mimetypes = ['text/x-typst']
27
+ url = 'https://typst.app'
28
+ version_added = '2.18'
29
+
30
+ tokens = {
31
+ 'root': [
32
+ include('markup'),
33
+ ],
34
+ 'common': [
35
+ (r'[ \t]+', Whitespace),
36
+ (r'((?!=[*_$`\-+0-9/<@\\#\[]|https?://).)+', Text),
37
+ ],
38
+ 'markup': [
39
+ include('comment'),
40
+ (r'^\s*=+.*$', Generic.Heading),
41
+ (r'[*][^*]*[*]', Generic.Strong),
42
+ (r'_[^_]*_', Generic.Emph),
43
+ (r'\$', Punctuation, 'maths'),
44
+ (r'`[^`]*`', String.Backtick), # inline code
45
+ (r'^\s*-', Punctuation), # unnumbered list
46
+ (r'^\s*\+', Punctuation), # numbered list
47
+ (r'^\s*[0-9.]+', Punctuation), # numbered list variant
48
+ (r'^(\s*/\s+)([^:]+)(:)', bygroups(Punctuation, Name.Variable, Punctuation)), # definitions
49
+ (r'<[a-zA-Z_][a-zA-Z0-9_-]*>', Name.Label), # label
50
+ (r'@[a-zA-Z_][a-zA-Z0-9_-]*', Name.Label), # reference
51
+ (r'\\#', Text), # escaped
52
+ (words(('#let', '#set', '#show'), suffix=r'\b'), Keyword.Declaration, 'inline_code'),
53
+ (r'(#[a-zA-Z_][a-zA-Z0-9_]*)(\[)', bygroups(Name.Function, Punctuation), 'markup'),
54
+ (r'(#[a-zA-Z_][a-zA-Z0-9_]*)(\()', bygroups(Name.Function, Punctuation), 'inline_code'),
55
+ (r'#[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable),
56
+ (r'```(?:.|\n)*?```', String.Backtick), # code block
57
+ (r'https?://[0-9a-zA-Z~/%#&=\',;.+?]*', Generic.Emph), # links
58
+ (words((r'---', r'\\', r'~', r'--', r'...'), suffix=r'\b'), Punctuation), # special chars shorthand
59
+ (r'\\\[', Punctuation), # escaped
60
+ (r'\\\]', Punctuation), # escaped
61
+ (r'\[', Punctuation, '#push'),
62
+ (r'\]', Punctuation, '#pop'),
63
+ include('common'),
64
+ ],
65
+ 'maths': [
66
+ include('comment'),
67
+ (words(('_', '^', '+', '-', '/', '*', '->', '<-', '!=', '=='),
68
+ suffix=r'\b'), Operator),
69
+ (words((r'\\', '$='), suffix=r'\b'), Operator), # maths markup operators
70
+ (r'\\\$', Punctuation), # escaped
71
+ (r'\$', Punctuation, '#pop'), # end of math mode
72
+ include('code'),
73
+ ],
74
+ 'comment': [
75
+ (r'//.*$', Comment.Single),
76
+ (r'/[*](.|\n)*?[*]/', Comment.Multiline),
77
+ ],
78
+ 'code': [
79
+ include('comment'),
80
+ (r'\[', Punctuation, 'markup'),
81
+ (r'\(|\{', Punctuation, 'code'),
82
+ (r'\)|\}', Punctuation, '#pop'),
83
+ (r'"[^"]*"', String.Double),
84
+ (r'[=,]', Operator),
85
+ (words(('and', 'or', 'not'), suffix=r'\b'), Operator.Word),
86
+ (r'=>|<=|==|!=|>|<|-=|\+=|\*=|/=|\+|-|\\|\*', Operator), # comparisons
87
+ (r'([a-zA-Z_][a-zA-Z0-9_]*)(:)', bygroups(Name.Variable, Punctuation), '#push'),
88
+ (r'([a-zA-Z_][a-zA-Z0-9_]*)(\()', bygroups(Name.Function, Punctuation), '#push'),
89
+ (words(('as', 'break', 'export', 'continue', 'else', 'for', 'if',
90
+ 'import', 'in', 'include', 'return', 'while'), suffix=r'\b'),
91
+ Keyword.Reserved),
92
+ (words(('auto', 'none', 'true', 'false'), suffix=r'\b'), Keyword.Constant),
93
+ (r'([0-9.]+)(mm|pt|cm|in|em|fr|%)', bygroups(Number, Keyword.Reserved)),
94
+ (words(('let', 'set', 'show'), suffix=r'\b'), Keyword.Declaration),
95
+ # FIXME: make this work
96
+ ## (r'(import|include)( *)(")([^"])(")',
97
+ ## bygroups(Keyword.Reserved, Text, Punctuation, String.Double, Punctuation)),
98
+ include('common'),
99
+ ],
100
+ 'inline_code': [
101
+ (r';$', Punctuation, '#pop'),
102
+ include('code'),
103
+ ],
104
+ }
@@ -4,9 +4,7 @@
4
4
 
5
5
  Lexer for the UL4 templating language.
6
6
 
7
- More information: https://python.livinglogic.de/UL4.html
8
-
9
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
10
8
  :license: BSD, see LICENSE for details.
11
9
  """
12
10
 
@@ -25,8 +23,6 @@ __all__ = ['UL4Lexer', 'HTMLUL4Lexer', 'XMLUL4Lexer', 'CSSUL4Lexer',
25
23
  class UL4Lexer(RegexLexer):
26
24
  """
27
25
  Generic lexer for UL4.
28
-
29
- .. versionadded:: 2.12
30
26
  """
31
27
 
32
28
  flags = re.MULTILINE | re.DOTALL
@@ -34,6 +30,8 @@ class UL4Lexer(RegexLexer):
34
30
  name = 'UL4'
35
31
  aliases = ['ul4']
36
32
  filenames = ['*.ul4']
33
+ url = 'https://python.livinglogic.de/UL4.html'
34
+ version_added = '2.12'
37
35
 
38
36
  tokens = {
39
37
  "root": [
@@ -52,12 +50,26 @@ class UL4Lexer(RegexLexer):
52
50
  Text.Whitespace, Name.Function),
53
51
  "ul4", # Switch to "expression" mode
54
52
  ),
53
+ (
54
+ # Comment:
55
+ # ``<?note?>...<?end note?>``
56
+ r"<\?\s*note\s*\?>",
57
+ Comment,
58
+ "note", # Switch to "note" mode
59
+ ),
55
60
  (
56
61
  # Comment:
57
62
  # ``<?note foobar?>``
58
63
  r"<\?\s*note\s.*?\?>",
59
64
  Comment,
60
65
  ),
66
+ (
67
+ # Template documentation:
68
+ # ``<?doc?>...<?end doc?>``
69
+ r"<\?\s*doc\s*\?>",
70
+ String.Doc,
71
+ "doc",
72
+ ),
61
73
  (
62
74
  # Template documentation:
63
75
  # ``<?doc foobar?>``
@@ -113,6 +125,26 @@ class UL4Lexer(RegexLexer):
113
125
  (r"[^<]+", Comment),
114
126
  (r".", Comment),
115
127
  ],
128
+ # Note mode ignores everything upto the matching ``<?end note?>`` tag
129
+ "note": [
130
+ # Nested ``<?note?>`` tag
131
+ (r"<\?\s*note\s*\?>", Comment, "#push"),
132
+ # ``<?end note?>`` tag
133
+ (r"<\?\s*end\s+note\s*\?>", Comment, "#pop"),
134
+ # Everything else
135
+ (r"[^<]+", Comment),
136
+ (r".", Comment),
137
+ ],
138
+ # Doc mode ignores everything upto the matching ``<?end doc?>`` tag
139
+ "doc": [
140
+ # Nested ``<?doc?>`` tag
141
+ (r"<\?\s*doc\s*\?>", String.Doc, "#push"),
142
+ # ``<?end doc?>`` tag
143
+ (r"<\?\s*end\s+doc\s*\?>", String.Doc, "#pop"),
144
+ # Everything else
145
+ (r"[^<]+", String.Doc),
146
+ (r".", String.Doc),
147
+ ],
116
148
  # UL4 expressions
117
149
  "ul4": [
118
150
  # End the tag
@@ -210,6 +242,8 @@ class HTMLUL4Lexer(DelegatingLexer):
210
242
  name = 'HTML+UL4'
211
243
  aliases = ['html+ul4']
212
244
  filenames = ['*.htmlul4']
245
+ url = 'https://python.livinglogic.de/UL4.html'
246
+ version_added = ''
213
247
 
214
248
  def __init__(self, **options):
215
249
  super().__init__(HtmlLexer, UL4Lexer, **options)
@@ -223,6 +257,8 @@ class XMLUL4Lexer(DelegatingLexer):
223
257
  name = 'XML+UL4'
224
258
  aliases = ['xml+ul4']
225
259
  filenames = ['*.xmlul4']
260
+ url = 'https://python.livinglogic.de/UL4.html'
261
+ version_added = ''
226
262
 
227
263
  def __init__(self, **options):
228
264
  super().__init__(XmlLexer, UL4Lexer, **options)
@@ -236,6 +272,8 @@ class CSSUL4Lexer(DelegatingLexer):
236
272
  name = 'CSS+UL4'
237
273
  aliases = ['css+ul4']
238
274
  filenames = ['*.cssul4']
275
+ url = 'https://python.livinglogic.de/UL4.html'
276
+ version_added = ''
239
277
 
240
278
  def __init__(self, **options):
241
279
  super().__init__(CssLexer, UL4Lexer, **options)
@@ -249,6 +287,8 @@ class JavascriptUL4Lexer(DelegatingLexer):
249
287
  name = 'Javascript+UL4'
250
288
  aliases = ['js+ul4']
251
289
  filenames = ['*.jsul4']
290
+ url = 'https://python.livinglogic.de/UL4.html'
291
+ version_added = ''
252
292
 
253
293
  def __init__(self, **options):
254
294
  super().__init__(JavascriptLexer, UL4Lexer, **options)
@@ -262,6 +302,8 @@ class PythonUL4Lexer(DelegatingLexer):
262
302
  name = 'Python+UL4'
263
303
  aliases = ['py+ul4']
264
304
  filenames = ['*.pyul4']
305
+ url = 'https://python.livinglogic.de/UL4.html'
306
+ version_added = ''
265
307
 
266
308
  def __init__(self, **options):
267
309
  super().__init__(PythonLexer, UL4Lexer, **options)
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for the Icon and Unicon languages, including ucode VM.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -20,14 +20,14 @@ __all__ = ['IconLexer', 'UcodeLexer', 'UniconLexer']
20
20
  class UniconLexer(RegexLexer):
21
21
  """
22
22
  For Unicon source code.
23
-
24
- .. versionadded:: 2.4
25
23
  """
26
24
 
27
25
  name = 'Unicon'
28
26
  aliases = ['unicon']
29
27
  filenames = ['*.icn']
30
28
  mimetypes = ['text/unicon']
29
+ url = 'https://www.unicon.org'
30
+ version_added = '2.4'
31
31
 
32
32
  flags = re.MULTILINE
33
33
 
@@ -166,13 +166,14 @@ class UniconLexer(RegexLexer):
166
166
  class IconLexer(RegexLexer):
167
167
  """
168
168
  Lexer for Icon.
169
-
170
- .. versionadded:: 1.6
171
169
  """
172
170
  name = 'Icon'
173
171
  aliases = ['icon']
174
172
  filenames = ['*.icon', '*.ICON']
175
173
  mimetypes = []
174
+ url = 'https://www2.cs.arizona.edu/icon'
175
+ version_added = '1.6'
176
+
176
177
  flags = re.MULTILINE
177
178
 
178
179
  tokens = {
@@ -306,13 +307,14 @@ class IconLexer(RegexLexer):
306
307
  class UcodeLexer(RegexLexer):
307
308
  """
308
309
  Lexer for Icon ucode files.
309
-
310
- .. versionadded:: 2.4
311
310
  """
312
311
  name = 'ucode'
313
312
  aliases = ['ucode']
314
313
  filenames = ['*.u', '*.u1', '*.u2']
315
314
  mimetypes = []
315
+ url = 'http://www.unicon.org'
316
+ version_added = '2.4'
317
+
316
318
  flags = re.MULTILINE
317
319
 
318
320
  tokens = {
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for UrbiScript language.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -20,14 +20,14 @@ __all__ = ['UrbiscriptLexer']
20
20
  class UrbiscriptLexer(ExtendedRegexLexer):
21
21
  """
22
22
  For UrbiScript source code.
23
-
24
- .. versionadded:: 1.5
25
23
  """
26
24
 
27
25
  name = 'UrbiScript'
28
26
  aliases = ['urbiscript']
29
27
  filenames = ['*.u']
30
28
  mimetypes = ['application/x-urbiscript']
29
+ url = 'https://github.com/urbiforge/urbi'
30
+ version_added = '1.5'
31
31
 
32
32
  flags = re.DOTALL
33
33
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  The module that parses Pixar's Universal Scene Description file format.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -30,34 +30,29 @@ _WHITESPACE = r"([ \t]+)"
30
30
  class UsdLexer(RegexLexer):
31
31
  """
32
32
  A lexer that parses Pixar's Universal Scene Description file format.
33
-
34
- .. versionadded:: 2.6
35
33
  """
36
34
 
37
35
  name = "USD"
38
36
  url = 'https://graphics.pixar.com/usd/release/index.html'
39
37
  aliases = ["usd", "usda"]
40
38
  filenames = ["*.usd", "*.usda"]
39
+ version_added = '2.6'
41
40
 
42
41
  tokens = {
43
42
  "root": [
44
- (r"(custom){_WHITESPACE}(uniform)(\s+){}(\s+){}(\s*)(=)".format(
45
- _TYPE, _BASE_ATTRIBUTE, _WHITESPACE=_WHITESPACE),
43
+ (rf"(custom){_WHITESPACE}(uniform)(\s+){_TYPE}(\s+){_BASE_ATTRIBUTE}(\s*)(=)",
46
44
  bygroups(Keyword.Token, Whitespace, Keyword.Token, Whitespace,
47
45
  Keyword.Type, Whitespace, Name.Attribute, Text,
48
46
  Name.Keyword.Tokens, Whitespace, Operator)),
49
- (r"(custom){_WHITESPACE}{}(\s+){}(\s*)(=)".format(
50
- _TYPE, _BASE_ATTRIBUTE, _WHITESPACE=_WHITESPACE),
47
+ (rf"(custom){_WHITESPACE}{_TYPE}(\s+){_BASE_ATTRIBUTE}(\s*)(=)",
51
48
  bygroups(Keyword.Token, Whitespace, Keyword.Type, Whitespace,
52
49
  Name.Attribute, Text, Name.Keyword.Tokens, Whitespace,
53
50
  Operator)),
54
- (r"(uniform){_WHITESPACE}{}(\s+){}(\s*)(=)".format(
55
- _TYPE, _BASE_ATTRIBUTE, _WHITESPACE=_WHITESPACE),
51
+ (rf"(uniform){_WHITESPACE}{_TYPE}(\s+){_BASE_ATTRIBUTE}(\s*)(=)",
56
52
  bygroups(Keyword.Token, Whitespace, Keyword.Type, Whitespace,
57
53
  Name.Attribute, Text, Name.Keyword.Tokens, Whitespace,
58
54
  Operator)),
59
- (r"{}{_WHITESPACE}{}(\s*)(=)".format(
60
- _TYPE, _BASE_ATTRIBUTE, _WHITESPACE=_WHITESPACE),
55
+ (rf"{_TYPE}{_WHITESPACE}{_BASE_ATTRIBUTE}(\s*)(=)",
61
56
  bygroups(Keyword.Type, Whitespace, Name.Attribute, Text,
62
57
  Name.Keyword.Tokens, Whitespace, Operator)),
63
58
  ] +
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for Varnish configuration
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -19,13 +19,13 @@ __all__ = ['VCLLexer', 'VCLSnippetLexer']
19
19
  class VCLLexer(RegexLexer):
20
20
  """
21
21
  For Varnish Configuration Language (VCL).
22
-
23
- .. versionadded:: 2.2
24
22
  """
25
23
  name = 'VCL'
26
24
  aliases = ['vcl']
27
25
  filenames = ['*.vcl']
28
26
  mimetypes = ['text/x-vclsrc']
27
+ url = 'https://www.varnish-software.com/developers/tutorials/varnish-configuration-language-vcl'
28
+ version_added = '2.2'
29
29
 
30
30
  def analyse_text(text):
31
31
  # If the very first line is 'vcl 4.0;' it's pretty much guaranteed
@@ -160,13 +160,13 @@ class VCLLexer(RegexLexer):
160
160
  class VCLSnippetLexer(VCLLexer):
161
161
  """
162
162
  For Varnish Configuration Language snippets.
163
-
164
- .. versionadded:: 2.2
165
163
  """
166
164
  name = 'VCLSnippets'
167
165
  aliases = ['vclsnippets', 'vclsnippet']
168
166
  mimetypes = ['text/x-vclsnippet']
169
167
  filenames = []
168
+ url = 'https://www.varnish-software.com/developers/tutorials/varnish-configuration-language-vcl'
169
+ version_added = '2.2'
170
170
 
171
171
  def analyse_text(text):
172
172
  # override method inherited from VCLLexer
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexer for Intermediate Verification Languages (IVLs).
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -18,13 +18,12 @@ __all__ = ['BoogieLexer', 'SilverLexer']
18
18
  class BoogieLexer(RegexLexer):
19
19
  """
20
20
  For Boogie source code.
21
-
22
- .. versionadded:: 2.1
23
21
  """
24
22
  name = 'Boogie'
25
23
  url = 'https://boogie-docs.readthedocs.io/en/latest/'
26
24
  aliases = ['boogie']
27
25
  filenames = ['*.bpl']
26
+ version_added = '2.1'
28
27
 
29
28
  tokens = {
30
29
  'root': [
@@ -66,12 +65,12 @@ class BoogieLexer(RegexLexer):
66
65
  class SilverLexer(RegexLexer):
67
66
  """
68
67
  For Silver source code.
69
-
70
- .. versionadded:: 2.2
71
68
  """
72
69
  name = 'Silver'
73
70
  aliases = ['silver']
74
71
  filenames = ['*.sil', '*.vpr']
72
+ url = 'https://github.com/viperproject/silver'
73
+ version_added = '2.2'
75
74
 
76
75
  tokens = {
77
76
  'root': [
@@ -0,0 +1,65 @@
1
+ """
2
+ pygments.lexers.verifpal
3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for Verifpal languages.
6
+
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, words, bygroups, default
12
+ from pygments.token import Comment, Keyword, Name, String, Punctuation, \
13
+ Whitespace
14
+
15
+ __all__ = ['VerifpalLexer']
16
+
17
+
18
+ class VerifpalLexer(RegexLexer):
19
+ """
20
+ For Verifpal code.
21
+ """
22
+
23
+ name = 'Verifpal'
24
+ aliases = ['verifpal']
25
+ filenames = ['*.vp']
26
+ mimetypes = ['text/x-verifpal']
27
+ url = 'https://verifpal.com'
28
+ version_added = '2.16'
29
+
30
+ tokens = {
31
+ 'root': [
32
+ (r'//.*$', Comment.Single),
33
+ (r'(principal)( +)(\w+)( *)(\[)(.*)$', bygroups(Name.Builtin, Whitespace, String, Whitespace, Punctuation, Whitespace)),
34
+ (r'(attacker)( *)(\[)( *)(passive|active)( *)(\])( *)$', bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace, String, Whitespace, Punctuation, Whitespace)),
35
+ (r'(knows)( +)(private|public)( +)', bygroups(Name.Builtin, Whitespace, Keyword.Constant, Whitespace), 'shared'),
36
+ (r'(queries)( +)(\[)', bygroups(Name.Builtin, Whitespace, Punctuation), 'queries'),
37
+ (r'(\w+)( +)(->|→)( *)(\w+)( *)(\:)', bygroups(String, Whitespace, Punctuation, Whitespace, String, Whitespace, Punctuation), 'shared'),
38
+ (words(('generates', 'leaks'), suffix=r'\b'), Name.Builtin, 'shared'),
39
+ (words(( 'phase', 'precondition',), suffix=r'\b'), Name.Builtin),
40
+ (r'[\[\(\)\]\?:=→^,]', Punctuation),
41
+ (r'->', Punctuation),
42
+ (words(('password',), suffix=r'\b'), Keyword.Constant),
43
+ (words(('AEAD_DEC', 'AEAD_ENC', 'ASSERT', 'BLIND', 'CONCAT',
44
+ 'DEC', 'ENC', 'G', 'HASH', 'HKDF', 'MAC', 'PKE_DEC',
45
+ 'PKE_ENC', 'PW_HASH', 'RINGSIGN', 'RINGSIGNVERIF',
46
+ 'SHAMIR_JOIN', 'SHAMIR_SPLIT', 'SIGN', 'SIGNVERIF',
47
+ 'SPLIT', 'UNBLIND', '_', 'nil'), suffix=r'\b'),
48
+ Name.Function),
49
+ (r'\s+', Whitespace),
50
+ (r'\w+', Name.Variable),
51
+ ],
52
+ 'shared': [
53
+ (r'[\^\[\],]', Punctuation),
54
+ (r' +', Whitespace),
55
+ (r'\w+', Name.Variable),
56
+ default('#pop')
57
+ ],
58
+ 'queries': [
59
+ (r'\s+', Name.Variable),
60
+ (words(('confidentiality?', 'authentication?', 'freshness?',
61
+ 'unlinkability?', 'equivalence?'), suffix='( )'),
62
+ bygroups(Keyword.Pseudo, Whitespace), 'shared'),
63
+ default('#pop')
64
+ ]
65
+ }