Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 8bb9e6fdcab0a3cc7534db1d18d5f1377d99dbab 0 parents
spox authored
Showing with 26,989 additions and 0 deletions.
  1. +25 −0 History.txt
  2. +233 −0 Manifest.txt
  3. +52 −0 README.txt
  4. +51 −0 Rakefile
  5. +122 −0 bin/theme2latexrender
  6. +156 −0 bin/theme2xhtmlrender
  7. +140 −0 bin/uv
  8. +109 −0 broken_syntax/c++.syntax
  9. +326 −0 broken_syntax/c.syntax
  10. +118 −0 broken_syntax/mail.syntax
  11. +543 −0 broken_syntax/markdown.syntax
  12. +92 −0 broken_syntax/mel.syntax
  13. +1,253 −0 broken_syntax/php.syntax
  14. +113 −0 broken_syntax/pmwiki.syntax
  15. +107 −0 broken_syntax/regular_expressions_oniguruma.syntax
  16. +109 −0 broken_syntax/regular_expressions_python.syntax
  17. +63 −0 broken_syntax/smarty.syntax
  18. +90 −0 lib/uv.rb
  19. +131 −0 lib/uv/render_processor.rb
  20. +67 −0 lib/uv/utility.rb
  21. +132 −0 render/latex/active4d.render
  22. +96 −0 render/latex/all_hallows_eve.render
  23. +171 −0 render/latex/amy.render
  24. +111 −0 render/latex/blackboard.render
  25. +552 −0 render/latex/brilliance_black.render
  26. +561 −0 render/latex/brilliance_dull.render
  27. +162 −0 render/latex/cobalt.render
  28. +126 −0 render/latex/dawn.render
  29. +132 −0 render/latex/eiffel.render
  30. +123 −0 render/latex/espresso_libre.render
  31. +93 −0 render/latex/idle.render
  32. +99 −0 render/latex/iplastic.render
  33. +96 −0 render/latex/lazy.render
  34. +135 −0 render/latex/mac_classic.render
  35. +117 −0 render/latex/magicwb_amiga.render
  36. +204 −0 render/latex/pastels_on_dark.render
  37. +123 −0 render/latex/slush_poppies.render
  38. +81 −0 render/latex/spacecadet.render
  39. +186 −0 render/latex/sunburst.render
  40. +153 −0 render/latex/twilight.render
  41. +126 −0 render/latex/zenburnesque.render
  42. +131 −0 render/old/txt2tags.render
  43. +140 −0 render/xhtml/active4d.render
  44. +104 −0 render/xhtml/all_hallows_eve.render
  45. +179 −0 render/xhtml/amy.render
  46. +119 −0 render/xhtml/blackboard.render
  47. +560 −0 render/xhtml/brilliance_black.render
  48. +569 −0 render/xhtml/brilliance_dull.render
  49. +170 −0 render/xhtml/cobalt.render
  50. +134 −0 render/xhtml/dawn.render
  51. +140 −0 render/xhtml/eiffel.render
  52. +131 −0 render/xhtml/espresso_libre.render
  53. +114 −0 render/xhtml/files/css/active4d.css
  54. +72 −0 render/xhtml/files/css/all_hallows_eve.css
  55. +147 −0 render/xhtml/files/css/amy.css
  56. +88 −0 render/xhtml/files/css/blackboard.css
  57. +605 −0 render/xhtml/files/css/brilliance_black.css
  58. +599 −0 render/xhtml/files/css/brilliance_dull.css
  59. +149 −0 render/xhtml/files/css/cobalt.css
  60. +121 −0 render/xhtml/files/css/dawn.css
  61. +121 −0 render/xhtml/files/css/eiffel.css
  62. +109 −0 render/xhtml/files/css/espresso_libre.css
  63. +62 −0 render/xhtml/files/css/idle.css
  64. +80 −0 render/xhtml/files/css/iplastic.css
  65. +73 −0 render/xhtml/files/css/lazy.css
  66. +123 −0 render/xhtml/files/css/mac_classic.css
  67. +104 −0 render/xhtml/files/css/magicwb_amiga.css
  68. +188 −0 render/xhtml/files/css/pastels_on_dark.css
  69. +85 −0 render/xhtml/files/css/slush_poppies.css
  70. +51 −0 render/xhtml/files/css/spacecadet.css
  71. +180 −0 render/xhtml/files/css/sunburst.css
  72. +137 −0 render/xhtml/files/css/twilight.css
  73. +91 −0 render/xhtml/files/css/zenburnesque.css
  74. +101 −0 render/xhtml/idle.render
  75. +107 −0 render/xhtml/iplastic.render
  76. +104 −0 render/xhtml/lazy.render
  77. +143 −0 render/xhtml/mac_classic.render
  78. +125 −0 render/xhtml/magicwb_amiga.render
  79. +212 −0 render/xhtml/pastels_on_dark.render
  80. +131 −0 render/xhtml/slush_poppies.render
  81. +89 −0 render/xhtml/spacecadet.render
  82. +194 −0 render/xhtml/sunburst.render
  83. +161 −0 render/xhtml/twilight.render
  84. +134 −0 render/xhtml/zenburnesque.render
  85. +97 −0 syntax/actionscript.syntax
  86. +276 −0 syntax/active4d.syntax
  87. +311 −0 syntax/active4d_html.syntax
  88. +50 −0 syntax/active4d_ini.syntax
  89. +21 −0 syntax/active4d_library.syntax
  90. +33 −0 syntax/ada.syntax
  91. +151 −0 syntax/antlr.syntax
  92. +191 −0 syntax/apache.syntax
  93. +384 −0 syntax/applescript.syntax
  94. +70 −0 syntax/asp.syntax
  95. +129 −0 syntax/asp_vb.net.syntax
  96. +151 −0 syntax/bibtex.syntax
  97. +41 −0 syntax/blog_html.syntax
  98. +42 −0 syntax/blog_markdown.syntax
  99. +27 −0 syntax/blog_text.syntax
  100. +27 −0 syntax/blog_textile.syntax
  101. +53 −0 syntax/build.syntax
  102. +287 −0 syntax/bulletin_board.syntax
  103. +55 −0 syntax/cake.syntax
  104. +36 −0 syntax/camlp4.syntax
  105. +32 −0 syntax/cm.syntax
  106. +119 −0 syntax/coldfusion.syntax
  107. +176 −0 syntax/context_free.syntax
  108. +59 −0 syntax/cs.syntax
  109. +195 −0 syntax/css.syntax
  110. +1,925 −0 syntax/css_experimental.syntax
  111. +68 −0 syntax/csv.syntax
  112. +142 −0 syntax/d.syntax
  113. +81 −0 syntax/diff.syntax
  114. +204 −0 syntax/dokuwiki.syntax
  115. +47 −0 syntax/dot.syntax
  116. +43 −0 syntax/doxygen.syntax
  117. +62 −0 syntax/dylan.syntax
  118. +78 −0 syntax/eiffel.syntax
  119. +922 −0 syntax/erlang.syntax
  120. +80 −0 syntax/f-script.syntax
  121. +141 −0 syntax/fortran.syntax
  122. +142 −0 syntax/fxscript.syntax
  123. +34 −0 syntax/greasemonkey.syntax
  124. +83 −0 syntax/gri.syntax
  125. +191 −0 syntax/groovy.syntax
  126. +22 −0 syntax/gtd.syntax
  127. +143 −0 syntax/gtdalt.syntax
  128. +88 −0 syntax/haml.syntax
  129. +88 −0 syntax/haskell.syntax
  130. +27 −0 syntax/html-asp.syntax
  131. +362 −0 syntax/html.syntax
  132. +36 −0 syntax/html_django.syntax
  133. +424 −0 syntax/html_for_asp.net.syntax
  134. +119 −0 syntax/html_mason.syntax
  135. +40 −0 syntax/html_rails.syntax
  136. +26 −0 syntax/html_tcl.syntax
  137. +32 −0 syntax/icalendar.syntax
  138. +48 −0 syntax/inform.syntax
  139. +55 −0 syntax/ini.syntax
  140. +77 −0 syntax/installer_distribution_script.syntax
  141. +81 −0 syntax/io.syntax
  142. +211 −0 syntax/java.syntax
  143. +20 −0 syntax/javaproperties.syntax
  144. +256 −0 syntax/javascript.syntax
  145. +72 −0 syntax/javascript_+_prototype.syntax
  146. +140 −0 syntax/javascript_+_prototype_bracketed.syntax
  147. +114 −0 syntax/jquery_javascript.syntax
  148. +136 −0 syntax/json.syntax
  149. +708 −0 syntax/languagedefinition.syntax
  150. +566 −0 syntax/latex.syntax
  151. +41 −0 syntax/latex_beamer.syntax
  152. +50 −0 syntax/latex_log.syntax
  153. +64 −0 syntax/latex_memoir.syntax
  154. +219 −0 syntax/lexflex.syntax
  155. +54 −0 syntax/lighttpd.syntax
  156. +492 −0 syntax/lilypond.syntax
  157. +61 −0 syntax/lisp.syntax
  158. +24 −0 syntax/literate_haskell.syntax
  159. +29 −0 syntax/logo.syntax
  160. +152 −0 syntax/logtalk.syntax
Sorry, we could not display the entire diff because it was too big.
25 History.txt
@@ -0,0 +1,25 @@
+== 0.10.2
+* Fixed --no-lines command line option.
+* Updated PHP syntax, no longer stalling.
+
+== 0.10.1 / 2007-06-15
+* Corrected line-number schemes in theme2xhtmlrender
+* Corrected alpha blending code in theme2xhtmlrender, Now the brilliance themes seem to work!
+* Modified html_processor to include whole syntax scopes.
+* Add index for duplicated setting names in tmTheme files.
+* Multiple fixes for latex, color boxes have now the right color and size.
+
+== 0.10.0 / 2007-05-15
+* Added copy files commant to Uv module and to command line utility.
+ now the required files (ex. css) may be easily copied to a destination
+ directory.
+* Small corrections in html_processor (should change name)
+* Many modifications to latex rendering
+* First latex rendering implementation (still buggy).
+* All processing is defined in render files.
+
+== 0.9.0 / 2007-04-24
+
+* 1 major enhancement
+ * Birthday!
+
233 Manifest.txt
@@ -0,0 +1,233 @@
+test/test_uv.rb
+lib/uv/render_processor.rb
+lib/uv/utility.rb
+lib/uv.rb
+bin/theme2xhtmlrender
+bin/theme2latexrender
+bin/uv
+History.txt
+Rakefile
+Manifest.txt
+README.txt
+render/xhtml/files/css/idle.css
+render/xhtml/files/css/lazy.css
+render/xhtml/files/css/espresso_libre.css
+render/xhtml/files/css/blackboard.css
+render/xhtml/files/css/brilliance_dull.css
+render/xhtml/files/css/sunburst.css
+render/xhtml/files/css/amy.css
+render/xhtml/files/css/zenburnesque.css
+render/xhtml/files/css/magicwb_amiga.css
+render/xhtml/files/css/dawn.css
+render/xhtml/files/css/eiffel.css
+render/xhtml/files/css/twilight.css
+render/xhtml/files/css/spacecadet.css
+render/xhtml/files/css/brilliance_black.css
+render/xhtml/files/css/mac_classic.css
+render/xhtml/files/css/active4d.css
+render/xhtml/files/css/slush_poppies.css
+render/xhtml/files/css/cobalt.css
+render/xhtml/files/css/iplastic.css
+render/xhtml/files/css/all_hallows_eve.css
+render/xhtml/files/css/pastels_on_dark.css
+render/xhtml/idle.render
+render/xhtml/lazy.render
+render/xhtml/espresso_libre.render
+render/xhtml/blackboard.render
+render/xhtml/brilliance_dull.render
+render/xhtml/sunburst.render
+render/xhtml/amy.render
+render/xhtml/zenburnesque.render
+render/xhtml/magicwb_amiga.render
+render/xhtml/dawn.render
+render/xhtml/eiffel.render
+render/xhtml/twilight.render
+render/xhtml/spacecadet.render
+render/xhtml/brilliance_black.render
+render/xhtml/mac_classic.render
+render/xhtml/active4d.render
+render/xhtml/slush_poppies.render
+render/xhtml/cobalt.render
+render/xhtml/iplastic.render
+render/xhtml/all_hallows_eve.render
+render/xhtml/pastels_on_dark.render
+render/latex/mac_classic.render
+render/latex/active4d.render
+render/latex/cobalt.render
+render/latex/magicwb_amiga.render
+render/latex/pastels_on_dark.render
+render/latex/iplastic.render
+render/latex/idle.render
+render/latex/lazy.render
+render/latex/espresso_libre.render
+render/latex/brilliance_dull.render
+render/latex/blackboard.render
+render/latex/sunburst.render
+render/latex/amy.render
+render/latex/zenburnesque.render
+render/latex/dawn.render
+render/latex/eiffel.render
+render/latex/twilight.render
+render/latex/spacecadet.render
+render/latex/slush_poppies.render
+render/latex/brilliance_black.render
+render/latex/all_hallows_eve.render
+render/old/txt2tags.render
+syntax/logo.syntax
+syntax/dylan.syntax
+syntax/latex_log.syntax
+syntax/textile.syntax
+syntax/build.syntax
+syntax/latex_memoir.syntax
+syntax/lexflex.syntax
+syntax/lisp.syntax
+syntax/gtd.syntax
+syntax/m.syntax
+syntax/ocaml.syntax
+syntax/d.syntax
+syntax/cm.syntax
+syntax/ocamlyacc.syntax
+syntax/opengl.syntax
+syntax/pascal.syntax
+syntax/lua.syntax
+syntax/active4d.syntax
+syntax/mel.syntax
+syntax/r.syntax
+syntax/r_console.syntax
+syntax/smarty.syntax
+syntax/latex.syntax
+syntax/prolog.syntax
+syntax/rez.syntax
+syntax/asp.syntax
+syntax/xhtml_1.0.syntax
+syntax/icalendar.syntax
+syntax/mootools.syntax
+syntax/scheme.syntax
+syntax/xml.syntax
+syntax/mail.syntax
+syntax/swig.syntax
+syntax/slate.syntax
+syntax/sweave.syntax
+syntax/qmake_project.syntax
+syntax/release_notes.syntax
+syntax/html_tcl.syntax
+syntax/html.syntax
+syntax/c.syntax
+syntax/pmwiki.syntax
+syntax/ruby.syntax
+syntax/csv.syntax
+syntax/ruby_on_rails.syntax
+syntax/xsl.syntax
+syntax/yaml.syntax
+syntax/io.syntax
+syntax/java.syntax
+syntax/gri.syntax
+syntax/movable_type.syntax
+syntax/cs.syntax
+syntax/css.syntax
+syntax/c++.syntax
+syntax/haml.syntax
+syntax/dot.syntax
+syntax/tsv.syntax
+syntax/ruby_experimental.syntax
+syntax/man.syntax
+syntax/bibtex.syntax
+syntax/objective-c.syntax
+syntax/subversion_commit_message.syntax
+syntax/ocamllex.syntax
+syntax/tcl.syntax
+syntax/tex.syntax
+syntax/ragel.syntax
+syntax/shell-unix-generic.syntax
+syntax/inform.syntax
+syntax/sql.syntax
+syntax/python.syntax
+syntax/modula-3.syntax
+syntax/cake.syntax
+syntax/logtalk.syntax
+syntax/ini.syntax
+syntax/diff.syntax
+syntax/fortran.syntax
+syntax/txt2tags.syntax
+syntax/s5.syntax
+syntax/scilab.syntax
+syntax/mips.syntax
+syntax/twiki.syntax
+syntax/perl.syntax
+syntax/fxscript.syntax
+syntax/markdown.syntax
+syntax/lilypond.syntax
+syntax/blog_html.syntax
+syntax/html_mason.syntax
+syntax/jquery_javascript.syntax
+syntax/json.syntax
+syntax/languagedefinition.syntax
+syntax/tex_math.syntax
+syntax/xml_strict.syntax
+syntax/php.syntax
+syntax/doxygen.syntax
+syntax/strings_file.syntax
+syntax/makefile.syntax
+syntax/setext.syntax
+syntax/ada.syntax
+syntax/active4d_ini.syntax
+syntax/active4d_library.syntax
+syntax/antlr.syntax
+syntax/javascript_+_prototype.syntax
+syntax/lighttpd.syntax
+syntax/template_toolkit.syntax
+syntax/sql_rails.syntax
+syntax/ssh-config.syntax
+syntax/mediawiki.syntax
+syntax/moinmoin.syntax
+syntax/javascript.syntax
+syntax/quake3_config.syntax
+syntax/qt_c++.syntax
+syntax/camlp4.syntax
+syntax/multimarkdown.syntax
+syntax/blog_text.syntax
+syntax/blog_textile.syntax
+syntax/bulletin_board.syntax
+syntax/groovy.syntax
+syntax/gtdalt.syntax
+syntax/regular_expressions_python.syntax
+syntax/latex_beamer.syntax
+syntax/remind.syntax
+syntax/regexp.syntax
+syntax/rd_r_documentation.syntax
+syntax/standard_ml.syntax
+syntax/literate_haskell.syntax
+syntax/python_django.syntax
+syntax/restructuredtext.syntax
+syntax/mod_perl.syntax
+syntax/coldfusion.syntax
+syntax/installer_distribution_script.syntax
+syntax/vectorscript.syntax
+syntax/macports_portfile.syntax
+syntax/yui_javascript.syntax
+syntax/actionscript.syntax
+syntax/active4d_html.syntax
+syntax/apache.syntax
+syntax/applescript.syntax
+syntax/asp_vb.net.syntax
+syntax/blog_markdown.syntax
+syntax/context_free.syntax
+syntax/css_experimental.syntax
+syntax/dokuwiki.syntax
+syntax/eiffel.syntax
+syntax/erlang.syntax
+syntax/f-script.syntax
+syntax/haskell.syntax
+syntax/greasemonkey.syntax
+syntax/html-asp.syntax
+syntax/html_django.syntax
+syntax/html_for_asp.net.syntax
+syntax/html_rails.syntax
+syntax/javaproperties.syntax
+syntax/javascript_+_prototype_bracketed.syntax
+syntax/objective-c++.syntax
+syntax/plain_text.syntax
+syntax/postscript.syntax
+syntax/processing.syntax
+syntax/property_list.syntax
+syntax/regular_expressions_oniguruma.syntax
52 README.txt
@@ -0,0 +1,52 @@
+== Ultraviolet
+
+Ultraviolet is a syntax highlighting library and engine. It
+uses TextMate[http://macromates.com/] syntax files and parses
+them using the Textpow[http://textpow.rubyforge.org] library. It
+supports more than 60 programming languages out of the box.
+
+== SYNTAX
+
+
+== REQUIREMENTS:
+
+* Oniguruma for Ruby[http://oniguruma.rubyforge.org] v1.1.0 or higher.
+* Textpow[http://textpow.rubyforge.org] v0.9.0 or higher.
+
+== INSTALL:
+
+sudo gem install -r markray
+
+== BUGS/PROBLEMS/INCOMPATIBILITIES:
+
+
+== TODO:
+
+
+== CREDITS:
+
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2007 FIX
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
51 Rakefile
@@ -0,0 +1,51 @@
+require 'rubygems'
+require 'fileutils'
+
+rubyforge_name = "ultraviolet"
+
+begin
+ require 'hoe'
+
+ class Hoe
+ # Dirty hack to eliminate Hoe from gem dependencies
+ def extra_deps
+ @extra_deps.delete_if{ |x| x.first == 'hoe' }
+ end
+ end
+
+ version = /^== *(\d+\.\d+\.\d+)/.match( File.read( 'History.txt' ) )[1]
+
+ h = Hoe.new('ultraviolet', version) do |p|
+ p.rubyforge_name = 'ultraviolet'
+ p.author = ['Dizan Vasquez']
+ p.email = ['dichodaemon@gmail.com']
+ p.email = 'dichodaemon@gmail.com'
+ p.summary = 'Syntax highlighting engine'
+ p.description = p.paragraphs_of('README.txt', 1 ).join('\n\n')
+ p.url = 'http://ultraviolet.rubyforge.org'
+ p.rdoc_pattern = /^(lib|bin|ext)|txt$/
+ p.changes = p.paragraphs_of('History.txt', 0).join("\n\n")
+ p.extra_deps << ['textpow', '>= 0.10.0']
+ p.clean_globs = ["manual/*"]
+ end
+
+ desc 'Create MaMa documentation'
+ task :mama => :clean do
+ system "mm -c -t refresh -o manual mm/manual.mm"
+ end
+
+ desc 'Publish MaMa documentation to RubyForge'
+ task :mama_publish => [:clean, :mama] do
+ config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
+ host = "#{config["username"]}@rubyforge.org"
+ remote_dir = "/var/www/gforge-projects/#{h.rubyforge_name}"
+ local_dir = 'manual'
+ system "rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}"
+ end
+
+rescue LoadError => e
+ desc 'Run the test suite.'
+ task :test do
+ system "ruby -Ibin:lib:test test_#{rubyforge_name}.rb"
+ end
+end
122 bin/theme2latexrender
@@ -0,0 +1,122 @@
+#! /usr/bin/env ruby
+begin
+ require 'plist'
+rescue LoadError
+ require 'rubygems'
+ require 'plist'
+end
+require 'uv/utility'
+
+base_dir = File.join( File.dirname(__FILE__), '..', 'render' )
+
+def settings
+ unless @settings
+ @settings = @theme["settings"].find { |s| ! s["name"] }["settings"]
+ end
+ @settings
+end
+
+@theme = Plist::parse_xml( ARGV[0] )
+render = {"name" => @theme["name"]}
+codecolumn = ""
+numbercolumn = ""
+standard_name = File.basename( ARGV[0] ).downcase.gsub(/\s+/, '_').gsub('.tmtheme', '').gsub(/\W/, '').gsub(/_+/, '_')
+
+render["tags"] = []
+
+@theme["settings"].each do |t|
+ if t["scope"]
+ class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
+ if class_name == ""
+ class_name = "x" * t["name"].size
+ end
+
+ tag = {}
+ tag["selector"] = t["scope"]
+ render["tags"] << tag
+
+ begin_string = ""
+ pcount = 0
+ if s = t["settings"]
+ if s["background"]
+ begin_string << "\\setlength{\\fboxsep}{0ex}\\colorbox[HTML]{#{Uv.normalize_color(settings, s["background"])[1..-1]}}{\\rule[-0.5ex]{0pt}{2.0ex}"
+ else
+ begin_string << "{"
+ end
+ pcount += 1
+ if s["foreground"]
+ begin_string << "\\color[HTML]{#{Uv.normalize_color(settings, s["foreground"], true)[1..-1]}}"
+ end
+ case s["fontStyle"]
+ when /bold/
+ begin_string << "\\textbf{"
+ pcount += 1
+ when /italic/
+ begin_string << "\\textit{"
+ pcount += 1
+ when /underline/
+ begin_string << "\\underline{"
+ pcount += 1
+ end
+ tag["begin"] = begin_string
+ tag["end"] = "}" * pcount
+ end
+
+
+ elsif ! t["name"]
+ if s = t["settings"]
+ codecolumn = "\\newcolumntype{C}{>{"
+ codecolumn << "\\color[HTML]{#{Uv.normalize_color(settings, s["foreground"], true)[1..-1]}}" if s["foreground"]
+ codecolumn << "\\columncolor[HTML]{#{Uv.alpha_blend(s["background"], s["background"])[1..-1]}}" if s["background"]
+ codecolumn << "}l}"
+ bg = Uv.alpha_blend(s["selection"], s["selection"]) if s["selection"]
+ numbercolumn = "\\newcolumntype{N}{>{"
+ numbercolumn << "\\color[HTML]{#{Uv.foreground(bg)[1..-1]}}" if bg
+ numbercolumn << "\\columncolor[HTML]{#{bg[1..-1]}}" if s["selection"]
+ numbercolumn << "}l}"
+
+ tag = {}
+ tag["begin"] = "\\texttt{"
+ tag["end"] = "}&\\mbox{\\texttt{"
+ render["line-numbers"] = tag end
+ end
+end
+
+render["filter"] = '@escaped.gsub(/(\$)/, \'\\\\\\\\\1\').gsub(/\\\\(?!\$)/, \'$\\\\\\\\backslash$\').gsub(/(_|\{|\}|&|\#|%)/, \'\\\\\\\\\1\').gsub(/~/, \'\\\\textasciitilde \').gsub(/ /,\'\\\\hspace{1ex}\').gsub(/\t| /,\'\\\\hspace{3ex}\').gsub(/\"/, "\'\'").gsub(/(\^)/,\'\\\\\\\\\1{}\')'
+
+tag = {}
+tag["begin"] = ""
+tag["end"] = "}}\\\\"
+render["line"] = tag
+
+tag = {}
+tag["begin"] = <<END
+#{codecolumn}
+#{numbercolumn}
+\\begin{longtable}{NC}
+END
+
+tag["end"] = <<END
+\\end{longtable}
+END
+render["listing"] = tag
+
+tag = {}
+tag["begin"] = <<END
+\\documentclass[a4paper,landscape]{article}
+\\usepackage{xcolor}
+\\usepackage{colortbl}
+\\usepackage{longtable}
+\\usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
+\\usepackage[T1]{fontenc}
+\\usepackage[scaled]{beramono}
+\\begin{document}
+END
+
+tag["end"] = <<END
+\\end{document}
+END
+
+render["document"] = tag
+
+File.open( File.join( base_dir, "latex", "#{standard_name}.render" ), "w" ) {|f| YAML.dump( render, f ) }
156 bin/theme2xhtmlrender
@@ -0,0 +1,156 @@
+#! /usr/bin/env ruby
+begin
+ require 'plist'
+rescue LoadError
+ require 'rubygems'
+ require 'plist'
+end
+require 'uv/utility'
+
+base_dir = File.join( File.dirname(__FILE__), '..', 'render' )
+
+
+def settings
+ unless @settings
+ @settings = @theme["settings"].find { |s| ! s["name"] }["settings"]
+ end
+ @settings
+end
+
+puts "Processing #{ARGV[0]}"
+
+@theme = Plist::parse_xml( ARGV[0] )
+render = {"name" => @theme["name"]}
+css = {}
+
+standard_name = File.basename( ARGV[0] ).downcase.gsub(/\s+/, '_').gsub('.tmtheme', '').gsub(/\W/, '').gsub(/_+/, '_')
+code_name = "pre.#{standard_name}"
+
+render["tags"] = []
+count_names = {}
+@theme["settings"].each do |t|
+ if t["scope"]
+ class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
+ if class_name == ""
+ class_name = "x" * t["name"].size
+ end
+
+ if count_names[class_name]
+ tname = class_name
+ class_name = "#{class_name}#{count_names[class_name]}"
+ count_names[tname] += count_names[tname] + 1
+ else
+ count_names[class_name] = 1
+ end
+
+ tag = {}
+ tag["selector"] = t["scope"]
+ tag["begin"] = "<span class=\"#{class_name}\">"
+ tag["end"] = "</span>"
+ render["tags"] << tag
+
+ if s = t["settings"]
+ style = {}
+ style["color"] = Uv.normalize_color(settings, s["foreground"], true)
+ style["background-color"] = Uv.normalize_color(settings, s["background"])
+ case s["fontStyle"]
+ when /bold/ then style["font-weight"] = "bold"
+ when /italic/ then style["font-style"] = "italic"
+ when /underline/ then style["text-decoration"] = "underline"
+ end
+ css[".#{class_name}"] = style
+ end
+ elsif ! t["name"]
+ if s = t["settings"]
+ style = {}
+ style["color"] = Uv.normalize_color(settings, s["foreground"], true)
+ style["background-color"] = Uv.alpha_blend(s["background"], s["background"])
+ css[code_name] = style
+ @style = style
+ style = {}
+ style["background-color"] = Uv.alpha_blend(s["selection"], s["selection"])
+ style["color"] = Uv.foreground( style["background-color"] )
+ css[".line-numbers"] = style
+
+ tag = {}
+ tag["begin"] = "<span class=\"line-numbers\">"
+ tag["end"] = "</span>"
+ render["line-numbers"] = tag
+ end
+ end
+end
+
+render["filter"] = "CGI.escapeHTML( @escaped )"
+
+tag = {}
+tag["begin"] = ""
+tag["end"] = ""
+render["line"] = tag
+
+
+tag = {}
+tag["begin"] = "<pre class=\"#{standard_name}\">"
+tag["end"] = "</pre>"
+render["listing"] = tag
+
+tag = {}
+tag["begin"] = <<END
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="cache-control" content="no-cache" />
+ <meta http-equiv="expires" content="3600" />
+ <meta name="revisit-after" content="2 days" />
+ <meta name="robots" content="index,follow" />
+ <meta name="publisher" content="Dichodaemon" />
+ <meta name="copyright" content="Dichodaemon" />
+
+ <meta name="author" content="Dichodaemon" />
+ <meta name="distribution" content="global" />
+ <meta name="description" content="Ocatarinetabellachithchix" />
+ <meta name="keywords" content="arzaversperia flexilimosos toves" />
+ <link rel="stylesheet" type="text/css" media="screen,projection,print" href="css/#{standard_name}.css" />
+ <title>#{standard_name}</title>
+
+</head>
+
+<body>
+END
+
+tag["end"] = <<END
+ <p>
+ <a href="http://validator.w3.org/check?uri=referer">
+ <img style="border:0"
+ src="http://www.w3.org/Icons/valid-xhtml10"
+ alt="Valid XHTML 1.0 Strict" height="31" width="88" />
+ </a>
+ <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">
+ <img style="border:0;width:88px;height:31px"
+ src="http://jigsaw.w3.org/css-validator/images/vcss"
+ alt="Valid CSS!" />
+ </a>
+ </p>
+</body>
+</html>
+END
+
+render["document"] = tag
+
+File.open( File.join( base_dir, "xhtml", "#{standard_name}.render" ), "w" ) {|f| YAML.dump( render, f ) }
+
+File.open( File.join( base_dir, "xhtml", "files", "css", "#{standard_name}.css" ), "w" ) do |f|
+ css.each do |key, values|
+ if key == code_name
+ f.puts "#{code_name} {"
+ #puts @style
+ else
+ f.puts "#{code_name} #{key} {"
+ end
+ values.each do |style, value|
+ f.puts " #{style}: #{value};" if value
+ end
+ f.puts "}"
+ end
+end
140 bin/uv
@@ -0,0 +1,140 @@
+#!/usr/bin/env ruby
+
+begin
+ require 'rubygems'
+ require 'uv'
+rescue LoadError
+ $:.unshift File.join( File.dirname(__FILE__), '..', 'lib' )
+ require 'uv'
+end
+
+require 'optparse'
+require 'ostruct'
+
+o = OpenStruct.new
+o.copy_files = false
+o.output = "xhtml"
+o.headers = false
+o.theme = "espresso_libre"
+o.lines = true
+
+options = OptionParser.new
+
+options.banner =<<END
+
+Usage: uv [options] input_file
+
+Parses input_file (or stdin, if no input_file is given) and
+outputs the coresponding HTML to stdout. If no syntax is specified,
+it tries to guess the best one. If no theme is specified, defaults
+to espresso_libre.
+
+Example:
+
+ uv -t amy -h ~/.bashrc > bashrc.html
+
+ Renders the contents of ~/.bashrc to file bashrc.html
+ as a standalone web page.
+
+All options are non-mandatory
+
+Options:
+
+END
+
+options.on( "-c DIR", "--copy-files DIR", <<DESCRIPTION ) {|val| o.copy_files = val}
+Copy the required files to the specified output directory (css, images, etc).
+DESCRIPTION
+
+options.on( "-s SYNTAX", "--syntax SYNTAX", <<DESCRIPTION, Uv.syntaxes) {|val| o.syntax = val}
+The file's syntax (e.g. ruby, c++, etc.)
+DESCRIPTION
+
+options.on( "-o OUTPUT", "--output OUTPUT", <<DESCRIPTION) {|val| o.output = val}
+The output format (xhtml, latex, etc.) default to xhtml
+DESCRIPTION
+
+options.on( "-t THEME", "--theme THEME", <<DESCRIPTION, Uv.themes) {|val| o.theme = val}
+The theme to be used (e.g. amy, espresso_libre, etc.)
+DESCRIPTION
+
+options.on( "-n", "--no-lines", <<DESCRIPTION ) {|val| o.lines = false}
+Produces output without line numbers
+DESCRIPTION
+
+
+options.on( "-h", "--headers", <<DESCRIPTION ) {|val| o.headers = val}
+Include headers, outputs a self-contained web page/document
+DESCRIPTION
+
+options.on( "-d", "--debug", <<DESCRIPTION ) {|val| o.debug = val}
+Outputs debug information instead of normal page rendering
+DESCRIPTION
+
+options.on( "-l [syntaxes|themes]", "--list [syntaxes|themes]", ['syntaxes', 'themes'], <<DESCRIPTION ) {|val| o.list = val}
+Lists all the available syntaxes/themes
+DESCRIPTION
+
+
+options.on( "-?", "--help", <<DESCRIPTION ) {|val| o.help = val}
+Show this message
+DESCRIPTION
+
+rest = options.parse( ARGV )
+
+
+if o.help
+ puts options
+ exit
+elsif o.list
+ if o.list == 'syntaxes'
+ puts "Available syntaxes:\n"
+ Uv.syntaxes.sort.each{ |s| puts " - #{s}"}
+ elsif o.list == 'themes'
+ puts "Available themes:\n"
+ Uv.themes.sort.each{ |t| puts " - #{t}"}
+ else
+ STDERR.puts "Option #{o.list} is not valid should be one of [syntaxes, themes]"
+ end
+ exit
+end
+
+if o.copy_files
+ unless File.exists?(o.copy_files)
+ STDERR.puts "The specified output directory: #{o.copy_files} does not exist."
+ exit -1
+ end
+ Uv.copy_files o.output, o.copy_files
+end
+
+o.filename = rest[0]
+
+if o.filename && ! o.syntax
+ candidates = Uv.syntax_for_file o.filename
+ if candidates.size > 1
+ STDERR.puts "Many syntaxes match, please specify"
+ STDERR.puts "\nMatching syntaxes:"
+ candidates.sort.each { |name, syntax| STDERR.puts "\t - " + name}
+ exit -1
+ end
+ o.syntax = candidates.first.first unless candidates.size == 0
+end
+
+unless o.syntax
+ STDERR.puts "No default syntax found, please specify"
+ exit -1
+end
+
+if o.filename
+ o.text = File.read(o.filename)
+else
+ o.text = STDIN
+end
+
+if o.debug
+ Uv.debug( o.text, o.syntax )
+ exit
+end
+
+puts Uv.parse( o.text, o.output, o.syntax, o.lines, o.theme, o.headers )
+
109 broken_syntax/c++.syntax
@@ -0,0 +1,109 @@
+---
+name: C++
+fileTypes:
+- cc
+- cpp
+- cp
+- cxx
+- c++
+- C
+- h
+- hh
+- hpp
+- h++
+firstLineMatch: -\*- C\+\+ -\*-
+scopeName: source.c++
+uuid: 26251B18-6B1D-11D9-AFDB-000D93589AF6
+foldingStartMarker: "(?x)\n\
+ \t\t /\\*\\*(?!\\*)\n\
+ \t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\
+ \t"
+patterns:
+- include: source.c
+- name: storage.modifier.c++
+ match: \b(friend|explicit|private|protected|public|virtual)\b
+- name: keyword.control.c++
+ match: \b(catch|namespace|operator|try|throw|using)\b
+- name: keyword.control.c++
+ match: \bdelete\b(\s*\[\])?|\bnew\b(?!])
+- name: variable.other.readwrite.member.c++
+ match: \b(f|m)[A-Z]\w*\b
+ comment: common C++ instance var naming idiom -- fMemberName
+- name: variable.language.c++
+ match: \b(this)\b
+- name: storage.type.template.c++
+ match: \btemplate\b\s*
+- name: keyword.operator.cast.c++
+ match: \b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\b\s*
+- name: keyword.operator.c++
+ match: \b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b
+- name: storage.type.c++
+ match: \b(class|wchar_t)\b
+- name: storage.modifier.c++
+ match: \b(export|mutable|typename)\b
+- name: meta.function.destructor.c++
+ endCaptures:
+ "0":
+ name: punctuation.definition.parameters.c
+ begin: "(?x)\n\
+ \t\t\t\t(?: ^ # begin-of-line\n\
+ \t\t\t\t | (?: (?<!else|new|=) ) # or word + space before name\n\
+ \t\t\t\t)\n\
+ \t\t\t\t((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\
+ \t\t\t\t \\s*(\\() (?=[^)]*\\) # match \"(\" and use look-ahead for \")\"\n\
+ \t\t\t\t (\\s*=\\s*0)?\\s* # optional pure modifier\n\
+ \t\t\t\t (\\{|\\n)) # start bracket or end-of-line\n\
+ \t\t\t"
+ beginCaptures:
+ "1":
+ name: entity.name.function.c
+ "2":
+ name: punctuation.definition.parameters.c
+ end: \)
+ patterns:
+ - include: $base
+- name: meta.function.destructor.prototype.c++
+ endCaptures:
+ "0":
+ name: punctuation.definition.parameters.c
+ begin: "(?x)\n\
+ \t\t\t\t(?: ^ # begin-of-line\n\
+ \t\t\t\t | (?: (?<!else|new|=) ) # or word + space before name\n\
+ \t\t\t\t)\n\
+ \t\t\t\t((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name\n\
+ \t\t\t\t \\s*(\\() (?=[^)]*\\) # match \"(\" and use look-ahead for \")\"\n\
+ \t\t\t\t (\\s*=\\s*0)?\\s* # optional pure modifier\n\
+ \t\t\t\t ;) # terminating semi-colon\n\
+ \t\t\t"
+ beginCaptures:
+ "1":
+ name: entity.name.function.c
+ "2":
+ name: punctuation.definition.parameters.c
+ end: \)
+ patterns:
+ - include: $base
+- name: meta.function.constructor.c++
+ endCaptures:
+ "0":
+ name: punctuation.definition.parameters.c
+ begin: "(?x)\n\
+ \t\t\t\t(?: ^\\s*) # begin-of-line\n\
+ \t\t\t\t((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name\n\
+ \t\t\t\t \\s*(\\() (?= # match \"(\"\n\
+ \t\t\t\t (?<arg> [^()]++ | \\( \\g<arg>*+ \\) )*+ # function arguments\n\
+ \t\t\t\t \\) # match \")\"\n\
+ \t\t\t\t (\\s* : (?<base> \\s* [A-Za-z_][A-Za-z0-9_]* \\( \\g<arg>*+ \\) ) (, \\g<base>)* (, (?=\\s*\\n))? )? \\s* # optional base constructors\n\
+ \t\t\t\t (\\{|\\n)) # start bracket or end-of-line\n\
+ \t\t\t"
+ beginCaptures:
+ "1":
+ name: entity.name.function.c
+ "2":
+ name: punctuation.definition.parameters.c
+ end: \)
+ patterns:
+ - include: $base
+foldingStopMarker: (?<!\*)\*\*/|^\s*\}
+keyEquivalent: ^~C
+comment: I don't think anyone uses .hp. .cp tends to be paired with .h. (I could be wrong. :) -- chris
326 broken_syntax/c.syntax
@@ -0,0 +1,326 @@
+---
+name: C
+fileTypes:
+- c
+- h
+firstLineMatch: -[*]-( Mode:)? C -[*]-
+scopeName: source.c
+repository:
+ pragma-mark:
+ name: meta.section
+ captures:
+ "1":
+ name: meta.preprocessor.c
+ "2":
+ name: keyword.control.import.pragma.c
+ "3":
+ name: meta.toc-list.pragma-mark.c
+ match: ^\s*(#\s*(pragma\s+mark)\s+(.*))
+ preprocessor-rule-enabled:
+ captures:
+ "1":
+ name: meta.preprocessor.c
+ "2":
+ name: keyword.control.import.if.c
+ "3":
+ name: constant.numeric.preprocessor.c
+ begin: ^\s*(#(if)\s+(0*1)\b)
+ end: ^\s*(#\s*(endif)\b)
+ patterns:
+ - captures:
+ "1":
+ name: meta.preprocessor.c
+ "2":
+ name: keyword.control.import.else.c
+ begin: |
+ ^\s*(#\s*(else)\b).*
+
+ contentName: comment.block.preprocessor.else-branch
+ end: (?=^\s*#\s*endif\b.*$)
+ patterns:
+ - include: "#disabled"
+ - include: "#pragma-mark"
+ - begin: ""
+ end: (?=^\s*#\s*(else|endif)\b.*$)
+ patterns:
+ - include: $base
+ string_escaped_char:
+ patterns:
+ - name: constant.character.escape.c
+ match: \\(\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})
+ - name: invalid.illegal.unknown-escape.c
+ match: \\.
+ disabled:
+ begin: ^\s*#\s*if(n?def)?\b.*$
+ end: ^\s*#\s*endif\b.*$
+ patterns:
+ - include: "#disabled"
+ - include: "#pragma-mark"
+ comment: eat nested preprocessor if(def)s
+ preprocessor-rule-other:
+ captures:
+ "1":
+ name: meta.preprocessor.c
+ "2":
+ name: keyword.control.import.c
+ begin: ^\s*(#\s*(if(n?def)?)\b.*?(?:(?=(?://|/\*))|$))
+ end: ^\s*(#\s*(endif)\b).*$
+ patterns:
+ - include: $base
+ preprocessor-rule-disabled:
+ captures:
+ "1":
+ name: meta.preprocessor.c
+ "2":
+ name: keyword.control.import.if.c
+ "3":
+ name: constant.numeric.preprocessor.c
+ begin: |
+ ^\s*(#(if)\s+(0)\b).*
+
+ end: ^\s*(#\s*(endif)\b)
+ patterns:
+ - captures:
+ "1":
+ name: meta.preprocessor.c
+ "2":
+ name: keyword.control.import.else.c
+ begin: ^\s*(#\s*(else)\b)
+ end: (?=^\s*#\s*endif\b.*$)
+ patterns:
+ - include: $base
+ - name: comment.block.preprocessor.if-branch
+ begin: ""
+ end: (?=^\s*#\s*(else|endif)\b.*$)
+ patterns:
+ - include: "#disabled"
+ - include: "#pragma-mark"
+ string_placeholder:
+ patterns:
+ - name: constant.other.placeholder.c
+ match: "(?x)%\n\
+ \t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\
+ \t\t\t\t\t\t[#0\\- +']* # flags\n\
+ \t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\
+ \t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\
+ \t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\
+ \t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n\
+ \t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n\
+ \t\t\t\t\t"
+ - name: invalid.illegal.placeholder.c
+ match: "%"
+uuid: 25066DC2-6B1D-11D9-9D5B-000D93589AF6
+foldingStartMarker: "(?x)\n\
+ \t\t /\\*\\*(?!\\*)\n\
+ \t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\
+ \t"
+patterns:
+- include: "#preprocessor-rule-enabled"
+- include: "#preprocessor-rule-disabled"
+- include: "#preprocessor-rule-other"
+- name: comment.block.c
+ captures:
+ "0":
+ name: punctuation.definition.comment.c
+ begin: /\*
+ end: \*/
+- name: comment.line.double-slash.c++
+ begin: //
+ beginCaptures:
+ "0":
+ name: punctuation.definition.comment.c
+ end: $\n?
+ patterns:
+ - name: punctuation.separator.continuation.c++
+ match: (?>\\\s*\n)
+- name: keyword.control.c
+ match: \b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\b
+- name: storage.type.c
+ match: \b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\b
+- name: storage.modifier.c
+ match: \b(const|extern|register|restrict|static|volatile|inline)\b
+- name: constant.other.variable.mac-classic.c
+ match: \bk[A-Z]\w*\b
+ comment: common C constant naming idiom -- kConstantVariable
+- name: variable.other.readwrite.global.mac-classic.c
+ match: \bg[A-Z]\w*\b
+- name: variable.other.readwrite.static.mac-classic.c
+ match: \bs[A-Z]\w*\b
+- name: constant.language.c
+ match: \b(NULL|true|false|TRUE|FALSE)\b
+- name: keyword.operator.sizeof.c
+ match: \b(sizeof)\b
+- name: constant.numeric.c
+ match: \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b
+- name: string.quoted.double.c
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.c
+ begin: "\""
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.c
+ end: "\""
+ patterns:
+ - include: "#string_escaped_char"
+ - include: "#string_placeholder"
+- name: string.quoted.single.c
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.c
+ begin: "'"
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.c
+ end: "'"
+ patterns:
+ - include: "#string_escaped_char"
+- name: meta.preprocessor.macro.c
+ begin: "(?x)\n\
+ \t\t\t\t^\\s*\\#\\s*(define)\\s+ # define\n\
+ \t\t\t\t((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n\
+ \t\t\t\t(?: # and optionally:\n\
+ \t\t\t\t (\\() # an open parenthesis\n\
+ \t\t\t\t (\n\
+ \t\t\t\t \\s* \\g<id> \\s* # first argument\n\
+ \t\t\t\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n\
+ \t\t\t\t (?:\\.\\.\\.)? # varargs ellipsis?\n\
+ \t\t\t\t )\n\
+ \t\t\t\t (\\)) # a close parenthesis\n\
+ \t\t\t\t)?\n\
+ \t\t\t"
+ beginCaptures:
+ "7":
+ name: punctuation.separator.parameters.c
+ "8":
+ name: punctuation.definition.parameters.c
+ "1":
+ name: keyword.control.import.define.c
+ "2":
+ name: entity.name.function.preprocessor.c
+ "4":
+ name: punctuation.definition.parameters.c
+ "5":
+ name: variable.parameter.preprocessor.c
+ end: (?=(?://|/\*))|$
+ patterns:
+ - name: punctuation.separator.continuation.c
+ match: (?>\\\s*\n)
+ - include: $base
+- name: meta.preprocessor.diagnostic.c
+ captures:
+ "1":
+ name: keyword.control.import.error.c
+ begin: ^\s*#\s*(error|warning)\b
+ end: $
+ patterns:
+ - name: punctuation.separator.continuation.c
+ match: (?>\\\s*\n)
+- name: meta.preprocessor.c.include
+ captures:
+ "1":
+ name: keyword.control.import.include.c
+ begin: ^\s*#\s*(include|import)\b\s+
+ end: (?=(?://|/\*))|$
+ patterns:
+ - name: punctuation.separator.continuation.c
+ match: (?>\\\s*\n)
+ - name: string.quoted.double.include.c
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.c
+ begin: "\""
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.c
+ end: "\""
+ - name: string.quoted.other.lt-gt.include.c
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.c
+ begin: <
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.c
+ end: ">"
+- include: "#pragma-mark"
+- name: meta.preprocessor.c
+ captures:
+ "1":
+ name: keyword.control.import.c
+ begin: ^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\b
+ end: (?=(?://|/\*))|$
+ patterns:
+ - name: punctuation.separator.continuation.c
+ match: (?>\\\s*\n)
+- name: support.type.sys-types.c
+ match: \b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\b
+- name: support.type.pthread.c
+ match: \b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\b
+- name: support.type.stdint.c
+ match: \b(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\b
+- name: support.constant.mac-classic.c
+ match: \b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\b
+- name: support.type.mac-classic.c
+ match: \b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\b
+- name: support.function.C99.c
+ match: \b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\b
+- name: meta.function.c
+ endCaptures:
+ "0":
+ name: punctuation.definition.parameters.c
+ begin: "(?x)\n\
+ \t\t\t\t(?: ^ # begin-of-line\n\
+ \t\t\t\t | \n\
+ \t\t\t\t (?: (?= \\s ) (?<!else|new) (?<=\\w)\\s+ # or word + space before name\n\
+ \t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>])\\s* # or type modifier before name\n\
+ \t\t\t\t )\n\
+ \t\t\t\t)\n\
+ \t\t\t\t(\n\
+ \t\t\t\t\t([A-Za-z_][A-Za-z0-9_]|::)* # actual name\n\
+ \t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\
+ \t\t\t\t)\n\
+ \t\t\t\t \\s*(\\() (?= # match \"(\"\n\
+ \t\t\t\t (?<fun> [^()]++ | \\( \\g<fun>*+ \\) )*+ # function arguments\n\
+ \t\t\t\t \\) \t\t # match \")\"\n\
+ \t\t\t\t (\\s+const)?\\s* # optional const modifier\n\
+ \t\t\t\t (\\{|\\n|//|/\\*)) # start bracket or end-of-line\n\
+ \t\t\t"
+ beginCaptures:
+ "1":
+ name: entity.name.function.c
+ "2":
+ name: punctuation.definition.parameters.c
+ end: \)
+ patterns:
+ - include: $base
+- name: meta.function.prototype.c
+ endCaptures:
+ "0":
+ name: punctuation.definition.parameters.c
+ begin: "(?x)\n\
+ \t\t\t\t(?: ^ # begin-of-line\n\
+ \t\t\t\t | (?: (?= \\s ) (?<!else|new|return) (?<=\\w)\\s+ # or word + space before name\n\
+ \t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&])\\s* # or type modifier before name\n\
+ \t\t\t\t )\n\
+ \t\t\t\t)\n\
+ \t\t\t\t(\n\
+ \t\t\t\t\t[A-Za-z_][A-Za-z0-9_:]* # actual name\n\
+ \t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\
+ \t\t\t\t)\n\
+ \t\t\t\t \\s+(\\() (?= # match \"(\"\n\
+ \t\t\t\t (?<fun> [^()]++ | \\( \\g<fun>*+ \\) )*+ # function arguments\n\
+ \t\t\t\t \\) # match \")\"\n\
+ \t\t\t\t (\\s+const)?\\s* # optional const modifier\n\
+ \t\t\t\t ;) # terminating semi-colon\n\
+ \t\t\t"
+ beginCaptures:
+ "1":
+ name: entity.name.function.c
+ "2":
+ name: punctuation.definition.parameters.c
+ end: \)
+ patterns:
+ - include: $base
+foldingStopMarker: (?<!\*)\*\*/|^\s*\}
+keyEquivalent: ^~C
118 broken_syntax/mail.syntax
@@ -0,0 +1,118 @@
+---
+name: Mail
+fileTypes:
+- mail
+firstLineMatch: "^From: .*(?=\\w+@[\\w-]+\\.\\w+)"
+scopeName: text.mail.markdown
+repository:
+ reference:
+ name: constant.other.reference.mail
+ captures:
+ "0":
+ name: punctuation.definition.constant.mail
+ begin: <
+ end: ">"
+ patterns:
+ - include: "#string"
+ - include: "#comment"
+ - include: "#domain_literal"
+ - include: "#atom"
+ encoded_text:
+ name: meta.encoded-text.mail
+ captures:
+ "1":
+ name: constant.other.charset.mail
+ "2":
+ name: constant.other.encoding.mail
+ match: =\?(.*?)(?:\*[^?]+)?\?([QB])\?(.*?)\?=
+ any:
+ patterns:
+ - include: "#group"
+ - include: "#reference"
+ - include: "#string"
+ - include: "#comment"
+ - include: "#domain_literal"
+ - include: "#atom"
+ domain_literal:
+ name: meta.domain-literal.mail
+ begin: \[
+ end: \]
+ patterns:
+ - include: "#quote_pair"
+ - include: "#group"
+ - include: "#reference"
+ - include: "#string"
+ - include: "#comment"
+ - include: "#atom"
+ quote_pair:
+ name: constant.other.escape.mail
+ match: \\.
+ group:
+ name: meta.group.mail
+ begin: ":(?=.*;)"
+ end: ;
+ patterns:
+ - include: "#reference"
+ - include: "#string"
+ - include: "#comment"
+ - include: "#domain_literal"
+ - include: "#atom"
+ comment: "this is to group addresses, RFC822 says that these \xE2\x80\x9Cmust occur in matched pairs,\xE2\x80\x9D but e.g. the date header uses : as a time separator."
+ comment:
+ name: comment.line.parentheses.mail
+ captures:
+ "0":
+ name: punctuation.definition.comment.mail
+ begin: \(
+ end: \)
+ patterns:
+ - include: "#quote_pair"
+ - include: "#comment"
+ string:
+ name: string.quoted.double.mail
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.mail
+ begin: "\""
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.mail
+ end: "\""
+ patterns:
+ - include: "#quote_pair"
+ - include: "#encoded_text"
+ atom:
+ name: string.unquoted.atom.mail
+ match: "[^ \\t\\v\\n()<>@,;:\\\\\".\\[\\]]+"
+uuid: 15615A0C-37B0-4B3F-9105-53ED536AFBB4
+patterns:
+- name: meta.header.mail
+ begin: ((?i:subject))(:)\s*
+ contentName: entity.name.section.mail
+ beginCaptures:
+ "1":
+ name: keyword.other.mail
+ "2":
+ name: punctuation.separator.key-value.mail
+ end: ^(?![ \t\v])
+- name: meta.header.mail
+ begin: ([\x{21}-\x{39}\x{3B}-\x{7E}]+)(:)\s*
+ beginCaptures:
+ "1":
+ name: keyword.other.mail
+ "2":
+ name: punctuation.separator.key-value.mail
+ end: ^(?![ \t\v])
+ patterns:
+ - include: "#string"
+ - include: "#comment"
+ - include: "#reference"
+ - include: "#atom"
+- name: text.html.markdown
+ begin: ^(?![A-Za-z0-9]+:)
+ end: ^(?=not)possible$
+ patterns:
+ - name: meta.separator.signature.mail
+ match: ^-- $\n
+ - include: text.html.markdown
+keyEquivalent: ^~M
543 broken_syntax/markdown.syntax
@@ -0,0 +1,543 @@
+---
+name: Markdown
+fileTypes:
+- markdown
+- mdown
+- markdn
+- md
+scopeName: text.html.markdown
+repository:
+ image-inline:
+ name: meta.image.inline.markdown
+ captures:
+ "6":
+ name: punctuation.definition.metadata.markdown
+ "11":
+ name: punctuation.definition.string.markdown
+ "7":
+ name: punctuation.definition.link.markdown
+ "12":
+ name: punctuation.definition.string.markdown
+ "8":
+ name: markup.underline.link.image.markdown
+ "13":
+ name: string.other.link.description.title.markdown
+ "9":
+ name: punctuation.definition.link.markdown
+ "14":
+ name: punctuation.definition.string.markdown
+ "15":
+ name: punctuation.definition.string.markdown
+ "16":
+ name: punctuation.definition.metadata.markdown
+ "1":
+ name: punctuation.definition.string.begin.markdown
+ "2":
+ name: string.other.link.description.markdown
+ "3":
+ name: punctuation.definition.string.end.markdown
+ "10":
+ name: string.other.link.description.title.markdown
+ "5":
+ name: invalid.illegal.whitespace.markdown
+ match: "(?x:\n\
+ \t\t\t\t\\!\t\t\t\t\t\t\t# Images start with !\n\
+ \t\t\t\t(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\t\n\
+ \t\t\t\t\t\t\t\t\t\t\t# Match the link text.\n\
+ \t\t\t\t([ ])?\t\t\t\t\t\t# Space not allowed\n\
+ \t\t\t\t(\\()\t\t\t\t\t\t# Opening paren for url\n\
+ \t\t\t\t\t(<?)(\\S+?)(>?)\t\t\t# The url\n\
+ \t\t\t\t\t[ \\t]*\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t\t(?:\n\
+ \t\t\t\t\t\t ((\\().+?(\\)))\t\t# Match title in parens\xE2\x80\xA6\n\
+ \t\t\t\t\t\t| ((\").+?(\"))\t\t# or in quotes.\n\
+ \t\t\t\t\t)?\t\t\t\t\t\t# Title is optional\n\
+ \t\t\t\t\t\\s*\t\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t(\\))\n\
+ \t\t\t )"
+ image-ref:
+ name: meta.image.reference.markdown
+ captures:
+ "6":
+ name: constant.other.reference.link.markdown
+ "7":
+ name: punctuation.definition.constant.markdown
+ "1":
+ name: punctuation.definition.string.begin.markdown
+ "2":
+ name: string.other.link.description.markdown
+ "4":
+ name: punctuation.definition.string.begin.markdown
+ "5":
+ name: punctuation.definition.constant.markdown
+ match: \!(\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(.*?)(\])
+ escape:
+ name: constant.character.escape.markdown
+ match: \\[-`*_#+.!(){}\[\]\\>]
+ bracket:
+ name: meta.other.valid-bracket.markdown
+ match: <(?![a-z/?\$!])
+ comment: "\n\
+ \t\t\t\tMarkdown will convert this for us. We match it so that the\n\
+ \t\t\t\tHTML grammar will not mark it up as invalid.\n\
+ \t\t\t"
+ list-paragraph:
+ patterns:
+ - name: meta.paragraph.list.markdown
+ begin: \G\s+(?=\S)
+ end: ^\s*$
+ patterns:
+ - include: "#inline"
+ link-ref-literal:
+ name: meta.link.reference.literal.markdown
+ captures:
+ "6":
+ name: punctuation.definition.constant.end.markdown
+ "1":
+ name: punctuation.definition.string.begin.markdown
+ "2":
+ name: string.other.link.title.markdown
+ "4":
+ name: punctuation.definition.string.end.markdown
+ "5":
+ name: punctuation.definition.constant.begin.markdown
+ match: (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(\])
+ link-email:
+ name: meta.link.email.lt-gt.markdown
+ captures:
+ "1":
+ name: punctuation.definition.link.markdown
+ "2":
+ name: markup.underline.link.markdown
+ "4":
+ name: punctuation.definition.link.markdown
+ match: (<)((?:mailto:)?[-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(>)
+ inline:
+ patterns:
+ - include: "#escape"
+ - include: "#ampersand"
+ - include: "#bracket"
+ - include: "#raw"
+ - include: "#bold"
+ - include: "#italic"
+ - include: "#line-break"
+ - include: "#image-inline"
+ - include: "#link-inline"
+ - include: "#link-inet"
+ - include: "#link-email"
+ - include: "#image-ref"
+ - include: "#link-ref-literal"
+ - include: "#link-ref"
+ block_quote:
+ name: markup.quote.markdown
+ begin: \G[ ]{,3}(>)(?!$)[ ]?
+ beginCaptures:
+ "1":
+ name: punctuation.definition.blockquote.markdown
+ end: |-
+ (?x)^
+ (?= \s*$
+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\g<marker>){2,}[ \t]*+$
+ | [ ]{,3}>.
+ )
+ patterns:
+ - begin: |-
+ (?x)\G
+ (?= [ ]{,3}>.
+ )
+ end: ^
+ patterns:
+ - include: "#block_quote"
+ - begin: |-
+ (?x)\G
+ (?= ([ ]{4}|\t)
+ | [#]{1,6}\s*+
+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\g<marker>){2,}[ \t]*+$
+ )
+ applyEndPatternLast: 1
+ end: ^
+ patterns:
+ - include: "#block_raw"
+ - include: "#heading"
+ - include: "#separator"
+ - begin: |-
+ (?x)\G
+ (?! $
+ | [ ]{,3}>.
+ | ([ ]{4}|\t)
+ | [#]{1,6}\s*+
+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\g<marker>){2,}[ \t]*+$
+ )
+ end: $|(?<=\n)
+ patterns:
+ - include: "#inline"
+ comment: "\n\
+ \t\t\t\tWe terminate the block quote when seeing an empty line, a\n\
+ \t\t\t\tseparator or a line with leading > characters. The latter is\n\
+ \t\t\t\tto \xE2\x80\x9Creset\xE2\x80\x9D the quote level for quoted lines.\n\
+ \t\t\t"
+ link-ref:
+ name: meta.link.reference.markdown
+ captures:
+ "6":
+ name: constant.other.reference.link.markdown
+ "7":
+ name: punctuation.definition.constant.end.markdown
+ "1":
+ name: punctuation.definition.string.begin.markdown
+ "2":
+ name: string.other.link.title.markdown
+ "4":
+ name: punctuation.definition.string.end.markdown
+ "5":
+ name: punctuation.definition.constant.begin.markdown
+ match: (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)([^\]]*+)(\])
+ block_raw:
+ name: markup.raw.block.markdown
+ match: \G([ ]{4}|\t).*$\n?
+ separator:
+ name: meta.separator.markdown
+ match: \G[ ]{,3}([-*_])([ ]{,2}\1){2,}[ \t]*$\n?
+ link-inline:
+ name: meta.link.inline.markdown
+ captures:
+ "6":
+ name: punctuation.definition.metadata.markdown
+ "11":
+ name: punctuation.definition.string.begin.markdown
+ "7":
+ name: punctuation.definition.link.markdown
+ "12":
+ name: punctuation.definition.string.end.markdown
+ "8":
+ name: markup.underline.link.markdown
+ "13":
+ name: string.other.link.description.title.markdown
+ "9":
+ name: punctuation.definition.link.markdown
+ "14":
+ name: punctuation.definition.string.begin.markdown
+ "15":
+ name: punctuation.definition.string.end.markdown
+ "16":
+ name: punctuation.definition.metadata.markdown
+ "1":
+ name: punctuation.definition.string.begin.markdown
+ "2":
+ name: string.other.link.title.markdown
+ "4":
+ name: punctuation.definition.string.end.markdown
+ "10":
+ name: string.other.link.description.title.markdown
+ "5":
+ name: invalid.illegal.whitespace.markdown
+ match: "(?x:\n\
+ \t\t\t\t(\\[)((?<square>[^\\[\\]\\\\]|\\\\.|\\[\\g<square>*+\\])*+)(\\])\t\n\
+ \t\t\t\t\t\t\t\t\t\t\t# Match the link text.\n\
+ \t\t\t\t([ ])?\t\t\t\t\t\t# Space not allowed\n\
+ \t\t\t\t(\\()\t\t\t\t\t\t# Opening paren for url\n\
+ \t\t\t\t\t(<?)(.*?)(>?)\t\t\t# The url\n\
+ \t\t\t\t\t[ \\t]*\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t\t(?:\n\
+ \t\t\t\t\t\t ((\\().+?(\\)))\t\t# Match title in parens\xE2\x80\xA6\n\
+ \t\t\t\t\t\t| ((\").+?(\"))\t\t# or in quotes.\n\
+ \t\t\t\t\t)?\t\t\t\t\t\t# Title is optional\n\
+ \t\t\t\t\t\\s*\t\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t(\\))\n\
+ \t\t\t )"
+ bold:
+ name: markup.bold.markdown
+ captures:
+ "1":
+ name: punctuation.definition.bold.markdown
+ begin: "(?x)\n\
+ \t\t\t\t\t\t(\\*\\*|__)(?=\\S)\t\t\t\t\t\t\t\t# Open\n\
+ \t\t\t\t\t\t(?=\n\
+ \t\t\t\t\t\t\t(\n\
+ \t\t\t\t\t\t\t <[^>]*+>\t\t\t\t\t\t\t# HTML tags\n\
+ \t\t\t\t\t\t\t | (?<raw>`+)([^`]|(?!(?<!`)\\g<raw>(?!`))`)*+\\g<raw>\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# Raw\n\
+ \t\t\t\t\t\t\t | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+\t\t\t# Escapes\n\
+ \t\t\t\t\t\t\t | \\[\n\
+ \t\t\t\t\t\t\t\t(\t\t\t\t\n\
+ \t\t\t\t\t\t\t\t (?<square>\t\t\t\t\t# Named group\n\
+ \t\t\t\t\t\t\t\t\t\t\t[^\\[\\]\\\\]\t\t\t\t# Match most chars\n\
+ \t\t\t\t\t\t\t\t | \\\\.\t\t\t\t\t\t# Escaped chars\n\
+ \t\t\t\t\t\t\t\t | \\[ \\g<square>*+ \\]\t\t# Nested brackets\n\
+ \t\t\t\t\t\t\t\t )*+\n\
+ \t\t\t\t\t\t\t\t\t\\]\n\
+ \t\t\t\t\t\t\t\t\t(\n\
+ \t\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t# Reference Link\n\
+ \t\t\t\t\t\t\t\t\t\t\t[ ]?\t\t\t\t\t# Optional space\n\
+ \t\t\t\t\t\t\t\t\t\t\t\\[[^\\]]*+\\]\t\t\t\t# Ref name\n\
+ \t\t\t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t\t\t | (\t\t\t\t\t\t\t# Inline Link\n\
+ \t\t\t\t\t\t\t\t\t\t\t\\(\t\t\t\t\t\t# Opening paren\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t[ \\t]*+\t\t\t\t# Optional whtiespace\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t<?(.*?)>?\t\t\t# URL\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t[ \\t]*+\t\t\t\t# Optional whtiespace\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t(\t\t\t\t\t# Optional Title\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t(?<title>['\"])\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t(.*?)\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t\\g<title>\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t)?\n\
+ \t\t\t\t\t\t\t\t\t\t\t\\)\n\
+ \t\t\t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t | (?!(?<=\\S)\\1).\t\t\t\t\t\t# Everything besides\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# style closer\n\
+ \t\t\t\t\t\t\t)++\n\
+ \t\t\t\t\t\t\t(?<=\\S)\\1\t\t\t\t\t\t\t\t# Close\n\
+ \t\t\t\t\t\t)\n\
+ \t\t\t\t\t"
+ end: (?<=\S)(\1)
+ patterns:
+ - begin: (?=<[^>]*?>)
+ applyEndPatternLast: 1
+ end: (?<=>)
+ patterns:
+ - include: text.html.basic
+ - include: "#escape"
+ - include: "#ampersand"
+ - include: "#bracket"
+ - include: "#raw"
+ - include: "#italic"
+ - include: "#image-inline"
+ - include: "#link-inline"
+ - include: "#link-inet"
+ - include: "#link-email"
+ - include: "#image-ref"
+ - include: "#link-ref-literal"
+ - include: "#link-ref"
+ heading:
+ name: markup.heading.markdown
+ captures:
+ "1":
+ name: punctuation.definition.heading.markdown
+ begin: \G(#{1,6})(?!#)\s*(?=\S)
+ contentName: entity.name.section.markdown
+ end: \s*(#*)$\n?
+ patterns:
+ - include: "#inline"
+ link-inet:
+ name: meta.link.inet.markdown
+ captures:
+ "1":
+ name: punctuation.definition.link.markdown
+ "2":
+ name: markup.underline.link.markdown
+ "3":
+ name: punctuation.definition.link.markdown
+ match: (<)((?:https?|ftp)://.*?)(>)
+ raw:
+ name: markup.raw.inline.markdown
+ captures:
+ "1":
+ name: punctuation.definition.raw.markdown
+ "3":
+ name: punctuation.definition.raw.markdown
+ match: (`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1)
+ italic:
+ name: markup.italic.markdown
+ captures:
+ "1":
+ name: punctuation.definition.italic.markdown
+ begin: "(?x)\n\
+ \t\t\t\t\t\t(\\*|_)(?=\\S)\t\t\t\t\t\t\t\t# Open\n\
+ \t\t\t\t\t\t(?=\n\
+ \t\t\t\t\t\t\t(\n\
+ \t\t\t\t\t\t\t <[^>]*+>\t\t\t\t\t\t\t# HTML tags\n\
+ \t\t\t\t\t\t\t | (?<raw>`+)([^`]|(?!(?<!`)\\g<raw>(?!`))`)*+\\g<raw>\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# Raw\n\
+ \t\t\t\t\t\t\t | \\\\[\\\\`*_{}\\[\\]()#.!+\\->]?+\t\t\t# Escapes\n\
+ \t\t\t\t\t\t\t | \\[\n\
+ \t\t\t\t\t\t\t\t(\t\t\t\t\n\
+ \t\t\t\t\t\t\t\t (?<square>\t\t\t\t\t# Named group\n\
+ \t\t\t\t\t\t\t\t\t\t\t[^\\[\\]\\\\]\t\t\t\t# Match most chars\n\
+ \t\t\t\t\t\t\t\t | \\\\.\t\t\t\t\t\t# Escaped chars\n\
+ \t\t\t\t\t\t\t\t | \\[ \\g<square>*+ \\]\t\t# Nested brackets\n\
+ \t\t\t\t\t\t\t\t )*+\n\
+ \t\t\t\t\t\t\t\t\t\\]\n\
+ \t\t\t\t\t\t\t\t\t(\n\
+ \t\t\t\t\t\t\t\t\t\t(\t\t\t\t\t\t\t# Reference Link\n\
+ \t\t\t\t\t\t\t\t\t\t\t[ ]?\t\t\t\t\t# Optional space\n\
+ \t\t\t\t\t\t\t\t\t\t\t\\[[^\\]]*+\\]\t\t\t\t# Ref name\n\
+ \t\t\t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t\t\t | (\t\t\t\t\t\t\t# Inline Link\n\
+ \t\t\t\t\t\t\t\t\t\t\t\\(\t\t\t\t\t\t# Opening paren\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t[ \\t]*+\t\t\t\t# Optional whtiespace\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t<?(.*?)>?\t\t\t# URL\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t[ \\t]*+\t\t\t\t# Optional whtiespace\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t(\t\t\t\t\t# Optional Title\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t(?<title>['\"])\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t(.*?)\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t\\g<title>\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t)?\n\
+ \t\t\t\t\t\t\t\t\t\t\t\\)\n\
+ \t\t\t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t\t)\n\
+ \t\t\t\t\t\t\t | \\1\\1\t\t\t\t\t\t\t\t# Must be bold closer\n\
+ \t\t\t\t\t\t\t | (?!(?<=\\S)\\1).\t\t\t\t\t\t# Everything besides\n\
+ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# style closer\n\
+ \t\t\t\t\t\t\t)++\n\
+ \t\t\t\t\t\t\t(?<=\\S)\\1\t\t\t\t\t\t\t\t# Close\n\
+ \t\t\t\t\t\t)\n\
+ \t\t\t\t\t"
+ end: (?<=\S)(\1)((?!\1)|(?=\1\1))
+ patterns:
+ - begin: (?=<[^>]*?>)
+ applyEndPatternLast: 1
+ end: (?<=>)
+ patterns:
+ - include: text.html.basic
+ - include: "#escape"
+ - include: "#ampersand"
+ - include: "#bracket"
+ - include: "#raw"
+ - include: "#bold"
+ - include: "#image-inline"
+ - include: "#link-inline"
+ - include: "#link-inet"
+ - include: "#link-email"
+ - include: "#image-ref"
+ - include: "#link-ref-literal"
+ - include: "#link-ref"
+ line-break:
+ name: meta.dummy.line-break
+ match: " {2,}$"
+ ampersand:
+ name: meta.other.valid-ampersand.markdown
+ match: "&(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)"
+ comment: "\n\
+ \t\t\t\tMarkdown will convert this for us. We match it so that the\n\
+ \t\t\t\tHTML grammar will not mark it up as invalid.\n\
+ \t\t\t"
+uuid: 0A1D9874-B448-11D9-BD50-000D93B6E43C
+foldingStartMarker: |-
+ (?x)
+ (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?>
+ |<!--(?!.*-->)
+ |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
+ )
+patterns:
+- name: meta.block-level.markdown
+ begin: |-
+ (?x)^
+ (?= [ ]{,3}>.
+ | ([ ]{4}|\t)
+ | [#]{1,6}\s*+
+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\g<marker>){2,}[ \t]*+$
+ )
+ end: |-
+ (?x)^
+ (?! [ ]{,3}>.
+ | ([ ]{4}|\t)
+ | [#]{1,6}\s*+
+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\g<marker>){2,}[ \t]*+$
+ )
+ patterns:
+ - include: "#block_quote"
+ - include: "#block_raw"
+ - include: "#heading"
+ - include: "#separator"
+ comment: "\n\
+ \t\t\t\tWe could also use an empty end match and set\n\
+ \t\t\t\tapplyEndPatternLast, but then we must be sure that the begin\n\
+ \t\t\t\tpattern will only match stuff matched by the sub-patterns.\n\
+ \t\t\t"
+- name: markup.list.unnumbered
+ captures:
+ "1":
+ name: punctuation.definition.list_item.markdown
+ begin: ^[ ]{0,3}([*+-])(?=\s)
+ end: ^(?=\S)
+ patterns:
+ - include: "#list-paragraph"
+- name: markup.list.numbered
+ captures:
+ "1":
+ name: punctuation.definition.list_item.markdown
+ begin: ^[ ]{0,3}[0-9]+(\.)(?=\s)
+ end: ^(?=\S)
+ patterns:
+ - include: "#list-paragraph"
+- name: meta.disable-markdown
+ begin: ^(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b)(?!.*?</\1>)
+ end: (?<=^</\1>$\n)
+ patterns:
+ - include: text.html.basic
+ comment: "\n\
+ \t\t\t\tMarkdown formatting is disabled inside block-level tags.\n\
+ \t\t\t"
+- name: meta.disable-markdown
+ begin: ^(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b)
+ end: $\n?
+ patterns:
+ - include: text.html.basic
+ comment: Same rule but for one line disables.
+- name: meta.link.reference.def.markdown
+ captures:
+ "6":
+ name: markup.underline.link.markdown
+ "11":
+ name: string.other.link.description.title.markdown
+ "7":
+ name: punctuation.definition.link.markdown
+ "12":
+ name: punctuation.definition.string.begin.markdown
+ "8":
+ name: string.other.link.description.title.markdown
+ "13":
+ name: punctuation.definition.string.end.markdown
+ "9":
+ name: punctuation.definition.string.begin.markdown
+ "1":
+ name: punctuation.definition.constant.markdown
+ "2":
+ name: constant.other.reference.link.markdown
+ "3":
+ name: punctuation.definition.constant.markdown
+ "4":
+ name: punctuation.separator.key-value.markdown
+ "10":
+ name: punctuation.definition.string.end.markdown
+ "5":
+ name: punctuation.definition.link.markdown
+ match: "(?x:\n\
+ \t\t\t\t\\s*\t\t\t\t\t\t# Leading whitespace\n\
+ \t\t\t\t(\\[)(.+?)(\\])(:)\t\t# Reference name\n\
+ \t\t\t\t[ \\t]*\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t(<?)(\\S+?)(>?)\t\t\t# The url\n\
+ \t\t\t\t[ \\t]*\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t(?:\n\
+ \t\t\t\t\t ((\\().+?(\\)))\t\t# Match title in quotes\xE2\x80\xA6\n\
+ \t\t\t\t\t| ((\").+?(\"))\t\t# or in parens.\n\
+ \t\t\t\t)?\t\t\t\t\t\t# Title is optional\n\
+ \t\t\t\t\\s*\t\t\t\t\t\t# Optional whitespace\n\
+ \t\t\t\t$\n\
+ \t\t\t)"
+- name: meta.paragraph.markdown
+ begin: ^(?=\S)(?![=-]{3,}(?=$))
+ end: ^(?:\s*$|(?=[ ]{,3}>.))|(?=[ \t]*\n)(?<=^===|^====|=====|^---|^----|-----)[ \t]*\n
+ patterns:
+ - include: "#inline"
+ - include: text.html.basic
+ - name: markup.heading.1.markdown
+ captures:
+ "1":
+ name: punctuation.definition.heading.markdown
+ match: ^(={3,})(?=[ \t]*$)
+ - name: markup.heading.2.markdown
+ captures:
+ "1":
+ name: punctuation.definition.heading.markdown
+ match: ^(-{3,})(?=[ \t]*$)
+foldingStopMarker: |-
+ (?x)
+ (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>
+ |^\s*-->
+ |(^|\s)\}
+ )
+keyEquivalent: ^~M
92 broken_syntax/mel.syntax
@@ -0,0 +1,92 @@
+---
+name: MEL
+fileTypes:
+- as
+scopeName: source.mel
+uuid: 69554E52-391D-42BC-9F65-7A77444BA1CF
+foldingStartMarker: (/\*\*|\{\s*$)
+patterns:
+- name: storage.type.mel
+ match: \b(matrix|string|vector|float|int|void)\b
+- name: support.function.mel
+ match: \b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\b
+- name: support.constant.mel
+ match: \b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\b
+- name: keyword.control.mel
+ match: \b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\b
+- name: keyword.other.mel
+ match: \b(global)\b
+- name: constant.language.mel
+ match: \b(null|undefined)\b
+- name: constant.numeric.mel
+ match: \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\b
+- name: string.quoted.double.mel
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.mel
+ begin: "\""
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.mel
+ end: "\""
+ patterns:
+ - name: constant.character.escape.mel
+ match: \\.
+- name: variable.other.mel
+ captures:
+ "1":
+ name: punctuation.definition.variable.mel
+ match: (\$)[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*?\b
+- name: string.quoted.single.mel
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.mel
+ begin: "'"
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.mel
+ end: "'"
+ patterns:
+ - name: constant.character.escape.mel
+ match: \\.
+- name: constant.language.mel
+ match: \b(false|true|yes|no|on|off)\b
+- name: comment.block.mel
+ captures:
+ "0":
+ name: punctuation.definition.comment.mel
+ begin: /\*
+ end: \*/
+- name: comment.line.double-slash.mel
+ captures:
+ "1":
+ name: punctuation.definition.comment.mel
+ match: (//).*$\n?
+- name: keyword.operator.mel
+ match: \b(instanceof)\b
+- name: keyword.operator.symbolic.mel
+ match: "[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]"
+- name: meta.preprocessor.mel
+ captures:
+ "1":
+ name: punctuation.definition.preprocessor.mel
+ match: ^[ \t]*(#)[a-zA-Z]+
+- name: meta.function.mel
+ endCaptures:
+ "0":
+ name: punctuation.section.function.mel
+ begin: ((?:global\s*)?proc)\s*(\w+\s*\[?\]?\s+|\s+)([A-Za-z_][A-Za-z0-9_]*)\s*(\()
+ beginCaptures:
+ "1":
+ name: keyword.other.mel
+ "2":
+ name: storage.type.mel
+ "3":
+ name: entity.name.function.mel
+ "4":
+ name: punctuation.section.function.mel
+ end: \)
+ patterns:
+ - include: $self
+foldingStopMarker: (\*\*/|^\s*\})
+keyEquivalent: ^~M
1,253 broken_syntax/php.syntax
@@ -0,0 +1,1253 @@
+---
+name: PHP
+firstLineMatch: ^#!.*php[0-9]{0,1}\b
+scopeName: source.php
+repository:
+ regex-single-quoted:
+ name: string.regexp.single-quoted.php
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.php
+ begin: (?x)'/ (?= (\\.|[^'/])++/[imsxeADSUXu]*' )
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.php
+ end: (/)([imsxeADSUXu]*)(')
+ patterns:
+ - name: string.regexp.arbitrary-repitition.php
+ captures:
+ "1":
+ name: punctuation.definition.arbitrary-repitition.php
+ "3":
+ name: punctuation.definition.arbitrary-repitition.php
+ match: (\{)\d+(,\d+)?(\})
+ - name: constant.character.escape.regex.php
+ match: (\\){1,2}[.$^\[\]{}]
+ comment: "Escaped from the regexp \xE2\x80\x93 there can also be 2 backslashes (since 1 will escape the first)"
+ - name: constant.character.escape.php
+ match: \\{1,2}[\\']
+ comment: "Escaped from the PHP string \xE2\x80\x93 there can also be 2 backslashes (since 1 will escape the first)"
+ - name: string.regexp.character-class.php
+ captures:
+ "0":
+ name: punctuation.definition.character-class.php
+ begin: \[(?:\^?\])?
+ end: \]
+ patterns:
+ - name: constant.character.escape.php
+ match: \\[\\'\[\]]
+ - name: keyword.operator.regexp.php
+ match: "[$^+*]"
+ variables:
+ patterns:
+ - include: "#var_global"
+ - include: "#var_global_safer"
+ - include: "#var_basic"
+ string-double-quoted:
+ name: string.quoted.double.php
+ endCaptures:
+ "0":
+ name: punctuation.definition.string.end.php
+ begin: "\""
+ contentName: meta.string-contents.quoted.double.php
+ beginCaptures:
+ "0":
+ name: punctuation.definition.string.begin.php
+ end: "\""
+ patterns:
+ - include: "#interpolation"
+ comment: "This contentName is just to allow the usage of \xE2\x80\x9Cselect scope\xE2\x80\x9D to select the string contents first, then the string with quotes"
+ language:
+ patterns:
+ - name: string.unquoted.heredoc.php
+ begin: (?=<<<\s*(HTML|XML|SQL)\s*$)
+ end: (?!<?<<\s*(HTML|XML|SQL)\s*$)
+ patterns:
+ - name: meta.embedded.html
+ endCaptures:
+ "0":
+ name: punctuation.section.embedded.end.php
+ "1":
+ name: keyword.operator.heredoc.php
+ "2":
+ name: punctuation.definition.string.php
+ begin: (<<<)\s*(HTML)\s*$\n?
+ contentName: text.html
+ beginCaptures:
+ "0":
+ name: punctuation.section.embedded.begin.php
+ "1":
+ name: punctuation.definition.string.php
+ "2":
+ name: keyword.operator.heredoc.php
+ end: ^(HTML)(;?)$\n?
+ patterns:
+ - include: text.html.basic
+ - include: "#interpolation"
+ - name: meta.embedded.xml
+ endCaptures:
+ "0":
+ name: punctuation.section.embedded.end.php
+ "1":
+ name: keyword.operator.heredoc.php
+ "2":
+ name: punctuation.definition.string.php
+ begin: (<<<)\s*(XML)\s*$\n?
+ contentName: text.xml
+ beginCaptures:
+ "0":
+ name: punctuation.section.embedded.begin.php
+ "1":
+ name: punctuation.definition.string.php
+ "2":
+ name: keyword.operator.heredoc.php
+ end: ^(XML)(;?)$\n?
+ patterns:
+ - include: text.xml
+ - include: "#interpolation"
+ - name: meta.embedded.sql
+ endCaptures:
+ "0":
+ name: punctuation.section.embedded.end.php
+ "1":
+ name: keyword.operator.heredoc.php
+ "2":
+ name: punctuation.definition.string.php
+ begin: (<<<)\s*(SQL)\s*$\n?
+ contentName: source.sql
+ beginCaptures:
+ "0":
+ name: punctuation.section.embedded.begin.php
+ "1":
+ name: punctuation.definition.string.php
+ "2":
+ name: keyword.operator.heredoc.php
+ end: ^(SQL)(;?)$\n?
+ patterns:
+ - include: source.sql
+ - include: "#interpolation"
+ - name: comment.block.documentation.phpdoc.php
+ captures:
+ "0":
+ name: punctuation.definition.comment.php
+ begin: /\*\*(?:#@\+)?\s*$
+ end: \*/
+ patterns:
+ - include: "#php_doc"
+ comment: |-
+ This now only highlights a docblock if the first line contains only /**
+ - this is to stop highlighting everything as invalid when people do comment banners with /******** ...
+ - Now matches /**#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate
+ - name: comment.block.php
+ captures:
+ "0":
+ name: punctuation.definition.comment.php
+ begin: /\*
+ end: \*/
+ - name: comment.line.double-slash.php
+ captures:
+ "1":
+ name: punctuation.definition.comment.php
+ match: (//).*?($\n?|(?=\?>))
+ - name: comment.line.number-sign.php
+ captures:
+ "1":
+ name: punctuation.definition.comment.php
+ match: (#).*?($\n?|(?=\?>))
+ - name: meta.interface.php
+ begin: ^(?i)\s*(interface)\s+([a-z0-9_]+)\s*(extends)?\s*
+ beginCaptures:
+ "1":
+ name: storage.type.interface.php
+ "2":
+ name: entity.name.type.interface.php
+ "3":
+ name: storage.modifier.extends.php
+ end: $
+ patterns:
+ - name: entity.other.inherited-class.php
+ match: "[a-zA-Z0-9_]+"
+ - name: meta.class.php
+ begin: (?i)^\s*(abstract|final)?\s*(class)\s+([a-z0-9_]+)\s*
+ beginCaptures:
+ "1":
+ name: storage.modifier.abstract.php
+ "2":
+ name: storage.type.class.php
+ "3":
+ name: entity.name.type.class.php
+ end: $
+ patterns:
+ - captures:
+ "1":
+ name: storage.modifier.extends.php
+ "2":
+ name: entity.other.inherited-class.php
+ match: (?i:(extends))\s+([a-zA-Z0-9_]+)\s*
+ - begin: (?i:(implements))\s+([a-zA-Z0-9_]+)\s*
+ beginCaptures:
+ "1":
+ name: storage.modifier.implements.php
+ "2":
+ name: support.class.implements.php
+ end: (?=\s*\b(?i:(extends)))|$
+ patterns:
+ - captures:
+ "1":
+ name: support.class.implements.php
+ match: ,\s*([a-zA-Z0-9_]+)\s*
+ - name: keyword.control.php
+ match: \b(break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|return|switch|use|while)\b
+ - name: meta.include.php
+ begin: (?i)\b((?:require|include)(?:_once)?)\b\s*
+ beginCaptures:
+ "1":
+ name: keyword.control.import.include.php
+ end: (?=\s|;|$)
+ patterns:
+ - include: "#language"
+ - name: keyword.control.exception.php
+ match: \b(catch|try|throw|exception)|([a-zA-Z_]*Exception)\b
+ - name: meta.function.php
+ endCaptures:
+ "1":
+ name: punctuation.definition.parameters.end.php
+ begin: (?:^\s*)((?:(?:final|abstract|public|private|protected|static)\s+)*)(function)(?:\s+|(\s*&\s*))(?:(__(?:call|(?:con|de)struct|get|(?:is|un)?set|tostring|clone|set_state|sleep|wakeup|autoload))|([a-zA-Z0-9_]+))\s*(\()
+ contentName: meta.function.arguments.php
+ beginCaptures:
+ "6":
+ name: punctuation.definition.parameters.begin.php
+ "1":
+ name: storage.modifier.php
+ "2":
+ name: storage.type.function.php
+ "3":
+ name: storage.modifier.reference.php
+ "4":
+ name: support.function.magic.php
+ "5":
+ name: entity.name.function.php
+ end: \)
+ patterns:
+ - name: meta.function.argument.array.php
+ endCaptures:
+ "0":
+ name: punctuation.definition.array.end.php
+ begin: "(?x)\n\
+ \t\t\t\t\t\t\t\t\t\\s*(array) # Typehint\n\
+ \t\t\t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n\
+ \t\t\t\t\t\t\t\t\t\\s*((\\$+)[a-zA-Z_\\x7F-\\xFF][a-zA-Z0-9_\\x7F-\\xFF]*) # The variable name\n\
+ \t\t\t\t\t\t\t\t\t\\s*(=)\t# A default value\n\
+ \t\t\t\t\t\t\t\t\t\\s*(array)\\s*(\\()\n\
+ \t\t\t\t\t\t\t\t\t"
+ contentName: meta.array.php
+ beginCaptures:
+ "6":
+ name: support.function.construct.php
+ "7":
+ name: punctuation.definition.array.begin.php
+ "1":
+ name: storage.type.php
+ "2":
+ name: storage.modifier.php
+ "3":
+ name: variable.other.php
+ "4":
+ name: punctuation.definition.variable.php
+ "5":
+ name: keyword.operator.assignment.php
+ end: \)
+ patterns:
+ - include: "#strings"
+ - include: "#numbers"
+ - name: meta.function.argument.array.php
+ captures:
+ "6":
+ name: constant.language.php
+ "7":